Skip to content
This repository was archived by the owner on Oct 3, 2024. It is now read-only.
This repository was archived by the owner on Oct 3, 2024. It is now read-only.

READ_EXTERNAL_STORAGE permission permanently denied even though it hasn't been asked before? #158

@Daltron

Description

@Daltron

Even after I delete the app and reinstall, the else statement is always called. Why is this permission always being detected as denied when it has never been asked for? Any help would be appreciated! 😄

if (EasyPermissions.hasPermissions(getContext(), perms)) {
            Intent intent = new Intent(Intent.ACTION_GET_CONTENT);
            intent.setType("image/*");
            intent = Intent.createChooser(intent, "Select Picture");
            if (intent.resolveActivity(getActivity().getPackageManager()) != null) {
                startActivityForResult(intent, REQUEST_PICK_IMAGE);
            }
 } else if (!EasyPermissions.permissionPermanentlyDenied(this, Manifest.permission.READ_EXTERNAL_STORAGE)) {
            // Do not have permissions, request them now
            EasyPermissions.requestPermissions(
                    this,
                    getString(R.string.external_storage_rationale),
                    READ_EXTERNAL_STORAGE_PERMISSION,
                    perms);
} else {
            new AppSettingsDialog.Builder(this, getString(R.string.external_storage_rationale)).build().show();
}

I am also including this in my manifest

<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions