cordova-plugin-android-permissions
cordova-plugin-android-permissions copied to clipboard
Storage permission not showing up
We have been trying this plugin on all versions from 7 to 14 and we have found that specifically in android version 13, Samsung models, the permission pop up for writing on the external storage isn't showing up. It doesn't even show an option to allow the storage in the phone settings > app > permissions
I'm also having the same problem.
const tryGetPermission = async () => {
return new Promise((resolve, reject) => {
const permissions = cordova.plugins.permissions;
if (!permissions) {
return resolve(false)
}
permissions.checkPermission(
permissions.WRITE_EXTERNAL_STORAGE,
async function(status) {
if (status.hasPermission) {
resolve(true);
} else {
permissions.requestPermission(// the permission pop up does not work.
permissions.WRITE_EXTERNAL_STORAGE,
async function(status) {
resolve(status.hasPermission)//status.hasPermission = false
},
function() {
reject(false);
}
);
}
},
function() {
reject(false);
}
);
});
}
I'm also having the same problem.
const tryGetPermission = async () => { return new Promise((resolve, reject) => { const permissions = cordova.plugins.permissions; if (!permissions) { return resolve(false) } permissions.checkPermission( permissions.WRITE_EXTERNAL_STORAGE, async function(status) { if (status.hasPermission) { resolve(true); } else { permissions.requestPermission(// the permission pop up does not work. permissions.WRITE_EXTERNAL_STORAGE, async function(status) { resolve(status.hasPermission)//status.hasPermission = false }, function() { reject(false); } ); } }, function() { reject(false); } ); }); }
This is what I found https://developer.android.com/training/data-storage/manage-all-files