Have you implemented onDestroy()
? If not, I believe that might be the solution – and you stop your Timer
or whatever you’re using to run the service within onDestroy()
.
A service can be stopped by calling its stopSelf() method, or by calling Context.stopService().
See this link for some more information.