Answer the question
In order to leave comments, you need to log in
Why can't I see the files?
I'm trying to get a list of files on the sdcard, but it always returns null along the path /storage/emulated/0/, but it sees all the files on /. If you enter adb shell ls -l /storage/emulated/0/ in the console, then all files are visible
File directory = new File( Environment.getExternalStorageDirectory().getAbsolutePath() );
File[] files = directory.listFiles();
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question