I was wondering if I can start an Intent for viewing a directory with a File browser (if there’s one installed on the device) so I can open a folder like this:
Intent intent = new Intent(Intent.ACTION_VIEW);
Uri uri = Uri.parse("file:///sdcard/MyFolder");
intent.setDataAndType(uri, "MIME TYPE FOR FOLDERS");
startActivity(intent);
AndExplorer has vendor mime types to use AndExplorer as a file chooser:
vnd.android.cursor.dir/lysesoft.andexplorer.directorvnd.android.cursor.dir/lysesoft.andexplorer.fileSee AndExplorer’s developper documentation for more information. I think other file explorers as similar features, but I didn’t find their docs yet.