Add ability to turn off storing files "downloaded" through a Document Provider (Storage Access Framework)
- Dominant language
- Kotlin
- Stars
- 5.6k
- Forks
- 2k
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 92
Description
### Is your feature request related to a problem? Please describe.
I'm developing an Audiobook Player and want to finish adding Nextcloud as a source of Audiobooks through the custom Document Provider. When a user accesses a book that is stored in their nextcloud, the book will download to their device (storing the book offline). The problem is I have no control over those files. If the user ever wants to delete the files from their device, they will have to open the nextcloud app and clear the files themselves. Alternatively, I could copy the files to my app's storage, but then we are doubling the amount of space the audiobook is taking (the files within my app, and stored within Nextcloud), and they would still have to delete the files manually.
### Describe the solution you'd like
_Ideally_, I would like the Document Provider API to give more fine-tuned control (i.e. delete files from device and detect if they are currently on the device). But that is a "Google" problem.
So instead I would like an option to be added to the Nextcloud app where you can select a folder and indicate that it will only be stored in cache (allowing it to be cleared by the OS when necessary). I then could "download" the files to the device, then copy them to my app. The user could use my app no matter the condition of the Nextcloud app and remove the audiobook from device. At the same time, it wouldn't double up on the amount of storage used per book.
### Describe alternatives you've considered
I suppose I could just tell the users to delete the book themselves within the nextcloud app, but that is less than ideal (especially considering the wording of the "Delete" menu. I've almost deleted files from the server when I only meant to delete the local copy).
I am open to other alternatives, or utilizing any functionality in the API that I am unaware of.
Thanks!
Contributor guide
Assessment
This issue has not been assessed yet.