Reputation: 4069
My request may seems strange, but I need to reset the permissions from the code. I ask the permissions like that :
if (ContextCompat.checkSelfPermission(getApplicationContext(),
Manifest.permission.CAMERA)
!= PackageManager.PERMISSION_GRANTED) {
ActivityCompat.requestPermissions(this,
new String[]{Manifest.permission.CAMERA},
MY_PERMISSIONS_REQUEST_CAMERA);
}
How can I revoke that permission once the user granted it?
Upvotes: 2
Views: 1128
Reputation: 3103
You can't for the same reason you can't grant them - they must always be under the users control.
Upvotes: 2