Terminate android service without reset
<p>I am aware that force killing an app is very bad, but the client requires it. I am required to implement a force reboot of sorts for the app. This is how I implemented it:</p>

<p>I create a <code>BroadcastReceiver</code> in my Application's (not Activity's) <code>onCreate</code> method. I have it wait for the REBOOT command to be broadcast. Upon receipt, I have it broadcast another message that has the services call <code>stopSelf</code> so that threads and services have a chance to exit cleanly. I then have an <code>AlarmManager</code> call my main activity 5 seconds later. Finally have my application kill itself with <code>Process.kill(Process.myPid())</code>. For the most part, it works, and I just need to add some extra waiting time before it kills the process (maybe by waiting for a TERMINATE broadcast from each running Service). My issue is this: while reviewing the logs, I found out that the system schedules the services to reboot. I'm worried about conflicts. Is there a way to terminate the services without any chance of it rebooting?</p>
