How to kill an An Android Application Programatically
<p>I am Working on Android applications and getting one problem.
that  I am using 
Exit Button ,So when i am clicking the exit button(which is present in last activity of the application or in Middle but not in First Activity ) then the application should close,And when i am restarting the application it should start from the first screen.</p>

<p>But my Problem is its not killing the application  and when i am starting again it is starting from the previously paused activities.</p>

<p>i have used System.exit(0);
and also used
android.os.Process.killProcess(android.os.Process.myPid());</p>

<p>but those r not working.</p>

<p>Please help me out in this area<br>
thanks in advance.</p>
