apache / cordova-plugin-file

Apache Cordova File Plugin
https://cordova.apache.org/
Apache License 2.0
741 stars 756 forks source link

Mention in Readme that - API level 29 onward's plugin will not work for reading files outside project directory. #523

Closed mujaffars closed 8 months ago

mujaffars commented 2 years ago

Feature Request

Motivation Behind Feature

The readme does not mention that this plugin will not work if we use Api level greater than 29. Please mention that so the users will get a clear understanding of the app.

Feature Description

Google Play Store now accepts new apps with API levels greater than 29 only. So adding clear details to the readme will give a clear understanding.

Alternatives or Workarounds

breautek commented 2 years ago

You can still read files outside the project directory (which I assume you mean the application directory...)

But there are many directories outside of the project directory that are simply no longer accessible, or have limited access with Scoped Storage, which was introduced in API 29 and completely enforced in API 30.

You should be able to read files inside the cordova.file.external* paths for example, all of which are outside of your application directory, but you can only read files in which your app has created. And you may need the READ_EXTERNAL_STORAGE permission granted for reading files that wasn't created by your app.

Creating new directories in the external storage is also no longer permissible with the new scoped storage rules.

I agree though, documentation will likely need to be updated. I'm sure there is also some conflicting information in our previous documentation.

breautek commented 8 months ago

Noted at https://github.com/apache/cordova-plugin-file#androids-external-storage-quirks