Hi. I've tried several code snippets to get the file names of a specific directory, but all gave me a null. What would be the correct way? Thanks in advance.
import java.io.File;
import android.os.Environment;
// String path = Environment.getExternalStorageDirectory().toString()+"/Download";
String path = "/storage/emulated/legacy/Download";
File f = new File(path);
File[] files = f.listFiles();
printArray(files);