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

I want to redirect into my application when user accept call. not to native calling screen

Open saurabh874 opened this issue 5 years ago • 16 comments

Hi I am using react-native v-0.61.4 with react-native-callkeep. is there anyway to redirect into own application when user accept call. not to native calling screen?

saurabh874 avatar Oct 28 '20 10:10 saurabh874

yes, use RNCallKeep.backToForeground();(Android only) method. this method will bring your app on the top of the native call screen.

samad324 avatar Oct 29 '20 09:10 samad324

@samad324 thanks but in iOS. it always open native call kit. when app is in back-ground or kill state. do you have any idea how to resolve it and will it be possible to remove native call screen when accept a call?

saurabh874 avatar Oct 29 '20 09:10 saurabh874

add answerCall listener in your app and redirect on your call screen. it will automatically direct you on your app.

 RNCallKeep.addEventListener('answerCall', async ({callUUID}) => {
     this.props.navigation.navigate('Video');
});

samad324 avatar Oct 29 '20 09:10 samad324

but it is not working when app is in kill mode or phone locked.

saurabh874 avatar Oct 29 '20 09:10 saurabh874

ohh.. my app is working fine when app is killed, but yes i'm facing the issue when phone is locked. and trying to resolve it as well. Kindly comment here if you will find any solution.

samad324 avatar Oct 29 '20 09:10 samad324

Sure @samad324

saurabh874 avatar Oct 29 '20 09:10 saurabh874

@saurabh874 hi, i saw the behaviour of the WhatsApp and Skype on lock screen, and they behaved same. if you want see your app you need to unlock your device.

samad324 avatar Nov 06 '20 07:11 samad324

Any update @samad324 ? I am still facing this issue. I receive a push on locked ios, slide to answer, enter the passcode and the app does not opens. TIA

agamsps avatar Jan 12 '21 10:01 agamsps

Sorry, @agamsps , I got switched to another project and I don't know how they handle this.

samad324 avatar Jan 12 '21 10:01 samad324

When phone is locked, there's no way to open app directly from PN. https://stackoverflow.com/questions/41740139

There will be an icon in the native dialer, if user click on that icon, the phone will show unlock screen and if user unlock the phone, app will be shown. There's a config imageName when you setup CallKeep, which map to the objective C iconTemplateImageData to customize the image of that icon.

namnm avatar Jan 12 '21 12:01 namnm

@agamsps see my solution in last comment of #355

gabrielelana avatar Jan 11 '22 18:01 gabrielelana

@gabrielelana Great info. Thanks for sharing

namnm avatar Jan 11 '22 18:01 namnm

@samad324 I can not bring to my call screen in case app killed. I dont know why, can not debug with app killed. Other case work fine, can u help?

fukemy avatar Oct 18 '22 14:10 fukemy