Package com.my.target.mediation
Interface MediationNativeBannerAdAdapter.MediationNativeBannerAdListener
-
- Enclosing interface:
- MediationNativeBannerAdAdapter
public static interface MediationNativeBannerAdAdapter.MediationNativeBannerAdListener
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidcloseIfAutomaticallyDisabled(MediationNativeBannerAdAdapter adapter)Calls ifshouldCloseAutomatically()returned false.voidonAdChoicesIconLoad(ImageData imageData, boolean success, MediationNativeBannerAdAdapter adapter)Need to call when adChoices icon loaded successfullyvoidonClick(MediationNativeBannerAdAdapter adapter)Must be called when ad view received click.voidonCloseAutomatically(MediationNativeBannerAdAdapter adapter)Calls ifshouldCloseAutomatically()returned true.voidonLoad(NativeBanner banner, MediationNativeBannerAdAdapter adapter)Must be called when implemented ads network loads successfully insideMediationNativeBannerAdAdapter.load(MediationNativeBannerAdConfig, MediationNativeBannerAdListener, Context)method.voidonNoAd(IAdLoadingError adLoadingError, MediationNativeBannerAdAdapter adapter)Must be called when implemented ads failed to load for some reason insideMediationNativeBannerAdAdapter.load(MediationNativeBannerAdConfig, MediationNativeBannerAdListener, Context)method.voidonShow(MediationNativeBannerAdAdapter adapter)Must be called when ad view showing / impression must be tracked.booleanshouldCloseAutomatically()Determines what SDK should do when selecting particular adchoices option.
-
-
-
Method Detail
-
onAdChoicesIconLoad
void onAdChoicesIconLoad(@Nullable ImageData imageData, boolean success, @NonNull MediationNativeBannerAdAdapter 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 NativeBanner banner, @NonNull MediationNativeBannerAdAdapter adapter)Must be called when implemented ads network loads successfully insideMediationNativeBannerAdAdapter.load(MediationNativeBannerAdConfig, MediationNativeBannerAdListener, Context)method.- Parameters:
banner- banner should be created from assets, received from ad network. UseNativeBanner.Builderfor building itadapter- an instance of current adapter
-
onNoAd
void onNoAd(@NonNull IAdLoadingError adLoadingError, @NonNull MediationNativeBannerAdAdapter adapter)Must be called when implemented ads failed to load for some reason insideMediationNativeBannerAdAdapter.load(MediationNativeBannerAdConfig, MediationNativeBannerAdListener, Context)method.- Parameters:
adLoadingError- a reason of fail to loadadapter- an instance of current adapter
-
onClick
void onClick(@NonNull MediationNativeBannerAdAdapter 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 MediationNativeBannerAdAdapter 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
-
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 MediationNativeBannerAdAdapter adapter)Calls ifshouldCloseAutomatically()returned true.- Parameters:
adapter- Adapter whom ad was closed automatically.
-
closeIfAutomaticallyDisabled
void closeIfAutomaticallyDisabled(@NonNull MediationNativeBannerAdAdapter adapter)Calls ifshouldCloseAutomatically()returned false.- Parameters:
adapter- Adapter whom ad have to be hidden.
-
-