I want to get the external SDCard path. I use Environment.getExternalStorageDirectory()
and get the internal sdcard /mnt/sdcard/
. My external sdcard is/storage/extSdCard
.
How to get it programmatically?
I want to get the external SDCard path. I use Environment.getExternalStorageDirectory()
and get the internal sdcard /mnt/sdcard/
. My external sdcard is/storage/extSdCard
.
How to get it programmatically?
Try like this.
For eg: File f= new File("/mnt/extSdCard/");
new File("/mnt/external_sd/")
or
new File("/mnt/extSdCard/")
in replace of Environment.getExternalStorageDirectory()
Hope it might help you.
File storageDir = new File("/mnt/");
if(storageDir.isDirectory()){
String[] dirlst = storageDir.list();
//TODO some type of selecton method