Search code examples
androidexternalsd-card

How to get the external SDCard?


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?


Solution

  • File storageDir = new File("/mnt/");
    if(storageDir.isDirectory()){
    String[] dirlst = storageDir.list();
    //TODO some type of selecton method