breautek commented on issue #649:
URL: 
https://github.com/apache/cordova-plugin-file/issues/649#issuecomment-2789680535

   If you purely operate with internal storage paths, the plugin and you're 
application is already compliant assuming you're running 8.x of the plugin.
   
   The file plugin doesn't declare any permissions itself, allowing you to 
decide what you **need** for your application. However non-internal `file://` 
paths requires external storage permissions or READ permissions depending on 
the API level. If the nature of your application can justify using those 
permissions, then you can add them to your app config (see 
[example](https://github.com/apache/cordova-plugin-file?tab=readme-ov-file#sdk-target-less-than-29)).
   
   Otherwise if you need to work with the external filesystem, then the file 
plugin is no longer a clean fit, but can still be useful in specific 
circumstances. Changes to your application might be necessary to be complaint 
with Google's policies. To interface with Android's external storage, without 
requiring extra permissions which Google requires justification for, you must 
interface with the MediaStore and use `content://` URIs. These URIs give you 
temporary access to a specific resource on the external filesystem. This plugin 
does not interface with the MediaStore directly, but it can resolve 
`content://` uris to read and write to those resources providing that their 
content providers enables read/writes.
   
   An example of this pattern can be seen with the Apache camera plugin, which 
does interface with the MediaStore when choosing images from the gallery. A 
`content://` path is typically given, we don't know the underlying storage of 
the content, it could be external storage, google drive, or some other 
location, but after the user picks the resource, the app can read the given 
`content://` url for a limited time allowing the application to use or make a 
copy of the resource if necessary using the file plugin APIs.
   
   The limitations of accessing external file system resources is noted 
[here](https://github.com/apache/cordova-plugin-file?tab=readme-ov-file#androids-external-storage-quirks)
   
   Let me know if this information helps or if there is anything that needs to 
be expanded on.


-- 
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.

To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org

Reply via email to