public class POBNativeAdRenderer
extends java.lang.Object
implements com.pubmatic.sdk.nativead.renderer.POBNativeAdRendering, com.pubmatic.sdk.nativead.POBNativeAdViewListener, com.pubmatic.sdk.common.utility.POBImageDownloadManager.POBImageDownloadListener
Constructor and Description |
---|
POBNativeAdRenderer(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(View adView,
int assetId)
Notify the assets with certain Id in is clicked.
|
void |
onComplete(java.util.Map<java.lang.String,Bitmap> downloadedImages)
Notifies the Positive event occurred on the dialog
|
void |
onNonAssetClicked(View nonAssetView,
java.lang.String id)
Notify the non-asset with certain id that got clicked.
|
void |
onRecordClick(View adView)
Notify the POBNativeAdView is clicked.
|
void |
onRecordImpression(View adView)
Notify the POBNativeAdView is attached to view and the impression is occurred.
|
void |
registerView(com.pubmatic.sdk.nativead.response.POBNativeAdResponse descriptor,
View adView,
java.util.List<View> list)
Register view for impression and click tracking
|
void |
renderAd(com.pubmatic.sdk.nativead.response.POBNativeAdResponse descriptor,
POBNativeTemplateView templateView)
It starts the rendering of the native ad with the provided ad descriptor.
|
void |
setAdRendererListener(com.pubmatic.sdk.nativead.renderer.POBNativeRendererListener listener)
Sets the ad renderer listener
|
void |
setNativeMeasurementProvider(com.pubmatic.sdk.common.viewability.POBNativeMeasurementProvider openMeasurementProvider)
Sets the open measurement listener
|
public void registerView(@NonNull com.pubmatic.sdk.nativead.response.POBNativeAdResponse descriptor, @NonNull View adView, @NonNull java.util.List<View> list)
com.pubmatic.sdk.nativead.renderer.POBNativeAdRendering
registerView
in interface com.pubmatic.sdk.nativead.renderer.POBNativeAdRendering
descriptor
- POBNativeAdResponse instanceadView
- native ad view containerlist
- clickable asset viewspublic void enableDsaIcon(boolean dsaIconEnabled)
com.pubmatic.sdk.nativead.renderer.POBNativeAdRendering
enableDsaIcon
in interface com.pubmatic.sdk.nativead.renderer.POBNativeAdRendering
dsaIconEnabled
- true if DSA icon should be rendered, false otherwisepublic void renderAd(@NonNull com.pubmatic.sdk.nativead.response.POBNativeAdResponse descriptor, @NonNull POBNativeTemplateView templateView)
com.pubmatic.sdk.nativead.renderer.POBNativeAdRendering
renderAd
in interface com.pubmatic.sdk.nativead.renderer.POBNativeAdRendering
descriptor
- ad descriptortemplateView
- template view to render native adpublic void setAdRendererListener(@Nullable com.pubmatic.sdk.nativead.renderer.POBNativeRendererListener listener)
com.pubmatic.sdk.nativead.renderer.POBNativeAdRendering
setAdRendererListener
in interface com.pubmatic.sdk.nativead.renderer.POBNativeAdRendering
listener
- ad renderer listenerpublic void setNativeMeasurementProvider(@Nullable com.pubmatic.sdk.common.viewability.POBNativeMeasurementProvider openMeasurementProvider)
com.pubmatic.sdk.nativead.renderer.POBNativeAdRendering
setNativeMeasurementProvider
in interface com.pubmatic.sdk.nativead.renderer.POBNativeAdRendering
openMeasurementProvider
- ad renderer listenerpublic void destroy()
com.pubmatic.sdk.nativead.renderer.POBNativeAdRendering
destroy
in interface com.pubmatic.sdk.nativead.renderer.POBNativeAdRendering
public void onRecordImpression(@NonNull View adView)
com.pubmatic.sdk.nativead.POBNativeAdViewListener
onRecordImpression
in interface com.pubmatic.sdk.nativead.POBNativeAdViewListener
adView
- instance of ad viewpublic void onRecordClick(@NonNull View adView)
com.pubmatic.sdk.nativead.POBNativeAdViewListener
onRecordClick
in interface com.pubmatic.sdk.nativead.POBNativeAdViewListener
adView
- instance of ad Viewpublic void onAssetClicked(@NonNull View adView, int assetId)
com.pubmatic.sdk.nativead.POBNativeAdViewListener
onAssetClicked
in interface com.pubmatic.sdk.nativead.POBNativeAdViewListener
adView
- instance of ad ViewassetId
- Id of the asset which is clicked.public void onNonAssetClicked(@NonNull View nonAssetView, @NonNull java.lang.String id)
com.pubmatic.sdk.nativead.POBNativeAdViewListener
onNonAssetClicked
in interface com.pubmatic.sdk.nativead.POBNativeAdViewListener
nonAssetView
- that recorded click eventid
- id of the view which is clickedpublic void onComplete(@NonNull java.util.Map<java.lang.String,Bitmap> downloadedImages)
com.pubmatic.sdk.common.utility.POBImageDownloadManager.POBImageDownloadListener
onComplete
in interface com.pubmatic.sdk.common.utility.POBImageDownloadManager.POBImageDownloadListener
downloadedImages
- map of url vs downloaded image bitmap