react-native-callkeep
react-native-callkeep copied to clipboard
I want to redirect into my application when user accept call. not to native calling screen
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?
yes, use RNCallKeep.backToForeground();(Android only) method. this method will bring your app on the top of the native call screen.
@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?
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');
});
but it is not working when app is in kill mode or phone locked.
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.
Sure @samad324
@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.
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
Sorry, @agamsps , I got switched to another project and I don't know how they handle this.
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.
@agamsps see my solution in last comment of #355
@gabrielelana Great info. Thanks for sharing
@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?