public final class MyTargetNativeAdAdapter extends java.lang.Object implements MediationNativeAdAdapter
MediationNativeAdAdapter.MediationNativeAdListener| Constructor and Description |
|---|
MyTargetNativeAdAdapter() |
| Modifier and Type | Method and Description |
|---|---|
void |
destroy()
Destroys adapter and cleans resources.
|
android.view.View |
getMediaView(android.content.Context context)
Must return view for displaying media view (large picture or video) for correct
implementation of Native Ads and tracking.
|
void |
load(MediationNativeAdConfig mediationAdConfig,
MediationNativeAdAdapter.MediationNativeAdListener 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
MediationNativeAdConfig mediationAdConfig,
@NonNull
MediationNativeAdAdapter.MediationNativeAdListener listener,
@NonNull
android.content.Context context)
MediationNativeAdAdapterNativePromoBanner from received assets and
then should be called MediationNativeAdAdapter.MediationNativeAdListener.onLoad(NativePromoBanner, MediationNativeAdAdapter)
in case of failed loading should be called MediationNativeAdAdapter.MediationNativeAdListener.onNoAd(String, MediationNativeAdAdapter)
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 MediationNativeAdAdaptermediationAdConfig - contains main configuration for mediationlistener - main mediation listenercontext - app contextMediationNativeAdConfigpublic void registerView(@NonNull
android.view.View view,
@Nullable
java.util.List<android.view.View> clickableViews,
int adChoicesPlacement)
MediationNativeAdAdapterregisterView in interface MediationNativeAdAdapterview - view to be registeredclickableViews - optional views want to be clickableadChoicesPlacement - placement of AdChoices icon. Possible values in
AdChoicesPlacementpublic void unregisterView()
MediationNativeAdAdapterunregisterView in interface MediationNativeAdAdapter@Nullable
public android.view.View getMediaView(@NonNull
android.content.Context context)
MediationNativeAdAdaptergetMediaView in interface MediationNativeAdAdaptercontext - app contextpublic void destroy()
MediationAdapterdestroy in interface MediationAdapter