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.


  • Anonymous

    Genius!

    Could this be done for the iPhone?

    • John Edgar Park

       This Ciao app sort of does: http://ciaoapp.com/

      • Anonymous

        Ace!  Thanks John.

        I don’t see much information about what options one has beyond buttons and an LCD – but it certainly looks interesting!

      • Anonymous

        Ace!  Thanks John.

        I don’t see much information about what options one has beyond buttons and an LCD – but it certainly looks interesting!

      • Anonymous

        Ace!  Thanks John.

        I don’t see much information about what options one has beyond buttons and an LCD – but it certainly looks interesting!

      • Anonymous

        Ace!  Thanks John.

        I don’t see much information about what options one has beyond buttons and an LCD – but it certainly looks interesting!

    • John Edgar Park

       This Ciao app sort of does: http://ciaoapp.com/

    • John Edgar Park

       This Ciao app sort of does: http://ciaoapp.com/

    • John Edgar Park

       This Ciao app sort of does: http://ciaoapp.com/

    • John Edgar Park

       This Ciao app sort of does: http://ciaoapp.com/

    • John Edgar Park

       This Ciao app sort of does: http://ciaoapp.com/

  • http://www.facebook.com/profile.php?id=556408045 Daniel Conley Paul III

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

    • http://www.facebook.com/mark.a.stubbs Mark Stubbs

      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

      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?

  • http://www.facebook.com/profile.php?id=556408045 Daniel Conley Paul III

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

  • Andrea Pavesi

    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

    • http://rancidbacon.com follower

      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: https://github.com/follower/android-arduino-handbag