public class

LegacyInAppMessage

extends Object
java.lang.Object
   ↳ com.urbanairship.iam.LegacyInAppMessage

Class Overview

Legacy in-app message model object.

Summary

Nested Classes
class LegacyInAppMessage.Builder InAppMessage Builder. 
Public Methods
static LegacyInAppMessage fromPush(PushMessage pushMessage)
Creates an in-app message from a push message.
String getAlert()
Returns the message's alert.
Map<StringJsonValue> getButtonActionValues(String buttonId)
Returns the specified button's action name to action value map.
String getButtonGroupId()
Returns the button group ID.
Map<StringJsonValue> getClickActionValues()
Returns the on click action name to action value map.
Long getDuration()
Returns the duration in milliseconds for how long the message should be shown.
long getExpiry()
Returns the expiration time in milliseconds since Jan.
JsonMap getExtras()
Returns extras map.
String getId()
Returns the message's ID.
String getPlacement()
Returns the placement of the in-app message.
Integer getPrimaryColor()
Returns the message's primary color.
Integer getSecondaryColor()
Returns the message's secondary color.
static LegacyInAppMessage.Builder newBuilder()
Creates a new builder.
[Expand]
Inherited Methods
From class java.lang.Object

Public Methods

public static LegacyInAppMessage fromPush (PushMessage pushMessage)

Creates an in-app message from a push message.

Parameters
pushMessage The push message.
Returns
  • The in-app message or null if the push did not contain an in-app message.
Throws
JsonException If the JSON payload is unable to parsed.

public String getAlert ()

Returns the message's alert.

Returns
  • The message's alert.

public Map<StringJsonValue> getButtonActionValues (String buttonId)

Returns the specified button's action name to action value map.

Returns
  • The button's action values.

public String getButtonGroupId ()

Returns the button group ID. The button group can be fetched from getNotificationActionGroup(String)

Returns
  • The button group ID.

public Map<StringJsonValue> getClickActionValues ()

Returns the on click action name to action value map.

Returns
  • The on click action values.

public Long getDuration ()

Returns the duration in milliseconds for how long the message should be shown.

Returns
  • The duration of the message in milliseconds.

public long getExpiry ()

Returns the expiration time in milliseconds since Jan. 1, 1970, midnight GMT.

Returns
  • The expiration time in milliseconds since Jan. 1, 1970, midnight GMT.

public JsonMap getExtras ()

Returns extras map.

Returns
  • The extras map.

public String getId ()

Returns the message's ID.

Returns
  • The message's ID.

public String getPlacement ()

Returns the placement of the in-app message.

Returns
  • The message's placement.

public Integer getPrimaryColor ()

Returns the message's primary color.

Returns
  • The message's primary color.

public Integer getSecondaryColor ()

Returns the message's secondary color.

Returns
  • The message's secondary color.

public static LegacyInAppMessage.Builder newBuilder ()

Creates a new builder.

Returns
  • A new legacy in-app message builder.