react-native-callkeep
react-native-callkeep copied to clipboard
App not opened on answer after unlocking ios device
When the device is locked and there is any incoming call, i answered the call and then unlocked the screen but the application was in background state
Expected Behaviour: After unlocking the device it should be in the foreground state .
Same issue for me. When the device is locked and there is any incoming call, i answered the call and then unlocked the screen but the application was in background state.After unlocking the device it should be in the foreground state .
Did you found any solution ? @umairlive490
Yes, any luck?
Is there a solution?
Solved this yesterday, got an hint from the WhatsApp behaviour
TLDR
RNCallKeep.displayIncomingCall(
UUID,
'Caller Number',
'Caller Name',
'generic',
true // <- THIS IS THE MAGIC
);
Apparently you need to tell iOS that your call is a video call, and since (I guess) it has no way to tell how do you want to display the video streams, it will bring the specific application in foreground.
The following is the behaviour that I managed to have (close to what I have on Android):
Ring -> Answer -> Unlock -> Application
Before I was only able to have:
Ring -> Answer -> Native Call UI -> Press Application Button (bottom right) -> Unlock -> Application
A huge improvement in usability
Solved this yesterday, got an hint from the WhatsApp behaviour
TLDR
RNCallKeep.displayIncomingCall( UUID, 'Caller Number', 'Caller Name', 'generic', true // <- THIS IS THE MAGIC );
Apparently you need to tell iOS that your call is a video call, and since (I guess) it has no way to tell how do you want to display the video streams, it will bring the specific application in foreground.
The following is the behaviour that I managed to have (close to what I have on Android):
Ring -> Answer -> Unlock -> Application
Before I was only able to have:
Ring -> Answer -> Native Call UI -> Press Application Button (bottom right) -> Unlock -> Application
A huge improvement in usability
Wouldn't setting hadVideo: YES
in reportNewIncomingCall
within AppDelegate.m
not achieve the same behaviour? Cause it doesn't.
Wouldn't setting
hadVideo: YES
inreportNewIncomingCall
withinAppDelegate.m
not achieve the same behaviour? Cause it doesn't.
You mean hasVideo: YES
?
Don't know, didn't tried that, I use data-only push notifications, not voip notifications
thanks @gabrielelana , it's really importaint answer to me. love u so much <3
@gabrielelana , not worked to me. I changed hasVideo = true in AppDelegate, but still not working, I am using pushkit
@fukemy I don't know exactly what you do in AppDelegate, but note that what works for me is probably different: I set the flag when I need to display the incoming call RNCallKeep.displayIncomingCall
and I do that when I receive the push notification. Hope this helps
If you are using reportNewIncomingCall
in AppDelegate. you should change: hasVideo = true, fromPushKit: NO
[RNCallKeep reportNewIncomingCall:uuid
handle:@"app name"
handleType:@"generic"
hasVideo:true <---- change this line
localizedCallerName:@"caller name"
supportsHolding:NO
supportsDTMF:NO
supportsGrouping:NO
supportsUngrouping:NO
fromPushKit:NO <---- change this line
payload:NULL
withCompletionHandler:completion
and use imageName = icon user can click to open the app, in the setup function: the icon should be transparent
[RNCallKeep setup:@{
@"appName": @"Video Visit",
@"imageName": @"call.png", <--- Change this line
@"maximumCallGroups": @1,
@"maximumCallsPerCallGroup": @1,
@"supportsVideo": @YES, <--- Change this line
@"displayCallReachabilityTimeout":@60000
}];
+1, any news for does that have not got it to open the app after unlocking the screen on received call?
Solved this yesterday, got an hint from the WhatsApp behaviour
TLDR
RNCallKeep.displayIncomingCall( UUID, 'Caller Number', 'Caller Name', 'generic', true // <- THIS IS THE MAGIC );
Apparently you need to tell iOS that your call is a video call, and since (I guess) it has no way to tell how do you want to display the video streams, it will bring the specific application in foreground.
The following is the behaviour that I managed to have (close to what I have on Android):
Ring -> Answer -> Unlock -> Application
Before I was only able to have:
Ring -> Answer -> Native Call UI -> Press Application Button (bottom right) -> Unlock -> Application
A huge improvement in usability
Hi, this worked for me on version 4.1.0 but won't work on 4.3.1. I needed to update to be able to route audio through bluetooth, so it's not an option for me to downgrade. Did anyone have better luck trying to solve this?
@AndreasKarlzzon I think because you try to turn off the default call screen by calling endCall event when the receiver answers the calling. I faced this issue so I still keep default call screen