Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added ability to Give write permission to the SD card #278

Merged
merged 2 commits into from
Jul 11, 2022

Conversation

Jnewbon
Copy link
Contributor

@Jnewbon Jnewbon commented Jul 10, 2022

Fixes #159

After reading over the Simple storage docs I made some changed in the AbsFileSystem plugin to handle Access Denied to External media types by requesting the needed access from the user, Tested this code on Android 10 and it seems to work.

User Flow

  1. Open Side Bar
  2. Select Local Media
  3. Choose 'Books' in dropdown and Click New Folder
  4. Create the folder or select and existing one on an SD card
  5. Click Allow and Allow again
  6. Message dialog will appear stating Write perms are needed
  7. Another Folder selector is shown at SD Card Root level
  8. Click Allow and Allow again

Permission is granted but the folder is not added to the App, user will need to select the folder again, However this time the app will add the folder as expected. If the user pick the folder instead of the root of the SD Card an helpful message is displayed stating the root folder should be selected and the selector is displayed again

I haven't figured out how to get this done in a nicer way, it seems Android require the user to be pestered a lot for these kind of permissions

Also this is my first look into android Dev.

@Jnewbon Jnewbon mentioned this pull request Jul 10, 2022
2 tasks
@advplyr advplyr merged commit 2b5377d into advplyr:master Jul 11, 2022
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.

Access denied
2 participants