Page tree


com.pubmatic.sdk.headerbidding

Class PMPrefetchManager

java.lang.Object
    com.pubmatic.sdk.headerbidding.PMPrefetchManager
All Implemented Interfaces:
com.pubmatic.sdk.common.ResponseGenerator

public class PMPrefetchManagerextends java.lang.Object implements com.pubmatic.sdk.common.ResponseGenerator

This class is the responsible for fetching the bids from PubMatic ad server. It gives callback to Publisher application via PMPrefetchListener. It also manages the bids for future rendering. Provides the auto refresh feature using which it continous notify the Publisher with new bid details after specified interval. Only for first refresh the notification occurs at in seconds. And all successor notification will occur after in seconds.

Nested Class Summary

Modifier and TypeClass and Description
static interface PMPrefetchManager.PMPrefetchListener Listener to channel result events of a header bidding request to the publisher app.

Constructor Summary

Constructor and Description
PMPrefetchManager(android.content.Context context, PMPrefetchManager.PMPrefetchListener pmPrefetchListener)

Method Summary

Modifier and TypeMethod and Description
void destroy() Release resources, clear maps and destroy the adViews used.
java.lang.string getClickTrackingUrl(java.lang.string impressionId)
java.lang.string getCreative(java.lang.string impressionId)
PMPrefetchManager.PMPrefetchListener getPrefetchListener()
java.lang.Double getPrice(java.lang.string impressionId)
java.lang.string getTrackingUrl(java.lang.string impressionId)
Boolean isLocationDetectionEnabled() Determines if location detection is enabled.
void loadBannerAd(java.lang.string impressionId, PMAdRendered pmAdRendered) Provide the rendered adView from PubMatic cached creative.
void loadInterstitialAd(java.lang.string impressionId, PMAdRendered pmAdRendered) Provide the rendered adView from PubMatic cached creative.
void prefetchCreatives(PMPrefetchRequest adRequest)

Methods inherited from class java.lang.Object


clone, equals, finalize, getClass, hashCode, notify, notifyAll, tostring, wait, wait, wait

Constructor Detail


PMPrefetchManager

public PMPrefetchManager(android.content.Context context, PMPrefetchManager.PMPrefetchListener pmPrefetchListener)

Method Detail


getPrefetchListener

public PMPrefetchManager.PMPrefetchListener getPrefetchListener()

isLocationDetectionEnabled

public Boolean isLocationDetectionEnabled()

Determines if location detection is enabled. If enabled, the SDK will use the location services of the device to determine the device's location ad add ad request parameters (lat/long) to the ad request. Location detection can be enabled with setLocationDetectionEnabled() or enableLocationDetection().

Returns:
true if location detection is enabled, false if not

prefetchCreatives

public void prefetchCreatives(PMPrefetchRequest adRequest)

loadBannerAd

public void loadBannerAd(java.lang.string impressionId, PMAdRendered pmAdRendered)

Provide the rendered adView from PubMatic cached creative. This creative is the header bidding winner for the provided impressionId.

Parameters:
impressionId - the winning impressionId

loadInterstitialAd

public void loadInterstitialAd(java.lang.string impressionId, PMAdRendered pmAdRendered)

Provide the rendered adView from PubMatic cached creative. This creative is the header bidding winner for the provided adSlotId.

destroy

public void destroy()

Release resources, clear maps and destroy the adViews used.

getTrackingUrl

public java.lang.string getTrackingUrl(java.lang.string impressionId)
Specified by:
getTrackingUrl in interface com.pubmatic.sdk.common.ResponseGenerator

getClickTrackingUrl

public java.lang.string getClickTrackingUrl(java.lang.string impressionId)
Specified by:
getClickTrackingUrl in interface com.pubmatic.sdk.common.ResponseGenerator

getCreative

public java.lang.string getCreative(java.lang.string impressionId)
Specified by:
getCreative in interface com.pubmatic.sdk.common.ResponseGenerator

getPrice

public java.lang.Double getPrice(java.lang.string impressionId)
Specified by:
getPrice in interface com.pubmatic.sdk.common.ResponseGenerator


⇧ Top