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 Detail

      • POBNativeAdRenderer

        POBNativeAdRenderer(Context context)
    • Method Detail

      • 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
      • 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 View
        assetId - 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 event
        id - id of the view which is clicked