Package com.my.target.mediation
Interface MediationNativeBannerAdAdapter
-
- All Superinterfaces:
MediationAdapter
- All Known Implementing Classes:
MyTargetNativeBannerAdAdapter
public interface MediationNativeBannerAdAdapter extends MediationAdapter
Mediation adapter interface for NativeBanner format. Every mediation adapter for this format should implement this for correct work.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceMediationNativeBannerAdAdapter.MediationNativeBannerAdListener
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description android.view.ViewgetIconView(android.content.Context context)Must return view for displaying icon view for correct implementation of Native Ads and tracking.voidload(MediationNativeBannerAdConfig mediationAdConfig, MediationNativeBannerAdAdapter.MediationNativeBannerAdListener listener, android.content.Context context)Will be called when mediation choose this adapter for loading mediation.voidregisterView(android.view.View view, java.util.List<android.view.View> clickableViews, int adChoicesPlacement)Will be called when view becomes ready to be shown.voidunregisterView()Will be called when view appears invisible and unused.-
Methods inherited from interface com.my.target.mediation.MediationAdapter
destroy
-
-
-
-
Method Detail
-
load
void load(@NonNull MediationNativeBannerAdConfig mediationAdConfig, @NonNull MediationNativeBannerAdAdapter.MediationNativeBannerAdListener 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. After successful loading should be createdcom.my.target.core.models.banners.NativeAdBannerfrom received assets and then should be calledMediationNativeBannerAdAdapter.MediationNativeBannerAdListener.onLoad(NativeBanner, MediationNativeBannerAdAdapter)in case of failed loading should be calledMediationNativeBannerAdAdapter.MediationNativeBannerAdListener.onNoAd(String, MediationNativeBannerAdAdapter)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.- Parameters:
mediationAdConfig- contains main configuration for mediationlistener- main mediation listenercontext- app context- See Also:
MediationNativeBannerAdConfig
-
registerView
void registerView(@NonNull android.view.View view, @Nullable java.util.List<android.view.View> clickableViews, int adChoicesPlacement)Will be called when view becomes ready to be shown. There must be called apis to start tracking views, adding listeners on views and load resources, which was not loaded previously, such as not pre-loaded media content. Clickable views is optional, if set - click listeners must be placed only on views in this list, otherwise must be used default logic of ad network- Parameters:
view- view to be registeredclickableViews- optional views want to be clickableadChoicesPlacement- placement of AdChoices icon. Possible values inAdChoicesPlacement
-
unregisterView
void unregisterView()
Will be called when view appears invisible and unused. There must be called apis to stop tracking views and free resources.
-
getIconView
@Nullable android.view.View getIconView(@NonNull android.content.Context context)Must return view for displaying icon view for correct implementation of Native Ads and tracking. It is optional, but preferred.- Parameters:
context- app context- Returns:
- View for Icon
-
-