Is it possible to use the AndroidAccessory library to set up a USB communication between MBED - Android device Jellyeban 4.1.1

25 Jun 2013

Dear All,

We use the AndroidAccessory Library [1] to setup a USB communication between MBED and an Android device In our case the Android device is an Android TV stick, to be precise a Tronsmart MK808b with Android Jellybean 4.1.1 installed [2]. However, setting up the USB communication with Androids ADK gives some problems. When I want to build it and run it at the Android stick I get the following error message in the Android Development Tool (ADT) using the Android Debugging Bridge (ADB):

"Package com.test.demo requires unavailable shared library com.android.future.usb.accessory; failing!"

I don't get this message when I have connected a normal Samsung Galaxy S2 smartphone (Jellybean 4.1.2) instead of this Android TV Stick.

So I have the following questions for setting up the USB communication between the Android TV Stick and the MBED side:

(A) For the smartphone tested App - MBED USB communication, with use of the ADK, the App uses the 'com.android.future.usb.accessory' library. However, these USB accessories APIs are a Google APIs add-on library to backport it to models before Android 3.1, using an external library, namely the 'com.android.future.usb.accessory' library [3]. Has somebody managed to setup an Android - MBED USB communication using the built-in library (after Android 3.1), so the 'android.hardware.usb' library in combination with the MBED AndriodAccessory Library [1]? Is there a MBED library available with examples of this?

(B) Does somebody know how to check if the library 'com.android.future.usb.accessory' is available on the Android OS side? So to get a list of installed libraries?

Thanks,

R

[1] (http://mbed.org/users/p07gbar/code/AndroidAccessory/file/98fbe1660f0a/)

[2] Tronsmart MK808b with Finless ROM 1.6a, Android Jellybean 4.1.1

[3] http://developer.android.com/guide/topics/connectivity/usb/accessory.html#choosing

24 Nov 2013

Thanks all, & Hello!~ i have try and also have this library error in Java "import com.android.future.usb.UsbAccessory" my solution: i)click "mbedADKSketch" at your Java Eclipse project ii) right click entry the properties[Alt+Enter] iii) select Android on Left hand side and choice "Google APIs..." can solve it. At android USB will be 2 type: 1) as Accessory 2) as Host at early at mBed site having enough information to clarify on it~

Hope everyone enjoy to used mBed!~