Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Storage permission not showing up #126

Open
pixellet14 opened this issue Oct 9, 2023 · 2 comments
Open

Storage permission not showing up #126

pixellet14 opened this issue Oct 9, 2023 · 2 comments

Comments

@pixellet14
Copy link

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

@nomori7010
Copy link

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);
      }
    );
  });
}

@pixellet14
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants