CodeWithOz opened a new issue #468: URL: https://github.com/apache/cordova-plugin-file/issues/468
# Feature Request ## Motivation Behind Feature <!-- Why should this feature be implemented? What problem does it solve? --> This feature solves the problem of saving files to a shared storage volume on Android 11, which is desirable for media files because the user would not expect media files to be locked away to only the app that created the media file. `VOLUME_EXTERNAL_PRIMARY` is the new way to do this but I can't find a way to access it the using this plugin. [This example](https://developer.android.com/training/data-storage/shared/media#add-item) shows how to use `VOLUME_EXTERNAL_PRIMARY` to save files to shared storage, but on [this page](https://cordova.apache.org/docs/en/10.x/reference/cordova-plugin-file/index.html#where-to-store-files) it seems there's no exposure to that storage volume via this plugin. ## Feature Description <!-- Describe your feature request in detail Please provide any code examples or screenshots of what this feature would look like Are there any drawbacks? Will this break anything for existing users? --> Ideally I'd like to be able to write code like this: ``` window.resolveLocalFileSystemURL( cordova.file.volumeExternalPrimary, dirEntry => {...} ) ``` Please see the links above for the example from the official Android docs. ## Alternatives or Workarounds <!-- Describe alternatives or workarounds you are currently using Are there ways to do this with existing functionality? --> The alternative is to use the app-specific storage space on the external drive, but the [Android docs state](https://developer.android.com/training/data-storage/shared) that this would not be ideal for media because the files will not be available to other apps and would be wiped if the app is uninstalled, both of which a user is unlikely to desire for pics and vids. I know that there are conversations about Android 11 changes in #426 and #456, but no mention has been made of this particular use-case, which is an important one. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
