-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Permisison Flows
Implement flow for checking and requesting global permissions
- For android this includes managing all files: https://developer.android.com/training/data-storage/manage-all-files
- For web, this would include requesting persistent storage: https://developer.mozilla.org/en-US/docs/Web/API/StorageManager/persist
- TBC on iOS
Android
Current solution requests to manage all files, but Android code is rough and may be better ways.
Custom Plugin APIs
Headbase works with the filesystem lots, and using Capacitors FileSystem API and capawesome FilePicker means adding additional application API level complexity. it may be preferable in the medium/long term to write a custom plugin which could provide:
- exact APIs returning consistent file references (paths) and other metadata as required
- features like loading a directory tree via one call which currently requires processing and recursive calls in the platform api layer
- file query features which will hit the filesystem lots and could be more performant
The CapacitorSQLite plugin works well, but docs and API is not the easiest to use. A custom plugin here could allow for a streamlined API experience and add confidence that there won't be future issues.
Storage Access Framework (SAF)
It may also be possible to integrate with storage access framework (https://developer.android.com/guide/topics/providers/document-provider)? i don't know if this would be covered by managing all file permissions, or seperate. I also don't know if/how this integrates with Capacitor FileSystem.
The use case I think this would support is reading/writing files to cloud provider DocumentProviders such as Google Drive, Dropbox etc.