It's not really an issue but I can't figure out why this happens.
I made a small app to test gamepad input. Using the Android Object's "Button is down" event.
Please login to see this attachment.
I added an option to check through Please login to see this link. because my gamepad input was registered as multiple keyevents simultaneously. For instance pressing A would trigger the BUTTON_A keyEvent and the DPAD_CENTER event; my guess is that that is android's way of making the gamepad compatible with the UI. Similarly BUTTON_B also triggers the BACK button.
But anyway, I found out that tapping on the screen also triggers a keyEvent. On my phone it triggered the SLEEP key event (Decimal 223) which doesn't make much sense so I tried on my tablet... and there I got a MEDIA_SKIP_BACKWARD (273).
I tested on all five android devices at home hoping to get identical values on some device so as to try and figure out what's going on, but I consistently got a different value on each device.
[table='width: 500']
[tr][/tr]
[tr]
[/tr][tr][td][/td][/tr]
[tr][td]Device[/td][/tr]
[tr]
[/tr][tr][td][/td][/tr]
[tr][td]KeyEvent that is detected on touch[/td][/tr]
[tr]
[/tr][tr][td][/td][/tr]
[tr][td]Android Version[/td][/tr]
[tr]
[/tr]
[tr][/tr]
[tr]
[/tr][tr][td][/td][/tr]
[tr][td]BGH AXS Joy II
(Nubia UI v2.6.0; should be like a ZTE phone mostly)[/td][/tr]
[tr]
[/tr][tr][td][/td][/tr]
[tr][td]SLEEP = 223[/td][/tr]
[tr]
[/tr][tr][td][/td][/tr]
[tr][td]4.4.4[/td][/tr]
[tr]
[/tr]
[tr][/tr]
[tr]
[/tr][tr][td][/td][/tr]
[tr][td]Samsung Galaxy Tab 3 11"[/td][/tr]
[tr]
[/tr][tr][td][/td][/tr]
[tr][td]MEDIA_SKIP_BACKWARD = 273[/td][/tr]
[tr]
[/tr][tr][td][/td][/tr]
[tr][td]4.2.2[/td][/tr]
[tr]
[/tr]
[tr][/tr]
[tr]
[/tr][tr][td][/td][/tr]
[tr][td]Toshiba AT10-A Tablet[/td][/tr]
[tr]
[/tr][tr][td][/td][/tr]
[tr][td]PAIRING = 225[/td][/tr]
[tr]
[/tr][tr][td][/td][/tr]
[tr][td]4.2.1[/td][/tr]
[tr]
[/tr]
[tr][/tr]
[tr]
[/tr][tr][td][/td][/tr]
[tr][td]MotoGPlay[/td][/tr]
[tr]
[/tr][tr][td][/td][/tr]
[tr][td]SOFT_SLEEP = 276[/td][/tr]
[tr]
[/tr][tr][td][/td][/tr]
[tr][td]6.0.1[/td][/tr]
[tr]
[/tr]
[tr][/tr]
[tr]
[/tr][tr][td][/td][/tr]
[tr][td]Samsung Galaxy Y Pro
(gt-B510L)[/td][/tr]
[tr]
[/tr][tr][td][/td][/tr]
[tr][td]SCROLL_LOCK = 116[/td][/tr]
[tr]
[/tr][tr][td][/td][/tr]
[tr][td]2.3.6[/td][/tr]
[tr]
[/tr]
[tr][/tr]
[tr]
[/tr][tr][td][/td][/tr]
[tr][td]ALCATEL One Touch[/td][/tr]
[tr]
[/tr][tr][td][/td][/tr]
[tr][td]MEDIA_AUDIO_TRACK = 222[/td][/tr]
[tr]
[/tr][tr][td][/td][/tr]
[tr][td]4.3[/td][/tr]
[tr]
[/tr]
[/table]
Any idea why this happens?
If anyone wants to test this on other phones and report here what KeyEvent you get, it'll be much appreciated.
Here's the APK and the MFA of my Gamepad Tester application:
Please login to see this attachment.
Please login to see this attachment.
To test, tap on this button ↓ then touch anywhere on the screen, and a KeyEvent should be registered and displayed on screen.
Please login to see this picture.
(Also I don't know if there's a better option to have Bluetooth Gamepad support on android yet, but that's for a separate post I suppose)