The X-Arcade acts like a keyboard on both MAME4Droid and MAME4All (except on Ouya), simply connect using the USB port. You can also make the X-Arcade work as an Xbox 360 gamepad instead. If your android device doesn't have a USB port, you can make it work wirelessly.
MAME4Droid runs the most MAME games on an Android device. To use the X-Arcade on it simply tap on the screen outside of the center window to bring up Settings. Under Settings>Input you will want to set External Controller to 'Keyboard or IME', and then define the controls under Settings>Input>Define Keys to the layout shown below.
MAME4All only plays a limited number of older MAME games compared to MAME4Droid. To use the X-Arcade on it simply click on 'OPTION' on the screen, choose Settings, then define keys. You will want to set the controls up as shown below.
|Function:||Player 1||Player 2|
|Stick Up||Numpad 8||R|
|Stick Left||Numpad 4||D|
|Stick Right||Numpad 5||G|
|Stick B||Ctrl Left||A|
|Stick X||Alt Left||S|
|Stick Y||Left Shift||W|
|Coin or Stick Select||3||4|