Closed greatjack1 closed 7 years ago
Please add this line "token.continuePermissionRequest();" in the onPermissionRationaleShouldBeShown method for appearing the permission dialog again after deny.
Example like:- Dexter.withActivity(this) .withPermission(Manifest.permission.WRITE_EXTERNAL_STORAGE) .withListener(new PermissionListener() { @Override public void onPermissionGranted(PermissionGrantedResponse response) { Log.e("PERMITION ","ACCEPT"); }
@Override
public void onPermissionDenied(PermissionDeniedResponse response) {
Log.e("PERMITION ","DENAY");
}
@Override
public void onPermissionRationaleShouldBeShown(PermissionRequest permission, PermissionToken token) {
token.continuePermissionRequest();
Log.e("PERMITION ","RATIONAL");
}
})
.onSameThread()
.check();
Thanks, issue closed
Expected behaviour: Each and every time dexter runs, it should check for permissions, and ask for them and then call the onPermissionsChecked method. Every single time Dexter is used it should repeat this.
Actual behaviour: Dexter only calls it the first time I ask for permissions, how ever if the user denies the permission on the first time and then restarts the app, dexter will not call the onPermissionsChecked method