Hi I have written the following code:
public boolean onKeyDown(int keyCode,KeyEvent event) {
if (keyCode==KeyEvent.KEYCODE_HOME) {
showDialog(MY_DALOG);
return true;
}
return true;
}
But when I press the HOME BUTTON, it doesn't call the line if(keyCode==KeyEvent.KEYCODE_HOME) when debugging.
On the other hand, it calls the onPause(). I have put my code in onPause() but still, it shows a SuperNotFound exception in Logcat.
Any idea how to display a dialog by pressing the HOMEKEY?