add /storage/emulated/0 for android10

This commit is contained in:
Adrian Ulrich 2020-04-03 20:14:55 +02:00
parent b68ca35af7
commit bf57fa76f1

View File

@ -169,6 +169,8 @@ public class MediaLibrary {
for (File file : context.getExternalMediaDirs()) {
defaultPaths.add(file.getAbsolutePath());
}
// but for now, we also add the default SD directory.
defaultPaths.add(Environment.getExternalStorageDirectory().getAbsolutePath());
} else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
// Try to discover media paths using getExternalMediaDirs() on 5.x and newer
for (File file : context.getExternalMediaDirs()) {