I have a service in my android application and I need that it never stop.
How to mark my service so the user could never stop it?
If the user goes to: “Setting – Applications – Running Services – My Service” and click on STOP, my service should not be stopped.
How can I do this?
I have a service in my android application and I need that it never
Share
You cannot prevent stopping a service. The same way you cannot prevent somebody from force closing your app. Even if it were possible, the user could still kill your service by uninstalling your app. Why do you want the service not to be stopped?
On second thought you could have two services that monitor each other periodically by checking ActivityManager.getRunningServices(). When one service is killed the other could restart it. This would probably be considered malicious activity on your part, and you would likely receive very negative reviews.