react-native-callkeep icon indicating copy to clipboard operation
react-native-callkeep copied to clipboard

App not opened on answer after unlocking ios device

Open tuneerclixlogix opened this issue 4 years ago • 14 comments

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 .

tuneerclixlogix avatar Jan 28 '21 12:01 tuneerclixlogix

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 .

umairlive490 avatar Mar 01 '21 06:03 umairlive490

Did you found any solution ? @umairlive490

tuneerclixlogix avatar Mar 15 '21 06:03 tuneerclixlogix

Yes, any luck?

m4r00p avatar Jun 10 '21 11:06 m4r00p

Is there a solution?

timorss avatar Oct 31 '21 14:10 timorss

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

gabrielelana avatar Dec 31 '21 11:12 gabrielelana

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.

KeKam avatar Feb 04 '22 09:02 KeKam

Wouldn't setting hadVideo: YES in reportNewIncomingCall within AppDelegate.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

gabrielelana avatar Feb 06 '22 08:02 gabrielelana

thanks @gabrielelana , it's really importaint answer to me. love u so much <3

fukemy avatar Oct 26 '22 18:10 fukemy

@gabrielelana , not worked to me. I changed hasVideo = true in AppDelegate, but still not working, I am using pushkit

fukemy avatar Oct 26 '22 18:10 fukemy

@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

gabrielelana avatar Nov 18 '22 08:11 gabrielelana

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
   }];

MrGru avatar Nov 23 '22 12:11 MrGru

+1, any news for does that have not got it to open the app after unlocking the screen on received call?

AndreasKarlzzon avatar Jan 31 '23 10:01 AndreasKarlzzon

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?

aromero-braintly avatar Jun 16 '23 19:06 aromero-braintly

@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

MinhThu100200 avatar Oct 30 '23 03:10 MinhThu100200