magnusja / libaums

Open source library to access USB Mass Storage devices on Android without rooting your device
Apache License 2.0
1.26k stars 270 forks source link

storageDevices.length is always 0 #395

Closed androidHRTZ closed 1 year ago

androidHRTZ commented 1 year ago

Problem UsbMassStorageDevice.getMassStorageDevices(this) ‘s length is always 0

When UsbManager usbManager = (UsbManager) getSystemService(Context.USB_SERVICE); usbManager.getDeviceList.size() is 1 and UsbMassStorageDevice[] storageDevices = UsbMassStorageDevice.getMassStorageDevices(MainActivity.this); storageDevices.length is always 0

what can i do to solve this problem , thanks .

talhacomak commented 1 year ago

Same problem with Canon Camera. When i use a USB Card, there is no problem. When i use Canon Camera as OTG device, the library couldn't see it as Mass Storage Device. However i can reach the files with Android MTP function at notification bar.

androidHRTZ commented 1 year ago

Yes,me too,my device is Canon Camera,and i can get the Canon Camera ‘s images with Android MTP.

magnusja commented 1 year ago

MTP is not supported by this library, contributions welcome!