Closed JeetuChoudhary closed 1 year ago
It is happening same to us after updating to 33. https://github.com/apache/cordova-plugin-file/issues/577 Also seems related
Android 13 / API 33 removes WRITE_EXTERNAL_STORAGE
/READ_EXTERNAL_STORAGE
permissions and replaces them with READ_MEDIA
permissions (see here)
So requesting EXTERNAL_STORAGE
permission when build SDK >= 33 will have no effect.
Instead request READ_MEDIA
, e.g.
cordova.plugins.diagnostic.requestRuntimePermission(function(status){
console.log("Permission: " + status);
}, function(error){
console.error("The following error occurred: "+error);
}, cordova.plugins.diagnostic.permission.READ_MEDIA_IMAGES);
Current behavior:
After updating the app to target Android API 33. When I try to download an image, it shows the Storage Request dialog stating to allow the app to access files on your device.
I have tried to request permission again for Android API 33 as you mentioned in the documentation and it doesn't open any permission dialog and shows following message in logs:
Expected behavior:
It should download and store images on the phone after clicking on the download button.
Screenshots
Environment information
Capacitor:
System:
33
"cordova.plugins.diagnostic": "^7.1.2"