Subscribe to Make Magazine Today!

“follower” wrote in with yet another cool project for the Android Open Accessory SDK. This time, you don’t even need to do any Android programming; your Arduino Sketch tells follower’s Android app what to do and what to display on the screen:

Handbag makes it possible to create Arduino-based accessories for Android devices without creating an Android app. You both define the Android application user interface and implement the behaviour in your Arduino sketch.

Here’s an example of how you would (currently) create an interface with a label, some space and a single button:

configureWidget(UI_WIDGET_LABEL, ID_NONE, "Example Handbag Android Accessory");
configureWidget(UI_WIDGET_LABEL, ID_NONE, "");
configureWidget(UI_WIDGET_BUTTON, ID_B1, "Toggle Digital Pin 4");

Handbag: the Android Arduino Accessorizer

If you’re going to be at the O’Reilly Open Source Convention in July, be sure to check out follower’s Get Started with the Arduino – A Hands-On Introductory Workshop.

Brian Jepson

Brian Jepson

I’m a tinkerer and finally reached the point where I fix more things than I break. When I’m not tinkering, I’m probably editing a book for Maker Media.

17 Responses to Use Android Open Accessory Without Android Programming

Your Thoughts?

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

  1. Anonymous on said:


    Could this be done for the iPhone?

  2.  anyone else getting a parse error on the install of this apk file?

    • A parse error probably means you have the wrong version of Android. 
      Gingerbread 2.3.4 or HoneyComb 3.1 is required to use the Android Open
      Accessory API.

    • Duane Woods on said:

      I am suffering from the same issue, and I have a bionic which is gingerbread 2.3.4, it just tells me install fails, is the phone supposed to be rooted to use this?

  3.  anyone else getting a parse error on the install of this apk file?

  4. Andrea Pavesi on said:

    Hello, sorry to disturb you, but I’ve a big question regarding the code of handbag… I have a big problem ’cause I’m developing an app that use tha ADK on a LG Optimus SOL phone. Any app I’ve tested until now on this phone fails, cause the open accessory doesn’t work properly (even if the android version of the phone is 2.3.4..) All application excet the latest version of handbag. This is really strange. There’s someting that I miss and you have find to solve my problem? please let me know if you have any idea about that. I’m wasting a lot of time searching on the web a solution, without results until now. Best regards Andrea

    • Are you saying: “Any [ADK] app I’ve tested until now on this phone fails… [except] the latest version of handbag”?

      By this, do you mean that only the latest Handbag app works with the ADK on your phone? Does Handbag *actually* work (i.e. communicates successfully with the Arduino) or does it just not display an error message?

      I recommend checking the logcat output on your phone when the other applications fail. (You can use an app like ‘aLogcat’ to check the logs on your phone without connecting it to another computer.)

      If Handbag is actually running successfully you can take a look at the source code–which might give you a hint–here:

Related Supplies at Maker Shed