react-native-webrtc / react-native-callkeep

iOS CallKit framework and Android ConnectionService for React Native
ISC License
922 stars 444 forks source link

DisplayIncomingCall not working in Android when APP is in Killed state. #682

Open JNitinSharma opened 1 year ago

JNitinSharma commented 1 year ago

Bug report

Description

I am trying to make a app using audio video call feature. I have used the React-native-callkeep to inform the reciever about the call. flow of the call goes like : when caller hit the call initiate button reciever gets an FCM Push notification with data to join the Room

I want to awake the reciever screen when reciever App is in killed state. for which I'm using react-native-callkeep. I'm calling displayIncomingCall() function to awake the screen it is working fine in IOS but not working in Android when App is in killed state.

//function to call the incoming call screen

export const Display = async (uuid, handle, localizedCallerName) =>{ RNCallKeep.displayIncomingCall(uuid,handle,localizedCallerName) } // inside index.js messaging().setBackgroundMessageHandler(async(data) => {

if (data.data?.description == "audio" || data.data?.description == "video") {

Platform.OS == "android" ? Display("11edc52b-2918-4d71-9058-f7285e29d894","Shadowz Calling", data?.data?.sent_by_name) : Display("11edc52b-2918-4d71-9058-f7285e29d894","Shadowz Calling", data?.data?.sent_by_name,"number","false") } })

Steps to Reproduce

Versions

- Callkeep: 4.3.8  
- React Native: 0.67

Logs

Paste here
devilabhi commented 1 year ago

I'm also facing the same issue

RamsayRomero commented 1 year ago

It works for me in killed state. Try calling RNCallKeep.setup before calling RNCallKeep.displayIncomingCall. Also make sure you are sending a high priority FCM.

gokulnath-t commented 1 year ago

I used native code to receive incoming call in both android and iOS. the library is callkit for iOS.

RamsayRomero commented 1 year ago

I used native code to receive incoming call in both android and iOS. the library is callkit for iOS.

That's the whole point of this library though. Callkeep uses Callkit under the hood.

devilabhi commented 1 year ago

The SDK is not providing any support, not good.

danilvalov commented 9 months ago

I had the same problem. And I solved it using this library to show custom incoming video call activity (it works correctly in killed state): https://github.com/linhvovan29546/react-native-full-screen-notification-incoming-call/blob/5d9ee46cb4f37e847ae0c237afd5c24108632f2a/example/src/services/CallKeepService.ts#L109-L124