Android app doesn't close
<p>There is a point in my app where I need to kill the app completely.  I use this to do so:</p>

<pre><code>protected void exitApp()
{
    Dialogs.DismissAll();
    finish();
    int pid = android.os.Process.myPid(); 
    android.os.Process.killProcess(pid); 
}
</code></pre>

<p>My problem is that this only works sometimes.  At other times when this gets called the device screen just turns black and doesn't go to the device home screen.  To get to the home screen from this point I have to press the home button.  Any ideas why?</p>

<p>(please don't lecture me about how this code is against Android development guidelines.  I have read all the information about it and feel that this is the best approach to give the client what they want)</p>

<p>Thanks</p>
