![]() It's all explained here in the Android docs on the Background Execution Limits of Oreo This seems to be a result of the changes from Android 7 to Android 8 where in Oreo they began restricting things a bit. ![]() If the service is a "background service" and the app for the service is not in the foreground, the service may be terminated - so getting the service started isn't really enough if you need it to stay around. Now, if I run the application that has the service so it's in the foreground immediately prior to launching the "client" app that will attempt to start the service, everything works fine for the service start. I've removed a few lines for clarity, but the code is effectively: void onResume() : app is in background uid nullĪt (ContextImpl.java:1505)Īt (ContextImpl.java:1461)Īt (ContextWrapper.java:644) I've got a music player which attempts to start a Service in onResume() of an Activity.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |