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 Objectprotected booleanprotected BidLoaderprotected BidResponseprotected AdUnitConfiguration -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddContextData(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 & value for adunit context targeting if the key already exists the value will be appended to the list.voidaddExtKeyword(String keyword) This method obtains the context keyword for adunit context targeting Inserts the given element in the set if it is not already present.voidaddExtKeywords(Set<String> keywords) This method obtains the context keyword set for adunit context targeting Adds the elements of the given set to the set.voidaddUserData(DataObject dataObject) 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 targetingvoidprotected 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.getGpid()voidremoveContextData(String key) Deprecated.voidremoveContextKeyword(String keyword) Deprecated.Use removeExtKeywordvoidremoveExtData(String key) This method allows to remove specific context data keyword & 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) This method obtains the content for adunit, content, in which impression will appearvoidsetAutoRefreshInterval(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 & 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
-
allowNullableAdObject
protected boolean allowNullableAdObject
-
-
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)
-
addContextData
Deprecated.This method obtains the context data keyword & 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 & 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 & 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 & 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 & 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 & 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
This method obtains the context keyword for adunit context targeting Inserts the given element in the set if it is not already present. -
addExtKeywords
This method obtains the context keyword set for adunit context targeting Adds the elements of the given set to the set. -
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
This method obtains the content for adunit, content, in which impression will appear -
getAppContent
-
addUserData
-
getUserData
-
clearUserData
public void clearUserData() -
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
-