public final class MyTargetNativeBannerAdAdapter extends java.lang.Object implements MediationNativeBannerAdAdapter
MediationNativeBannerAdAdapter.MediationNativeBannerAdListener| Constructor and Description |
|---|
MyTargetNativeBannerAdAdapter() |
| Modifier and Type | Method and Description |
|---|---|
void |
destroy()
Destroys adapter and cleans resources.
|
android.view.View |
getIconView(android.content.Context context)
Must return view for displaying icon view for correct implementation of Native Ads and
tracking.
|
void |
load(MediationNativeBannerAdConfig mediationAdConfig,
MediationNativeBannerAdAdapter.MediationNativeBannerAdListener listener,
android.content.Context context)
Will be called when mediation choose this adapter for loading mediation.
|
void |
registerView(android.view.View view,
java.util.List<android.view.View> clickableViews,
int adChoicesPlacement)
Will be called when view becomes ready to be shown.
|
void |
setSection(NativeAdSection section) |
void |
unregisterView()
Will be called when view appears invisible and unused.
|
public void setSection(@Nullable
NativeAdSection section)
public void load(@NonNull
MediationNativeBannerAdConfig mediationAdConfig,
@NonNull
MediationNativeBannerAdAdapter.MediationNativeBannerAdListener listener,
@NonNull
android.content.Context context)
MediationNativeBannerAdAdaptercom.my.target.core.models.banners.NativeAdBanner from received assets and
then should be called MediationNativeBannerAdAdapter.MediationNativeBannerAdListener.onLoad(NativeBanner, MediationNativeBannerAdAdapter)
in case of failed loading should be called MediationNativeBannerAdAdapter.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.load in interface MediationNativeBannerAdAdaptermediationAdConfig - contains main configuration for mediationlistener - main mediation listenercontext - app contextMediationNativeBannerAdConfigpublic void registerView(@NonNull
android.view.View view,
@Nullable
java.util.List<android.view.View> clickableViews,
int adChoicesPlacement)
MediationNativeBannerAdAdapterregisterView in interface MediationNativeBannerAdAdapterview - view to be registeredclickableViews - optional views want to be clickableadChoicesPlacement - placement of AdChoices icon. Possible values in
AdChoicesPlacementpublic void unregisterView()
MediationNativeBannerAdAdapterunregisterView in interface MediationNativeBannerAdAdapter@Nullable
public android.view.View getIconView(@NonNull
android.content.Context context)
MediationNativeBannerAdAdaptergetIconView in interface MediationNativeBannerAdAdaptercontext - app contextpublic void destroy()
MediationAdapterdestroy in interface MediationAdapter