public class

LandingPageAction

extends Action
java.lang.Object
   ↳ com.urbanairship.actions.Action
     ↳ com.urbanairship.iam.actions.LandingPageAction

Class Overview

Schedules a landing page to display ASAP. Accepted situations: SITUATION_PUSH_OPENED, SITUATION_WEB_VIEW_INVOCATION, SITUATION_MANUAL_INVOCATION, SITUATION_AUTOMATION, and SITUATION_FOREGROUND_NOTIFICATION_ACTION_BUTTON. Accepted argument value types: URL defined as either a String or a Map containing the key "url" that defines the URL, an optional "width", "height" in dps as an int or "fill" string, an optional "aspect_lock" option as a boolean. The aspect_lock option guarantees that if the message does not fit, it will be resized at the same aspect ratio defined by the provided width and height parameters. Default Registration Names: ^p, landing_page_action

Summary

Constants
float DEFAULT_BORDER_RADIUS Default border radius.
String DEFAULT_REGISTRY_NAME Default registry name
String DEFAULT_REGISTRY_SHORT_NAME Default registry short name
String URL_KEY The content's url payload key
[Expand]
Inherited Constants
From class com.urbanairship.actions.Action
Public Constructors
LandingPageAction()
Default constructor.
Public Methods
boolean acceptsArguments(ActionArguments arguments)
Checks if the argument's value can be parsed to a URI and if the situation is not Action.SITUATION_PUSH_RECEIVED.
float getBorderRadius()
Gets the border radius.
ActionResult perform(ActionArguments arguments)
Performs the action.
void setBorderRadius(float borderRadius)
Sets the border radius to apply to the HtmlDisplayContent.
Protected Methods
Schedule<InAppMessage> createSchedule(Uri uri, ActionArguments arguments)
Called to create the schedule Info.
InAppMessage.Builder extendMessage(InAppMessage.Builder builder)
Can be used to customize the InAppMessage.
Builder<InAppMessage> extendSchedule(Builder<InAppMessage> builder)
Can be used to customize the Schedule.
Uri parseUri(ActionArguments arguments)
Parses the ActionArguments for a landing page URI.
[Expand]
Inherited Methods
From class com.urbanairship.actions.Action
From class java.lang.Object

Constants

public static final float DEFAULT_BORDER_RADIUS

Default border radius.

Constant Value: 2.0

public static final String DEFAULT_REGISTRY_NAME

Default registry name

Constant Value: "landing_page_action"

public static final String DEFAULT_REGISTRY_SHORT_NAME

Default registry short name

Constant Value: "^p"

public static final String URL_KEY

The content's url payload key

Constant Value: "url"

Public Constructors

public LandingPageAction ()

Default constructor.

Public Methods

public boolean acceptsArguments (ActionArguments arguments)

Checks if the argument's value can be parsed to a URI and if the situation is not Action.SITUATION_PUSH_RECEIVED.

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

public float getBorderRadius ()

Gets the border radius.

Returns
  • The border radius.

public ActionResult perform (ActionArguments arguments)

Performs the action.

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

public void setBorderRadius (float borderRadius)

Sets the border radius to apply to the HtmlDisplayContent.

Parameters
borderRadius The border radius.

Protected Methods

protected Schedule<InAppMessage> createSchedule (Uri uri, ActionArguments arguments)

Called to create the schedule Info.

Parameters
uri The landing page Uri.
arguments The arguments.
Returns
  • The schedule info.

protected InAppMessage.Builder extendMessage (InAppMessage.Builder builder)

Can be used to customize the InAppMessage.

Parameters
builder The builder.
Returns
  • The builder.

protected Builder<InAppMessage> extendSchedule (Builder<InAppMessage> builder)

Can be used to customize the Schedule.

Parameters
builder The builder.
Returns
  • The builder.

protected Uri parseUri (ActionArguments arguments)

Parses the ActionArguments for a landing page URI.

Parameters
arguments The action arguments.
Returns
  • A landing page Uri, or null if the arguments could not be parsed or is not allowed.