Google I/O 2011: Android Open Accessories and ADK

Summary: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.

Topics: Hardware, Android, Google

About

Ed Burnette has been hooked on computers ever since he laid eyes on a TRS-80 in the local Radio Shack. Since graduating from NC State University he has programmed everything from serial device drivers and debuggers to web servers. After a delightful break working on commercial video games, Ed reluctantly returned to business software. He... Full Bio

zdnet_core.socialButton.googleLabel Contact Disclosure

Kick off your day with ZDNet's daily email newsletter. It's the freshest tech news and opinion, served hot. Get it.

Related Stories

The best of ZDNet, delivered

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