-
Notifications
You must be signed in to change notification settings - Fork 186
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
Activity cannot be started from background after beacon was detected #65
Comments
@VictorCorchez, yes, I believe your analysis of the problem is correct. It is no longer possible for apps to launch activities from the background. While the original version of this reference app did try to launch an activity from the background, I removed that and replaced it with a notification last year in the commit below. Perhaps you are still using an old copy of the reference app? If there is something posted today that still has code to do this, please let us know. |
so is there is no other way of launching an activity from background without user interaction? I was thinking maybe this library could use the CompanionDevice approach. But I'm not sure if it works the same to be able to launch my app if it detects the beacon. |
As of Android 10 I do not believe this is possible anymore per the link you provided in this issue. I see nothing in Companion Device Pairing that would help here |
08-10 12:57:41.554 16404 16809 D MainActivity: Current region state is: INSIDE
08-10 12:57:41.554 16404 16809 D MainActivity: Got a didEnterRegion call
08-10 12:57:41.554 16404 16809 D MainActivity: Calling startActivity()
08-10 12:57:41.556 1289 3046 D OemSceneCallBlock: isCallBlockedWithUidIntent { act=android.intent.action.MAIN flg=0x18000000 cmp=/.MainActivity }, ResolveInfo{c0dfce1 /.MainActivity m=0x0}, false
08-10 12:57:41.557 1289 3046 I ActivityTaskManager: START u0 {act=android.intent.action.MAIN flg=0x18000000 cmp=/.MainActivity} from uid 10756 pid 16404
This happens while testing on Android 10 and seems this could be the explanation:
https://developer.android.com/guide/components/activities/background-starts
The text was updated successfully, but these errors were encountered: