public class

RateAppAction

extends Action
java.lang.Object
   ↳ com.urbanairship.actions.Action
     ↳ com.urbanairship.actions.RateAppAction

Class Overview

Action to link users to the rating section of their respective app store directly or through a prompt.

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

Expected argument values: ``show_link_prompt``: Optional Boolean. If NO action will link directly to the Amazon or Play store review page, if YES action will display a rating prompt. Defaults to NO if null. ``title``: Optional String. String to override the link prompt's title. Header defaults to "Enjoying ?" if null. ``body``: Optional String. String to override the link prompt's body. Body defaults to "Tap Rate to rate it in the app store." if null.

Result value: null

Default Registration Names: ^ra, rate_app_action

Summary

Constants
String BODY_KEY Key to define the app review link prompt's body when providing the action's value as a map.
String DEFAULT_REGISTRY_NAME Default registry name
String DEFAULT_REGISTRY_SHORT_NAME Default registry short name
String SHOW_LINK_PROMPT_KEY Key for the showing link prompt option.
String SHOW_RATE_APP_INTENT_ACTION Intent action for linking directly to store review page or displaying a rating link prompt with the option of opening the review page link.
String TITLE_KEY Key to define the app review link prompt's title when providing the action's value as a map.
[Expand]
Inherited Constants
From class com.urbanairship.actions.Action
Public Constructors
RateAppAction()
Public Methods
boolean acceptsArguments(ActionArguments arguments)
Checks if the argument's value can be parsed and ensures the situation is neither Action.SITUATION_PUSH_RECEIVED nor Action.SITUATION_BACKGROUND_NOTIFICATION_ACTION_BUTTON.
ActionResult perform(ActionArguments arguments)
Performs the action.
boolean shouldRunOnMainThread()
Determines which thread runs the action.
[Expand]
Inherited Methods
From class com.urbanairship.actions.Action
From class java.lang.Object

Constants

public static final String BODY_KEY

Key to define the app review link prompt's body when providing the action's value as a map.

Constant Value: "body"

public static final String DEFAULT_REGISTRY_NAME

Default registry name

Constant Value: "rate_app_action"

public static final String DEFAULT_REGISTRY_SHORT_NAME

Default registry short name

Constant Value: "^ra"

public static final String SHOW_LINK_PROMPT_KEY

Key for the showing link prompt option.

Constant Value: "show_link_prompt"

public static final String SHOW_RATE_APP_INTENT_ACTION

Intent action for linking directly to store review page or displaying a rating link prompt with the option of opening the review page link.

Constant Value: "com.urbanairship.actions.SHOW_RATE_APP_INTENT_ACTION"

public static final String TITLE_KEY

Key to define the app review link prompt's title when providing the action's value as a map.

Constant Value: "title"

Public Constructors

public RateAppAction ()

Public Methods

public boolean acceptsArguments (ActionArguments arguments)

Checks if the argument's value can be parsed and ensures the situation is neither Action.SITUATION_PUSH_RECEIVED nor Action.SITUATION_BACKGROUND_NOTIFICATION_ACTION_BUTTON.

Parameters
arguments The action arguments.
Returns
  • true if the action can perform with the arguments, otherwise false.

public ActionResult perform (ActionArguments arguments)

Performs the action.

Parameters
arguments The action arguments.
Returns
  • The result of the action.

public boolean shouldRunOnMainThread ()

Determines which thread runs the action.

Returns
  • true if the action should be run on the main thread, or false if the action should run on a background thread.