[*] I confirm this is a suspected bug or issue that will affect other users
[*] I have reproduced the issue using the example project or provided the necessary information to reproduce the issue.
[*] I have read the documentation thoroughly and it does not help solve my issue.
[ ] I have checked that no similar issues (open or closed) already exist.
Current behavior:
Expected behavior:
It should request the external storage permission.
For example, If i want to access my photo library/file. It should request the permission.
Steps to reproduce:
Create a sample cordova app.
Install the cordova-diagnostic-plugin cordova-diagnostic-plugin.
Then try to check and request the externalstorage access using the below code as mentioned in the plugin document.
cordova.plugins.diagnostic.requestExternalStorageAuthorization(function(status){
console.log("Authorization request for external storage use was " + (status == cordova.plugins.diagnostic.permissionStatus.GRANTED ? "granted" : "denied"));
}, function(error){
console.error(error);
});
Here im always getting the status as "DENIED_ALWAYS"
Screenshots
Environment information
Cordova CLI version
cordova -v12.0.0 (cordova-lib@12.0.1)
Cordova platform version
android 12.0.1
Plugins & versions installed in project (including this plugin)
Bug report
CHECKLIST
[*] I have read the issue reporting guidelines
[*] I confirm this is a suspected bug or issue that will affect other users
[*] I have reproduced the issue using the example project or provided the necessary information to reproduce the issue.
[*] I have read the documentation thoroughly and it does not help solve my issue.
[ ] I have checked that no similar issues (open or closed) already exist.
Current behavior:
Expected behavior: It should request the external storage permission. For example, If i want to access my photo library/file. It should request the permission.
Steps to reproduce:
Create a sample cordova app. Install the cordova-diagnostic-plugin cordova-diagnostic-plugin. Then try to check and request the externalstorage access using the below code as mentioned in the plugin document.
cordova.plugins.diagnostic.requestExternalStorageAuthorization(function(status){ console.log("Authorization request for external storage use was " + (status == cordova.plugins.diagnostic.permissionStatus.GRANTED ? "granted" : "denied")); }, function(error){ console.error(error); });
Here im always getting the status as "DENIED_ALWAYS"
Screenshots
Environment information
cordova -v
12.0.0 (cordova-lib@12.0.1)cordova plugin ls
cordova.plugins.diagnostic 7.1.3 "Diagnostic"Runtime issue
Android build issue:
node -v
ls platforms/android/.gradle
Related code:
Console output
requestExternalStorageAuthorization always returning as DENIED_ALWAYS
``` // Paste any relevant JS/native console output here ```