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


   > However, will there be a solution to reading files in API 30? If 
application is designed to work with files it will be useless if there will be 
no way to access FS.
   
   Android is going to limit the ability to access the file system outside of 
your app's sandbox, so accessing these files won't be possible starting API 30 
as they once were. Android has a `MediaStore` API that we either need to figure 
out how to implement within the file plugin or perhaps as an entirely new 
plugin. The MediaStore is no way alike the the FS API so it may be completely 
out of scope for this plugin.
   
   With that being said, there will be some external files that will become 
inaccessible starting API 30 as the MediaStore doesn't provide access to 
everything. For example, `cordova.file.externalRootDirectory + "test.txt"` will 
likely become impossible to access using the new APIs which will be enforced 
starting API 30. Likewise, if you have any custom folders that you used inside 
the external root directory, they'll become inaccessible. 
[Google](https://developer.android.com/about/versions/11/privacy/storage) 
states:
   
   > If your app uses the legacy storage model and previously targeted Android 
10 or lower, you might be storing data in a directory that your app cannot 
access when the scoped storage model is enabled. Before you target Android 11, 
migrate data to a directory that's compatible with scoped 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.

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