InterstitialAd

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

Loads and displays an Interstitial Ad using a Composable.

Parameters

activity

the current Activity (only needed for Android Impl)

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

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