Android just got a whole lot more interesting for hardware development. We can already run music apps and tools like Processing and (via libpd) Pure Data patches on Android. Now, you should soon be able to plug in joysticks, custom hardware, sensors, and other devices and make Android a go-anywhere live music and visual platform. Updated: USB audio class is in fact supported; awaiting other details.

The new hardware APIs allow anyone to develop hardware accessories for Android, from individual DIYers all the way to brands. You don’t have to sign an NDA, and you don’t need a special hardware license – the aspects about which I’ve complained in the past with regards to Apple policies. Anyone can do it.

Here’s some of the documentation:
ADK Android Hardware Development Kit, based on Arduino (MEGA)
Android USB Accessory
USB Host Mode

In the keynote, Google even showed an Arduino MEGA-based board for doing I/O. This should theoretically be open source hardware, though we don’t yet have specifications or code. Based on the way it was described, I would imagine other Arduino boards would work, too, at least with modification.

It’s also unclear what the relationship of the new Arduino-based stuff is to the existing IOIO project, also based on Arduino and Android and with more or less the same capabilities. It’s very possible that what Google has done is add official support. Official SDK support seems like a good thing; I’m just unsure what it means if you’ve already got an IOIO or how the two things relate. (It should be a step forward in at least some ways. If you read the specs on IOIO at Sparkfun, you’ll note that – because of missing OS support – IOIO has to implement host mode itself. And handset support is limited. But IOIO is a much better name.)

I wanted to get out there with the news, so I’ll let you look through the documentation if you’re interested. Since Google IO isn’t covered by an NDA (cough, Apple), I’m hoping we’ll find out more details.

One very nice detail, aside from the Arduino support: the documentation specifically calls out USB bus power.

This leaves some significant questions unanswered, however. For one thing, despite Apple’s restrictions for hardware connected to the Dock Connector, Apple has a very liberal policy and some brilliant hardware work when it comes to USB connections made via the Camera Connection Kit. Power is often an issue, but Apple’s iOS on iPad supports a wide range of USB device classes, including USB audio and USB MIDI devices. There’s still no word on whether that’s supported on Apple – which would be a major detail for music use. (MIDI doesn’t have to be a dealbreaker; you could certainly perform the same functions via the existing classes, or even create your own Android-to-MIDI adapter. But the lack of quality audio I/O could hamper the use of Android for music applications.) USB audio is confirmed, as Google themselves cite it as an example. Waiting on other specifics.

Separated at birth? The IOIO project. Photo courtesy, who still sell this board – and incidentally, it remains useful for prototyping!

That said, let me review: we’ve now gotten things I’d never really have imagined given the early development of mobile apps. We have Arduino-based and basic USB hardware on Android (possibly more), and USB MIDI and audio devices on iOS.

