react-native-callkeep icon indicating copy to clipboard operation
react-native-callkeep copied to clipboard

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

Open JNitinSharma opened this issue 2 years ago • 7 comments

Bug report

  • [ ] I've checked the example to reproduce the issue.

  • Reproduced on:

  • [ y ] Android

  • [ ] iOS

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

JNitinSharma avatar Apr 05 '23 07:04 JNitinSharma

I'm also facing the same issue

devilabhi avatar Apr 06 '23 09:04 devilabhi

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.

RamsayRomero avatar May 01 '23 23:05 RamsayRomero

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

gokulnath-t avatar May 03 '23 07:05 gokulnath-t

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.

RamsayRomero avatar May 04 '23 16:05 RamsayRomero

The SDK is not providing any support, not good.

devilabhi avatar Jun 09 '23 11:06 devilabhi

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

danilvalov avatar Feb 05 '24 12:02 danilvalov