InterstitialAdHandler

actual constructor(activity: Any?)
expect constructor(activity: Any?)

Parameters

activity

Android required Activity

// Instantiate
val ad = InterstitialAd(activity)
// Load the Ad
ad.load(
adUnitId = "AD_UNIT_ID_GOES_HERE", // Interstitial Ad Unit ID from AdMob
onLoad = {
// ad.setListeners could go here instead
},
onFailure = { } // Callback when ad fails to load
)
// (optional) Observe what happens to the ad after it's shown
ad.setListeners(
onFailure = {}, // Callback 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
)
// Show the ad
ad.show()
actual constructor(activity: Any?)