Package com.my.target.mediation
Class MyTargetStandardAdAdapter
java.lang.Object
com.my.target.mediation.MyTargetStandardAdAdapter
- All Implemented Interfaces:
MediationAdapter,MediationStandardAdAdapter
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.my.target.mediation.MediationStandardAdAdapter
MediationStandardAdAdapter.MediationStandardAdListener -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddestroy()Destroys adapter and cleans resources.voidload(MediationAdConfig mediationAdConfig, MyTargetView.AdSize adSize, MediationStandardAdAdapter.MediationStandardAdListener listener, android.content.Context context) Will be called when mediation choose this adapter for loading mediation.voidsetSection(StandardAdSection section)
-
Constructor Details
-
MyTargetStandardAdAdapter
public MyTargetStandardAdAdapter()
-
-
Method Details
-
setSection
public void setSection(@Nullable StandardAdSection section) -
load
public void load(@NonNull MediationAdConfig mediationAdConfig, @NonNull MyTargetView.AdSize adSize, @NonNull MediationStandardAdAdapter.MediationStandardAdListener listener, @NonNull android.content.Context context) Will be called when mediation choose this adapter for loading mediation. All of initialization and loading logic should be implemented here. Then should be calledMediationStandardAdAdapter.MediationStandardAdListener.onLoad(View, MediationStandardAdAdapter)in case of failed loading should be calledMediationStandardAdAdapter.MediationStandardAdListener.onNoAd(IAdLoadingError, MediationStandardAdAdapter)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 interfaceMediationStandardAdAdapter- Parameters:
mediationAdConfig- contains main configuration for mediationadSize- banner sizelistener- main mediation listenercontext- app context- See Also:
-
destroy
public void destroy()Destroys adapter and cleans resources. Adapter will not work after calling this method- Specified by:
destroyin interfaceMediationAdapter
-