setListeners

actual fun setListeners(onFailure: (Exception) -> Unit, onDismissed: () -> Unit, onShown: () -> Unit, onImpression: () -> Unit, onClick: () -> Unit)

Sets the listeners for the interstitial ad.

Parameters

onFailure

A callback invoked when the ad fails to show.

onDismissed

A callback invoked when the ad is dismissed.

onShown

A callback invoked when the ad is shown.

onImpression

A callback invoked when an impression is recorded for the ad.

onClick

A callback invoked when the ad is clicked.

expect fun setListeners(onFailure: (Exception) -> Unit, onDismissed: () -> Unit, onShown: () -> Unit = {}, onImpression: () -> Unit = {}, onClick: () -> Unit = {})

Sets the FullScreenContentCallback for the Interstitial Ad.

The setListeners function handles events related to displaying your InterstitialAdHandler. Callbacks must be set before calling InterstitialAdHandler.show.

Parameters

onFailure

Callback with Exception when ad fails to display

onDismissed

Callback when ad is dismissed

onShown

Callback after ad is shown

onImpression

Callback after the ad makes an impression

onClick

Callback on ad click

actual fun setListeners(onFailure: (Exception) -> Unit, onDismissed: () -> Unit, onShown: () -> Unit, onImpression: () -> Unit, onClick: () -> Unit)