[PR #278] [MERGED] Added ability to Give write permission to the SD card #1398

Closed
opened 2026-04-24 23:58:10 +02:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/advplyr/audiobookshelf-app/pull/278
Author: @Jnewbon
Created: 7/11/2022
Status: Merged
Merged: 7/11/2022
Merged by: @advplyr

Base: masterHead: master


📝 Commits (2)

  • f998deb Added Storage Media type Write access
  • 7fe3849 Re Added read Permission check as i probably shouldn't have removed it

📊 Changes

3 files changed (+35 additions, -19 deletions)

View changed files

📝 android/app/build.gradle (+1 -1)
📝 android/app/src/main/java/com/audiobookshelf/app/MainActivity.kt (+0 -5)
📝 android/app/src/main/java/com/audiobookshelf/app/plugins/AbsFileSystem.kt (+34 -13)

📄 Description

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.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/advplyr/audiobookshelf-app/pull/278 **Author:** [@Jnewbon](https://github.com/Jnewbon) **Created:** 7/11/2022 **Status:** ✅ Merged **Merged:** 7/11/2022 **Merged by:** [@advplyr](https://github.com/advplyr) **Base:** `master` ← **Head:** `master` --- ### 📝 Commits (2) - [`f998deb`](https://github.com/advplyr/audiobookshelf-app/commit/f998deb725a4f3ca6ccc386b2a07014740c23528) Added Storage Media type Write access - [`7fe3849`](https://github.com/advplyr/audiobookshelf-app/commit/7fe384970569555c25cc8da696223d032fedf173) Re Added read Permission check as i probably shouldn't have removed it ### 📊 Changes **3 files changed** (+35 additions, -19 deletions) <details> <summary>View changed files</summary> 📝 `android/app/build.gradle` (+1 -1) 📝 `android/app/src/main/java/com/audiobookshelf/app/MainActivity.kt` (+0 -5) 📝 `android/app/src/main/java/com/audiobookshelf/app/plugins/AbsFileSystem.kt` (+34 -13) </details> ### 📄 Description 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. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2026-04-24 23:58:10 +02:00
adam closed this issue 2026-04-24 23:58:10 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf-app#1398