Package org.prebid.mobile
Class AdUnit
java.lang.Object
org.prebid.mobile.AdUnit
- Direct Known Subclasses:
BannerBaseAdUnit,NativeAdUnit,VideoBaseAdUnit
Base ad unit for the original API.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanprotected Objectprotected WeakReference<android.view.View> protected booleanprotected BidLoaderprotected BidResponseprotected AdUnitConfigurationprotected final VisibilityMonitor -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidactivatePrebidImpressionTracker(android.view.View adView) Applies the native visibility tracker for tracking `burl` url.voidaddContextData(String key, String value) Deprecated.voidaddContextKeyword(String keyword) Deprecated.Use addExtKeywordvoidaddContextKeywords(Set<String> keywords) Deprecated.Use addExtKeywordsvoidaddExtData(String key, String value) This method obtains the context data keyword invalid input: '&' value for adunit context targeting if the key already exists the value will be appended to the list.voidaddExtKeyword(String keyword) Deprecated.imp.ext.context.keywords doesn't existvoidaddExtKeywords(Set<String> keywords) Deprecated.imp.ext.context.keywords doesn't existvoidaddUserData(DataObject dataObject) Deprecated.voidDeprecated.voidDeprecated.Use clearExtKeywordsvoidThis method allows to remove all context data set from adunit context targetingvoidThis method allows to remove all keywords from the set of adunit context targetingvoidDeprecated.protected ResultCodeconvertToResultCode(AdException renderingException) protected BidRequesterListenercreateBidListener(OnCompleteListener originalListener) voiddestroy()Destroy ad unit and stop downloading.voidfetchDemand(Object adObject, OnCompleteListener listener) Loads ad and applies keywords to the ad object.voidfetchDemand(OnFetchDemandResult listener) Loads ad and saves it to cache.voidfetchDemand(OnCompleteListener2 listener) Deprecated.Deprecated.getGpid()Deprecated.voidremoveContextData(String key) Deprecated.voidremoveContextKeyword(String keyword) Deprecated.Use removeExtKeywordvoidremoveExtData(String key) This method allows to remove specific context data keyword invalid input: '&' values set from adunit context targetingvoidremoveExtKeyword(String keyword) This method allows to remove specific context keyword from adunit context targetingvoidResumes auto refresh interval after stopping.voidsetAppContent(ContentObject content) Deprecated.voidsetAutoRefreshInterval(int seconds) Auto refresh interval for banner ad.voidsetAutoRefreshPeriodMillis(int periodMillis) Deprecated.Please use setAutoRefreshInterval() in seconds!voidvoidsetImpOrtbConfig(String ortbConfig) Sets imp level OpenRTB config JSON string that will be merged with the original imp object in the bid request.voidsetOrtbConfig(String config) Deprecated, for removal: This API element is subject to removal in a future version.voidsetPbAdSlot(String pbAdSlot) voidStops auto refresh interval.voidupdateContextData(String key, Set<String> value) Deprecated.voidupdateExtData(String key, Set<String> value) This method obtains the context data keyword invalid input: '&' values for adunit context targeting the values if the key already exist will be replaced with the new set of values
-
Field Details
-
configuration
-
bidLoader
-
adObject
-
bidResponse
-
visibilityMonitor
-
adViewReference
-
allowNullableAdObject
protected boolean allowNullableAdObject -
activateInterstitialPrebidImpressionTracker
protected boolean activateInterstitialPrebidImpressionTracker
-
-
Constructor Details
-
AdUnit
-
-
Method Details
-
setAutoRefreshPeriodMillis
Deprecated.Please use setAutoRefreshInterval() in seconds! -
setAutoRefreshInterval
public void setAutoRefreshInterval(int seconds) Auto refresh interval for banner ad. -
resumeAutoRefresh
public void resumeAutoRefresh()Resumes auto refresh interval after stopping. -
stopAutoRefresh
public void stopAutoRefresh()Stops auto refresh interval. -
destroy
public void destroy()Destroy ad unit and stop downloading. -
fetchDemand
Deprecated. -
fetchDemand
Loads ad and applies keywords to the ad object.- Parameters:
adObject- AdMob's (AdManagerAdRequestorAdManagerAdRequest.Builder) or AppLovin's (MaxNativeAdLoader) ad objectlistener- callback when operation is completed (success or fail)
-
fetchDemand
Loads ad and saves it to cache.- Parameters:
listener- callback when operation is completed (success or fail)
-
activatePrebidImpressionTracker
public void activatePrebidImpressionTracker(android.view.View adView) Applies the native visibility tracker for tracking `burl` url.- Parameters:
adView- the ad view object (f.e.AdManagerAdView)
-
addContextData
Deprecated.This method obtains the context data keyword invalid input: '&' value for adunit context targeting if the key already exists the value will be appended to the list. No duplicates will be added -
updateContextData
Deprecated.This method obtains the context data keyword invalid input: '&' values for adunit context targeting the values if the key already exist will be replaced with the new set of values -
removeContextData
Deprecated.This method allows to remove specific context data keyword invalid input: '&' values set from adunit context targeting -
clearContextData
Deprecated.This method allows to remove all context data set from adunit context targeting -
addExtData
This method obtains the context data keyword invalid input: '&' value for adunit context targeting if the key already exists the value will be appended to the list. No duplicates will be added -
updateExtData
This method obtains the context data keyword invalid input: '&' values for adunit context targeting the values if the key already exist will be replaced with the new set of values -
removeExtData
This method allows to remove specific context data keyword invalid input: '&' values set from adunit context targeting -
clearExtData
public void clearExtData()This method allows to remove all context data set from adunit context targeting -
addContextKeyword
Deprecated.Use addExtKeywordThis method obtains the context keyword for adunit context targeting Inserts the given element in the set if it is not already present. -
addContextKeywords
Deprecated.Use addExtKeywordsThis method obtains the context keyword set for adunit context targeting Adds the elements of the given set to the set. -
removeContextKeyword
Deprecated.Use removeExtKeywordThis method allows to remove specific context keyword from adunit context targeting -
clearContextKeywords
Deprecated.Use clearExtKeywordsThis method allows to remove all keywords from the set of adunit context targeting -
addExtKeyword
Deprecated.imp.ext.context.keywords doesn't exist -
addExtKeywords
Deprecated.imp.ext.context.keywords doesn't exist -
removeExtKeyword
This method allows to remove specific context keyword from adunit context targeting -
clearExtKeywords
public void clearExtKeywords()This method allows to remove all keywords from the set of adunit context targeting -
setAppContent
Deprecated.In the upcoming major release, the method will be removed. Please, use TargetingParams.setGlobalOrtbConfig method instead. This method obtains the content for adunit, content, in which impression will appear -
getAppContent
Deprecated.In the upcoming major release, the method will be removed. Please, use TargetingParams.getGlobalOrtbConfig method instead. -
addUserData
Deprecated.In the upcoming major release, the method will be removed. Please, use TargetingParams.setGlobalOrtbConfig method instead. -
getUserData
Deprecated.In the upcoming major release, the method will be removed.Please, use TargetingParams.getGlobalOrtbConfig method instead. -
clearUserData
Deprecated.In the upcoming major release, the method will be removed. Please, use TargetingParams.setGlobalOrtbConfig method instead. -
getPbAdSlot
-
setPbAdSlot
-
getGpid
-
setGpid
-
setOrtbConfig
Deprecated, for removal: This API element is subject to removal in a future version. -
getImpOrtbConfig
-
setImpOrtbConfig
Sets imp level OpenRTB config JSON string that will be merged with the original imp object in the bid request. Expected format:"{"new_field": "value"}".- Parameters:
ortbConfig- JSON config string.
-
createBidListener
-
convertToResultCode
-
getConfiguration
-