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.
Screenshot_2017-07-29-18-56-04.jpg
I added an option to check through all possible keyevents 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.

Device KeyEvent that is detected on touch Android Version
BGH AXS Joy II
(Nubia UI v2.6.0; should be like a ZTE phone mostly)
SLEEP = 223 4.4.4
Samsung Galaxy Tab 3 11" MEDIA_SKIP_BACKWARD = 273 4.2.2
Toshiba AT10-A Tablet PAIRING = 225 4.2.1
MotoGPlay SOFT_SLEEP = 276 6.0.1
Samsung Galaxy Y Pro
(gt-B510L)
SCROLL_LOCK = 116 2.3.6
ALCATEL One Touch MEDIA_AUDIO_TRACK = 222 4.3



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:
gamepad_android_tester.mfa
gamepad_android_tester.apk

To test, tap on this button ↓ then touch anywhere on the screen, and a KeyEvent should be registered and displayed on screen.



(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)