How to modify message to request the location permission?

I am working in monitoring app, and I need modify the language of message to request the ACCESS_COARSE_LOCATION permission. How to do it?
According to I’m calling in the MainActivity:

The default Android permissions dialog doesn’t allow you to add a custom message/explanation to it.

The way to go about that is to use the check method first, see what permissions are missing via the onRequirementsMissing callback, show your own dialog or a screen which explains why you need these permissions and what’s in it for the user, e.g.:

(the copy/message could be better here :P)

And then if the user taps on the button, you invoke the actual dialog.

See also: Android’s own documentation/hints about how to do the “explaining” part:

1 Like