-
Notifications
You must be signed in to change notification settings - Fork 40
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
Not working in oreo devices #1
Comments
Same happens for me. However sometimes it does work. Will post any further findings here. |
Not working when app is swiped from recent apps list |
It works on a Samsung S8 (SM-G950F) with Android 8.0. What phone causes a problem? |
Not working when app is swiped from recent apps list. (log is stuck) any solution? |
Same issue for me, but on Pie. OnePlus 5T OxygenOS 9.0.4 (Android version 9). Also happens on virtualized Nexus 5X. Trigger appears to be memory pressure (i.e. opening Maps app on the virtualized Nexus 5X is enough to usually cause Android to kill the background process). |
This summary from Android team makes it pretty clear that they're not trying to allow any workarounds for silent background processes that are long-running and reliable: https://developer.android.com/guide/background They consider battery and RAM impact top-priority issues for users' experience and that anything like a pedometer use case should be spawning a foreground service (so that a user knows that there could be battery and RAM impact and decide to uninstall the app). I don't think Android has done enough to explain to end-users that this was a big shift in the experience with the advent of Oreo. I still talk to users all the time that HATE sticky notifications and they don't appreciate that Android is trying to enforce transparency. They just want them gone (which forces us app makers to take on the burden of explaining how Android works to end-users). Short of Android team reversing their course on this policy, I think any workarounds for highly responsive background processes will be short-lived. |
Process: oak.shef.ac.uk.testrunningservicesbackgroundrelaunched, PID: 21844
java.lang.RuntimeException: Unable to start receiver oak.shef.ac.uk.testrunningservicesbackgroundrelaunched.SensorRestarterBroadcastReceiver: java.lang.IllegalStateException: Not allowed to start service Intent { cmp=oak.shef.ac.uk.testrunningservicesbackgroundrelaunched/.SensorService }: app is in background uid UidRecord{5813532 u0a200 RCVR bg:+1m0s42ms idle procs:1 seq(0,0,0)}
at android.app.ActivityThread.handleReceiver(ActivityThread.java:3399)
at android.app.ActivityThread.-wrap18(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1780)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6944)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)
Caused by: java.lang.IllegalStateException: Not allowed to start service Intent { cmp=oak.shef.ac.uk.testrunningservicesbackgroundrelaunched/.SensorService }: app is in background uid UidRecord{5813532 u0a200 RCVR bg:+1m0s42ms idle procs:1 seq(0,0,0)}
at android.app.ContextImpl.startServiceCommon(ContextImpl.java:1538)
at android.app.ContextImpl.startService(ContextImpl.java:1484)
at android.content.ContextWrapper.startService(ContextWrapper.java:663)
at android.content.ContextWrapper.startService(ContextWrapper.java:663)
at oak.shef.ac.uk.testrunningservicesbackgroundrelaunched.SensorRestarterBroadcastReceiver.onReceive(SensorRestarterBroadcastReceiver.java:16)
at android.app.ActivityThread.handleReceiver(ActivityThread.java:3392)
at android.app.ActivityThread.-wrap18(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1780)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6944)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)
The text was updated successfully, but these errors were encountered: