Android SDK's
Android-Based Developer Tools for X-keys
SDKs for Android
The X-keys Android SDK provides example applications with full source code to help developers integrate X-keys devices into Android projects. These samples demonstrate basic communication and control, offering a starting point for your own development.
Download Android SDKFile: eclipse.zip
Size: 888 KB
Updated: April 4, 2014
More Code Samples
Large Key Samples
PIGameController.zip (3.2MB)
IDE: Eclipse
Product: XK-24
Description: PIGameController is an app that displays the data from any game controller. Similar to other apps available, but includes buttons as well as some device adding/removing features. The app was written using the Android SDK sample ApiDemos: GameControllerInput.java as a guide.
Device Notification C++ 2003
PIJoyKeys.zip (1.5MB)
IDE: Eclipse
Product: XK-24
Description: PIJoyKeys is a simpler app that demonstrates how to capture only digital buttons.
Tips for using X-keys with Android
Device Requirements
Your Android device must support USB OTG (On-The-Go) to act as a USB host.
If your device is running Android 3.1 (Honeycomb) or newer, it should support OTG.
Programming Your X-keys
X-keys must be programmed on a Windows PC using MacroWorks 3.1 in Hardware Mode.
Make sure to change the endpoint/PID to one that does NOT have PI Consumer (required for Software Mode) support.
Unit Data > Change Endpoints
or
Tools > Advanced > Endpoint/PID Changer
Using a mode with PI Consumer enabled may result in slow or inconsistent behavior on Android.
Power Management
It is recommended that the backlighting be turned off to reduce power consumption.
Use the PI Engineering SDK sample for the specific X-keys model or from MacroWorks 3.1 from the Unit Data tab.
Using with the Android Soft Keyboard
Some Android versions may disable the soft keyboard when X-keys is plugged in.
To re-enable it:
- Go to Settings > Language & Input
- Under Keyboard & Input Methods click Default
- In the Choose input method window, toggle the Hardware Physical Keyboard switch to OFF