Package com.my.target.mediation
Interface MediationNativeAdAdapter.MediationNativeAdListener
-
- Enclosing interface:
- MediationNativeAdAdapter
public static interface MediationNativeAdAdapter.MediationNativeAdListener
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidcloseIfAutomaticallyDisabled(MediationNativeAdAdapter adapter)Calls 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.voidonCloseAutomatically(MediationNativeAdAdapter adapter)Calls ifshouldCloseAutomatically()returned true.voidonLoad(NativePromoBanner banner, MediationNativeAdAdapter adapter)Must be called when implemented ads network loads successfully insideMediationNativeAdAdapter.load(MediationNativeAdConfig, MediationNativeAdListener, Context)method.voidonNoAd(java.lang.String reason, 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 playingbooleanshouldCloseAutomatically()Determines what SDK should do when selecting particular adchoices option.
-
-
-
Method Detail
-
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
void onLoad(@NonNull NativePromoBanner banner, @NonNull MediationNativeAdAdapter adapter)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
void onNoAd(@NonNull java.lang.String reason, @NonNull MediationNativeAdAdapter adapter)Must be called when implemented ads failed to load for some reason insideMediationNativeAdAdapter.load(MediationNativeAdConfig, MediationNativeAdListener, Context)method.- Parameters:
reason- a reason of fail to loadadapter- an instance of current adapter
-
onClick
void onClick(@NonNull MediationNativeAdAdapter adapter)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
void onShow(@NonNull MediationNativeAdAdapter adapter)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
void onVideoPlay(@NonNull MediationNativeAdAdapter adapter)If current ad contains video element, must be called when video starts playing- Parameters:
adapter- an instance of current adapter
-
onVideoPause
void onVideoPause(@NonNull MediationNativeAdAdapter adapter)If current ad contains video element, must be called when video paused- Parameters:
adapter- an instance of current adapter
-
onVideoComplete
void onVideoComplete(@NonNull MediationNativeAdAdapter adapter)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
void onCloseAutomatically(@NonNull MediationNativeAdAdapter adapter)Calls ifshouldCloseAutomatically()returned true.- Parameters:
adapter- Adapter whom ad was closed automatically.
-
closeIfAutomaticallyDisabled
void closeIfAutomaticallyDisabled(@NonNull MediationNativeAdAdapter adapter)Calls ifshouldCloseAutomatically()returned false.- Parameters:
adapter- Adapter whom ad have to be hidden.
-
-