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


   Google doesn't really provide any concrete details but [they do 
say](https://developer.android.com/about/versions/11/privacy/storage#permissions-target-11)
   
   > If your app targets Android 11, both the WRITE_EXTERNAL_STORAGE permission 
and the WRITE_MEDIA_STORAGE privileged permission no longer provide any 
additional access.
   
   `WRITE_EXTERNAL_STORAGE` is the permission originally required to write to 
any file in external storage (that is `/sdcard/` for devices with an actual sd 
card or `/storage/emulated/0/` for devices with emulated external storage, 
which are most modern devices today). As of API 30, `WRITE_EXTERNAL_STORAGE` 
does not grant any special behaviours, and is essentially ignored/no-op. In my 
testing, you can write to certain external file paths, e.g. `Downloads/`, 
`Media/`, `Pictures/`, etc... but apps can no longer modify files under the 
external directories unless if the app itself was the creator of the file (at 
least that's my current interpretation/understanding of the [google android 
docs](https://developer.android.com/training/data-storage/shared/media#request-permissions)).
   
   If you're using a plugin such as the camera plugin to obtain pictures, it 
would be important to note that your app **is not** the creator of the image, 
and instead the Camera app on the device is. Therefore you should have read 
access with `READ_EXTERNAL_STORAGE` permission granted, but you cannot write or 
make modifications to the file. You **should** be able to write a copy of that 
file under a different filename.


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to