Android : Override Remote Control default functions on Android Set Top Box

on Wednesday, September 10, 2014


i'm currently developing an android set top box app, and control the whole app using a remote control.


how to override the remote control default action/behavior? some example, if i have a ListView and it has the focus, when i press NEXT on remote control

(event.getScanCode() == RemoteDetection.REMOTE_NEXT)

the ListView would jump to the next section of the ListView (for example i have 20 items in a ListView, and 5 is visible, pressing next would set the item #6 to 'selected' and jump the list to #6)


i've tried returning false/true on the onKeyUp/onKeyDown/dispatchKeyEvent method but the default behavior still occur (or remote control didn't work at all)


can anybody help me to find a way to ignore the default action? Thank you


0 comments:

Post a Comment