You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 3, 2024. It is now read-only.
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)) {
Intentintent = newIntent(Intent.ACTION_GET_CONTENT);
intent.setType("image/*");
intent = Intent.createChooser(intent, "Select Picture");
if (intent.resolveActivity(getActivity().getPackageManager()) != null) {
startActivityForResult(intent, REQUEST_PICK_IMAGE);
}
} elseif (!EasyPermissions.permissionPermanentlyDenied(this, Manifest.permission.READ_EXTERNAL_STORAGE)) {
// Do not have permissions, request them nowEasyPermissions.requestPermissions(
this,
getString(R.string.external_storage_rationale),
READ_EXTERNAL_STORAGE_PERMISSION,
perms);
} else {
newAppSettingsDialog.Builder(this, getString(R.string.external_storage_rationale)).build().show();
}