InterstitialAd

fun InterstitialAd(adUnitId: String = AdUnitId.INTERSTITIAL_DEFAULT, onDismissed: () -> Unit = {}, onShown: () -> Unit = {}, onImpression: () -> Unit = {}, onClick: () -> Unit = {}, onFailure: (Exception) -> Unit = {}, onLoad: () -> Unit = {}, custom: CustomTargeting? = null)

Loads and displays an Interstitial Ad using a Composable.

Parameters

adUnitId

Your AdMob AdUnitId String

onDismissed

Lambda that executes when the user closes the ad

onShown

Lambda expression that executes after the ad is presented

onImpression

Lambda expression that executes after the user has seen the ad

onClick

Lambda expression that executes after the user clicks the ad

onFailure

Lambda expression that executes after the ad fails to load or redirect

onLoad

Lambda expression that executes after the InterstitialAdHandler has fully loaded

custom

Optional CustomTargeting parameters for ad targeting

See also


fun InterstitialAd(loadedAd: InterstitialAdHandler, onDismissed: () -> Unit = {}, onShown: () -> Unit = {}, onImpression: () -> Unit = {}, onClick: () -> Unit = {}, onFailure: (Exception) -> Unit = {})

Displays a pre-loaded Interstitial Ad using a Composable.

Parameters

loadedAd

an InterstitialAdHandler pre-loaded before the call

onDismissed

Lambda that executes when the user closes the ad

onShown

Lambda expression that executes after the ad is presented

onImpression

Lambda expression that executes after the user has seen the ad

onClick

Lambda expression that executes after the user clicks the ad

onFailure

Lambda expression that executes after the ad fails to load or redirect

See also