title: Android application start-up
body: <p>In my application,it requires to start the application from the starting activity or the first activity;as the application is authenticated by a login section..</p>
  
  <p>So,whenever the application gets exit;say,via pressing BACK or HOME button,i need to start the application from the login itself...Is there any method to do the same?</p>
  
  <p>I tried a simple technique by overriding the KEYEVENT,and implementing the finish() method inside.It works for the the BACK button;but its not working for the HOME button...</p>
  
  <pre><code>public boolean onKeyDown(int keyCode, KeyEvent event) {
      if (keyCode == KeyEvent.KEYCODE_HOME) {
  
          finish();    
      }
      if (keyCode == KeyEvent.KEYCODE_BACK) {
  
          finish();    
      }
      return false;
  }
  </code></pre>