Most of the new android devices have an internal sdcard and an external sdcard. I want to make a file explorer app but I can\'t find out how to get the path to use in my app
File main=new File(String.valueOf(Environment.getExternalStorageDirectory().getAbsolutePath())); File[]t=main.getParentFile().listFiles(); for(File dir:t) { Log.e("Main",dir.getAbsolutePath()); }
Output:
E/Main: /storage/sdcard1 E/Main: /storage/sdcard0
I have one SD card and inbuilt memory.