java.lang.Object | |||
↳ | com.urbanairship.actions.Action | ||
↳ | com.urbanairship.actions.PromptPermissionAction | ||
↳ | com.urbanairship.actions.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
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
String | DEFAULT_REGISTRY_NAME | Default registry name | |||||||||
String | DEFAULT_REGISTRY_SHORT_NAME | Default registry short name | |||||||||
String | FEATURE_BACKGROUND_LOCATION | Action value to enable location with background updates. | |||||||||
String | FEATURE_LOCATION | Action value to enable location. | |||||||||
String | FEATURE_USER_NOTIFICATIONS | Action value to enable user notifications. |
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
com.urbanairship.actions.PromptPermissionAction
| |||||||||||
From class
com.urbanairship.actions.Action
|
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
EnableFeatureAction(Supplier<PermissionsManager> permissionsManagerSupplier, Supplier<AirshipLocationClient> locationClientSupplier) | |||||||||||
EnableFeatureAction() |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
void |
onStart(ActionArguments arguments)
Called before an action is performed.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
PromptPermissionAction.Args | parseArg(ActionArguments arguments) |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
com.urbanairship.actions.PromptPermissionAction
| |||||||||||
From class
com.urbanairship.actions.Action
| |||||||||||
From class
java.lang.Object
|
Default registry name
Default registry short name
Action value to enable location with background updates.
Action value to enable location.
Action value to enable user notifications. See setUserNotificationsEnabled(boolean)
Called before an action is performed.
arguments | The action arguments. |
---|