Package com.my.target.mediation
Class MyTargetInterstitialAdAdapter
- java.lang.Object
-
- com.my.target.mediation.MyTargetInterstitialAdAdapter
-
- All Implemented Interfaces:
MediationAdapter,MediationInterstitialAdAdapter
public final class MyTargetInterstitialAdAdapter extends java.lang.Object implements MediationInterstitialAdAdapter
An adapter for internal mediation
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.my.target.mediation.MediationInterstitialAdAdapter
MediationInterstitialAdAdapter.MediationInterstitialAdListener
-
-
Constructor Summary
Constructors Constructor Description MyTargetInterstitialAdAdapter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddestroy()Destroys adapter and cleans resources.voiddismiss()Will be called on attempt to dismiss the ad.voidload(MediationAdConfig mediationAdConfig, MediationInterstitialAdAdapter.MediationInterstitialAdListener listener, android.content.Context context)Will be called when mediation choose this adapter for loading mediation.voidsetSection(InterstitialAdSection section)voidshow(android.content.Context context)Will be called on attempt to show.
-
-
-
Method Detail
-
setSection
public void setSection(@Nullable InterstitialAdSection section)
-
load
public void load(@NonNull MediationAdConfig mediationAdConfig, @NonNull MediationInterstitialAdAdapter.MediationInterstitialAdListener listener, @NonNull android.content.Context context)Description copied from interface:MediationInterstitialAdAdapterWill be called when mediation choose this adapter for loading mediation. All of initialization and loading logic should be implemented here. Then should be calledMediationInterstitialAdAdapter.MediationInterstitialAdListener.onLoad(MediationInterstitialAdAdapter)in case of failed loading should be calledMediationInterstitialAdAdapter.MediationInterstitialAdListener.onNoAd(IAdLoadingError, MediationInterstitialAdAdapter)with the reason of fail. If no callbacks will be called, adapter will be removed from loading queue, and next adapter or no ad will be called.- Specified by:
loadin interfaceMediationInterstitialAdAdapter- Parameters:
mediationAdConfig- contains main configuration for mediationlistener- main mediation listenercontext- app context- See Also:
MediationAdConfig
-
show
public void show(@NonNull android.content.Context context)Description copied from interface:MediationInterstitialAdAdapterWill be called on attempt to show. Interstitial ad should be displayed here. After successful displaying callbackMediationInterstitialAdAdapter.MediationInterstitialAdListener.onDisplay(MediationInterstitialAdAdapter)should be called- Specified by:
showin interfaceMediationInterstitialAdAdapter- Parameters:
context- app context
-
dismiss
public void dismiss()
Description copied from interface:MediationInterstitialAdAdapterWill be called on attempt to dismiss the ad. Interstitial ad should be closed here. After closing callbackMediationInterstitialAdAdapter.MediationInterstitialAdListener.onDismiss(MediationInterstitialAdAdapter)should be called- Specified by:
dismissin interfaceMediationInterstitialAdAdapter
-
destroy
public void destroy()
Description copied from interface:MediationAdapterDestroys adapter and cleans resources. Adapter will not work after calling this method- Specified by:
destroyin interfaceMediationAdapter
-
-