java – How do I handle the "don't ask again" checkbox in Android Runtime Permission?-ThrowExceptions

Exception or error:

I want to handle this checkbox and take action accordingly.
The process I want to do is as follows;
User triggers permission,

  • Dont do anything if the user denied permission

User triggers permission again

  • This time checkbox marks.
  • Again, there is no action.

The user triggers permission again.

  • This time the dialog show to go to the settings.

Most apps show the go to settings dialog after the second rejection. I dont want this.

How to solve:

if check box is checked store it using shared pref

Leave a Reply

Your email address will not be published. Required fields are marked *