rememberRewardedInterstitialAd

A composable function that remembers and manages a RewardedInterstitialAdHandler.

This function handles the lifecycle of a rewarded interstitial ad, including loading and reloading it when it's dismissed or hasn't been loaded yet.

Return

A MutableState holding the RewardedInterstitialAdHandler. This allows you to interact with the ad (e.g., to show it) and observe its state.

Parameters

adUnitId

The ad unit ID for the rewarded interstitial ad. Defaults to AdUnitId.REWARDED_INTERSTITIAL_DEFAULT.

onLoad

A callback function that is invoked when the ad has successfully loaded.

onFailure

A callback function that is invoked if the ad fails to load. It provides an Exception object containing details about the failure.

See also


actual fun rememberRewardedInterstitialAd(userId: String, customData: String, adUnitId: String, onLoad: () -> Unit, onFailure: (Exception) -> Unit): MutableState<RewardedAdHandler>

Remembers a RewardedAdHandler, which is used to load and show rewarded ads.

This function will automatically attempt to load an ad when the RewardedAdHandler.state is AdState.NONE or AdState.DISMISSED.

Return

A MutableState holding the RewardedAdHandler. You can observe this state to react to changes in the ad's lifecycle.

Parameters

userId

Used for Server-Side Verification

customData

Used for Server-Side Verification

adUnitId

The ad unit ID to use for loading the ad. Defaults to AdUnitId.REWARDED_DEFAULT.

onLoad

A callback that will be invoked when the ad has successfully loaded.

onFailure

A callback that will be invoked if the ad fails to load, providing an Exception with details of the failure.


actual fun rememberRewardedInterstitialAd(activity: Any?, adUnitId: String, onLoad: () -> Unit, onFailure: (Exception) -> Unit): MutableState<RewardedInterstitialAdHandler>

Deprecated

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

A composable function that remembers and manages a RewardedInterstitialAdHandler.

This function handles the lifecycle of a rewarded interstitial ad, including loading and reloading it when it's dismissed or hasn't been loaded yet.

Return

A MutableState holding the RewardedInterstitialAdHandler. This allows you to interact with the ad (e.g., to show it) and observe its state.

Parameters

activity

The current activity context. This is crucial for initializing and displaying the ad. It can be null, but ads will not function correctly if it is.

adUnitId

The ad unit ID for the rewarded interstitial ad. Defaults to AdUnitId.REWARDED_INTERSTITIAL_DEFAULT.

onLoad

A callback function that is invoked when the ad has successfully loaded.

onFailure

A callback function that is invoked if the ad fails to load. It provides an Exception object containing details about the failure.

See also

expect fun rememberRewardedInterstitialAd(adUnitId: String = AdUnitId.REWARDED_INTERSTITIAL_DEFAULT, onLoad: () -> Unit = {}, onFailure: (Exception) -> Unit = {}): MutableState<RewardedInterstitialAdHandler>

A composable function that remembers and manages a RewardedInterstitialAdHandler.

This function handles the lifecycle of a rewarded interstitial ad, including loading and reloading it when it's dismissed or hasn't been loaded yet.

Return

A MutableState holding the RewardedInterstitialAdHandler. This allows you to interact with the ad (e.g., to show it) and observe its state.

Parameters

adUnitId

The ad unit ID for the rewarded interstitial ad. Defaults to AdUnitId.REWARDED_INTERSTITIAL_DEFAULT.

onLoad

A callback function that is invoked when the ad has successfully loaded.

onFailure

A callback function that is invoked if the ad fails to load. It provides an Exception object containing details about the failure.

See also


expect fun rememberRewardedInterstitialAd(userId: String, customData: String, adUnitId: String = AdUnitId.REWARDED_DEFAULT, onLoad: () -> Unit = {}, onFailure: (Exception) -> Unit = {}): MutableState<RewardedAdHandler>

Remembers a RewardedAdHandler, which is used to load and show rewarded ads.

This function will automatically attempt to load an ad when the RewardedAdHandler.state is AdState.NONE or AdState.DISMISSED.

Return

A MutableState holding the RewardedAdHandler. You can observe this state to react to changes in the ad's lifecycle.

