We have a usb port in our android tablet(version 4.0.3).
- How do we find out any PenDrive connected on that port or not.
- How do we access the files in the USB Pendrive which connected on that port through programmatically in android.
We have a /mnt contained Folder as
asec
extsd
obb
sdcard
secure
usbhost1
-
How to programmatically identify which one is
Internal Memory Path,External SD Card PathandUSB Path. -
What is the purpose for used this folder
asec,obbandsecure.
Thanks in advance.
Regards
Bala
I guess to use the external sdcard you need to use this:
OR
OR
in replace of Environment.getExternalStorageDirectory()
Works for me. You should check whats in the directory mnt first and work from there..
You should use some type of selection method to choose which sdcard to use:
The “pen drive” is located in /mnt/ (just like all other storage devices in 4.0>)
It will probably be different for some devices, for the Acer Iconia A500 running 4.0.3 usb storage is under
/mnt/usb_storage/