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