RewardedAd

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

Loads and displays a Rewarded Ad using a Composable.

Parameters

activity

the current Activity (only needed for Android Impl)

adUnitId

Your AdMob AdUnitId String

onRewardEarned

Lambda that executes when the user has earned an ad-related reward

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 RewardedAd(loadedAd: RewardedAdHandler, onRewardEarned: () -> Unit, onDismissed: () -> Unit = {}, onShown: () -> Unit = {}, onImpression: () -> Unit = {}, onClick: () -> Unit = {}, onFailure: (Exception) -> Unit = {})

Displays a pre-loaded Rewarded Ad using a Composable.

Parameters

loadedAd

an RewardedAdHandler pre-loaded before the call

onRewardEarned

Lambda that executes when the user has earned an ad-related reward

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