I have the following code
if (ContextCompat.checkSelfPermission(this,
Manifest.permission.READ_CONTACTS)
!= PackageManager.PERMISSION_GRANTED) {
if (ActivityCompat.shouldShowRequestPermissionRationale(this,
Manifest.permission.READ_CONTACTS)) {
} else {
ActivityCompat.requestPermissions(this,
new String[]{Manifest.permission.READ_CONTACTS,Manifest.permission.READ_EXTERNAL_STORAGE},
MY_PERMISSIONS_REQUEST_READ_CONTACTS);
}
}
in which question if you have permission to access the contacts and to read the memory, here everything is fine, the problem comes when rejecting the permission.
If I reject it and return for another activity, when I go back to it I should ask again if I accept or not the permission but it does not,
Is not this supposed to verify if you have permission and if you do not have it? ask again?