Package org.prebid.mobile.api.rendering
Class BaseInterstitialAdUnit
java.lang.Object
org.prebid.mobile.api.rendering.BaseInterstitialAdUnit
- Direct Known Subclasses:
InterstitialAdUnit
,RewardedAdUnit
Internal base interstitial ad unit for rendering API.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected AdUnitConfiguration
protected final InterstitialControllerListener
protected boolean
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addContent
(ContentObject content) void
addContextData
(String key, String value) Deprecated.use addExtDatavoid
addContextKeyword
(String keyword) Deprecated.use addExtKeywordvoid
addContextKeywords
(Set<String> keywords) Deprecated.use addExtKeywordsvoid
addExtData
(String key, String value) void
addExtKeyword
(String keyword) Deprecated.imp.ext.context.keywords doesn't existvoid
addExtKeywords
(Set<String> keywords) void
addUserData
(DataObject dataObject) protected void
changeInterstitialAdUnitState
(org.prebid.mobile.api.rendering.BaseInterstitialAdUnit.InterstitialAdUnitState state) void
Deprecated.use clearExtDatavoid
Deprecated.use clearExtKeywordsvoid
void
void
void
destroy()
Cleans up resources when destroyed.BidResponse
protected android.content.Context
Deprecated.use getExtDataDictionaryDeprecated.use getExtKeywordsSetprotected void
init
(AdUnitConfiguration adUnitConfiguration) protected boolean
boolean
isLoaded()
void
loadAd()
Executes ad loading if no request is running.protected void
protected void
void
removeContextData
(String key) Deprecated.use removeExtDatavoid
removeContextKeyword
(String keyword) Deprecated.use removeExtKeywordvoid
removeExtData
(String key) void
removeExtKeyword
(String keyword) void
setAppContent
(ContentObject content) void
setCloseButtonArea
(double closeButtonArea) Sets close button percentage size in range from 0.05 to 1.void
setCloseButtonPosition
(Position closeButtonPosition) Sets close button position on the screen.void
setImpOrtbConfig
(String ortbConfig) Sets imp level OpenRTB config JSON string that will be merged with the original imp object in the bid request.void
setIsMuted
(boolean isMuted) void
setIsSoundButtonVisible
(boolean isSoundButtonVisible) void
setMaxVideoDuration
(int seconds) void
setOrtbConfig
(String openRtbConfig) Deprecated, for removal: This API element is subject to removal in a future version.void
setPbAdSlot
(String adSlot) void
setSkipButtonArea
(double buttonArea) Sets skip button percentage size in range from 0.05 to 1.void
setSkipButtonPosition
(Position skipButtonPosition) Sets skip button position on the screen.void
setSkipDelay
(int secondsDelay) Sets delay in seconds to show skip or close button.void
show()
Executes interstitial display if auction winner is defined.void
updateContextData
(String key, Set<String> value) Deprecated.use updateExtDatavoid
updateExtData
(String key, Set<String> value)
-
Field Details
-
userHasNotEarnedRewardYet
protected boolean userHasNotEarnedRewardYet -
config
protected AdUnitConfiguration config -
controllerListener
protected final InterstitialControllerListener controllerListener
-
-
Constructor Details
-
BaseInterstitialAdUnit
protected BaseInterstitialAdUnit(android.content.Context context)
-
-
Method Details
-
loadAd
public void loadAd()Executes ad loading if no request is running. -
isLoaded
public boolean isLoaded()- Returns:
- true if auction winner was defined, false otherwise
-
show
public void show()Executes interstitial display if auction winner is defined. -
addContextData
Deprecated.use addExtData -
updateContextData
Deprecated.use updateExtData -
removeContextData
Deprecated.use removeExtData -
clearContextData
Deprecated.use clearExtData -
getContextDataDictionary
Deprecated.use getExtDataDictionary -
addContextKeyword
Deprecated.use addExtKeyword -
addContextKeywords
Deprecated.use addExtKeywords -
removeContextKeyword
Deprecated.use removeExtKeyword -
getContextKeywordsSet
Deprecated.use getExtKeywordsSet -
clearContextKeywords
Deprecated.use clearExtKeywords -
addExtData
-
updateExtData
-
removeExtData
-
clearExtData
public void clearExtData() -
getExtDataDictionary
-
addExtKeyword
Deprecated.imp.ext.context.keywords doesn't exist -
addExtKeywords
-
removeExtKeyword
-
getExtKeywordsSet
-
clearExtKeywords
public void clearExtKeywords() -
setAppContent
-
getAppContent
-
addUserData
-
getUserData
-
clearUserData
public void clearUserData() -
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.
-
getPbAdSlot
-
setPbAdSlot
-
setSkipDelay
public void setSkipDelay(int secondsDelay) Sets delay in seconds to show skip or close button. -
setSkipButtonArea
public void setSkipButtonArea(double buttonArea) Sets skip button percentage size in range from 0.05 to 1. If value less than 0.05, size will be default. -
setSkipButtonPosition
Sets skip button position on the screen. Suitable values TOP_LEFT and TOP_RIGHT. Default value TOP_RIGHT. -
setIsMuted
public void setIsMuted(boolean isMuted) -
setIsSoundButtonVisible
public void setIsSoundButtonVisible(boolean isSoundButtonVisible) -
setMaxVideoDuration
public void setMaxVideoDuration(int seconds) -
setCloseButtonArea
public void setCloseButtonArea(double closeButtonArea) Sets close button percentage size in range from 0.05 to 1. If value less than 0.05, size will be default. -
setCloseButtonPosition
Sets close button position on the screen. Suitable values TOP_LEFT and TOP_RIGHT. Default value TOP_RIGHT. -
destroy
public void destroy()Cleans up resources when destroyed. -
init
protected void init(AdUnitConfiguration adUnitConfiguration) -
loadPrebidAd
protected void loadPrebidAd() -
getContext
protected android.content.Context getContext() -
isBidInvalid
protected boolean isBidInvalid() -
changeInterstitialAdUnitState
protected void changeInterstitialAdUnitState(org.prebid.mobile.api.rendering.BaseInterstitialAdUnit.InterstitialAdUnitState state) -
getBidResponse
public BidResponse getBidResponse() -
addContent
-
notifyUserReward
protected void notifyUserReward()
-