public class POBNativeAdProvider extends java.lang.Object implements POBNativeAd, POBNativeRendererListener, POBNativeAdEventListener
| Constructor and Description |
|---|
POBNativeAdProvider(android.content.Context context,
POBNativeTemplateType nativeTemplateType,
POBNativeAdEventBridge adEventHandler)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
destroy()
Method to destroy the native ad
|
POBNativeAdView |
getAdView()
Returns the rendered Native Ad View in both OpenWrapPartnerWin and OnAdServerWin condition
Instance of
POBNativeAdView works as a wrapper around AdServerView and OpenWrap POBNativeTemplateView |
void |
onAdClicked()
Notify about the Native Ad recorded click
|
void |
onAdClicked(int assetId)
Notify about the Native Ad recorded click for specific asset
|
void |
onAdClosed()
Notify about the Native Ad closed
|
void |
onAdImpression()
Notify about the Native Ad recorded impression
|
void |
onAdLeavingApplication()
Notify about the Native Ad leaving application
|
void |
onAdOpened()
Notify about the Native Ad opened
|
void |
onAdRendered(POBNativeAdView nativeAdView)
Notify about the Native Ad rendering completion
|
void |
onAdRenderingFailed(com.pubmatic.sdk.common.POBError error)
Notify about the Native Ad rendering failure
|
void |
onNativeAdClicked()
Get called when the ad server SDK informs about click event as a result of user interaction.
|
void |
onNativeAdClosed()
Get called this when the ad server SDK closed the ad
|
void |
onNativeAdImpression()
Get called when the ad server SDK informs about impression event
|
void |
onNativeAdOpened()
Get called this when the ad server SDK has opened an ad
|
void |
renderAd(POBNativeAdListener listener)
Render the native template in
POBNativeAdView object |
void |
renderAd(POBNativeTemplateView templateView,
POBNativeAdListener listener)
Another flavor of renderAd method use by publisher to pass there own custom view template
|
void |
setBid(com.pubmatic.sdk.openwrap.core.POBBid bid)
Sets the instance of POBBid
|
void |
setNativeAdResponse(POBNativeAdResponse nativeAdResponse)
Setter for the native ad response
|
public POBNativeAdProvider(@NonNull
android.content.Context context,
@NonNull
POBNativeTemplateType nativeTemplateType,
@NonNull
POBNativeAdEventBridge adEventHandler)
context - Activity contextnativeTemplateType - Template type for Native AdadEventHandler - Instance of POBNativeAdEventpublic void setBid(@Nullable
com.pubmatic.sdk.openwrap.core.POBBid bid)
bid - Instance of POBBidpublic void setNativeAdResponse(@Nullable
POBNativeAdResponse nativeAdResponse)
nativeAdResponse - Instance of POBNativeAdResponse@MainThread
public void renderAd(@NonNull
POBNativeAdListener listener)
POBNativeAdPOBNativeAdView objectrenderAd in interface POBNativeAdlistener - POBNativeAdListener to get rendering callbacks@MainThread
public void renderAd(@NonNull
POBNativeTemplateView templateView,
@NonNull
POBNativeAdListener listener)
POBNativeAdrenderAd in interface POBNativeAdtemplateView - custom template to get populatelistener - POBNativeAdListener of rendering callbackspublic void destroy()
POBNativeAddestroy in interface POBNativeAd@Nullable public POBNativeAdView getAdView()
POBNativeAdPOBNativeAdView works as a wrapper around AdServerView and OpenWrap POBNativeTemplateViewgetAdView in interface POBNativeAdPOBNativeAdViewpublic void onAdRendered(@NonNull
POBNativeAdView nativeAdView)
POBNativeRendererListeneronAdRendered in interface POBNativeRendererListenernativeAdView - Native Ad view instancepublic void onAdRenderingFailed(@NonNull
com.pubmatic.sdk.common.POBError error)
POBNativeRendererListeneronAdRenderingFailed in interface POBNativeRendererListenererror - POBError for show failurespublic void onAdImpression()
POBNativeRendererListeneronAdImpression in interface POBNativeRendererListenerpublic void onAdClicked()
POBNativeRendererListeneronAdClicked in interface POBNativeRendererListenerpublic void onAdClicked(int assetId)
POBNativeRendererListeneronAdClicked in interface POBNativeRendererListenerpublic void onAdLeavingApplication()
POBNativeRendererListeneronAdLeavingApplication in interface POBNativeRendererListenerpublic void onAdOpened()
POBNativeRendererListeneronAdOpened in interface POBNativeRendererListenerpublic void onAdClosed()
POBNativeRendererListeneronAdClosed in interface POBNativeRendererListenerpublic void onNativeAdClosed()
POBNativeAdEventListeneronNativeAdClosed in interface POBNativeAdEventListenerpublic void onNativeAdOpened()
POBNativeAdEventListeneronNativeAdOpened in interface POBNativeAdEventListenerpublic void onNativeAdClicked()
POBNativeAdEventListeneronNativeAdClicked in interface POBNativeAdEventListenerpublic void onNativeAdImpression()
POBNativeAdEventListeneronNativeAdImpression in interface POBNativeAdEventListener