I am working on TV application using Amazon Fire Stick TV. I need to handle long press event for the Dpad center button via TV remote control.
For the Dpad center button, only I receive a call to onKeyDown()
multiple times if I long press the DPad center button.
I do not receive any call to OnKeyUp()
methods and onLongKeyPress()
methods of the Activity while trying to long press the DPad center button. Is this a bug?
My compile SDK version is '23'.
I solved it by handling
KEYCODE_DPAD_CENTER
keyevent in thedispatchKeyEvent(KeyEvent event)
like this: