Skip to content Skip to sidebar Skip to footer

How Can I Get The Adk Demokit Example Working On A Google I/o Galaxy Tab 10.1?

I'm trying to get the DemoKit example working on an ADK board. It seems like even with the 3.1 update the Galaxy Tab doesn't have everything it needs (or at least doesn't work as a

Solution 1:

My apologies, accessory mode currently doesn't work with the Samsung Galaxy Tab 10.1. Samsung is aware of the issue and is working on resolving it. When the device does support accessory mode you should be able to use the com.android.future.usb.* APIs which will make it easier for you to write an app that works both with Android 3.1 and 2.3.4.

Solution 2:

I just got the new TouchWiz update and now the Arduino reads this back to the serial port:

Device addressed... Requesting device descriptor.found possible device. swithcing to serial mode
device supports protcol 1

Device addressed... Requesting device descriptor.found android acessory device
config desc
interface desc
inEp:1outEp:2

This is looking much better. The Galaxy Tab asks to run DemoKit, I hit OK, and it force quits. This better than it was previously.

I will update if I get it working fully.

Solution 3:

Are you sure you are using the right build target? Instead of regular "Android 2.3.3" (level 10) or "Android 3.1" (level 12), you should use "Google APIs" targets. If you run "Android SDK and AVD Manager", you can find them under Available Packages > Third party add-ons > Google Inc > "Google APIs by Google Inc., Android API 10" (or 12).

Solution 4:

My Galaxy Tab 10.1 on Android 3.1 didn't have the accessories API as a backport as well. So I got the following exception as well:

java.lang.NoClassDefFoundError: com.android.future.usb.UsbManager

One way to bringing it to work on the Tab 10.1 with Android 3.1 is to use the regular accessory API. Not the backported version. You can set your DemoKit projects target SDK to the regular API level 12 (Android 3.1).

In addition you have to change the code passages in the DemoKitActivity to get the UsbManager and the UsbAccesory to:

UsbManagermanager= (UsbManager) getSystemService(Context.USB_SERVICE);
UsbAccessoryaccessory= (UsbAccessory) intent.getParcelableExtra(UsbManager.EXTRA_ACCESSORY);

imports change to:

import android.hardware.usb.UsbAccessory;
import android.hardware.usb.UsbManager;

The Android manifest can still contain the following entry but it is not required anymore:

<uses-libraryandroid:name="com.android.future.usb.accessory" />

Post a Comment for "How Can I Get The Adk Demokit Example Working On A Google I/o Galaxy Tab 10.1?"