Android O, Background Service is running for more than 30 minutes. Why?

你说的曾经没有我的故事 提交于 2019-12-04 08:20:35

It my be some bug in preview.

But, are you sure your service is running after 1 minute? Your app process and background thread you made will/could run even after service is destroyed.

So your service does pass onDestroy callback, but you don't stop your thread in there and continue doing work in background. It only stops when whole app's process is killed because Android decided it's not important any more.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!