PromptPermissionAction

An action that prompts for permission.

Expected value: - permission: post_notifications, contacts, bluetooth, location, media, mic, or camera - fallback_system_settings: true to navigate to app settings if the permission is silently denied. - allow_airship_usage: If the permission is granted, any Airship features that depend on the permission will be enabled as well, e.g., enable user notifications on PushManager and push feature on privacy Manager if notifications are allowed.

Accepted situations: SITUATION_PUSH_OPENED, SITUATION_WEB_VIEW_INVOCATION, SITUATION_MANUAL_INVOCATION, SITUATION_AUTOMATION, and SITUATION_FOREGROUND_NOTIFICATION_ACTION_BUTTON.

Default Result: empty. The actual permission result can be received using a ResultReceiver in the metadata.

Default Registration Names: DEFAULT_REGISTRY_NAME, DEFAULT_REGISTRY_SHORT_NAME

Inheritors

Constructors

Link copied to clipboard
constructor(@NonNull permissionsManagerSupplier: Supplier<PermissionsManager>)
constructor()

Properties

Link copied to clipboard
Resulting permission status key when using a result receiver.
Link copied to clipboard
The starting permission status key when using a result receiver.
Link copied to clipboard
val DEFAULT_REGISTRY_NAME: String = "prompt_permission_action"
Default registry name
Link copied to clipboard
Default registry short name
Link copied to clipboard
val ENABLE_AIRSHIP_USAGE_ARG_KEY: String = "enable_airship_usage"
Enable airship usage argument key.
Link copied to clipboard
val FALLBACK_SYSTEM_SETTINGS_ARG_KEY: String = "fallback_system_settings"
Fallback system settings argument key.
Link copied to clipboard
val PERMISSION_ARG_KEY: String = "permission"
Permission argument key.
Link copied to clipboard
Permissions result key when using a result receiver.
Link copied to clipboard
val RECEIVER_METADATA: String = "com.urbanairship.actions.PromptPermissionActionReceiver"
Metadata key for a result receiver.

Inherited properties

Link copied to clipboard
Situation where an action is triggered from Action Automation.
Situation where an action is triggered from a background notification action button.
Situation where an action is triggered from a foreground notification action button.
Link copied to clipboard
Situation where an action is manually invoked.
Link copied to clipboard
Situation where an action is triggered when a push is opened.
Link copied to clipboard
Situation where an action is triggered when a push is received.
Link copied to clipboard
Situation where an action is triggered from a web view.

Functions

Link copied to clipboard
Called before an action is performed to determine if the the action can accept the arguments.
Link copied to clipboard
Performs the action.
Link copied to clipboard
open fun sendResult(@NonNull permission: Permission, @NonNull before: PermissionStatus, @NonNull after: PermissionStatus, @Nullable resultReceiver: ResultReceiver)
Link copied to clipboard
Determines which thread runs the action.

Inherited functions

Link copied to clipboard
open fun onFinish(@NonNull arguments: ActionArguments, @NonNull result: ActionResult)
Called after the action performs.
Link copied to clipboard
open fun onStart(@NonNull arguments: ActionArguments)
Called before an action is performed.