public class

InAppMessage

extends Object
implements Parcelable ScheduleData
java.lang.Object
   ↳ com.urbanairship.iam.InAppMessage

Class Overview

Defines an in-app message.

Summary

Nested Classes
class InAppMessage.Builder In-app message builder. 
@interface InAppMessage.DisplayBehavior  
@interface InAppMessage.DisplayType  
Constants
String DISPLAY_BEHAVIOR_DEFAULT The in-app message default display behavior.
String DISPLAY_BEHAVIOR_IMMEDIATE The in-app message should be displayed ASAP.
int MAX_NAME_LENGTH Max message name length.
String TYPE_AIRSHIP_LAYOUT An Airship layout type.
String TYPE_BANNER Banner in-app message.
String TYPE_CUSTOM Custom in-app message.
String TYPE_FULLSCREEN Fullscreen in-app message.
String TYPE_HTML HTML in-app message.
String TYPE_MODAL Modal in-app message.
[Expand]
Inherited Constants
From interface android.os.Parcelable
Public Methods
int describeContents()
boolean equals(Object o)
static InAppMessage fromJson(JsonValue jsonValue)
Parses a json value.
Map<StringJsonValue> getActions()
Gets the actions.
String getDisplayBehavior()
Gets the display behavior.
<T extends DisplayContent> T getDisplayContent()
Returns the display content.
JsonMap getExtras()
Gets the extras.
String getName()
Gets the message name.
String getType()
Gets the in-app message type.
int hashCode()
boolean isReportingEnabled()
Checks if reporting is enabled for the in-app message.
static InAppMessage.Builder newBuilder(InAppMessage message)
Creates a new builder from an existing message.
static InAppMessage.Builder newBuilder()
Creates a new builder.
JsonValue toJsonValue()
Returns the objects represented as a JsonValue.
String toString()
void writeToParcel(Parcel dest, int flags)
[Expand]
Inherited Methods
From class java.lang.Object
From interface android.os.Parcelable
From interface com.urbanairship.json.JsonSerializable

Constants

public static final String DISPLAY_BEHAVIOR_DEFAULT

The in-app message default display behavior. Usually displayed using the default coordinator that allows defining display interval.

Constant Value: "default"

public static final String DISPLAY_BEHAVIOR_IMMEDIATE

The in-app message should be displayed ASAP.

Constant Value: "immediate"

public static final int MAX_NAME_LENGTH

Max message name length.

Constant Value: 1024 (0x00000400)

public static final String TYPE_AIRSHIP_LAYOUT

An Airship layout type. These should be handled internally and not overridden.

Constant Value: "layout"

public static final String TYPE_BANNER

Banner in-app message.

Constant Value: "banner"

public static final String TYPE_CUSTOM

Custom in-app message.

Constant Value: "custom"

public static final String TYPE_FULLSCREEN

Fullscreen in-app message.

Constant Value: "fullscreen"

public static final String TYPE_HTML

HTML in-app message.

Constant Value: "html"

public static final String TYPE_MODAL

Modal in-app message.

Constant Value: "modal"

Public Methods

public int describeContents ()

public boolean equals (Object o)

public static InAppMessage fromJson (JsonValue jsonValue)

Parses a json value.

Parameters
jsonValue The json value.
Returns
  • The parsed InAppMessage.
Throws
JsonException If the json is invalid.

public Map<StringJsonValue> getActions ()

Gets the actions.

Returns
  • The actions.

public String getDisplayBehavior ()

Gets the display behavior.

Returns
  • The in-app message display behavior.

public T getDisplayContent ()

Returns
  • The display content.

public JsonMap getExtras ()

Gets the extras.

Returns
  • The extras.

public String getName ()

Gets the message name.

Returns
  • The message name.

public String getType ()

Gets the in-app message type.

Returns
  • The in-app message type.

public int hashCode ()

public boolean isReportingEnabled ()

Checks if reporting is enabled for the in-app message.

Returns
  • true if reporting is enabled, otherwise false.

public static InAppMessage.Builder newBuilder (InAppMessage message)

Creates a new builder from an existing message.

Parameters
message The in-app message.
Returns
  • A new in-app message builder.

public static InAppMessage.Builder newBuilder ()

Creates a new builder.

Returns
  • A new in-app message builder.

public JsonValue toJsonValue ()

Returns the objects represented as a JsonValue.

Returns
  • The object as a JsonValue.

public String toString ()

public void writeToParcel (Parcel dest, int flags)