Class POBNativeAdRenderer
-
- All Implemented Interfaces:
-
com.pubmatic.sdk.common.utility.POBImageDownloadManager.POBImageDownloadListener,com.pubmatic.sdk.nativead.POBNativeAdViewListener,com.pubmatic.sdk.nativead.renderer.POBNativeAdRendering
public class POBNativeAdRenderer implements POBNativeAdRendering, POBNativeAdViewListener, POBImageDownloadManager.POBImageDownloadListener
Class responsible for handling the native ad rendering
-
-
Constructor Summary
Constructors Constructor Description POBNativeAdRenderer(Context context)
-
Method Summary
Modifier and Type Method Description voidregisterView(@NonNull() POBNativeAdResponse descriptor, @NonNull() View adView, @NonNull() List<View> list)Register view for impression and click tracking voidenableDsaIcon(boolean dsaIconEnabled)Set DSA icon should be rendereded or not Default value is false, i.e. voidrenderAd(@NonNull() POBNativeAdResponse descriptor, @NonNull() POBNativeTemplateView templateView)It starts the rendering of the native ad with the provided ad descriptor. voidsetAdRendererListener(@Nullable() POBNativeRendererListener listener)Sets the ad renderer listener voidsetNativeMeasurementProvider(@Nullable() POBNativeMeasurementProvider openMeasurementProvider)Sets the open measurement listener voiddestroy()Destroys the native ad renderer voidonRecordImpression(@NonNull() View adView)Notify the POBNativeAdView is attached to view and the impression is occurred. voidonRecordClick(@NonNull() View adView)Notify the POBNativeAdView is clicked. voidonAssetClicked(@NonNull() View adView, int assetId)Notify the assets with certain Id in is clicked. voidonNonAssetClicked(@NonNull() View nonAssetView, @NonNull() String id)Notify the non-asset with certain id that got clicked. voidonComplete(@NonNull() Map<String, Bitmap> downloadedImages)-
-
Constructor Detail
-
POBNativeAdRenderer
POBNativeAdRenderer(Context context)
-
-
Method Detail
-
registerView
void registerView(@NonNull() POBNativeAdResponse descriptor, @NonNull() View adView, @NonNull() List<View> list)
Register view for impression and click tracking
- Parameters:
descriptor- POBNativeAdResponse instanceadView- native ad view containerlist- clickable asset views
-
enableDsaIcon
void enableDsaIcon(boolean dsaIconEnabled)
Set DSA icon should be rendereded or not Default value is false, i.e. DSA icon will not be rendered
- Parameters:
dsaIconEnabled- true if DSA icon should be rendered, false otherwise
-
renderAd
void renderAd(@NonNull() POBNativeAdResponse descriptor, @NonNull() POBNativeTemplateView templateView)
It starts the rendering of the native ad with the provided ad descriptor.
- Parameters:
descriptor- ad descriptortemplateView- template view to render native ad
-
setAdRendererListener
void setAdRendererListener(@Nullable() POBNativeRendererListener listener)
Sets the ad renderer listener
- Parameters:
listener- ad renderer listener
-
setNativeMeasurementProvider
void setNativeMeasurementProvider(@Nullable() POBNativeMeasurementProvider openMeasurementProvider)
Sets the open measurement listener
- Parameters:
openMeasurementProvider- ad renderer listener
-
destroy
void destroy()
Destroys the native ad renderer
-
onRecordImpression
void onRecordImpression(@NonNull() View adView)
Notify the POBNativeAdView is attached to view and the impression is occurred.
- Parameters:
adView- instance of ad view
-
onRecordClick
void onRecordClick(@NonNull() View adView)
Notify the POBNativeAdView is clicked.
- Parameters:
adView- instance of ad View
-
onAssetClicked
void onAssetClicked(@NonNull() View adView, int assetId)
Notify the assets with certain Id in is clicked.
- Parameters:
adView- instance of ad ViewassetId- Id of the asset which is clicked.
-
onNonAssetClicked
void onNonAssetClicked(@NonNull() View nonAssetView, @NonNull() String id)
Notify the non-asset with certain id that got clicked.
- Parameters:
nonAssetView- that recorded click eventid- id of the view which is clicked
-
onComplete
void onComplete(@NonNull() Map<String, Bitmap> downloadedImages)
-
-
-
-