前往主控台

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
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
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.

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 initialize(Context, String)
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 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 The completion handler that is called when the ad has loaded successfully, or if the ad failed to load.

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 The completion handler that is called when the ad has loaded successfully, or if the ad failed to load.

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 The completion handler that is called when the ad has loaded successfully, or if the ad failed to load.

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 The completion handler that is called when the ad has loaded successfully, or if the ad failed to load.