I have a moto Xoom with Android 3.1, and a Thinkpad USB mouse.
I connect Xoom and the mouse, everything goes well, I got a cousor,
click, drag works.
I'm trying to List my USB devices with new APIs in Android 3.1.
some codes like:
UsbManager manager = (UsbManager)
getSystemService(Context.USB_SERVICE);
HashMap<String, UsbDevice> deviceList = manager.getDeviceList();
Iterator<UsbDevice> deviceIterator =
deviceList.values().iterator();
Log.d("MyActivity", "Devices Count:" + deviceList.size() + "");
while (deviceIterator.hasNext()) {
UsbDevice device = (UsbDevice) deviceIterator.next();
Log.d("MyActivity", "getProductId:" +
device.getProductId() + "");
}
I got "Devices Count:0", when I connect my mouse to the Xoom. be
noticed, the mouse works.
and I got "Device count:1", when I connect my SanDisk flash disk to
the Xoom, and ProductId of the disk too.
these codes works with my Netcore wireless USB card too.
Why I can't list my mouse with these codes, did I miss something
important??
thanks for your reply in advance!
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en