I am creating a webview in my tv application and don't seem to be able to override the onKeyDown method when it comes to volume UP/DOWN. When i run it on an mobile or tablet emulator it works, but on the TV emulator or Android tv it doesn't do anything but control volume. Is there a way to override the volume control? I know i might be stupid to play with the volume actions, but they are the only free buttons on the remote, and sound isn't part of the application.
This is the section
@Override
public boolean onKeyDown(int keyCode, KeyEvent event){
if(keyCode == KeyEvent.KEYCODE_VOLUME_UP){
myMethod1();
return true;
} else if(keyCode == KeyEvent.KEYCODE_VOLUME_DOWN){
myMethod2();
return true;
}
super.onKeyDown(keyCode, event);
return true;
}