public class

HtmlDisplayContent

extends Object
implements DisplayContent
java.lang.Object
   ↳ com.urbanairship.iam.html.HtmlDisplayContent

Class Overview

Display content for a TYPE_HTML in-app message.

Summary

Nested Classes
class HtmlDisplayContent.Builder Display Content Builder. 
Constants
String ASPECT_LOCK_KEY The content's aspect lock payload key
String HEIGHT_KEY The content's height payload key
String REQUIRE_CONNECTIVITY The content's require connectivity key
String WIDTH_KEY The content's width payload key
[Expand]
Inherited Constants
From interface com.urbanairship.iam.DisplayContent
Public Methods
boolean equals(Object o)
static HtmlDisplayContent fromJson(JsonValue value)
Parses HTML display JSON.
boolean getAspectRatioLock()
Gets the aspect lock when displaying the message as a dialog.
int getBackgroundColor()
Returns the background color.
float getBorderRadius()
Returns the border radius in dps.
int getDismissButtonColor()
Returns the dismiss button color.
long getHeight()
Gets the desired height when displaying the message as a dialog.
boolean getRequireConnectivity()
Checks if the message can be displayed or not if connectivity is unavailable.
String getUrl()
Returns the url.
long getWidth()
Gets the desired width when displaying the message as a dialog.
int hashCode()
boolean isFullscreenDisplayAllowed()
Returns true if the html message is allowed to be displayed as fullscreen, otherwise false.
static HtmlDisplayContent.Builder newBuilder(HtmlDisplayContent displayContent)
Creates a builder from existing display content.
static HtmlDisplayContent.Builder newBuilder()
Builder factory method.
JsonValue toJsonValue()
Returns the objects represented as a JsonValue.
String toString()
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.urbanairship.json.JsonSerializable

Constants

public static final String ASPECT_LOCK_KEY

The content's aspect lock payload key

Constant Value: "aspect_lock"

public static final String HEIGHT_KEY

The content's height payload key

Constant Value: "height"

public static final String REQUIRE_CONNECTIVITY

The content's require connectivity key

Constant Value: "require_connectivity"

public static final String WIDTH_KEY

The content's width payload key

Constant Value: "width"

Public Methods

public boolean equals (Object o)

public static HtmlDisplayContent fromJson (JsonValue value)

Parses HTML display JSON.

Parameters
value The json payload.
Returns
  • The parsed display content.
Throws
JsonException If the json was unable to be parsed.

public boolean getAspectRatioLock ()

Gets the aspect lock when displaying the message as a dialog.

Returns
  • The aspect lock.

public int getBackgroundColor ()

Returns the background color.

Returns
  • The background color.

public float getBorderRadius ()

Returns the border radius in dps.

Returns
  • Border radius in dps.

public int getDismissButtonColor ()

Returns the dismiss button color.

Returns
  • The dismiss button color.

public long getHeight ()

Gets the desired height when displaying the message as a dialog.

Returns
  • The desired height.

public boolean getRequireConnectivity ()

Checks if the message can be displayed or not if connectivity is unavailable.

Returns
  • true if connectivity is required, otherwise false.

public String getUrl ()

Returns the url.

Returns
  • The url.

public long getWidth ()

Gets the desired width when displaying the message as a dialog.

Returns
  • The desired width.

public int hashCode ()

public boolean isFullscreenDisplayAllowed ()

Returns true if the html message is allowed to be displayed as fullscreen, otherwise false. See setAllowFullscreenDisplay(boolean)} for more details.

Returns
  • true to allow the html message to display as full screen, otherwise false.

public static HtmlDisplayContent.Builder newBuilder (HtmlDisplayContent displayContent)

Creates a builder from existing display content.

Parameters
displayContent The display content.
Returns
  • A builder instance.

public static HtmlDisplayContent.Builder newBuilder ()

Builder factory method.

Returns
  • A builder instance.

public JsonValue toJsonValue ()

Returns the objects represented as a JsonValue.

Returns
  • The object as a JsonValue.

public String toString ()