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

   As I had mentioned in my first comment, we did manage this to be working. 
   
   We use `MANAGE_EXTERNAL_STORAGE` already. At the app start we check the 
permission is allowed and if not, we start intent to request user to allow 
access to all files directly without his need to manage to go to Android 
settings. This is working fine.
   
   What we had realized with Android 13 is that it was not working, because 
file plugin did not consider this  `MANAGE_EXTERNAL_STORAGE` permission and did 
not allow `getDirectory` request. We then realized that we did not have 
mentioned `READ_MEDIA_*` permissions in config, so were not allowed.  After 
adding these permissions, that is FilePlugin testing in `hasReadPermission`, 
now it is working fine. 
   But in fact, we do not need these `READ_MEDIA_*` permissions.
   So we do not have any issues with file plugin now.
   
   And there was my comment targeted, file plugin requires `READ_MEDIA_*` 
permissions, but they are not needed if `MANAGE_EXTERNAL_STORAGE` is allowed, 
because in that case, app has access to all files. So file plugin could take 
that into account.
   
   This was maybe the root cause of problems also of other implementations that 
realized problems with file plugin on Android 13. That the app did not request 
`READ_MEDIA_*` permission and FilePlugin refused the access request.
   
   FYI, we store files in `cordova.file.externalRootDirectory` / appName, 
corresponding  to uri  `storage/emulated/0/appName` if I remember, so it is the 
direct root of Android storage.
   


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