java.lang.Object | |
↳ | com.urbanairship.iam.InAppMessage |
Defines an in-app message.
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<String, JsonValue> |
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
|
The in-app message default display behavior. Usually displayed using the default coordinator that allows defining display interval.
The in-app message should be displayed ASAP.
Max message name length.
An Airship layout type. These should be handled internally and not overridden.
Parses a json value.
jsonValue | The json value. |
---|
JsonException | If the json is invalid. |
---|
Gets the display behavior.
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
TYPE_AIRSHIP_LAYOUT
: a HtmlDisplayContent
Checks if reporting is enabled for the in-app message.
true
if reporting is enabled, otherwise false
.
Creates a new builder from an existing message.
message | The in-app message. |
---|
Creates a new builder.
Returns the objects represented as a JsonValue.