Request Permission

Using this action, you can request permission before accessing the user's private information, such as location, voice, contacts, and photos.

This action is helpful when you add a custom widget or action that accesses the user's personal information and does not have an inbuilt permission mechanism.

  • Request permission only works on a mobile platform.

  • There won't be any dialog shown for the Bluetooth and Notifications permissions.

Prerequisites

Before you add this action, ensure you add a message for the permission you would like to request.

Adding Request Permission action

Follow the steps below to add this action to any widget.

  1. Select the Widget (e.g., Button) on which you want to add this action.

  2. Select Actions from the Properties panel (the right menu), and click Open. This will open an Action flow Editor in a new popup window. If it's the first action, click + Add Action button. Otherwise, click the "+" button below the previous action tile and select Add Action.

    1. Search and select the Request Permissions (under Alerts/Notifications) action.

    2. Set the Permission Type to the one you need. Only the permissions for which the message is present are shown here. See how to add a permission message.

    3. Now you must check if the permission was granted or rejected. You can do so by adding the conditional action. To do so, click the "+" button below the previous action tile and select Add Conditional.

    4. From the Set Variable menu, select Permission > Permission name (this should be the permission you requested for).

      1. The TRUE section represents success, meaning permission was granted. Here you can add any action that informs users or access their data.

      2. The FALSE section represents failure, meaning permission was denied. Here you can add any action that informs users about the permission they have denied.

    5. Click Close.

Last updated