rememberRewardedAd

@Composable
actual fun rememberRewardedAd(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

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.


@Composable
actual fun rememberRewardedAd(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.


@Composable
actual fun rememberRewardedAd(activity: Any?, adUnitId: String, onLoad: () -> Unit, onFailure: (Exception) -> Unit): MutableState<RewardedAdHandler>

Deprecated

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

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

activity

The activity to use for loading and showing the ad. This should be an Android Activity.

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.


@Composable
actual fun rememberRewardedAd(activity: Any?, userId: String, customData: String, adUnitId: String, onLoad: () -> Unit, onFailure: (Exception) -> Unit): MutableState<RewardedAdHandler>

Deprecated

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

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

activity

The activity to use for loading and showing the ad. This should be an Android Activity.

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.

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

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.


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


@Composable
expect fun rememberRewardedAd(activity: Any?, adUnitId: String = AdUnitId.REWARDED_DEFAULT, onLoad: () -> Unit = {}, onFailure: (Exception) -> Unit = {}): MutableState<RewardedAdHandler>

Deprecated

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

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

activity

The activity to use for loading and showing the ad. This should be an Android Activity.

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.


@Composable
expect fun rememberRewardedAd(activity: Any?, userId: String, customData: String, adUnitId: String = AdUnitId.REWARDED_DEFAULT, onLoad: () -> Unit = {}, onFailure: (Exception) -> Unit = {}): MutableState<RewardedAdHandler>

Deprecated

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

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

activity

The activity to use for loading and showing the ad. This should be an Android Activity.

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.

@Composable
actual fun rememberRewardedAd(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

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.


@Composable
actual fun rememberRewardedAd(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.


@Composable
actual fun rememberRewardedAd(activity: Any?, adUnitId: String, onLoad: () -> Unit, onFailure: (Exception) -> Unit): MutableState<RewardedAdHandler>

Deprecated

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

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

activity

The activity to use for loading and showing the ad. This should be an Android Activity.

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.


@Composable
actual fun rememberRewardedAd(activity: Any?, userId: String, customData: String, adUnitId: String, onLoad: () -> Unit, onFailure: (Exception) -> Unit): MutableState<RewardedAdHandler>

Deprecated

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

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

activity

The activity to use for loading and showing the ad. This should be an Android Activity.

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.