Someone, please help!
answerCall event is not firing in Android only. When we call displayIncomingCall and the incoming call shows on Android, and when we press the call end button, the endCall event is firing, but when we press the call-accept button, it stays there on the call screen and nothing happens. And the answerCall event is not firing.
Please help, we've tried all the solutions, nothing is working.
And this is my code:
// Register background handler
messaging().setBackgroundMessageHandler(async remoteMessage => {
console.log('Message handled in the background!', remoteMessage);
const callUUID = uuid.v4().toLowerCase()
const number = String(Math.floor(Math.random() * 100000))
RNCallKeep.displayIncomingCall(callUUID, number, number, 'number', false);
// await Linking.openURL("awesome://");
DeviceEventEmitter.addListener("answerCall", (payload) => {
console.log('answerCall', payload); // it doesn't run here
});
});
AppRegistry.registerComponent(appName, () => App);
This very helpful block, it helps me to implement. you can try this
https://blog.theodo.com/2021/03/react-native-incoming-call-ui-callkeep/