I am new to android and I am doing some project planning.
I need to access / store some files to External storage device ( pendrive ). How to find external storage device path ( pendrive ).
Someone else asked this recently here.
Basically, the SDK has support for only one "external storage", and that is an SD card, not a "pen drive".
USB device is recognized as Mass Storage
device if:
usbInterface.getInterfaceClass() == UsbConstants.USB_CLASS_MASS_STORAGE
|| usbInterface.getInterfaceSubclass() == INTERFACE_SUBCLASS // int 6
|| usbInterface.getInterfaceProtocol() == INTERFACE_PROTOCOL // int 80
and
usbInterface.getEndpointCount() == 2
where one of endpoint must satisfy following:
endPoint direction == 0
endPoint type = UsbConstants.USB_ENDPOINT_XFER_BULK //int 2
Refer these links for further details:
Usb detect storage device
Usb device interface not found
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With