react-native-webrtc / react-native-callkeep

iOS CallKit framework and Android ConnectionService for React Native
ISC License
926 stars 445 forks source link

backToForeground doesn't work on Android 9. #227

Open maitzeth opened 4 years ago

maitzeth commented 4 years ago

Bug report

Description

Hello, I'm having a problem. Right know I'm testing the new method called backToForeground, it works perfectly on Android 7 and 8, but now Im testing on Android 9 (Emulated on Android Student) and the app is not waking up. There is any way to fix this?

Steps to Reproduce

Versions

- Callkeep: 3.0.15
- React Native: 0.61.5
- iOS: 
- Android: API 29 (Android 9)
- Phone model: Pixel Pixel 2 (Emulated)
fedebraintly commented 4 years ago

Hi, there!

I'm having the same issue. Also, it isn't working on Android 10.

Any ideas?

Thanks!

manuquentin commented 4 years ago

Working fine here on a Pixel 1 with Android 10

maitzeth commented 4 years ago

@manuquentin I managed to work adding this permission on the Manifest.

<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>

Before that I was not able to make it work in Android 9 and 10

codetheweb commented 4 years ago

@maitzeth thanks, that worked for me.

stephanoparaskeva commented 4 years ago

<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>

Before that I was not able to make it work in Android 9 and 10

I already have this in my androidManifest.xml and backToForeground() doesnt work for me on Android 7 Samsung S6

hanleiZoro commented 4 years ago

Hi, this issues is solved?

manuquentin commented 4 years ago

We've experienced the same issue on a Samsung Galaxy A5 (2016). It appears that backToForeground works as expected (when calling it in a AppState.addEventListener('change', ...) the app comes on foreground).

But Samsung have a fork of ConnectionService that prevents a lot of things... we've recently noticed that we can't trigger clicks in the Samsung ConnectionService UI with calls to adb shell input keyevent ... in our functional tests (calls that works on Pixel devices). I think Samsung has forbidden applications to be reordered above ConnectionService UI ...

We've try to display a local notification, so the user will click on it and display the app, but Android displays it as a small icon...

We'll continue our work on #251 to work around this issue.

imansalhi commented 4 years ago

@manuquentin maybe this can be useful for your progress and this

HarshitPadalia commented 4 years ago

We've experienced the same issue on a Samsung Galaxy A5 (2016). It appears that backToForeground works as expected (when calling it in a AppState.addEventListener('change', ...) the app comes on foreground).

But Samsung have a fork of ConnectionService that prevents a lot of things... we've recently noticed that we can't trigger clicks in the Samsung ConnectionService UI with calls to adb shell input keyevent ... in our functional tests (calls that works on Pixel devices). I think Samsung has forbidden applications to be reordered above ConnectionService UI ...

We've try to display a local notification, so the user will click on it and display the app, but Android displays it as a small icon...

We'll continue our work on #251 to work around this issue.

this can be solved if we use self managed connection service? if yes then I can help you for implement self managed connection service