The Amazon Fire Tv Stick has a dedicated menu button on it's remote that I would like to give functionality but have been unable to override. I am able to override every other button on the remote, but not the menu button. I know the menu button works because it still brings up the default Android options menu and MenuFragment. Here is my code to override the menu button.
public boolean onKeyUp (int keycode, KeyEvent event) {
if(keycode == KeyEvent.KEYCODE_MENU) {
Toast.makeText(this, "menu pressed", Toast.LENGTH_SHORT).show();
return true;
}
return super.onKeyUp(keycode, event);
}
The only reason I can think of that this might not work is if something else in my mainActivity is overriding the menu button as well, perhaps to run the options menu.
Thanks for any help!