react-native-webrtc/react-native-callkeep

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

Opened this issue · 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?

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

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

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