Skip to content Skip to sidebar Skip to footer

How To Restart Android Service When It Is Killed From Settings

I have an android application that in onCreate method of Main ACtivity starts a Background Service. This is a lightweight Service and I want to keep it running all the time. So , I

Solution 1:

Instead of using startService ,I am using BindService , I bind the Service in onCreate of the application and unbind it in onTerminate of application.

This keeps running my service all the time till the app is running and User is not given any option in App Manager to kill Running Services in my App.

Post a Comment for "How To Restart Android Service When It Is Killed From Settings"