Android APIs
public interface

MediationRewardedVideoAdAdapter

implements MediationAdapter
com.google.android.gms.ads.reward.mediation.MediationRewardedVideoAdAdapter

Class Overview

Adapter for third party ad networks that support rewarded video ads.

The typical life-cycle for an adapter is to have initialize(Context, MediationAdRequest, String, MediationRewardedVideoAdListener, Bundle, Bundle) called once. At this point the ad network should initialize itself and report to the listener either onInitializationSucceeded(MediationRewardedVideoAdAdapter) or onInitializationFailed(MediationRewardedVideoAdAdapter, int). Once the ad network is initialized, the app will request rewarded video by invoking loadAd(MediationAdRequest, Bundle, Bundle). At this point, the adapter should have a rewarded video ad ready and report to the listener either onAdLoaded(MediationRewardedVideoAdAdapter) or onAdFailedToLoad(MediationRewardedVideoAdAdapter, int). At the end of the life cycle, a best effort is made to call onDestroy(), though this is not guaranteed. Note that initialize(Context, MediationAdRequest, String, MediationRewardedVideoAdListener, Bundle, Bundle) and loadAd(MediationAdRequest, Bundle, Bundle) is called on the UI thread so all the standard precautions of writing code on that thread apply. In particular, the code should not call any blocking methods.

The adapter is expected to expose events via the MediationRewardedVideoAdListener passed in the initialize(Context, MediationAdRequest, String, MediationRewardedVideoAdListener, Bundle, Bundle) call. All parameters necessary to make an ad request should be passed in the userId, serverParameters, MediationAdRequest, and mediationExtras parameters.

Adapters should make an effort to disable multiple reward for one ad.

Summary

Public Methods
abstract void initialize(Context context, MediationAdRequest mediationAdRequest, String userId, MediationRewardedVideoAdListener listener, Bundle serverParameters, Bundle networkExtras)
abstract boolean isInitialized()
Returns true if the ad network has been initialized.
abstract void loadAd(MediationAdRequest mediationAdRequest, Bundle serverParameters, Bundle networkExtras)
abstract void showVideo()
Shows the rewarded video ad.
[Expand]
Inherited Methods
From interface com.google.android.gms.ads.mediation.MediationAdapter

Public Methods

public abstract void initialize (Context context, MediationAdRequest mediationAdRequest, String userId, MediationRewardedVideoAdListener listener, Bundle serverParameters, Bundle networkExtras)

public abstract boolean isInitialized ()

Returns true if the ad network has been initialized.

public abstract void loadAd (MediationAdRequest mediationAdRequest, Bundle serverParameters, Bundle networkExtras)

public abstract void showVideo ()

Shows the rewarded video ad. This can be called any time after a call to onAdLoaded(MediationRewardedVideoAdAdapter)