Restart the service even if app is force-stopped and Keep running service in background even after closing the app How?

前端 未结 8 569
陌清茗
陌清茗 2020-11-30 02:24

I am trying to run a service in the background. What my app does is when user checks checkbox then service starts and when it is unchecked service is stopped. Which is worki

8条回答
  •  情深已故
    2020-11-30 02:29

    Let your Service run in a separate process. There is a good tutorial in this blog.

    You can specify the android:process attribute in tag to make your app run within its own process.

    
    
    

提交回复
热议问题