Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SendIntentAndroid.openApp not working when called in background #122

Open
renege opened this issue Apr 17, 2020 · 3 comments
Open

SendIntentAndroid.openApp not working when called in background #122

renege opened this issue Apr 17, 2020 · 3 comments

Comments

@renege
Copy link

renege commented Apr 17, 2020

Hi,
I have a background service running and there I call: SendIntentAndroid.openApp('com.foobar')
But the app is not opening to the foreground when triggered in the background. The function is called, I can see that in the logs.

When I call the same function when the App is open, it does work..

@lucasferreira

@BertoGz
Copy link

BertoGz commented Feb 22, 2021

I have this issue too. I Found out it was related to the App's "Display over other apps" permission, if you turn that on, and try again did it work? If so you might have a permissions issue. I am using android 11 device on an app the has a background messaging service. I was able to do a work around by adding this to the service element

<service android:name="insert.your.service.package" android:permission="android.permission.BIND_SCREENING_SERVICE"> <intent-filter> <action android:name="android.telecom.CallScreeningService"/> </intent-filter> </service>
I have read in the docs that apps that have CallScreeningService automatically get this permission granted.
https://developer.android.com/about/versions/11/privacy/permissions // go down to where it talks about android 11 changes.
this helped on android 11 but I think it might not on lower versions...

@parazitenew
Copy link

Same issue, i wanted to open app when the main app receive a push notification on background, but did not work, and when it is handled on foreground, it works good. (Android 11) it was just a test, cause the final goal is that my app open itself when a push notification is received from quite state.

@softmasters
Copy link

Hello, any news about this? I have the same problem: I'm calling SendIntentAndroid.openApp(...) from a react native BackgroundTimer.runBackgroundTimer().
The background task is running correctly, but the external app is opened only if my app is in the foreground.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants