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.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.AdUnitConfigurationgetGpid()voidResumes auto refresh interval after stopping.voidsetAutoRefreshInterval(int seconds) Auto refresh interval for banner ad.voidvoidsetImpOrtbConfig(String ortbConfig) Sets imp level OpenRTB config JSON string that will be merged with the original imp object in the bid request.voidsetPbAdSlot(String pbAdSlot) voidStops auto refresh interval.
-
Field Details
-
configuration
protected AdUnitConfiguration configuration -
bidLoader
protected BidLoader bidLoader -
adObject
-
bidResponse
protected BidResponse bidResponse -
visibilityMonitor
-
adViewReference
-
allowNullableAdObject
protected boolean allowNullableAdObject -
activateInterstitialPrebidImpressionTracker
protected boolean activateInterstitialPrebidImpressionTracker
-
-
Constructor Details
-
AdUnit
-
-
Method Details
-
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
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)
-
getPbAdSlot
-
setPbAdSlot
-
getGpid
-
setGpid
-
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
public AdUnitConfiguration getConfiguration()
-