Package com.my.target.mediation
Interface MediationNativeAdAdapter.MediationNativeAdListener
- Enclosing interface:
- MediationNativeAdAdapter
public static interface MediationNativeAdAdapter.MediationNativeAdListener
-
Method Summary
Modifier and TypeMethodDescriptionvoidCalls ifshouldCloseAutomatically()returned false.voidonAdChoicesIconLoad(ImageData imageData, boolean success, MediationNativeAdAdapter adapter) Need to call when adChoices icon loaded successfullyvoidonClick(MediationNativeAdAdapter adapter) Must be called when ad view received click.voidCalls ifshouldCloseAutomatically()returned true.voidonLoad(NativePromoBanner banner, MediationNativeAdAdapter adapter) Must be called when implemented ads network loads successfully insideMediationNativeAdAdapter.load(MediationNativeAdConfig, MediationNativeAdListener, Context)method.voidonNoAd(IAdLoadingError adLoadingError, MediationNativeAdAdapter adapter) Must be called when implemented ads failed to load for some reason insideMediationNativeAdAdapter.load(MediationNativeAdConfig, MediationNativeAdListener, Context)method.voidonShow(MediationNativeAdAdapter adapter) Must be called when ad view showing / impression must be tracked.voidonVideoComplete(MediationNativeAdAdapter adapter) If current ad contains video element, must be called when video completed playingvoidonVideoPause(MediationNativeAdAdapter adapter) If current ad contains video element, must be called when video pausedvoidonVideoPlay(MediationNativeAdAdapter adapter) If current ad contains video element, must be called when video starts playingbooleanDetermines what SDK should do when selecting particular adchoices option.
-
Method Details
-
onAdChoicesIconLoad
void onAdChoicesIconLoad(@Nullable ImageData imageData, boolean success, @NonNull MediationNativeAdAdapter adapter) Need to call when adChoices icon loaded successfully- Parameters:
imageData- is current instancesuccess- is download statusadapter- an instance of current adapter
-
onLoad
Must be called when implemented ads network loads successfully insideMediationNativeAdAdapter.load(MediationNativeAdConfig, MediationNativeAdListener, Context)method.- Parameters:
banner- banner should be created from assets, received from ad network. UseNativePromoBanner.Builderfor building itadapter- an instance of current adapter
-
onNoAd
Must be called when implemented ads failed to load for some reason insideMediationNativeAdAdapter.load(MediationNativeAdConfig, MediationNativeAdListener, Context)method.- Parameters:
adLoadingError- a reason of fail to loadadapter- an instance of current adapter
-
onClick
Must be called when ad view received click. Most of ad networks provide callbacks for this, so pass it here- Parameters:
adapter- an instance of current adapter
-
onShow
Must be called when ad view showing / impression must be tracked. Most of ad networks provide callbacks for this, so pass it here- Parameters:
adapter- an instance of current adapter
-
onVideoPlay
If current ad contains video element, must be called when video starts playing- Parameters:
adapter- an instance of current adapter
-
onVideoPause
If current ad contains video element, must be called when video paused- Parameters:
adapter- an instance of current adapter
-
onVideoComplete
If current ad contains video element, must be called when video completed playing- Parameters:
adapter- an instance of current adapter
-
shouldCloseAutomatically
boolean shouldCloseAutomatically()Determines what SDK should do when selecting particular adchoices option.- Returns:
- Boolean value which specifies should be ad closed or not.
-
onCloseAutomatically
Calls ifshouldCloseAutomatically()returned true.- Parameters:
adapter- Adapter whom ad was closed automatically.
-
closeIfAutomaticallyDisabled
Calls ifshouldCloseAutomatically()returned false.- Parameters:
adapter- Adapter whom ad have to be hidden.
-