Package com.my.target.mediation
Class MyTargetRewardedAdAdapter
java.lang.Object
com.my.target.mediation.MyTargetRewardedAdAdapter
- All Implemented Interfaces:
MediationAdapter,MediationRewardedAdAdapter
An adapter for internal mediation
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.my.target.mediation.MediationRewardedAdAdapter
MediationRewardedAdAdapter.MediationRewardedAdListener -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddestroy()Destroys adapter and cleans resources.voiddismiss()Will be called on attempt to dismiss the ad.voidload(MediationAdConfig mediationAdConfig, MediationRewardedAdAdapter.MediationRewardedAdListener 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.
-
Constructor Details
-
MyTargetRewardedAdAdapter
public MyTargetRewardedAdAdapter()
-
-
Method Details
-
setSection
public void setSection(@Nullable InterstitialAdSection section) -
load
public void load(@NonNull MediationAdConfig mediationAdConfig, @NonNull MediationRewardedAdAdapter.MediationRewardedAdListener listener, @NonNull android.content.Context context) Description copied from interface:MediationRewardedAdAdapterWill be called when mediation choose this adapter for loading mediation. All of initialization and loading logic should be implemented here. Then should be calledMediationRewardedAdAdapter.MediationRewardedAdListener.onLoad(MediationRewardedAdAdapter)in case of failed loading should be calledMediationRewardedAdAdapter.MediationRewardedAdListener.onNoAd(IAdLoadingError, MediationRewardedAdAdapter)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 interfaceMediationRewardedAdAdapter- Parameters:
mediationAdConfig- contains main configuration for mediationlistener- main mediation listenercontext- app context- See Also:
-
show
public void show(@NonNull android.content.Context context) Description copied from interface:MediationRewardedAdAdapterWill be called on attempt to show. Rewarded ad should be displayed here. After successful displaying callbackMediationRewardedAdAdapter.MediationRewardedAdListener.onDisplay(MediationRewardedAdAdapter)should be called- Specified by:
showin interfaceMediationRewardedAdAdapter- Parameters:
context- app context
-
dismiss
public void dismiss()Description copied from interface:MediationRewardedAdAdapterWill be called on attempt to dismiss the ad. Rewarded ad should be closed here. After closing callbackMediationRewardedAdAdapter.MediationRewardedAdListener.onDismiss(MediationRewardedAdAdapter)should be called- Specified by:
dismissin interfaceMediationRewardedAdAdapter
-
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
-