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 SDK

File: eclipse.zip

Size: 888 KB

Updated: April 4, 2014

More Code Samples

Large Key Samples
Download PI Controller

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
Download PI Joy Keys

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:

  1. Go to Settings > Language & Input
  2. Under Keyboard & Input Methods click Default
  3. In the Choose input method window, toggle the Hardware Physical Keyboard switch to OFF
Note: This setting resets each time X-keys is reconnected, so it may need to be toggled again.
Can't find what you're looking for? Email us at tech@piengineering.com.