InAppDisplayDelegate

InAppDisplayDelegate

An optional display delegate which can control and be notified of in-app lifecycle events.

Methods

isMessageReadyToDisplay(details) → {PromiseLike.<boolean>|boolean}

When present, this method will be called prior to the message described by {details} being displayed. It must return a boolean or a promise that resolves to a boolean, where a true value means the message is OK to be displayed. When the promise resolves to false, the message will be suspended for later display.

Warning: If possible, it is highly recommended that you return a value synchronously to avoid situations where the asynchronous delay of your method performing its check could result in the message actually not being displayed, for example if another in-flight message were to display, and would cause this message to exceed a frequency limit. However, we realize this restriction may be very limiting in some integrations, so asynchronously returning a value via a promise is allowed, however note that this may cause you a display to later not occur in some circumstances.

Parameters:
Name Type Description
details InAppAutomationDetails

details of the in-app automation that is ready to display

Returns:
Type:
PromiseLike.<boolean> | boolean

messageFinishedDisplaying(details) → {void}

When present, this method will be called just after the message described by {details} is dismissed from the screen.

Parameters:
Name Type Description
details InAppAutomationDetails

details of the in-app automation that has finished displaying

Returns:
Type:
void

messageWillDisplay(details) → {void}

When present, this method will be called just prior to the message described by {details} being displayed on the screen.

Parameters:
Name Type Description
details InAppAutomationDetails

details of the in-app automation that is about to display

Returns:
Type:
void