Request permissions in a flow

To ask users for a system permission, add the Request permission action to a screen of your flow. For example:

  • Ask users to turn on push notifications on the last onboarding screen.
  • Ask for location access before users look for nearby stores.
  • Ask for camera access before users scan a document.

Your app shows the system dialog and passes the result to the flow. To control what happens next, add actions to When allowed, When denied, and After response. For example, if the flow requests location access to show a map of nearby places:

  • When allowed: The user granted access. The next screen shows the map around the user’s location.
  • When denied: The user declined access. The next screen asks for an address.
  • After response: The user made no decision, for example, closed the dialog without making a choice. The next screen shows a list of all places, without the map.

Your app needs code to handle each permission that a flow can request. Everything else changes without an app release: which permissions the flow requests, how it displays them, and the logic around them.

Before you start

Versions of your app can differ in the permission dialogs that they show for flows. For example, version 2.0 of your app shows the location dialog when a flow requests location access, and version 1.9 doesn’t. A published flow reaches both versions, so users of version 1.9 see the flow, but not the dialog. To show the flow only in version 2.0 and later:

  1. Create a segment on App version (current) for versions later than 1.9.
  2. Add the segment as an audience to the placement of the flow.

Permissions you can request

The Permission dropdown lists the following permissions. The table shows what users see on each OS, and what to plan for in the flow:

PermissioniOSModern AndroidOlder Android versionsIn the flow
Push notificationsAlertDialogAndroid 12 and earlier: no dialog. Notifications are on unless the user turned them off in the system settings, so the flow usually runs the When allowed actions.If your app requests provisional authorization on iOS, iOS doesn’t ask users, and the flow runs the When allowed actions right away. Provisional authorization means that iOS delivers notifications quietly: they only appear in the Notification Center.
App tracking (ATT)AlertNo such permission—On Android, the flow runs the After response actions.
Location while using the appAlert with a Precise switchDialog where users select precise or approximate locationAndroid 11 and earlier: the dialog has no choice of accuracy. If your app requests precise location, users who grant access share their precise location.For approximate location, the flow runs the When allowed actions too.
Location alwaysLocation alert, or an upgrade alert if users already granted Location while using the appSettings pageAndroid 10: a dialog. Android 9 and earlier: no separate request, because Android grants background location together with Location while using the app.On Android, request Location while using the app on an earlier screen, so that users see one step per screen. On iOS, after Allow Once, the flow runs the When denied actions.
Precise locationWith approximate location: an alert that asks for precise location. Without location access: the location alert. If users turn off Precise in the location alert, the alert that asks for precise location appears next.With approximate location: a dialog where users select precise location or keep approximate location. Without location access: the location dialog.Android 11 and earlier: no dialog for precise location alone. Android grants precise location together with Location while using the app.—
CameraAlertDialog—On Android devices without a camera, the flow runs the After response actions.
MicrophoneAlertDialog——
PhotosAlert where users select full or limited accessDialog. Users can select limited accessAndroid 13: a dialog without limited access. Android 12 and earlier: the storage permission dialog.For limited access, the flow runs the When allowed actions too.
Media libraryAlertDialogAndroid 12 and earlier: the storage permission dialog.On iOS, Media library and Apple Music share one alert. After users grant or decline one of them, iOS shows no alert for the other.
Apple MusicAlertNo such permission—On Android, the flow runs the After response actions. On iOS, this permission shares one alert with Media library.
Speech recognitionAlertThe microphone dialog—On iOS, speech recognition of live audio needs Microphone too. Either request Microphone on another screen of the flow, or request both permissions in your app code for Speech recognition.
ContactsAlert. On iOS 18 and later, users select all or some contactsDialog—For access to some contacts, the flow runs the When allowed actions too.
CalendarAlert for full access or for adding events onlyDialog—For access to add events only, the flow runs the When allowed actions too.
RemindersAlertNo such permission—On Android, the flow runs the After response actions.
Health dataHealth access sheetHealth Connect permissions screenAndroid 9 to 13: users need the Health Connect app from Google Play. Android 8 and earlier: Health Connect isn’t available, so the flow runs the After response actions.On iOS, when your app only requests read access, the flow runs the After response actions: iOS doesn’t report whether users granted read access.
Motion & FitnessAlert at the first access to motion dataDialogAndroid 9 and earlier: no dialog. Android grants the permission when the app is installed, so the flow runs the When allowed actions.—
BluetoothAlertNearby devices dialogAndroid 11 and earlier, or an app with a targetSdk of 30 or lower: the location dialog.—
Local networkAlert at the first access to the local networkDialog, in an app with a targetSdk of 37 or higherEarlier versions: no dialog. The app has access through its internet permission, so the flow runs the When allowed actions.On iOS, the flow never runs the When denied actions: iOS doesn’t tell your app when users decline. The flow waits for the timeout in your app, then runs the After response actions.
HomeKitAlertNo such permission—On Android, the flow runs the After response actions.
Focus statusAlertNo such permission—On Android, the flow runs the After response actions.
SiriAlertNo such permission—On Android, the flow runs the After response actions.

To skip the screen about an iOS-only permission on Android, only show it on iOS.

Add the request to a screen

