storage-chooser
storage-chooser copied to clipboard
Fix if no sdcard path will be crashed
If no sdcard or getExternalStorageState() is not MEDIA_MOUNTED or MEDIA_MOUNTED_READ_ONLY, the application will be crashed by storage path, and not use the PredefinedPath.
Hi, are you providing full absolute path to folder ?
If yes, then you want to use builder.skipOverview(true, yourPath)
Hi,
If I use skipOverview, and it will be:
java.lang.SecurityException: Unsupported path /data/user/0/{PackageName}/files/xxx.file
it can select internal storage path, but it will throw this exception.
And this is original use withPredefinedPath
method exception:
java.lang.IllegalArgumentException: Invalid path: /sdcard
Actually, this change just avoids throwing the exception. :(