Open folin03 opened 1 year ago
A little update, I have run few more tests and none of the event listeners are triggered on Android.
Does your device support connection service? you can check that calling the RNCallKeep.supportConnectionService(); method. Also, you can listen to the createIncomingConnectionFailed event and check for errors.
Yes the device runs Android 12 and it supports ConnectionService. createIncomingConnectionFailed is never fired but also onCreateIncomingConnection is never fired. On android I don't get any events e.g. after calling endCall endCall event listener is not trigered but it works fine on iOS. It used to work. I haven't work on the Android side of he app for few months. Last it was tested on Android 11. I updated to Android 12. The app ment to go for release so I run last test and found out this disaster.
I had the same problem when RNCallKeep.displayIncomingCall
fired but showIncomingCallUi
listener doesn't. I found a message in native android logs about calling displayIncomingCall
with the following:
[RNCallKeepModule] sendEventToJS, eventName: RNCallKeepShowIncomingCallUi, bound: true, hasListeners: false
So I saw hasListeners: false and just moved RNCallKeep.setup()
and RNCallKeep.addEventListener('showIncomingCallUi', ...)
to main index.js
file of my react native app, and it fixed this issue.
Description
I run RNCK in self-mode.
after calling
showIncomingCallUi is never fired. I listen to it. Throughout the logs I didn't find any error but also I do not get how is the event fired. displayIncomingCall in native modules runs ok but does not fire showIncomingCallUi. for test I have triggered the showIncomingCallUi manualy on the bottom of native displayIncomingCall function and as expected that triggered my code in RN when I ended the call by calling RNCallKeep.endCall(uuid); android log gave me this:
[RNCallKeepModule] endCall called, uuid: 88804f55-e449-4233-980b-808a46174abf [RNCallKeepModule] endCall ignored because no connection found, uuid: 88804f55-e449-4233-980b-808a46174abf
Would you have any suggestion where to look to fix it?