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
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:
UsbManager manager = (UsbManager) getSystemService(Context.USB_SERVICE);
UsbAccessory accessory = (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: