cordova-plugin-file icon indicating copy to clipboard operation
cordova-plugin-file copied to clipboard

fix(android): Request permission Android <= 10 on API 33

Open alexisGandar opened this issue 2 years ago • 0 comments
trafficstars

Platforms affected

Motivation and Context

On Android 10 and below, on cordova-plugin-file V8 and cordova-android V12 the permission request was not displayed to the user witch lead to an error when trying to write a file in the externalRootDirectory + '/Download' folder.

Permission not requested on Android 10 when targeting API 33 (#586)

Description

This fix always ask for permission if needed on GetFile action. This allow to fix the bug.

Testing

I test on Android 10/11/12/13 that writing a file to externalRootDirectory + '/Download' works.

Checklist

  • [x] I've run the tests to see all new and existing tests pass
  • [ ] I added automated test coverage as appropriate for this change
  • [x] Commit is prefixed with (platform) if this change only applies to one platform (e.g. (android))
  • [x] If this Pull Request resolves an issue, I linked to the issue in the text above (and used the correct keyword to close issues using keywords)
  • [ ] I've updated the documentation if necessary

alexisGandar avatar Jul 27 '23 06:07 alexisGandar