storage-chooser icon indicating copy to clipboard operation
storage-chooser copied to clipboard

Fix if no sdcard path will be crashed

Open TakumaLee opened this issue 6 years ago • 2 comments

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.

TakumaLee avatar Aug 21 '17 04:08 TakumaLee

Hi, are you providing full absolute path to folder ?

If yes, then you want to use builder.skipOverview(true, yourPath)

codekidX avatar Aug 23 '17 06:08 codekidX

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. :(

TakumaLee avatar Aug 24 '17 13:08 TakumaLee