public interface

AppLovinMediationAdapter

com.applovin.mediation.AppLovinMediationAdapter

Class Overview

This is an interface that defines a mediation adaptor. The adaptor should wrap a third-party ad SDK will be used by AppLovin to initiate ad loading and displaying.

Created by basil on 12/1/16.

Summary

Public Methods
abstract String getVersion()
Get the current version of the third-party SDK
abstract void initialize(AppLovinMediationAdapterConfig configuration, AppLovinSdk sdk, Activity activity)
Initialize the adapter.
abstract boolean isReady()
Checks if this adapter is ready to be used.
abstract void loadIncentivizedAd(AppLovinMediationAdapterConfig configuration, Context context, AppLovinMediationLoadListener loadListener)
Schedule loading of the next incentivized ad.
abstract void loadInterstitialAd(AppLovinMediationAdapterConfig configuration, Context context, AppLovinMediationLoadListener loadListener)
Schedule loading of the next interstitial ad.
abstract void prepareIncentivizedAd(AppLovinMediationAdapterConfig configuration, Context context)
Prepare an incentivized ad that could be loaded later via the loadIncentivizedAd() method.
abstract void prepareInterstitialAd(AppLovinMediationAdapterConfig configuration, Context context)
Prepare an interstitial ad that could be loaded later via the loadInterstitialAd() method.
abstract void processIncentivizedAdLoadTimeout()
This method is invoked when incentivized ad load was timed-out by the AppLovin SDK
abstract void processInterstitialAdLoadTimeout()
This method is invoked when interstitial ad load was timed-out by the AppLovin SDK
abstract void showIncentivizedAd(AppLovinMediatedAdInfo ad, AppLovinMediationAdapterConfig configuration, Activity activity, AppLovinMediationDisplayListener displayListener)
Show a pre-loaded incentivized ad
abstract void showInterstitialAd(AppLovinMediatedAdInfo adInfo, AppLovinMediationAdapterConfig configuration, Activity activity, AppLovinMediationDisplayListener displayListener)
Show a pre-loaded interstitial adInfo

Public Methods

public abstract String getVersion ()

Get the current version of the third-party SDK

Returns
  • Current version of the third-party SDK or null if none is available

public abstract void initialize (AppLovinMediationAdapterConfig configuration, AppLovinSdk sdk, Activity activity)

Initialize the adapter. This method is guaranteed to be called exactly once before any other methods are invoked.

Parameters
configuration Configuration of the current mediation adapter. Guaranteed not to be null. The last known configuration is passed on application re-initialization.
sdk AppLovin SDK that will be used for this adapter. Guaranteed not to be null.
activity Application's root activity. May be null.
Throws
Exception in case initialization fails. The adapter will be marked disabled in this case.

public abstract boolean isReady ()

Checks if this adapter is ready to be used. This function is guaranteed to be called after initialize was called.

Returns
  • true If the adapter is ready to be used for fetching ads.

public abstract void loadIncentivizedAd (AppLovinMediationAdapterConfig configuration, Context context, AppLovinMediationLoadListener loadListener)

Schedule loading of the next incentivized ad.

Parameters
configuration Configuration of the current mediation adapter. May be null.
context Application context. Guaranteed not to be null.
loadListener Listener to be notified when ad was loaded (or failed to load). May be null.

public abstract void loadInterstitialAd (AppLovinMediationAdapterConfig configuration, Context context, AppLovinMediationLoadListener loadListener)

Schedule loading of the next interstitial ad.

Parameters
configuration Configuration of the current mediation adapter. May be null.
context Application context. Guaranteed not to be null.
loadListener Listener to be notified when ad was loaded (or failed to load). May be null.

public abstract void prepareIncentivizedAd (AppLovinMediationAdapterConfig configuration, Context context)

Prepare an incentivized ad that could be loaded later via the loadIncentivizedAd() method.

Parameters
configuration Configuration of the current mediation adapter. Guaranteed not to be null.
context Application context. Guaranteed not to be null.

public abstract void prepareInterstitialAd (AppLovinMediationAdapterConfig configuration, Context context)

Prepare an interstitial ad that could be loaded later via the loadInterstitialAd() method.

Parameters
configuration Configuration of the current mediation adapter. Guaranteed not to be null.
context Application context. Guaranteed not to be null.

public abstract void processIncentivizedAdLoadTimeout ()

This method is invoked when incentivized ad load was timed-out by the AppLovin SDK

public abstract void processInterstitialAdLoadTimeout ()

This method is invoked when interstitial ad load was timed-out by the AppLovin SDK

public abstract void showIncentivizedAd (AppLovinMediatedAdInfo ad, AppLovinMediationAdapterConfig configuration, Activity activity, AppLovinMediationDisplayListener displayListener)

Show a pre-loaded incentivized ad

Parameters
ad Loaded incentivized ad. This is the information that was passed to the @link{AppLovinMediationLoadListener}'s adLoaded method. May be null.
configuration Configuration of the current mediation adapter. Guaranteed not to be null.
activity Currently active activity. Guaranteed not to be null.
displayListener Listener that should be notified when ad was

public abstract void showInterstitialAd (AppLovinMediatedAdInfo adInfo, AppLovinMediationAdapterConfig configuration, Activity activity, AppLovinMediationDisplayListener displayListener)

Show a pre-loaded interstitial adInfo

Parameters
adInfo Loaded interstitial. This is the information that was passed to the @link{AppLovinMediationLoadListener}'s adLoaded method. May be null.
configuration Configuration of the current mediation adapter. May be null.
activity Currently active activity. Guaranteed not to be null.