react-native-callkeep
react-native-callkeep copied to clipboard
App stuck after answering the call with incoming call screen.
Bug report
- Reproduced on:
- [ ] Android
Description
Answering the call from the incoming UI display on android was not navigating me to the app, the UI acted as if I had never answered the call.
I have tried with these methods(endCall(), endAllCall()) for dismiss the call in "answerCall" listener but incoming UI still displayed.
Steps to Reproduce
https://user-images.githubusercontent.com/25957550/158823274-f33e85f1-e170-4465-aa4f-9f42912976da.mp4
Here is my coding:
messaging().setBackgroundMessageHandler(handleRemoteMessage);
export async function handleRemoteMessage(notification) {
console.log(
bg notification: ${JSON.stringify(notification)}, platform: ${ Platform.OS }, ${new Date().toDateString()}
,
);
const stringifiedData = notification?.data?.['pinpoint.jsonBody']; const parsedNotification = JSON.parse(stringifiedData || '{}'); const parsedData = JSON.parse(parsedNotification.data); RNCallKeep.displayIncomingCall( parsedData.meetingId, parsedData.callerName, parsedData.callerName, 'number', false, ); }
const onAnswerCall = async ({callUUID}) => { RNCallKeep.endCall(callUUID); // RNCallKeep.endAllCalls();
navigation.navigate('CallPage', { callFromNotification: true }); };
Versions
- Callkeep: "4.3.2"
- React Native: "0.63.4"
- Android: Android 10
- Phone model: MI A1
Logs
Paste here
Yes, I have tried these methods(endCall(), endAllCall()) to dismiss the call in "answerCall" listener but incoming UI is still displayed too. Have you solved this problem yet?
@trandinhhiep789 same here! did you find any solution ?
same here :( any solution ?
Hey guys,
I've been having the same issue, but managed to get it working with the "setCurrentCallActive"
You could add it on the answer event listener.
const answerCall = () => {
RNCallKeep.setCurrentCallActive("YOUR CALL UUID");
}
Hi there! A year later, we're still having this issue, after some digging on my side, it appears that the 'endCall' listener is being triggered immediately after displayIncomingCall
has been called. I've added logs here (#626) but didn't find any solution yet (@convertcompany solution did not work for me as the issue happens before the "answer call" button is tapped)