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

   > Anyway, I don't understand why filePlugin is testing if all READ_MEDIA_* 
permissions are granted to allow read access and not at least one of. IMHO, 
this is bypassing the Android granularity.
   And also MANAGE_EXTERNAL_STORAGE should be taken into account when testing 
read/write permissions.
   
   You're right. It's done this way because A) filesystem doesn't know what 
kind of file you're working with and B) this represents the old behaviour the 
best.
   
   Android's scoped storage model does not fit well in a "Filesystem" concept 
and in fact there are a lot of limitations in using Filesystem APIs when 
interacting with the scoped storage framework. Using a media store plugin to 
interface with media store APIs should allow you to not request the READ_* 
permissions at all.
   
   > And also MANAGE_EXTERNAL_STORAGE should be taken into account when testing 
read/write permissions.
   
   While this permission will allow you to access the external filesystem as a 
traditional filesystem, the permission is a protected permission. Which means 
you need to provide justification to Google make use of the permission. Google 
reserves the right to reject any app that they feel do not **need** the 
MANAGE_EXTERNAL_STORAGE permission. In otherwords, unless if your app's main 
purpose is to manage files, you likely cannot make use of that permission and 
deploy to the Google Play store. This is why it's not used by the file plugin.
   
   Google has also 
[announced](https://support.google.com/googleplay/android-developer/answer/14115180?hl=en#)
 they are going to be more strict on the usage of the READ_* permissions, which 
puts a greater emphasize on moving towards the media store API. 
READ_MEDIA_IMAGES, and so on requires you to be implementing an app that 
requires broad access to a media type (such as a gallery app)
   
   In otherwords, I believe the file plugin is no longer going to be useful for 
interacting with the external storage partition and usage of the file plugin is 
probably going to be best reserved for interacting with internal app private 
storage only. I'd strongly consider looking into [media 
store](https://www.npmjs.com/search?q=ecosystem%3Acordova%20storage%20access%20framework)
 plugin instead.


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