public static class

LegacyInAppMessage.Builder

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

Class Overview

InAppMessage Builder.

Summary

Public Methods
LegacyInAppMessage build()
Builds the message.
LegacyInAppMessage.Builder setAlert(String alert)
Sets the message's alert.
LegacyInAppMessage.Builder setButtonActionValues(String buttonId, Map<StringJsonValue> actionValues)
Sets the message's button actions for a given button ID.
LegacyInAppMessage.Builder setButtonGroupId(String buttonGroupId)
Sets the message's button group ID.
LegacyInAppMessage.Builder setClickActionValues(Map<StringJsonValue> actionValues)
Sets the message's on click action values.
LegacyInAppMessage.Builder setDuration(Long milliseconds)
Sets the duration to show the message for.
LegacyInAppMessage.Builder setExpiry(Long milliseconds)
Sets the message's expiry in milliseconds.
LegacyInAppMessage.Builder setExtras(JsonMap extras)
Sets the message's extras.
LegacyInAppMessage.Builder setId(String id)
LegacyInAppMessage.Builder setPlacement(String placement)
Sets the message's placement.
LegacyInAppMessage.Builder setPrimaryColor(Integer color)
Sets the message's primary color.
LegacyInAppMessage.Builder setSecondaryColor(Integer color)
Sets the message's secondary color.
[Expand]
Inherited Methods
From class java.lang.Object

Public Methods

public LegacyInAppMessage build ()

Builds the message.

Returns
  • The created in-app message.
Throws
IllegalArgumentException if the duration is less than or equal to 0.

public LegacyInAppMessage.Builder setAlert (String alert)

Sets the message's alert.

Parameters
alert The message's alert.
Returns
  • The builder.

public LegacyInAppMessage.Builder setButtonActionValues (String buttonId, Map<StringJsonValue> actionValues)

Sets the message's button actions for a given button ID.

Parameters
buttonId The button's ID.
actionValues The button's action values.
Returns
  • The builder.

public LegacyInAppMessage.Builder setButtonGroupId (String buttonGroupId)

Sets the message's button group ID.

Parameters
buttonGroupId The message's button group ID.
Returns
  • The builder.

public LegacyInAppMessage.Builder setClickActionValues (Map<StringJsonValue> actionValues)

Sets the message's on click action values.

Parameters
actionValues The message's on click action values.
Returns
  • The builder.

public LegacyInAppMessage.Builder setDuration (Long milliseconds)

Sets the duration to show the message for.

Parameters
milliseconds The duration in milliseconds.
Returns
  • The builder.

public LegacyInAppMessage.Builder setExpiry (Long milliseconds)

Sets the message's expiry in milliseconds. If no expiry is set, it will default to 30 days from the creation date.

Parameters
milliseconds The expiry date in milliseconds.
Returns
  • The builder.

public LegacyInAppMessage.Builder setExtras (JsonMap extras)

Sets the message's extras.

Parameters
extras The message's extras.
Returns
  • The builder.

public LegacyInAppMessage.Builder setPlacement (String placement)

Sets the message's placement.

Parameters
placement The message's placement.
Returns
  • The builder.

public LegacyInAppMessage.Builder setPrimaryColor (Integer color)

Sets the message's primary color.

Parameters
color The message's primary color.
Returns
  • The builder.

public LegacyInAppMessage.Builder setSecondaryColor (Integer color)

Sets the message's secondary color.

Parameters
color The message's secondary color.
Returns
  • The builder.