public class

InAppMessage

extends Object
implements Parcelable JsonSerializable
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.DisplayType  
Constants
int MAX_ID_LENGTH Max message ID length.
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)
Map<StringJsonValue> getActions()
Gets the actions.
Audience getAudience()
Gets the audience.
<T extends DisplayContent> T getDisplayContent()
Returns the display content.
JsonMap getExtras()
Gets the extras.
String getId()
Gets the message ID.
String getType()
Gets the in-app message type.
int hashCode()
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 int MAX_ID_LENGTH

Max message ID length.

Constant Value: 100 (0x00000064)

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 Map<StringJsonValue> getActions ()

Gets the actions.

Returns
  • The actions.

public Audience getAudience ()

Gets the audience.

Returns
  • The audience.

public T getDisplayContent ()

Returns the display content.

The return type depends on the in-app message type: TYPE_BANNER: a BannerDisplayContent, TYPE_CUSTOM: a CustomDisplayContent, TYPE_FULLSCREEN: a FullScreenDisplayContent, TYPE_HTML: a HtmlDisplayContent

Returns
  • The display content.

public JsonMap getExtras ()

Gets the extras.

Returns
  • The extras.

public String getId ()

Gets the message ID.

Returns
  • The message ID.

public String getType ()

Gets the in-app message type.

Returns
  • The in-app message type.

public int hashCode ()

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)