And furthermore, I think people will do really, really cool things with this stuff. The refrain from many advocates of mobile and next-generation platforms has been that users don’t need or want the kinds of capabilities that we get from conventional computer experiences, and that us pundit nerds should stop making comparisons to computers and let average users just check their Facebook accounts. Yet I’m pleased that engineers at places like Apple and Google have added just those features, because I think a wide variety of people – not just nerds like me, indeed – can do great, expressive things with them, and that that’s been a lesson of computing over the past decades.

  • ehdyn

    The mind reels – dreaming up schemes

  • I think we are on the cusp of an era where hardware and software meld closer. It would be beneficial to the consumer if a small form factor, multi i/o capable computer(iOS/Andriod) become part of a modular system. Im sure in no time at all we will see (as we already have from Akai) grid controllers, synths, samplers, and DJ rigs.. using our phones/tablets as the brain. Standalone Monome. Roland could release the SP-707 as a controller for a phone..

  • I have been pushing for this news ever since I tried getting my oxygen8 to  talk to my phone.  I hope google will send out the sdk as soon as possible  and then the creators of jasuto and all the other semi pro apps  are familiar with arduino and usb audio.  Open the floodgates!

  • All those mistakes are thanks my phone by the way…  I'm using google speech to text xD

  • Is There any bootcamp plan to install Android on my IPhone? 😀

    Anyway, i think u can build "easilly" your own midi controller with arduino for your iPhone:

    Arduino Uno + the midi firmware for   the new atmel serial/USB wich is on Uno… I have to try it… Agree with the avive comment: hybride solution Will rock….i Want to plug my monôme into m'y phone!!!! 

  • Richard Lawler

    A few details I just learned:

    The ADK Arduino board is open source. The demo app, the firmware and the board layout are all supposedly available on

    The YoYo IOIO kit relies on ADB to communicate with Android which is not a best practice with the new APIs. There is no guarantee that ADB will remain around. It's fine for DIY one off stuff, but commercial products shouldn't rely on that. But there's also apparently no reason the IOIO board can't support the new API protocols.

    There are actually a couple different implementations. There's Honeycomb 3.1 USB on devices like the Xoom that support USB host mode. (the so-called "fast follower" Honeycomb tablets will supposedly also work)

    The other implementation is USB Accessory Mode which is supported on Gingerbread 2.3.4. The accessory device must be able to support host mode though. 

    It sounded like audio support is not yet possible through the USB Accessory APIs. There's no isochronous mode API as yet. But the information Peter posted indicates that perhaps some basic class compliant  audio drivers are included with Android 3.1.

    (reporting live from IO)

  • Peter Kirn

    Yeah, IOIO uses ADB. To say that's not best practices is an understatement; I think it's a hack (though a clever one)! But yes, IOIO can still be fun to mess about with, and something you prototyped with IOIO ought to be easily adapted to the ADK.

    So, the host mode — here's my source: "USB host API. On devices that support USB host mode, applications can now manage connected USB peripherals such as audio devices. input devices, communications devices, and more."

    Now, actually, that doesn't say specifically USB audio class, but it certainly implies it. 

    By the way, theoretically there was some sort of host mode on some non-Honeycomb devices, but no idea of the implication here, or what happens later this year with Ice Cream Sandwich. There's a lot of detail here to fill in.

  • Greg

    I wonder if they will release the USB converter chip and the firmware. The arduino Mega is just too expensive and too big. I'd likely to use cheap Arduino Pro Minis.

  • Peter Kirn

    Word is definitely that they're releasing the firmware. You ought to be able to do this with a non-MEGA, would be my guess, yes. Oh, and I don't think what makes the Mega expensive is the chip, so if you're breadboarding something that does the same thing…

  • dan

    Someone got USB Host Mode working on a Nexus One last summer (and the Droid earlier than that):

    I'm glad to see this functionality coming Android-wide, but like Richard I'm not sure what to make of this distinction between USB Accessory Mode and Host Mode. It sounds like they're trying to set aside "real" host mode for tablets only, while phones will only be able to use Android-specific accessories. Which would be a bummer, since this previous work in the developer community suggests that any phone should be able to support Host Mode (with power limits, of course).

  • Peter Kirn

    I don't think they're necessarily trying to set aside host mode for tablets – remember, the goal for the end of the year is a common set of APIs. I think the issue is that they'd have a lot of pushback with OEMs if they made USB host mode a required compatibility feature for phones, because of potential power draw, additional functionality to support, etc.

    My guess would be, for any device that adds this capability – or for people who root their phones and do it themselves – you ought to be able to use the same API.

    And in the meantime, for a lot of what people want to do, USB Accessory Mode should be pretty useful.

  • Perfectly fits our hight quality USB microphone 🙂

  • is anyone clear on how any of this deals with the lamentable state of the audio APIs in Android (both design and performance)?

  • Peter Kirn

    @Paul: It doesn't. Paul Brinkmann has a pretty good workaround sitting in the libpd repository. I expect a lot of people assume that's libpd-only, but it's not — it would apply to anyone doing Android audio in any application. For now, it's a reasonable approach. You're still restricted to performance of audio handsets.

    I remain interested to see how USB audio class devices work, though, as that may allow us to circumvent crappy internal audio – which, to be fair, can cause issues on any OS (not to mention greatly diminishing the desire to work with the thing at all). But we won't know until we can test … anyone with a Xoom 3G and a cable that can connect to microUSB can do it right now, but we should know in coming weeks.

  • Peter Kirn

    is the class to which I'm referring.

  • New uno could be USB compliant…

    Midi too.

  • Peter Kirn

    I think it's important to note that you don't need an Arduino to do this sort of stuff – nor is it necessarily easier. There's a lot of good AVR firmware out there for HID, etc. The trick is refining the software on all these projects, which is why it's nice to see Arduino moving in that direction.

  • RichardL

    Microchip is making a prototyping kit. It is not based on Arduino. 

  • Peter Kirn

    @RichardL: Ah, great … yeah, that makes some sense.

  • last year I started this project my target was to create an easy way to intereact with home's objects with Arduino, On this site you can generate the code for Arduino without any C/C++ knowledge.

  •   I have recently read an article on Android eating apple share and I guess by introducing such technology will surely big concern of Apple. I personally believe a great idea and good for mobile users who wants to watch & listen music on phone instead of PC, laptops. Thumbs up for the Android.

  • Eric

    My Nexus One has a pretty decent camera and ability to record video but the audio, so far, has been limited to the on board microphone during this operation. This means it picks up all the wind noise and less of something farther away.

    I've looked for some kind of software that would allow recording audio from bluetooth devices when recording video.

    I've looked for hardware that could plug into the headset port and act as a wired remote microphone.

    This post suggests it might be possible to use something like this&nbsp ; to connect a wired remote microphone.

    I just want to have remote microphone options for recording with the video.

    Any suggestions on how to make this happen in a low cost way?

  • MrMe

    "We can already run music apps and tools like Processing and (via libpd) Pure Data patches on Android."

    How can you install Processing on an Android tablet?

  • The iRig by IK Multimedia for iDevices also works on my HTC EVO 4G, the Viewsonic G-Tablet, and probably any other Android device that has a 3.5mm headset jack. This has a 1/4" mono input, 1/8" stereo headphone jack, and plugs into the iPod/Android. Guitar/Bass/Synth/Whatever can be plugged in and run thru rjdj scenes, sampled into electrum, etc…

  • Freddyt

    Does the audio have to be pristine ,C'mon… the purpose of this should be for a quick and painless musical sketchpad ? let's get  the usb plus android devices talking at least … Android devices tend to overheat when the processors are under stress anyway ..
    Wish list…(1 midi input and 1 audio input over usb ) 4 tracks of midi plus 2 tracks of audio on the software side would do very nicely…also the ability to quantise..nudge tracks..and set volume envelopes ..basic effects=..reverb &delay..and of course to export /import …and I would have a functional easy to use scratch pad all from my htchd2 android rooted phone!!!

  • Peter

    My wish list is simple:

    – From Android phone/tablet do midi sequencing of an external device/synth. No PC in the middle.

    Is this capability now within reach? Imminent?