Use Android Open Accessory Without Android Programming

Arduino Computers & Mobile
Use Android Open Accessory Without Android Programming

“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.

34 thoughts on “Use Android Open Accessory Without Android Programming

  1. Anonymous says:

    Genius!

    Could this be done for the iPhone?

    1. John Edgar Park says:

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

      1. Anonymous says:

        Ace!  Thanks John.

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

      2. Anonymous says:

        Ace!  Thanks John.

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

      3. Anonymous says:

        Ace!  Thanks John.

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

      4. Anonymous says:

        Ace!  Thanks John.

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

    2. John Edgar Park says:

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

    3. John Edgar Park says:

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

    4. John Edgar Park says:

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

    5. John Edgar Park says:

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

    6. John Edgar Park says:

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

  2. Daniel Conley Paul III says:

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

    1. Mark Stubbs says:

      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.

    2. Duane Woods says:

      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. Daniel Conley Paul III says:

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

  4. Andrea Pavesi says:

    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

    1. follower says:

      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

Comments are closed.

Discuss this article with the rest of the community on our Discord server!
Tagged

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.

View more articles by Brian Jepson

ADVERTISEMENT

Maker Faire Bay Area 2023 - Mare Island, CA

Escape to an island of imagination + innovation as Maker Faire Bay Area returns for its 15th iteration!

Buy Tickets today! SAVE 15% and lock-in your preferred date(s).

FEEDBACK