I want to use the UsbManager API by wrote following code:
In the Activity code:
UsbManager manager = (UsbManager) getSystemServi
This code works fine for me. Although your code looks similar you can recheck.
UsbManager usbManager = (UsbManager) getSystemService(USB_SERVICE);
HashMap map = usbManager.getDeviceList();
Iterator it = map.values().iterator();
while(it.hasNext()) {
UsbDevice device = it.next();
// use device info
}