title: force-stop the application programmatically in Android
body: <p>I want to <code>force-stop</code> an application from my Android app, (Instead of doing manually like <code>apps-force-&gt;stop</code>). How to achieve this?</p>
  
  <p>I used: </p>
  
  <pre><code>android.os.Process.killProcess(android.os.Process.myPid());
  system.exit(0);
  </code></pre>
  
  <p>It crashes.</p>