Answer the question
In order to leave comments, you need to log in
The list of files on the memory card is not returned?
The list of files on the memory card is not returned?
I wrote in the manifest:
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
String path = Environment.getExternalStorageDirectory().getAbsolutePath();
File f = new File(path);
if(f.listFiles()!=null)
{
File[] files = f.listFiles();
Arrays.sort(files);
for ( File aFile : files ){
if ( aFile.isDirectory() ) {
if(dir_opened(aFile.getPath())){
FileDir.add(aFile.getName());
}
}
}
}
Answer the question
In order to leave comments, you need to log in
You are probably running on Android 6. Permissions from this version must be requested at runtime. Here is an article for you to study.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question