How to run a background service in Oreo for longer period?

后端 未结 4 728
滥情空心
滥情空心 2020-12-03 15:39

Android Oreo has imposed many restrictions on running background service. Services now don\'t behave like normal in Oreo as they used to before.

But what if I have t

4条回答
  •  执笔经年
    2020-12-03 16:17

    You would not be able to run background services long running in Oreo as there are behaviour changes, now Oreo to optimise system memory, battery etc, it kills background service, to solve your issue you should use foreground service.

    Have a look at Background execution limits https://developer.android.com/about/versions/oreo/android-8.0-changes

    Hope this helps in understanding the issue....

提交回复
热议问题