OptionaltitleTitle for the Android background location permission dialog.
OptionalmessageThe body text of the dialog.
Provide an explanation of why you need this permission, similar in purpose to iOS' NSLocationAlwaysAndWhenInUseUsageDescription.
OptionalpositiveThe text to display on the positive action button.
OptionalnegativeThe text to display on the negative action button (eg: Cancel)
(Android 11+) Configure the dialog shown when requesting Always background location permission.
Android 11 changed the location authorization flow and no longer presents an “Allow all the time” option on the initial system dialog.
Instead, Android allows apps to show a custom rationale dialog explaining why background access is required.
This dialog can take the user directly to the app’s Location Permissions settings screen, where they can explicitly grant Allow all the time. The SDK presents this dialog automatically when:
"Always", andBehavior Notes
After the user presses the
positiveAction, it will not be shown again(pressing Cancel does not count as acceptance).
the rationale dialog becomes eligible to be shown again.
Example
Template Tags
The following template variables can be used inside any rationale field by writing them as
{tagName}:{backgroundPermissionOptionLabel}{applicationName}AndroidManifest.See also