java.lang.Object | |
↳ | com.urbanairship.iam.DisplayHandler |
Display handler for in-app message displays.
In-app message should call isDisplayAllowed(Context)
before displaying the in-app
message if the in-app message is displayed in its own activity. Typically, this should be done in
an Activity's or Fragment's onCreate callbacks.
When the in-app message is finished, call finished(ResolutionInfo, long)
. This will finish the display of an
in-app message and allow it to be triggered again by one of the in-app message triggers.
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From interface
android.os.Parcelable
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
void |
cancelFutureDisplays()
Prevents the message from displaying again.
| ||||||||||
int | describeContents() | ||||||||||
void |
finished(ResolutionInfo resolutionInfo, long displayMilliseconds)
Called when the in-app message is finished displaying.
| ||||||||||
String |
getScheduleId()
Gets the schedule ID.
| ||||||||||
boolean |
isDisplayAllowed(Context context)
Called to verify display is still allowed.
| ||||||||||
void | writeToParcel(Parcel dest, int flags) |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
From interface
android.os.Parcelable
|
Prevents the message from displaying again.
Called when the in-app message is finished displaying. After calling this method, the in-app message should immediately dismiss its view to prevent the current activity from redisplaying the in-app message if still on the back stack.
resolutionInfo | Info on why the message has finished. |
---|---|
displayMilliseconds | The display time in milliseconds |
Called to verify display is still allowed. If the in-app message is being displayed in a fragment or directly in an activity, it should be called in the onStart method. If the in-app message is attached directly to a view it should be called in the view's onWindowVisibilityChanged when the window becomes visible.
true
if the message should continue displaying, otherwise false
.