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

Android: launch main activity when got video call notification when app is closed

Open gentlee opened this issue 8 months ago • 3 comments

  1. Android app is closed (same with minimized on latest android)
  2. We receive call start notification with react-native-firebase/messaging
  3. We display incoming call with this lib
  4. User answers

Expected result:

we open app (MainActivity) with video call.

Actual result:

native call fullscreen is shown app Is not opened and no idea how to open it from background notification in latest Android.

Any thoughts?

gentlee avatar Apr 16 '25 16:04 gentlee

Here is how I solved it:

This patch adds activityToOpenOnAnswer prop to setup settings (in com.test.app.MainActivity format), which forces opening provided activity when user answers a call. Tested on android 11 and 15 - works perfectly. Also, it makes additionalPermissions prop optional.

react-native-callkeep+4.3.16.patch

gentlee avatar Apr 21 '25 18:04 gentlee

with this, does it let you connect the call? on my phone it just launches the app behind the native dialer. My signalling happens on the react native side so I don't know if you maybe used something else that handles the signalling natively

davidofir avatar Aug 18 '25 00:08 davidofir

yes it does, you need to follow this lib docs to configure handling calls

gentlee avatar Aug 26 '25 19:08 gentlee