0

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?

DaringLi
  • 409
  • 2
  • 6
  • 16

2 Answers2

0

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.

Shadow
  • 6,864
  • 6
  • 44
  • 93
0
File storageDir = new File("/mnt/");
if(storageDir.isDirectory()){
String[] dirlst = storageDir.list();
//TODO some type of selecton method
Marijn
  • 10,367
  • 5
  • 59
  • 80
Swati Rawat
  • 1,729
  • 1
  • 19
  • 34