title: How to exit an Android app programmatically?
body: <p>I am sure this question has been asked number of times because I read a few. My client wants me to put a button into his app where users can click and exit. I have read <a href="https://stackoverflow.com/questions/2033914/quitting-an-application-is-that-frowned-upon/2034238">this</a> and found calling <code>finish()</code> will do it. But, finish is only closing the current running activity right? I have lot of activities so in this case I have to pass each and every activity's instance and finish them or make every activity into Singleton pattern. </p>
  
  <p>I also got to know <code>Activity.moveTaskToBack(true)</code> can get you into the home screen. OK, this is not closing but backgrounding the process. So is this is effective?</p>
  
  <p>Which method should I use to close the app completely? Any of above described or any other method/other usage of above methods?</p>