Interstitial

1. Load an ad

val interstitialAd = InterstitialAd(context)
when (val result = interstitialAd.load(LoadParams())) {
    is InterstitialLoadSuccess -> { // setup ad events }
    is InterstitialLoadFailure -> {
        // banner load failed, handle error, println(result.error)
    }
}

2. Ad events

interstitialAd.onLoaded = {
    // Code to be executed when an ad loaded.
    // call show
}
interstitialAd.onFailed = { error ->
    // Code to be executed when an ad display fails.
}
interstitialAd.onClosed = {
    // Code to be executed when an ad closed.
}
interstitialAd.onDisplayed = {
    // Code to be executed when an ad displayed.
}
interstitialAd.onClicked = {
    // Code to be executed when an ad clicked.
}

3. Show the ad

interstitialAd.show()