rememberNativeAd

fun rememberNativeAd(activity: Any?, adUnitId: String = AdUnitId.NATIVE_DEFAULT, onLoad: () -> Unit = {}, onFailure: (Exception) -> Unit = {}, onDismissed: () -> Unit = {}, onShown: () -> Unit = {}, onImpression: () -> Unit = {}, onClick: () -> Unit = {}): MutableState<NativeAdHandler>

Remembers a NativeAdHandler across compositions.

Return

a MutableState of NativeAdHandler

Parameters

activity

the current Activity (only needed for Android Impl)

adUnitId

Your AdMob AdUnitId String

onLoad

Lambda expression that executes after the NativeAdHandler has fully loaded

onFailure

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

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

See also