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
  • 399
  • 2
  • 5
  • 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,754
  • 5
  • 39
  • 88
0
File storageDir = new File("/mnt/");
if(storageDir.isDirectory()){
String[] dirlst = storageDir.list();
//TODO some type of selecton method
Marijn
  • 10,097
  • 5
  • 56
  • 78
Swati Rawat
  • 1,729
  • 1
  • 19
  • 34