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 Jul 2, 2021. It is now read-only.
Call onPermissionsChecked with already granted permissions
Actual behaviour
when I ask for permissions it call onError(DexterError error) with REQUEST_ONGOING error
Activity was closed and opened several times using startActivityForResult setResult(OK) or CANCEL before this happened.
Steps to reproduce
Dexter.withActivity(getActivity())
.withPermissions(
Manifest.permission.CAMERA,
Manifest.permission.READ_EXTERNAL_STORAGE
).withListener(new MultiplePermissionsListener() {
@Override
public void onPermissionsChecked(MultiplePermissionsReport report) {
if (report.areAllPermissionsGranted()) {
openCamera();
} else {
requestMultiplePermissions();
}
}
@Override
public void onPermissionRationaleShouldBeShown(List<PermissionRequest> permissions, PermissionToken token) {
token.continuePermissionRequest();
}
}).withErrorListener(new PermissionRequestErrorListener() {
@Override
public void onError(DexterError error) {
int y = 0;
}
}).check();