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

Android 12 native call UI

Open saribalorhan opened this issue 2 years ago • 5 comments

Bug report

  • ☑ I've checked the example to reproduce the issue.

  • Reproduced on:

  • ☑ Android

  • ☐ iOS

Description

Android native call screen does not come when the app is killed status but the headless task is activated and the app wakes up in the background. I can see the console logs in debug mode, but the application does not come to the foreground. Native call screen does not appear.

If the application is in the background or foreground status, there is no problem. This problem I mentioned only happens on android 12 devices and when the application is closed. Previous android versions also working fine.

also checked

if (!RNCallKeep.supportConnectionService()) {
    console.warn("ConnectionService not supported!");
}

if (!RNCallKeep.hasPhoneAccount()) {
    console.warn("No phone account!");
}

above methods are not entering if blocks. So, I assume these conditions are ok.

Steps to Reproduce

standard install instructions

Versions

- Callkeep: 4.3.3
- React Native: 0.63.2
- iOS: -
- Android: 12
- Phone model:  Samsung Galaxy S20+

Logs

Paste here

saribalorhan avatar Jun 02 '22 12:06 saribalorhan

~I am having the same issue on Samsung Galaxy A32 5G~ see below

glesperance avatar Jun 22 '22 04:06 glesperance

Update: turns out my problem was related to some other interactions with my app.

glesperance avatar Jun 30 '22 03:06 glesperance

#576 -> if I do related request steps, working fine too. But I don't want to edit node modules actually.

@glesperance can you share what did you do to fix this issue?

saribalorhan avatar Jun 30 '22 05:06 saribalorhan

@saribalorhan My issue was related to some initialization problems with Firebase Cloud Messaging. On Android I use FCM to notify the user of an incoming call and -- although I did not get to the root cause -- RNFirebase seems that it could get initialized in such a way that would cause inconsistencies / race conditions.

To fix this I put all might imports for that library in one file that would then get imported throughout the app, that way I could make sure the library is always properly initialized before getting used.

I did the same for RNCallkeep as well.

Hope that helps!

glesperance avatar Jul 01 '22 01:07 glesperance

Thank you @glesperance I'll try as soon as possible

saribalorhan avatar Jul 01 '22 15:07 saribalorhan