title: How to Clear the Stack and close the application
body: <p>I want clear the stack and close the application by pressing on Exit Button in my application.So that when ever I open the application again i need to start the application from first activity.</p>
  
  <p>I am using below statements but these statements are not working.I don't want to use Launch mode Single Task.</p>
  
  <p>intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); 
  intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);</p>