title: Android - How to exit an app when user press the home button?
body: <p>I want to know how to exit an app when user press the Home Button.</p>
  
  <p>As far as i know that Home Button moves the running app in background and puts Launcher process in front.</p>
  
  <p>I know i can use finish() but i don't know where i should call it because i have no idea which function is going to get a call when user will press the Home Key.</p>
  
  <p>Thanks.</p>