Package org.prebid.mobile
Class AdUnit
-
- All Implemented Interfaces:
public abstract class AdUnitBase ad unit for the original API.
-
-
Method Summary
Modifier and Type Method Description voidsetAutoRefreshInterval(int seconds)Auto refresh interval for banner ad. voidresumeAutoRefresh()Resumes auto refresh interval after stopping. voidstopAutoRefresh()Stops auto refresh interval. 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. voidactivatePrebidImpressionTracker(View adView)Applies the native visibility tracker for tracking `burl` url. StringgetPbAdSlot()voidsetPbAdSlot(String pbAdSlot)StringgetGpid()voidsetGpid(String gpid)StringgetImpOrtbConfig()voidsetImpOrtbConfig(String ortbConfig)Sets imp level OpenRTB config JSON string that will be merged with the original imp object in the bid request. StringgetGlobalOrtbConfig()voidsetGlobalOrtbConfig(String ortbConfig)Sets the global OpenRTB configuration string for the ad unit. AdUnitConfigurationgetConfiguration()-
-
Constructor Detail
-
AdUnit
AdUnit(String configId)
-
-
Method Detail
-
setAutoRefreshInterval
void setAutoRefreshInterval(int seconds)
Auto refresh interval for banner ad.
-
resumeAutoRefresh
void resumeAutoRefresh()
Resumes auto refresh interval after stopping.
-
stopAutoRefresh
void stopAutoRefresh()
Stops auto refresh interval.
-
destroy
void destroy()
Destroy ad unit and stop downloading.
-
fetchDemand
void fetchDemand(Object adObject, OnCompleteListener listener)
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
void fetchDemand(OnFetchDemandResult listener)
Loads ad and saves it to cache.
- Parameters:
listener- callback when operation is completed (success or fail)
-
activatePrebidImpressionTracker
void activatePrebidImpressionTracker(View adView)
Applies the native visibility tracker for tracking `burl` url.
- Parameters:
adView- the ad view object (f.e.
-
getPbAdSlot
String getPbAdSlot()
-
setPbAdSlot
void setPbAdSlot(String pbAdSlot)
-
getImpOrtbConfig
String getImpOrtbConfig()
-
setImpOrtbConfig
void setImpOrtbConfig(String ortbConfig)
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.
-
getGlobalOrtbConfig
String getGlobalOrtbConfig()
-
setGlobalOrtbConfig
void setGlobalOrtbConfig(String ortbConfig)
Sets the global OpenRTB configuration string for the ad unit. It takes precedence over `TargetingParams.setGlobalOrtbConfig`. Expected format:
"{"new_field": "value"}".- Parameters:
ortbConfig- The global OpenRTB JSON configuration string to set.
-
getConfiguration
AdUnitConfiguration getConfiguration()
-
-
-
-