Parameters

userId

Used for Server-Side Verification

customData

Used for Server-Side Verification

adUnitId

The ad unit ID to use for loading the ad. Defaults to AdUnitId.REWARDED_DEFAULT.

onLoad

A callback that will be invoked when the ad has successfully loaded.

onFailure

A callback that will be invoked if the ad fails to load, providing an Exception with details of the failure.


expect fun rememberRewardedInterstitialAd(activity: Any?, adUnitId: String = AdUnitId.REWARDED_INTERSTITIAL_DEFAULT, onLoad: () -> Unit = {}, onFailure: (Exception) -> Unit = {}): MutableState<RewardedInterstitialAdHandler>

Deprecated

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

A composable function that remembers and manages a RewardedInterstitialAdHandler.

This function handles the lifecycle of a rewarded interstitial ad, including loading and reloading it when it's dismissed or hasn't been loaded yet.

Return

A MutableState holding the RewardedInterstitialAdHandler. This allows you to interact with the ad (e.g., to show it) and observe its state.

Parameters

activity

The current activity context. This is crucial for initializing and displaying the ad. It can be null, but ads will not function correctly if it is.

adUnitId

The ad unit ID for the rewarded interstitial ad. Defaults to AdUnitId.REWARDED_INTERSTITIAL_DEFAULT.

onLoad

A callback function that is invoked when the ad has successfully loaded.

onFailure

A callback function that is invoked if the ad fails to load. It provides an Exception object containing details about the failure.

See also

A composable function that remembers and manages a RewardedInterstitialAdHandler.

This function handles the lifecycle of a rewarded interstitial ad, including loading and reloading it when it's dismissed or hasn't been loaded yet.

Return

A MutableState holding the RewardedInterstitialAdHandler. This allows you to interact with the ad (e.g., to show it) and observe its state.

Parameters

adUnitId

The ad unit ID for the rewarded interstitial ad. Defaults to AdUnitId.REWARDED_INTERSTITIAL_DEFAULT.

onLoad

A callback function that is invoked when the ad has successfully loaded.

onFailure

A callback function that is invoked if the ad fails to load. It provides an Exception object containing details about the failure.

See also


actual fun rememberRewardedInterstitialAd(userId: String, customData: String, adUnitId: String, onLoad: () -> Unit, onFailure: (Exception) -> Unit): MutableState<RewardedAdHandler>

Remembers a RewardedAdHandler, which is used to load and show rewarded ads.

This function will automatically attempt to load an ad when the RewardedAdHandler.state is AdState.NONE or AdState.DISMISSED.

Return

A MutableState holding the RewardedAdHandler. You can observe this state to react to changes in the ad's lifecycle.

Parameters

userId

Used for Server-Side Verification

customData

Used for Server-Side Verification

adUnitId

The ad unit ID to use for loading the ad. Defaults to AdUnitId.REWARDED_DEFAULT.

onLoad

A callback that will be invoked when the ad has successfully loaded.

onFailure

A callback that will be invoked if the ad fails to load, providing an Exception with details of the failure.


actual fun rememberRewardedInterstitialAd(activity: Any?, adUnitId: String, onLoad: () -> Unit, onFailure: (Exception) -> Unit): MutableState<RewardedInterstitialAdHandler>

Deprecated

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

A composable function that remembers and manages a RewardedInterstitialAdHandler.

This function handles the lifecycle of a rewarded interstitial ad, including loading and reloading it when it's dismissed or hasn't been loaded yet.

Return

A MutableState holding the RewardedInterstitialAdHandler. This allows you to interact with the ad (e.g., to show it) and observe its state.

Parameters

activity

The current activity context. This is crucial for initializing and displaying the ad. It can be null, but ads will not function correctly if it is.

adUnitId

The ad unit ID for the rewarded interstitial ad. Defaults to AdUnitId.REWARDED_INTERSTITIAL_DEFAULT.

onLoad

A callback function that is invoked when the ad has successfully loaded.

onFailure

A callback function that is invoked if the ad fails to load. It provides an Exception object containing details about the failure.

See also