Gamepad support in Android

I am in the process of adding gamepad support to a game I am working on, and I noticed that it doesn’t seem to work on Android.

I currently have an Xbox One S (Bluetooth capable) controller hooked up to my Android tablet… a game tester app from the app store verifies that the gamepad is working correctly.

However, when I attempt to use the gamepad in my Android game, it doesn’t work. The same gamepad code works perfectly on the PC version of the game with the same Xbox one S controller (on both OpenGL and UWP).

Is there something special I need to do to have gamepad support an the Android version of the game?

FYI, I am running a fairly recent 3.6 build.


The Android GamePad interface is messed up. I have managed to work around it using the few buttons that return a value.
Button pressed Y returns GamePad X.
Button pressed Start returns GamePad.RightShoulder.
Button pressed Back returns GamePad.LeftShoulder.
Buttons A & B work also ThumbSticks.Left(I have not tested ThumbSticks.Right). None of the other buttons seem to
return any value.

After testing (using a GamePad test app) it appears that the bluetooth XBox One controller has different scan codes to the
older XBox controller.

I have updated my software for the XBox one controller using the XBox Accessories app from Windows Store. The gamepad is now reading Android input correctly.