Google I/O 2011: Android Open Accessories and ADK

The new Android Open Accessories API will allow Android apps to communcate with real world devices such as keyboards, mice (including scroll wheel and hover), game controllers, robots, and more. A demo from Android 3.

The new Android Open Accessories API will allow Android apps to communcate with real world devices such as keyboards, mice (including scroll wheel and hover), game controllers, robots, and more. A demo from Android 3.1 showed an Asteroids game played with an XBox controller. Another showed a USB controlled Nerf blaster.

USB has two modes - host mode and accessory mode. In host mode the phone acts like a computer that can charge devices and handle multiple devices. Unfortunately it's not supported yet by many phones and tablets. Accessory mode is supported by all phones, and lets the device you plug into the phone act as the host. On the phone you run an app that uses the Android Open Accessories API. Source code, hardware plans, etc. are available now at accessories.android.com.

There are two different APIs: one for Android 3.1 and a compatability library for Android 2.3. Apps see that an Intent is sent when hardware is attached and detached. Once a connection is established you just do reads and writes over stream I/O.

To encourage development, Google gave an ADK to everyone in the room. It includes two servos and all the needed cables.

For more details see the live notes.

Newsletters

You have been successfully signed up. To sign up for more newsletters or to manage your account, visit the Newsletter Subscription Center.
Subscription failed.
See All