To give users a reason before the system dialog appears, add the request to a screen that explains the permission:

  1. Select the button that should show the system dialog, such as Continue.
  2. Add an On Tap trigger with the Request permission action to the button.
  3. From the Permission dropdown, select the permission. The Your app must handle this request warning then lists what your app declares for it: the Info.plist keys, the Xcode capabilities, and the Android manifest permissions.

If an earlier screen already explained the permission, add the request to the On Screen Appear trigger of the next screen instead.

On the screen that has the Request permission action:

  • Label the button Continue or Next, not Allow.
  • On iOS, keep the button with the request as the only way off the screen. The Human Interface Guidelines ask for one button: a button that skips the system alert diverts users from their choice, and can make them feel manipulated.
  • On Android, add a Skip button that runs Navigate Next, and only show it on Android. The Android permission guidelines ask for a way to cancel a screen that explains a permission.
  • Add one Request permission action per screen: the flow sends one permission request at a time.

When the button with the request is the only way off a screen, the Flow & Paywall Builder warns you. The warning doesn’t block publishing. The builder counts Navigate to Screen, Navigate Next, Navigate back, and Close Flow as a way off on any trigger of the screen. They count inside a Conditional Action and in the actions for a purchase or restoration result too. The actions for the permission result and Open URL don’t count. A Skip button with a visibility condition still counts as a way off the screen, even where the condition hides it. So don’t rely on the warning: show the flow only in the versions of your app that can request the permission. These versions pass the result of the permission request to the flow.

Apple and Google set more rules for some permissions:

  • App tracking (ATT): A screen before the ATT alert must not offer an incentive, imitate the system alert, show an image of it, or annotate the screen behind it. Apple’s Human Interface Guidelines say that App Review rejects such screens. App Review Guideline 5.1.2(i) requires the ATT permission for tracking. The app can’t require tracking for access to features or for rewards.
  • Location always: On Android, Google Play requires a prominent disclosure right before the request. Put it on the screen with the Location always request. The disclosure says that the app collects location data for a named feature, even when the app is closed or not in use. See Access to device location in the background.
  • Bluetooth: On Android 11 and earlier, or in an app with a targetSdk of 30 or lower, users see a location dialog. Mention location on the screen that has the Request permission action.

How your app handles the request

When the flow runs the Request permission action, a permission handler in your app receives the permission request. The handler shows the system dialog and passes the result to the flow. For a permission that the handler doesn’t request, your app passes a not-granted result without a dialog, and the flow runs the After response actions.

If a version of your app without the permission handler shows the flow, users see no dialog. What the flow does next depends on the Adapty SDK in the app:

  • The flow stays on the screen:
    • The iOS, Unity, and Kotlin Multiplatform SDKs.
    • The Flutter SDK 4.4.0 and earlier.
  • The flow runs the After response actions:
    • The Android, React Native, and Capacitor SDKs.
    • The Flutter SDK 4.4.1 and later.

Add actions for each result

After your app passes the result, the flow runs the After response actions. The default action is Navigate Next, so users go to the next screen whether they grant the permission or decline it. Without an After response action, users stay on the screen.

To send users who grant the permission and users who decline it to different screens, add actions to When allowed and When denied. The flow then runs these actions instead of the After response actions:

  • When allowed actions: After the user grants the permission.
  • When denied actions: After your app passes denied, restricted, or permanently_denied to the flow.

If the only When allowed or When denied action is Do nothing, the flow moves on to the After response actions. To keep users who decline on the screen, remove every action from After response. Users who grant the permission then need their own way forward: add Navigate Next to When allowed.

Add an action to a result

To add an action for a result:

  1. Select the element with the Request permission action.
  2. Click the Request permission action.
  3. For When allowed, When denied, or After response, click .
  4. From the Action dropdown, select the action to run instead of Do nothing.

You can’t add Purchase, Restore purchases, or another Request permission action to When allowed, When denied, and After response.

Set up the When denied actions

Add a way forward, such as Navigate Next, as the last When denied action. App Review Guideline 5.1.2(i) doesn’t allow an app to require system functionality, such as push notifications, location services, or tracking, to use the app. Guideline 5.1.1(iv) asks apps to respect the user’s permission settings, and not to manipulate, trick, or force users to consent.

Use When denied for a path without the permission. For example, let users enter their city instead of location access, or show a button that opens the system settings. When your app passes restricted, the flow runs the When denied actions too: a device policy, such as parental controls, blocks the permission. Under such a policy, users can’t grant the permission in the system settings.

After response as a fallback

The flow never runs the When denied actions in the following cases:

  • The OS has no such permission, such as App tracking (ATT) on Android.
  • The OS doesn’t report a refusal, such as iOS for Local network or for read access to Health data.
  • The app version passes a not-granted result without denied, restricted, or permanently_denied.

In these cases, the flow runs the After response actions. Keep a navigation action there. The default After response action is Navigate Next.

Requests that don’t trigger a system dialog

When the OS shows no dialog, for example because the user granted the permission before this request, your app passes the result without waiting for the user. The flow then runs the actions for that result. If those actions leave the screen, users only see the screen for a moment.

Track the results

To count how many users grant a permission on each screen, track the permission events in the flow analytics of your app .