title: Home button click event handling android
body: <p>I wanted to call certain function for showing notifications on pressing of homebuttonclick event.</p>
  
  <p>I refered <a href="http://nisha113a5.blogspot.in/" rel="nofollow">this</a> blog.</p>
  
  <p>Written code as:</p>
  
  <pre><code>@Override
      public boolean onKeyDown(int keyCode, KeyEvent event){
          if(keyCode == KeyEvent.KEYCODE_HOME){
              APP_STATUS="SLEEP";
  
            LocalToNotification();
  
          }
          return true;
      }   
  </code></pre>
  
  <p>But unfortunatly it was not working.</p>
  
  <p>I tested through debugger, but observed that debugger is also not comming on this line of code upon pressing home button.</p>
  
  <p>What is wrong in above code?</p>
  
  <p>Please help me.</p>