Adapter

public abstract class Adapter extends Object
implements MediationExtrasReceiver
Known Direct Subclasses

Adapter for third party ad networks. All loading methods have a default implementation that will gracefully fail if the adapter does not support the format.

Public Constructor Summary

Public Method Summary

abstract VersionInfo
getSDKVersionInfo()
Returns the version of the third party SDK built into the app.
abstract VersionInfo
getVersionInfo()
Returns the version of the mediation adapter.
abstract void
initialize(Context context, InitializationCompleteCallback callback, List<MediationConfiguration> configurations)
Called by the Google Mobile Ads SDK to initialize a third party adapter and SDK.
void
loadAppOpenAd(MediationAppOpenAdConfiguration adConfiguration, MediationAdLoadCallback<MediationAppOpenAdMediationAppOpenAdCallback> callback)
Called by the Google Mobile Ads SDK to begin loading a third party app open ad.
void
loadBannerAd(MediationBannerAdConfiguration adConfiguration, MediationAdLoadCallback<MediationBannerAdMediationBannerAdCallback> callback)
Called by the Google Mobile Ads SDK to begin loading a third party banner ad given a MediationAdConfiguration

Used to load the winning ad from a mediation request.

void
loadInterscrollerAd(MediationBannerAdConfiguration adConfiguration, MediationAdLoadCallback<MediationInterscrollerAdMediationBannerAdCallback> callback)
Called by the Google Mobile Ads SDK to begin loading a third party interscroller ad given a MediationAdConfiguration

Used to load the winning ad from a mediation request.

void
loadInterstitialAd(MediationInterstitialAdConfiguration adConfiguration, MediationAdLoadCallback<MediationInterstitialAdMediationInterstitialAdCallback> callback)
Called by the Google Mobile Ads SDK to begin loading a third party interstitial ad given a MediationAdConfiguration

Used to load the winning ad from a mediation request.

void
loadNativeAd(MediationNativeAdConfiguration adConfiguration, MediationAdLoadCallback<UnifiedNativeAdMapperMediationNativeAdCallback> callback)
Called by the Google Mobile Ads SDK to begin loading a third party native ad given a MediationAdConfiguration

Used to load the winning ad from a mediation request.

void
loadRewardedAd(MediationRewardedAdConfiguration adConfiguration, MediationAdLoadCallback<MediationRewardedAdMediationRewardedAdCallback> callback)
Called by the Google Mobile Ads SDK to begin loading a third party rewarded ad given a MediationAdConfiguration

Used to load the winning ad from a mediation request.

void
loadRewardedInterstitialAd(MediationRewardedAdConfiguration adConfiguration, MediationAdLoadCallback<MediationRewardedAdMediationRewardedAdCallback> callback)
Called by the Google Mobile Ads SDK to begin loading a third party rewarded interstitial ad given a MediationAdConfiguration

Used to load the winning ad from a mediation request.

Inherited Method Summary

Public Constructors

public Adapter ()

Public Methods

public abstract VersionInfo getSDKVersionInfo ()

Returns the version of the third party SDK built into the app.

public abstract VersionInfo getVersionInfo ()

Returns the version of the mediation adapter.

public abstract void initialize (Context context, InitializationCompleteCallback callback, List<MediationConfiguration> configurations)

Called by the Google Mobile Ads SDK to initialize a third party adapter and SDK. This method is invoked shortly after the app initializes the Google Mobile Ads SDK.

Parameters
context The context the publisher provides in MobileAds.initialize(Context)
callback Callback to be invoked when the adapter has finished initialization.
configurations A list of MediationConfiguration objects configured for this adapter in the Google AdMob or Google Ad Manager UI.

public void loadAppOpenAd (MediationAppOpenAdConfiguration adConfiguration, MediationAdLoadCallback<MediationAppOpenAdMediationAppOpenAdCallback> callback)

Called by the Google Mobile Ads SDK to begin loading a third party app open ad.

Used to load the winning ad from a mediation request.

Parameters
adConfiguration The MediationAppOpenAdConfiguration that contains information needed to load the winning ad.
callback A callback to be invoked when the ad finishes loading.

public void loadBannerAd (MediationBannerAdConfiguration adConfiguration, MediationAdLoadCallback<MediationBannerAdMediationBannerAdCallback> callback)

Called by the Google Mobile Ads SDK to begin loading a third party banner ad given a MediationAdConfiguration

Used to load the winning ad from a mediation request.

Parameters
adConfiguration The MediationBannerAdConfiguration that contains information needed to load the winning ad.
callback A callback to be invoked when the ad finishes loading.

public void loadInterscrollerAd (MediationBannerAdConfiguration adConfiguration, MediationAdLoadCallback<MediationInterscrollerAdMediationBannerAdCallback> callback)

Called by the Google Mobile Ads SDK to begin loading a third party interscroller ad given a MediationAdConfiguration

Used to load the winning ad from a mediation request.

Parameters
adConfiguration The MediationBannerAdConfiguration that contains information needed to load the winning ad.
callback A callback to be invoked when the ad finishes loading.

public void loadInterstitialAd (MediationInterstitialAdConfiguration adConfiguration, MediationAdLoadCallback<MediationInterstitialAdMediationInterstitialAdCallback> callback)

Called by the Google Mobile Ads SDK to begin loading a third party interstitial ad given a MediationAdConfiguration

Used to load the winning ad from a mediation request.

Parameters
adConfiguration The MediationInterstitialAdConfiguration that contains information needed to load the winning ad.
callback A callback to be invoked when the ad finishes loading.

public void loadNativeAd (MediationNativeAdConfiguration adConfiguration, MediationAdLoadCallback<UnifiedNativeAdMapperMediationNativeAdCallback> callback)

Called by the Google Mobile Ads SDK to begin loading a third party native ad given a MediationAdConfiguration

Used to load the winning ad from a mediation request.

Parameters
adConfiguration The MediationNativeAdConfiguration that contains information needed to load the winning ad.
callback A callback to be invoked when the ad finishes loading.

public void loadRewardedAd (MediationRewardedAdConfiguration adConfiguration, MediationAdLoadCallback<MediationRewardedAdMediationRewardedAdCallback> callback)

Called by the Google Mobile Ads SDK to begin loading a third party rewarded ad given a MediationAdConfiguration

Used to load the winning ad from a mediation request.

Parameters
adConfiguration The MediationRewardedAdConfiguration that contains information needed to load the winning ad.
callback A callback to be invoked when the ad finishes loading.

public void loadRewardedInterstitialAd (MediationRewardedAdConfiguration adConfiguration, MediationAdLoadCallback<MediationRewardedAdMediationRewardedAdCallback> callback)

Called by the Google Mobile Ads SDK to begin loading a third party rewarded interstitial ad given a MediationAdConfiguration

Used to load the winning ad from a mediation request.

Parameters
adConfiguration The MediationRewardedAdConfiguration that contains information needed to load the winning ad.
callback A callback to be invoked when the ad finishes loading.