Service moved to cached background process when i stopped it from settings in android. But my application still running
<p>I want to run my app only when the background service is in running state. When the user stops it from settings, I'm restarting it from onDestroy() [Even if it is a bad programming practice.. thats the requirement.. :(] Sometimes when stopping my service,it goes to cached background processes. My app is running while service is not.. My question is..</p>

<p>Is it possible to detect the state when service goes to cached background process, so that i'll restart it or kill my app itself? If so how to kill the app as a whole? </p>
