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

RNCallKeep.backToForeground() doesn't work as expected always.

Open Raj2631 opened this issue 2 years ago • 5 comments

Bug report

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

  • Reproduced on:

  • [x] Android

  • [ ] iOS

Description

When a call is initiated when the app is in background or in a completely closed state, the callkeep UI is invoked. When the call is accepted, the required behavior is that it must open our app and callkeep must handle the call through background and it must show the app's screen to the user instead of the callkeep UI.

I'm using the RNCallKeep.backToForeground() function for that.

RNCallKeep.addEventListener('answerCall', () => {
    RNCallKeep.backToForeground();
    // Navigating to the required page on app  after this.
});

This invokes the app and navigates to the necessary screen when a call is answered (Although sometimes even this behavior is random, and it doesn't open the app always) but then the audio stops going through. The mic is active as it shows that the phone is using your microphone, but audio is not captured by the microphone. We're using Agora to connect VOIP calls, the audio issue only comes up while using Callkeep and not when we handle the calls ourselves, so maybe Callkeep is interfering with agora's audio channels.

Note: This is only happening on Android, not on iOS devices.

Steps to Reproduce

Versions

- Callkeep: "^4.3.8",
- React Native: "0.71.6",
- Android: 13 (could be reproducing in rest too, not sure)
- Phone model: SM-A528B/DS & M2101K6P

Logs

No logs.

Raj2631 avatar May 03 '23 07:05 Raj2631

I'm also facing the same issue

vamsimudadla avatar May 03 '23 07:05 vamsimudadla

facing same issue

sundram123789 avatar Jul 07 '23 10:07 sundram123789

facing same issue

chutuananh0310 avatar Apr 17 '24 06:04 chutuananh0310

facing same issue

chutuananh0310 avatar Apr 24 '24 03:04 chutuananh0310