-
Notifications
You must be signed in to change notification settings - Fork 67
CallKit actions not always getting executed. #64
Comments
@henrikbjorn were you able to figure this out? Are you using the react-native-pjsip library? I'm working on a SIP calling app that uses that library. |
Yeah we are using One of the things we found was that answering a call through CallKit needs to wait for |
We also found that this was important #66 On the first run from xcode it would work correctly, but on every subsequent reload of the device (via the debug menu) Callkit would be confused. This fixes this problem |
Also out |
@henrikbjorn thank you sir! |
Another observation. When you are entering background you need to delete accounts which takes time. So you need to extend the background processing time by doing something like this: - (void)applicationWillEnterForeground:(UIApplication *)application {
[self endBackgroundTask];
}
- (void)applicationDidEnterBackground:(UIApplication *)application {
// Create a background task and deregister the pjsip registrations
[self extendBackgroundRunningTime];
}
- (void)endBackgroundTask {
if (self.backgroundUpdateTask != UIBackgroundTaskInvalid) {
[[UIApplication sharedApplication] endBackgroundTask:self.backgroundUpdateTask];
self.backgroundUpdateTask = UIBackgroundTaskInvalid;
}
}
- (void)extendBackgroundRunningTime {
if (self.backgroundUpdateTask != UIBackgroundTaskInvalid) {
return;
}
self.backgroundUpdateTask = [[UIApplication sharedApplication] beginBackgroundTaskWithName:@"Unregistrations" expirationHandler:^{
[self endBackgroundTask];
}];
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
[NSThread sleepForTimeInterval:5.0f];
[[UIApplication sharedApplication] endBackgroundTask:self.backgroundUpdateTask];
self.backgroundUpdateTask = UIBackgroundTaskInvalid;
});
} |
When you receive a push notification from push kit, the app will not change state from background. So you need to register/create an account when that happens, if the user tries to answer the call via callkit. |
Here its not working also sometimes the endAllCalls function works but sometimes not |
@LFSCamargo #66 this one is important if you are reloading your app in development mode. Without this CallKit will be confused and nothing works correctly. |
Hey, thanks for the package.
I am seeing a couple of different issues while using the library.
CallKit.endCall
the phone still thinks there is a call active and gets confused.CallKit.displayIncomingCall
often it will instantly flash the ui as an overlay and then show the app, and then show the actual overlay. This can also be seen by the many triggers ofAppState
changes.AVAudioSession
It is not clear to me how this works together withpjsip
. Also it seems that the created audio session is not destroyed.CallKit.displayIncomingCall
sometimes does nothing. Even though the uuids are the same.The text was updated successfully, but these errors were encountered: