rememberNativeAd

@RequiresPermission(value = "android.permission.INTERNET")
@Composable
actual fun rememberNativeAd(adUnitId: String, 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

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


@RequiresPermission(value = "android.permission.INTERNET")
@Composable
actual fun rememberNativeAd(activity: Any?, adUnitId: String, onLoad: () -> Unit, onFailure: (Exception) -> Unit, onDismissed: () -> Unit, onShown: () -> Unit, onImpression: () -> Unit, onClick: () -> Unit): MutableState<NativeAdHandler>

Deprecated

The `activity` argument is no longer required as of v1.1.0-beta01

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

@Composable
expect fun rememberNativeAd(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

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


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

Deprecated

The `activity` argument is no longer required as of v1.1.0-beta01

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

@Composable
actual fun rememberNativeAd(adUnitId: String, 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

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


@Composable
actual fun rememberNativeAd(activity: Any?, adUnitId: String, onLoad: () -> Unit, onFailure: (Exception) -> Unit, onDismissed: () -> Unit, onShown: () -> Unit, onImpression: () -> Unit, onClick: () -> Unit): MutableState<NativeAdHandler>

Deprecated

The `activity` argument is no longer required as of v1.1.0-beta01

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