Android Question Android Color Buttons How To Use Them In Apk?

ronovar

Active Member
Licensed User
Longtime User
I have android tv box that have remote control...and on that box is android version 7.0, and my apk have at bottom 4color buttons so when user press RED button it open MsgBox1, GREEN Button open MsgBox2, YELLOW button open MsgBox3 and BLUE Button open MsgBox4.

But when i press these buttons my apk in B4A does not register them and start media, music, web or app...so how to get in activity keyup event when they are pressed so that i can use it in my apk and disable default usage in android, so that it does not start media, music, web or app?

Code that i try but as soon i press for example GREEN button it start WEB BROWSER on my android box and i don't want that.

B4X:
Sub Activity_KeyUp (KeyCode As Int) As Boolean
    'SELECT - Remote Code
    Select KeyCode
        
        ' RED - Button
        Case 183
               Log("RED Button Pressed...")
        'GREEN - Button
        Case 184
               Log("GREEN Button Pressed...")
    End Select
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…