Using a gamepad in Android
I've recently had the pleasure of messing about with some of the codelabs created by the Google Play Games team to demonstrate their functionality. At the same time, I also got my hands on a rather fun Moga Pro game controller, which can connect to Android phones and tablets via Bluetooth. Getting the two to work together was actually very easy, so I just wanted to note down a quick example for anyone trying to do something similar! When it comes to the gamepad input itself, there are a couple of options. Moga, along with other controller suppliers, have their own SDK to download and integrate. However, to get something going you don't really need that at all - the standard human interface device functionality in Android SDK level 12 and above includes support for gamepads and game controllers. From this point of view a gamepad is just a series of keys and joysticks. By default, once a pad is paired with an Android device, interacting with it causes events to be sent to t