masashi-sutou / flutter_ios_voip_kit Goto Github PK
View Code? Open in Web Editor NEWOne-to-one video call using CallKit and PushKit with flutter iOS app.
License: MIT License
One-to-one video call using CallKit and PushKit with flutter iOS app.
License: MIT License
I'm getting SSL error after using the following command you provided but it was working fine last time I used.
Sometimes it fails to get Voip token from following method:
FlutterIOSVoIPKit.instance.getVoIPToken(). Do you have nay idea why so?
How I can set call type like incoming call is audio/video
@masashi-sutou First of all, thanks for this package. The issue I am facing is I have to navigate to the app when user accept the call from the lock screen. But in the current scenario, app stays in the native iOS Ui. Actually, I need to authenticate the app, then initiate the call with Agora.
Is there something like this like in Firebase Cloud Messaging?
Hi,
In
i.e. voIPKit.testIncomingCall
, we don't have to do anything like:
self.voIPCenter.callKitCenter.incomingCall(uuidString: uuid,
callerId: callerId,
callerName: callerName) { (error)
or are we triggering the native incoming call UI in onDidReceiveIncomingPush
? My understanding is that's where I will be calling my own logic, in this case re-connecting my SIP User Agent.
Thanks.
I'm getting this error whn try Incomming call.
testIncomingcall function
voIPKit.testIncomingCall(
uuid: '12345',
callerId: dummyCallId,
callerName: dummyCallerName,
);
App getting terminate and producing this error
2021-03-02 01:58:29.498665+0600 Runner[873:430465] flutter: ๐ testIncomingCall: 12345, 123456, Dummy Tester
Fatal error: Unexpectedly found nil while unwrapping an Optional value: file /Users/johnsmith/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_ios_voip_kit-0.0.5/ios/Classes/CallKitCenter.swift, line 80
2021-03-02 01:58:29.503963+0600 Runner[873:430368] Fatal error: Unexpectedly found nil while unwrapping an Optional value: file /Users/johnsmith/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_ios_voip_kit-0.0.5/ios/Classes/CallKitCenter.swift, line 80
(lldb)
Please let me know the solution
The following message comes from XCode 14 on iOS 16 iPhone
libsp.dylib`spd_checkin_socket.cold.1:
0x2235d8364 <+0>: adrp x8, 141669
0x2235d8368 <+4>: adrp x9, 0
0x2235d836c <+8>: add x9, x9, #0xa3f ; "Linked against modern SDK, VOIP socket will not wake. Use Local Push Connectivity instead"
0x2235d8370 <+12>: str x9, [x8, #0x400]
-> 0x2235d8374 <+16>: brk #0x1
when I get incoming call and try to accept, can't track the event
voIPKit.onDidAcceptIncomingCall
Please guide me to event handling
Hi!
I use your plugin to integrate it with Agora. But the problem is when device is locked - I answer and ant to play audio message that will help users to understand that they need to tap voip button or video call to get to app.
I tried audio_service for playing sound in background. It works as expected, but after it - all voip event handlers (on Accept etc stop working) Seems there is conflict with isolate or receive port.
Can you help, please
Just to say thanks for this. Will be trying out this week and next and looks better than:
https://pub.dev/packages/flutter_voip_push_notification
and
I'm using firebase messaging and agora engine package for push notification and call.
unfortunately, that packages not support on background mode.
yours package can help me voip push but haven't a node js serve.
currently I just use laravel serve for my backend.
have a nice day !
Thank for your effort to builded this package
I want to make a video calling service with this and agora for this I need to pass token, channel. I'm passing those through apple but how can I receive those here when accept call
This is the json format I'm passing. How can I access the person object data. How can I access the "Token" object data from my app
{
"aps": {
"alert": {
"uuid" : "ddd",
"incoming_caller_id" : "dddds",
"incoming_caller_name" : "ddd"
},
"sound": "default"
},
"Token": {
"channel": "taddd",
"token": "token123",
"uid": "123"
}
}
how I can get that voip notification is received.
How To prevent showing a VoIP (Voice over IP) notification when your Flutter app is open on iOS
i'm using the @parse/node-apn
npm package in my firebase cloud function to request for a push.
i seem to be getting 'notifs sent: 0 failed: 1' when printing results.sent
and results.failed
.
i'm pretty sure that the VoIP Token being used is the one produced by the voip_kit instance (i checked logs).
please can someone confirm whether I'm calling the APNs properly? any idea where the problem could be?
const options = {
token: { // hidden for privacy
key: __dirname + "/../AuthKey_SECRET_KEYID.p8",
keyId: "SECRET_KEYID",
teamId: "SECRET_TEAMID",
},
production: true,
};
const apnProvider = new apn.Provider(options);
export const apncallpush = functions.https.onRequest(async (req, res) => {
const callerid = req.body.callerid;
const callername = req.body.callername;
const callertoken = req.body.calleetoken;
const note = new apn.Notification();
const deviceToken = `${callertoken}`
note.payload = {
"aps": {
"alert": {
"uuid": `f579cc8c-7127-4ca3-a9f5-dd4a591a2567`,
"incoming_caller_id": `${callerid}`,
"incoming_caller_name": `${callername}`,
},
},
};
note.contentAvailable = true;
note.expiry = Math.floor(Date.now() / 1000) + 60;
note.priority = 10;
note.pushType = "voip";
note.topic = "BUNDLE_ID.voip"; // hidden for privacy
apnProvider.send(note, deviceToken).then((result) => {
const r = `DONE! notifs sent: ${result.sent.length} failed: ${result.failed.length}`;
console.log(r);
}).catch(() => {
console.log('NOPE notif not sent');
});
and i only have 1 iOS device not 2, so sadly i cant try out the example app.
i also tried the CURL command mentioned in the doc. it connects to api.sandbox.apple and my .pem certificate verifies OK.
finally it outputs:
* Connection state changed (MAX_CONCURRENT_STREAMS == 1000)!
* We are completely uploaded and fine
< HTTP/2 200
< apns-id: A2ED1505-EE9D-CD19-955B-84669C7322A2
<
* Connection #0 to host api.sandbox.push.apple.com left intact
* Closing connection 0
I got this error: "Killing app because it never posted an incoming call to the system after receiving a PushKit VoIP push callback"
Can I get uuid/callerId when click accept from background for do something with data.
Hi,
I've edited the example via Xcode to use our app identifier and did flutter run
after changing the Signing Team
. It just sits at getVoIPToken
when I go to Your Callee
page.
I've generated a VoIP Certificate, so I can test notifications like so:
curl -v \
-d '{"aps":{"alert":{"incoming_caller_id":"01224123456","incoming_caller_name":"Gavin Henry"}}}' \
-H "apns-push-type: voip" \
-H "apns-expiration: 0" \
-H "apns-priority: 0" \
-H "apns-topic: my_valid_identifier.voip" \
--http2 \
--cert ./my_valid_identifier.voip.pem \
https://api.sandbox.push.apple.com/3/device/9727245afdd86fe042950bcaaae5b0ec7762fd2ef6659cd6f01f033303621542
which results in:
* Server certificate:
* subject: CN=api.development.push.apple.com; OU=management:idms.group.533599; O=Apple Inc.; ST=California; C=US
* start date: Apr 17 17:37:51 2019 GMT
* expire date: May 16 17:37:51 2021 GMT
* subjectAltName: host "api.sandbox.push.apple.com" matched cert's "api.sandbox.push.apple.com"
* issuer: CN=Apple IST CA 2 - G1; OU=Certification Authority; O=Apple Inc.; C=US
* SSL certificate verify ok.
* Using HTTP2, server supports multi-use
* Connection state changed (HTTP/2 confirmed)
* Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0
* Using Stream ID: 1 (easy handle 0x55ad3c2ec460)
> POST /3/device/9727245afdd86fe042950bcaaae5b0ec7762fd2ef6659cd6f01f033303621542 HTTP/2
> Host: api.sandbox.push.apple.com
> User-Agent: curl/7.66.0
> Accept: */*
> apns-push-type: voip
> apns-expiration: 0
> apns-priority: 0
> apns-topic: my_valid_identifier.voip
> Content-Length: 94
> Content-Type: application/x-www-form-urlencoded
>
* Connection state changed (MAX_CONCURRENT_STREAMS == 1000)!
* We are completely uploaded and fine
< HTTP/2 400
< apns-id: B7168B2F-0353-68ED-76C2-0B26B0E8D90B
<
* Connection #0 to host api.sandbox.push.apple.com left intact
{"reason":"DeviceTokenNotForTopic"}
Now that is the correct device id for my test iPhone 8 as I ran the example previously before changing the identifier. What have I missed? The cert was created against the correct identifier on https://developer.apple.com/account/resources/certificates/add
Thanks.
Function not working whenever receive voip call notification.
It would be cool, to have a "discussion" tab for that package, so questions about the usage can be posted there instead of the "issues" tab. It can be activated within the project settings.
Default, the callkit uses default sound from device.
so, how can we change it to others sound on incoming call page?
first, thanks for this amazing package
have been studying this package for over two days now, and I found some interesting challenges I can't seem to wrap my head around,
2)Is the Device token unique to the user or to the app?
Is Device Token the same as VoIP Token? and How do I get VoIP Token?
I have seen some code snippets of how the Nodejs server sends a request to APNs but none show how to connect the flutter app to Nodejs. Please how do use this package along with my app make a connection to the Nodejs server
What have done so far
Please your insight, article, or video will really be helpful
Voip Alerts received when app is in the background or foreground but Event Handlers onDidAcceptIncomingCall, onDidRejectIncomingCall not called when we accept or reject the call.
Voip Alert not received when app is terminated. Also app is crashing after that.
Please upgrade it to support null safety
Running "flutter pub get" in SureVoIP-Talk... 0.9s
The plugin `flutter_ios_voip_kit` doesn't have a main class defined in /home/ghenry/development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_ios_voip_kit-0.0.4+1/android/src/main/java/netkeepingblog/flutter_ios_voip_kit/FlutterIOSVoIPKitPlugin.java or /home/ghenry/development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_ios_voip_kit-0.0.4+1/android/src/main/kotlin/netkeepingblog/flutter_ios_voip_kit/FlutterIOSVoIPKitPlugin.kt. This is likely to due to an incorrect `androidPackage: netkeepingblog.flutter_ios_voip_kit` or `mainClass` entry in the plugin's pubspec.yaml.
If you are the author of this plugin, fix the `androidPackage` entry or move the main class to any of locations used above. Otherwise, please contact the author of this plugin and consider using a different plugin in the meanwhile.
My application required to video call, not audio call. Need face to face.
So i want to know. How can i redirect to my application once the call is accepted at locked screen, pull-down screen?
Is there any option for that?
I have tried re-install app.
Your Example App is working in Foreground only not in Background( when app is closed)
I did receive some message in console but app is not invoked
I have added Background and VOIP capabilities.
My Server Code
var apn = require("apn");
var deviceToken = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
let provider = new apn.Provider(
{
token: {
key: "AuthKey_XXXXXXXXX.p8",
keyId: "XXXXXXXXX",
teamId: "XXXXXXXXXXX",
cert:"voip_services.pem"
},
production: false
});
let notification = new apn.Notification();
notification.rawPayload = {
"aps": {
"alert": {
"uuid": "xxxxxxxxxxxxxxxxx",
"incoming_caller_id": "123456789",
"incoming_caller_name": "Shivam",
},
"badge":2,
'content-available': 1,
"data": {
"appointment_id": "47",
"caller_name": "Shivam",
"appointmentUUId": "22222222222222",
"caller_id": "44",
"type": "TO_DOCTOR",
"click_action": "FLUTTER_NOTIFICATION_CLICK",
},
}
};
notification.pushType = "voip";
notification.topic = "com.xxxxx.XXXXXXXXX.voip";
notification.expiry = 0;
notification.priority = 5;
provider.send(notification, deviceToken).then((err, result) => {
if (err) return console.log(JSON.stringify(err));
return console.log(JSON.stringify(result))
});
I'm using the getVoIPToken()
method and it returns a null token every time,
what could be causing this?
Any one know why this PR wasn't submitted yet, but just released on pub.dev?
Could you please separate this function into a separate one? So it is possible to customize the incoming screen when the foreground and backgroud should be displayed.
File: flutter_ios_voip_kit/ios/Classes/VoIPCenter.swift
Line 85 and line 106:
self.callKitCenter.incomingCall(uuidString: info?["uuid"] as! String,
callerId: info?["incoming_caller_id"] as! String,
callerName: callerName).
Currently, i cannot disable default incoming of CallKit when app run at foreground.
whenever I received VOIP push notification my device getting disconnected. Can u please tell me the reason?
Thank you in advance
[onDidReceiveIncomingPush] is not called when the app is not running then how can I get voip notification payload data while incoming accept call.
I don't see any of these here for CallKit?
Thanks.
Whenever app is in terminated state and I hit Voip notification, it successfully hits on my device and shows calling screen. But on accepting call it doesnt hit callback events onDidReceiveIncomingPush and onDidAcceptIncomingCall. Can you please help?
Can I get uuid/callerId when click accept from background for do something with data.
When I have not started the app once and a call comes in, the call kit is still on but my app does not
Hi,
At:
https://github.com/masashi-sutou/flutter_ios_voip_kit#3-add-new-image-set-for-callkit
can you provide more guidance?
Thanks.
I can only get payload (as i can see) from onDidReceiveIncomingPush
method, but this method is not working when app is not running. Can you explain please?
Hi!
When my app is in foreground I show custom calling view, and receiving void push notification.
So, user can answer via push or directly via app.
endCall()
? I tried acceptIncomingCall()
with no luck(A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.