//Granify Android SDK/com.granifyinc.granifysdk/Granify/subscribeMessageShown

subscribeMessageShown

[androidJvm]\

@JvmStatic

fun subscribeMessageShown(handler: (DisplayStatus) -> Unit)

Registers a callback handler to be notified when a message is (or could have been) shown.

In most cases, this handler implementation is expected to send the display status information to your analytics system. This allows for tracking messages displayed (as determined by the Granify engine) as a metric across all sessions.

Expect your handler to be invoked by Granify at any time, when our engine decides to show a message to a shopper. No guarantees are made regarding the thread the handler will be invoked on.

Placement

This function can be called at any time, but it is most usefully called prior to activateGranify to ensure a handler is registered in advance of any messages being shown.

Parameters

androidJvm

   
handler The callback to be invoked when a message is shown. A DisplayStatus will be supplied indicating whether the shopper was shown the message.