I have some Android Box, MXQ Pro actually, and I want to make video player app for it and I want to use colored buttons (RED, GREEN, YELLOW and BLUE) on remote for special things in player, but that buttons on remote are somehow hardcoded in Android and I can't catch them in dispatchKeyEvent. These buttons are preprogrammed to launch Media, Kodi, Web Browser and only BLUE button I can catch. Is there a way to catch/intercept such keyevents?
I have read something about Broadcast Receiver and putting my receiver to be highest priority, but never made anything useful of it. Never registered any signals.
BTW, this is what I got in logcat after pressing RED, GREEN and YELLOW button:
09-21 15:56:36.807 4388-4428/system_process I/ActivityManager: START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 sel=act=android.intent.action.MAIN cat=[android.intent.category.APP_MEDIA]}} from uid 1000 on display 0
09-21 15:58:46.561 4388-4428/system_process I/ActivityManager: START u0 {flg=0x10200000 cmp=org.xbmc.kodi/.Splash} from uid 1000 on display 0
09-21 15:59:00.313 4388-4428/system_process I/ActivityManager: START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=cyx.browser/.activity.MainActivity sel=act=android.intent.action.MAIN cat=[android.intent.category.APP_BROWSER]}} from uid 1000 on display 0
User contributions licensed under CC BY-SA 3.0