1

My app must have Camera and Audio access without being requested each time (I don't want to get into details, but trust me on this one).

Is there a way to know on Android 11+ if the user clicked "Only this time" on either Camera or Audio permission?

1 Answer 1

0

You cannot say, when the user will disable the permissions given to your app.

If you want to have the permissions always (irrespective of when you actually gonna need it), ask the user to give the permission at the launch of your app. Other than this, you cannot stop the user to disable the permissions later.

Kind of like:

if (isPermissionGiven){
    //Permission given, continue...
} else {
    //Permisson not given, ask for permission...
}  

By this you would be able to do your work unless you are doing any work to access the user's camera in background without the user's consent which is not Legitimate.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.