Skip to content

Fix if no sdcard path will be crashed#52

Open
TakumaLee wants to merge 1 commit into
codekidX:masterfrom
TakumaLee:patch-1
Open

Fix if no sdcard path will be crashed#52
TakumaLee wants to merge 1 commit into
codekidX:masterfrom
TakumaLee:patch-1

Conversation

@TakumaLee

Copy link
Copy Markdown

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.

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.
@codekidX

Copy link
Copy Markdown
Owner

Hi, are you providing full absolute path to folder ?

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

@TakumaLee

Copy link
Copy Markdown
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants