I am trying to detect when the physical Menu button on my Android phone has been pressed. I though the code below would work but it does not. Where am I going wrong please?
The error returned is 'Illegal modifier for parameter onKeyDown; only final is permitted'
public boolean onKeyDown(int keyCode, KeyEvent event) {
if (keyCode == KeyEvent.KEYCODE_MENU) {
// Do Stuff
} else {
return super.onKeyDown(keyCode, event);
}
}
question from:https://stackoverflow.com/questions/4239880/detecting-physical-menu-key-press-in-android