public class POBNativeAdRenderer extends java.lang.Object implements POBNativeAdRendering, POBNativeAdViewListener, com.pubmatic.sdk.common.utility.POBImageDownloadManager.POBImageDownloadListener
| Constructor and Description |
|---|
POBNativeAdRenderer(android.content.Context context) |
| Modifier and Type | Method and Description |
|---|---|
void |
destroy()
Destroys the native ad renderer
|
void |
enableDsaIcon(boolean dsaIconEnabled)
Set DSA icon should be rendereded or not
Default value is false, i.e.
|
void |
onAssetClicked(android.view.View adView,
int assetId)
Notify the assets with certain Id in is clicked.
|
void |
onComplete(java.util.Map<java.lang.String,android.graphics.Bitmap> downloadedImages) |
void |
onNonAssetClicked(android.view.View nonAssetView,
java.lang.String id)
Notify the non-asset with certain id that got clicked.
|
void |
onRecordClick(android.view.View adView)
Notify the POBNativeAdView is clicked.
|
void |
onRecordImpression(android.view.View adView)
Notify the POBNativeAdView is attached to view and the impression is occurred.
|
void |
registerView(POBNativeAdResponse descriptor,
android.view.View adView,
java.util.List<android.view.View> list)
Register view for impression and click tracking
|
void |
renderAd(POBNativeAdResponse descriptor,
POBNativeTemplateView templateView)
It starts the rendering of the native ad with the provided ad descriptor.
|
void |
setAdRendererListener(POBNativeRendererListener listener)
Sets the ad renderer listener
|
void |
setNativeMeasurementProvider(com.pubmatic.sdk.common.viewability.POBNativeMeasurementProvider openMeasurementProvider)
Sets the open measurement listener
|
public POBNativeAdRenderer(@NonNull
android.content.Context context)
public void registerView(@NonNull
POBNativeAdResponse descriptor,
@NonNull
android.view.View adView,
@NonNull
java.util.List<android.view.View> list)
POBNativeAdRenderingregisterView in interface POBNativeAdRenderingdescriptor - POBNativeAdResponse instanceadView - native ad view containerlist - clickable asset viewspublic void enableDsaIcon(boolean dsaIconEnabled)
POBNativeAdRenderingenableDsaIcon in interface POBNativeAdRenderingdsaIconEnabled - true if DSA icon should be rendered, false otherwisepublic void renderAd(@NonNull
POBNativeAdResponse descriptor,
@NonNull
POBNativeTemplateView templateView)
POBNativeAdRenderingrenderAd in interface POBNativeAdRenderingdescriptor - ad descriptortemplateView - template view to render native adpublic void setAdRendererListener(@Nullable
POBNativeRendererListener listener)
POBNativeAdRenderingsetAdRendererListener in interface POBNativeAdRenderinglistener - ad renderer listenerpublic void setNativeMeasurementProvider(@Nullable
com.pubmatic.sdk.common.viewability.POBNativeMeasurementProvider openMeasurementProvider)
POBNativeAdRenderingsetNativeMeasurementProvider in interface POBNativeAdRenderingopenMeasurementProvider - ad renderer listenerpublic void destroy()
POBNativeAdRenderingdestroy in interface POBNativeAdRenderingpublic void onRecordImpression(@NonNull
android.view.View adView)
POBNativeAdViewListeneronRecordImpression in interface POBNativeAdViewListeneradView - instance of ad viewpublic void onRecordClick(@NonNull
android.view.View adView)
POBNativeAdViewListeneronRecordClick in interface POBNativeAdViewListeneradView - instance of ad Viewpublic void onAssetClicked(@NonNull
android.view.View adView,
int assetId)
POBNativeAdViewListeneronAssetClicked in interface POBNativeAdViewListeneradView - instance of ad ViewassetId - Id of the asset which is clicked.public void onNonAssetClicked(@NonNull
android.view.View nonAssetView,
@NonNull
java.lang.String id)
POBNativeAdViewListeneronNonAssetClicked in interface POBNativeAdViewListenernonAssetView - that recorded click eventid - id of the view which is clickedpublic void onComplete(@NonNull
java.util.Map<java.lang.String,android.graphics.Bitmap> downloadedImages)
onComplete in interface com.pubmatic.sdk.common.utility.POBImageDownloadManager.POBImageDownloadListener