EnableFeatureAction

An action that enables features. Running the action with value FEATURE_LOCATION or FEATURE_BACKGROUND_LOCATION will prompt the user for permissions before enabling.

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

Accepted argument value - either FEATURE_USER_NOTIFICATIONS, FEATURE_BACKGROUND_LOCATION, or FEATURE_LOCATION.

Result value: true if the feature was enabled, otherwise false.

Default Registration Names: DEFAULT_REGISTRY_NAME, DEFAULT_REGISTRY_SHORT_NAME

Constructors

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

Properties

Link copied to clipboard
val DEFAULT_REGISTRY_NAME: String = "enable_feature"
Default registry name
Link copied to clipboard
Default registry short name
Link copied to clipboard
val FEATURE_BACKGROUND_LOCATION: String = "background_location"
Action value to enable location with background updates.
Link copied to clipboard
val FEATURE_LOCATION: String = "location"
Action value to enable location.
Link copied to clipboard
val FEATURE_USER_NOTIFICATIONS: String = "user_notifications"
Action value to enable user notifications.

Inherited 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.
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
open fun onStart(@NonNull arguments: ActionArguments)
Called before an action is performed.
Link copied to clipboard
protected open fun parseArg(arguments: ActionArguments): PromptPermissionAction.Args

Inherited 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
open fun onFinish(@NonNull arguments: ActionArguments, @NonNull result: ActionResult)
Called after the action performs.
Link copied to clipboard
Performs the action.
Link copied to clipboard
protected open fun prompt(@NonNull args: PromptPermissionAction.Args, @Nullable resultReceiver: ResultReceiver)
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.