PMPrefetchManager

Document created by david.simerly on Nov 21, 2017Last modified by david.simerly on Apr 4, 2018
Version 2Show Document
  • View in full screen mode

PubMatic SDKs

AdRequest

NativeAdSize

PMAdRendered

PMAdRequest

PMAdRequest.AD_TYPE

PMAdRequest.AWT_OPTION

PMAdRequest.ETHNICITY

PMAdRequest.GENDER

PMAdRequest.HASHING_TECHNIQUE

PMAdRequest.OPERID

PMAdRequest.RS

PMAdSize

PMAdSize

PMBannerAdRequest

PMBannerAdView

PMBannerAdView.BannerAdViewDelegate

PMBannerAdView.BannerAdViewDelegate.
     ActivityListener

PMBannerAdView.BannerAdViewDelegate.
     FeatureSupportHandler

PMBannerAdView.BannerAdViewDelegate.
     InternalBrowserListener

PMBannerAdView.BannerAdViewDelegate.
     RequestListener

PMBannerAdView.BannerAdViewDelegate.
     RichMediaListener

PMBannerImpression

PMBid

PMError

PMImpression

PMInterstitialAd

PMInterstitialAd.InterstitialAdListener

PMInterstitialAd.InterstitialAdListener.
     ActivityListener

PMInterstitialAd.InterstitialAdListener.
     FeatureSupportHandler

PMInterstitialAd.InterstitialAdListener.
     InternalBrowserListener

PMInterstitialAd.InterstitialAdListener.
     RequestListener

PMInterstitialAd.InterstitialAdListener.
     RichMediaListener

PMInterstitialAdRequest

PMLogger

PMLogger.LogListener

PMLogger.PMLogLevel

PMNativeAd

PMNativeAd.Image

PMNativeAd.NativeRequestListener

PMNativeAdRequest

PMNativeAssetRequest

PMNativeAssetResponse

PMNativeDataAssetRequest

PMNativeDataAssetResponse

PMNativeDataAssetTypes

PMNativeImageAssetRequest

PMNativeImageAssetResponse

PMNativeImageAssetTypes

PMNativeTitleAssetRequest

PMNativeTitleAssetResponse

➤ PMPrefetchManager

PMPrefetchManager.PMPrefetchListener

PMPrefetchRequest

PubMaticSDK


PubMatic Android SDK Guide

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
voiddestroy() Release resources, clear maps and destroy the adViews used.
java.lang.stringgetClickTrackingUrl(java.lang.string impressionId) 
java.lang.stringgetCreative(java.lang.string impressionId) 
PMPrefetchManager.PMPrefetchListenergetPrefetchListener() 
java.lang.DoublegetPrice(java.lang.string impressionId) 
java.lang.stringgetTrackingUrl(java.lang.string impressionId) 
BooleanisLocationDetectionEnabled() Determines if location detection is enabled.
voidloadBannerAd(java.lang.string impressionId, PMAdRendered pmAdRendered) Provide the rendered adView from PubMatic cached creative.
voidloadInterstitialAd(java.lang.string impressionId, PMAdRendered pmAdRendered) Provide the rendered adView from PubMatic cached creative.
voidprefetchCreatives(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

 

Attachments

    Outcomes