PMBannerAdRequest

Document created by david.simerly on Nov 20, 2017Last modified by david.simerly on Apr 3, 2018
Version 3Show 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.banner.pubmatic

Class PMBannerAdRequest

java.lang.Object
    com.pubmatic.sdk.common.AdRequest
        com.pubmatic.sdk.common.pubmatic.PMAdRequest
            com.pubmatic.sdk.banner.pubmatic.PMBannerAdRequest

 

Direct Known Subclasses:
PMPrefetchRequest

public class PMBannerAdRequest
extends PMAdRequest

 

PMBannerAdRequest class provides parameters for banner ad request. To request Banner Ad, you need to pass valid PMBannerAdRequest instance to PMBannerAdView’s loadRequest() method.

 

Nested Class Summary


Nested classes/interfaces inherited from class com.pubmatic.sdk.common.pubmatic.PMAdRequest


PMAdRequest.RS

 

Field Summary

Modifier and TypeField and Description
protected BooleanmIsInterstitial 
protected PMAdSize[]mMultiAdSizes 

 

Fields inherited from class com.pubmatic.sdk.common.pubmatic.PMAdRequest


mAdId, mAdOrientation, mAdType, mAid, mAppCategory, mAppDomain, mAWT, mCity, mCoppa, mDMA, mEthnicity, mGender, mHashing, mIABCategory, mIncome, mKeywordsList, mOperId, mOrmmaComplianceLevel, mPaid, mPMZoneId, mPubId, mSiteId, mState, mStoreURL, mYearOfBirth, mZip

 

Fields inherited from class com.pubmatic.sdk.common.AdRequest


isAndroidAidEnabled, mChannel, mContext, mCustomParams, mLocation, mPMAdSize, mPostData, mRRFormatter, mUrlParams, mUserAgent

 

Constructor Summary

ModifierConstructor and Description
protected PMBannerAdRequest() 

 

Method Summary

Modifier and TypeMethod and Description
BooleancheckMandatoryParams() 
static PMBannerAdRequestcreatePMBannerAdRequest(java.lang.string pubId, java.lang.string siteId, java.lang.string adId) Creates Ad request with Publisher credentials i.e Publisher Id, Site Id, AdTag Id
PMAdSizegetAdSize() Returns the ad size set from setAdSize()
com.pubmatic.sdk.common.RRFormattergetFormatter() 
PMAdSize[]getOptionalAdSizes() Returns the Ad size array for banner ad
protected voidinitializeDefaultParams() This method will initialize all the parameters which SDK need to fetch.
voidPMAdSize adSize) Sets the banner ad size in ad request with provided size.
voidPMAdSize[] mMultiAdSizes) Set the array of ad sizes.
protected voidsetUpPostParams() 

 

Methods inherited from class com.pubmatic.sdk.common.pubmatic.PMAdRequest


addKeyword, getAdOrientation, getAdType, getAppCategory, getAWT, getDeviceOrientation, getEthnicity, getIABCategory, getKeywordstring, getOperId, getPMZoneId, getSiteId, getStoreURL, getYearOfBirth, isApplicationPaid, setAdId, setAdOrientation, setAdType, setAid, setAppCategory, setAppDomain, setApplicationPaid, setAWT, setCity, setCoppa, setDMA, setEthnicity, setGender, setIABCategory, setIncome, setLocation, setOperId, setOrmmaComplianceLevel, setPMZoneId, setPubId, setSiteId, setState, setStoreURL, setUdidHash, setYearOfBirth, setZip

 

Methods inherited from class com.pubmatic.sdk.common.AdRequest


addUrlParam, getContext, getPostData, getUrlParams, isAndroidAidEnabled, putPostData, setAndroidAidEnabled, setContext, setCustomParams, setUrlParams, setUserAgent

 

Methods inherited from class java.lang.Object


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

 

Field Detail


mMultiAdSizes

protected PMAdSize[] mMultiAdSizes

 

mIsInterstitial

protected Boolean mIsInterstitial

 

Constructor Detail


PMBannerAdRequest

protected PMBannerAdRequest()

 

Method Detail


createPMBannerAdRequest

public static PMBannerAdRequest createPMBannerAdRequest(java.lang.string pubId,                                                         java.lang.string siteId,                                                         java.lang.string adId)

 

Creates Ad request with Publisher credentials i.e Publisher Id, Site Id, AdTag Id

 

Parameters:
pubId -
siteId -
adId -

 

Returns:

 

initializeDefaultParams

protected void initializeDefaultParams()

 

This method will initialize all the parameters which SDK need to fetch.

 

Specified by:
initializeDefaultParams in class AdRequest

 

setUpPostParams

protected void setUpPostParams()

 

 

Overrides:
setUpPostParams in class PMAdRequest

 

checkMandatoryParams

public Boolean checkMandatoryParams()

 

 

Overrides:
checkMandatoryParams in class PMAdRequest

 

Returns:

 

getFormatter

public com.pubmatic.sdk.common.RRFormatter getFormatter()

 

 

Specified by:
getFormatter in class AdRequest

 

Returns:

 

getOptionalAdSizes

public PMAdSize[] getOptionalAdSizes()

 

Returns the Ad size array for banner ad

 

Returns:

 

setOptionalAdSizes

public void setOptionalAdSizes(PMAdSize[] mMultiAdSizes)

 

Set the array of ad sizes. Maximum first 4 sizes would be considered at server for DSP auctioning.

 

Parameters:
mMultiAdSizes -

 

getAdSize

public PMAdSize getAdSize()

 

Returns the ad size set from setAdSize()

 

Overrides:
getAdSize in class AdRequest

 

Returns:
size of banner ad

 

setAdSize

public void setAdSize(PMAdSize adSize)

 

Sets the banner ad size in ad request with provided size. It is mandatory to set ad size in PMBannerAdRequest.

 

Overrides:
setAdSize in class AdRequest

 

Attachments

    Outcomes