apache / cordova-plugin-file

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

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

Open alexisGandar opened 9 months ago

alexisGandar commented 9 months ago

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