Class HTMLCreative
- java.lang.Object
-
- org.prebid.mobile.rendering.models.AbstractCreative
-
- org.prebid.mobile.rendering.models.HTMLCreative
-
- All Implemented Interfaces:
java.lang.Comparable,InterstitialManagerDisplayDelegate,WebViewDelegate
public class HTMLCreative extends AbstractCreative implements WebViewDelegate, InterstitialManagerDisplayDelegate, java.lang.Comparable
-
-
Field Summary
-
Fields inherited from class org.prebid.mobile.rendering.models.AbstractCreative
contextReference, creativeVisibilityTracker, interstitialManager, weakOmAdSessionManager
-
-
Constructor Summary
Constructors Constructor Description HTMLCreative(android.content.Context context, CreativeModel model, OmAdSessionManager omAdSessionManager, InterstitialManager interstitialManager)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(java.lang.Object creative)voidcreateOmAdSession()Create OM session for specific creative.voiddestroy()Specific creative cleanup.voiddisplay()Specific creative display.PrebidWebViewBasegetCreativeView()voidhandleAdWindowFocus()Executed when window gains focus (e.g. when app is resumed from background) Used byAdViewManagerto handle refresh on view visibility changevoidhandleAdWindowNoFocus()Executed when window loses focus (e.g. when app is going in background).voidhandleMRAIDEventsInCreative(MraidEvent mraidEvent, WebViewBase oldWebViewBase)voidinterstitialAdClosed()Close of an interstitial advoidinterstitialDialogShown(android.view.ViewGroup rootViewGroup)booleanisDisplay()booleanisEndCard()booleanisResolved()booleanisVideo()voidload()Specific creative load.voidmraidAdCollapsed()voidmraidAdExpanded()voidsetTwoPartNewWebViewBase(PrebidWebViewBase twoPartNewWebViewBase)voidstartViewabilityTracker()voidtrackAdLoaded()Executed after processing transaction and creating OmAdSession inAdViewManagervoidwebViewFailedToLoad(AdException error)voidwebViewReadyToDisplay()voidwebViewShouldOpenExternalLink(java.lang.String url)voidwebViewShouldOpenMRAIDLink(java.lang.String url)-
Methods inherited from class org.prebid.mobile.rendering.models.AbstractCreative
addOmFriendlyObstruction, changeVisibilityTrackerState, getCreativeModel, getCreativeViewListener, getMediaDuration, getResolutionListener, getVideoSkipOffset, isBuiltInVideo, isInterstitialClosed, isPlaying, mute, pause, resume, setCreativeView, setCreativeViewListener, setResolutionListener, startOmSession, trackVideoEvent, trackVideoStateChange, unmute, updateAdView
-
-
-
-
Constructor Detail
-
HTMLCreative
public HTMLCreative(android.content.Context context, CreativeModel model, OmAdSessionManager omAdSessionManager, InterstitialManager interstitialManager) throws AdException- Throws:
AdException
-
-
Method Detail
-
isDisplay
public boolean isDisplay()
- Specified by:
isDisplayin classAbstractCreative
-
isVideo
public boolean isVideo()
- Specified by:
isVideoin classAbstractCreative
-
load
public void load() throws AdExceptionDescription copied from class:AbstractCreativeSpecific creative load.- Specified by:
loadin classAbstractCreative- Throws:
AdException
-
display
public void display()
Description copied from class:AbstractCreativeSpecific creative display.- Specified by:
displayin classAbstractCreative
-
createOmAdSession
public void createOmAdSession()
Description copied from class:AbstractCreativeCreate OM session for specific creative. Each creative must create appropriate OM AdSession (e.g. for HTML and Native)- Specified by:
createOmAdSessionin classAbstractCreative
-
trackAdLoaded
public void trackAdLoaded()
Description copied from class:AbstractCreativeExecuted after processing transaction and creating OmAdSession inAdViewManager- Specified by:
trackAdLoadedin classAbstractCreative
-
startViewabilityTracker
public void startViewabilityTracker()
- Specified by:
startViewabilityTrackerin classAbstractCreative
-
handleAdWindowFocus
public void handleAdWindowFocus()
Description copied from class:AbstractCreativeExecuted when window gains focus (e.g. when app is resumed from background) Used byAdViewManagerto handle refresh on view visibility change- Specified by:
handleAdWindowFocusin classAbstractCreative
-
handleAdWindowNoFocus
public void handleAdWindowNoFocus()
Description copied from class:AbstractCreativeExecuted when window loses focus (e.g. when app is going in background). Used byAdViewManagerto handle refresh on view visibility change- Specified by:
handleAdWindowNoFocusin classAbstractCreative
-
webViewReadyToDisplay
public void webViewReadyToDisplay()
- Specified by:
webViewReadyToDisplayin interfaceWebViewDelegate
-
webViewFailedToLoad
public void webViewFailedToLoad(AdException error)
- Specified by:
webViewFailedToLoadin interfaceWebViewDelegate
-
webViewShouldOpenExternalLink
public void webViewShouldOpenExternalLink(java.lang.String url)
- Specified by:
webViewShouldOpenExternalLinkin interfaceWebViewDelegate
-
webViewShouldOpenMRAIDLink
public void webViewShouldOpenMRAIDLink(java.lang.String url)
- Specified by:
webViewShouldOpenMRAIDLinkin interfaceWebViewDelegate
-
interstitialAdClosed
public void interstitialAdClosed()
Description copied from interface:InterstitialManagerDisplayDelegateClose of an interstitial ad- Specified by:
interstitialAdClosedin interfaceInterstitialManagerDisplayDelegate
-
interstitialDialogShown
public void interstitialDialogShown(android.view.ViewGroup rootViewGroup)
- Specified by:
interstitialDialogShownin interfaceInterstitialManagerDisplayDelegate
-
compareTo
public int compareTo(java.lang.Object creative)
- Specified by:
compareToin interfacejava.lang.Comparable
-
getCreativeView
public PrebidWebViewBase getCreativeView()
- Overrides:
getCreativeViewin classAbstractCreative- Returns:
- individual creative view. E.g. webView for HTMLCreative.
-
mraidAdExpanded
public void mraidAdExpanded()
-
isResolved
public boolean isResolved()
- Specified by:
isResolvedin classAbstractCreative- Returns:
- true if WebView is resolved (loaded or failed to load callback triggered), false otherwise.
-
isEndCard
public boolean isEndCard()
- Specified by:
isEndCardin classAbstractCreative- Returns:
- true if creative is an endcard, false otherwise.
-
destroy
public void destroy()
Description copied from class:AbstractCreativeSpecific creative cleanup. Creative must cleanup it's internal state.- Overrides:
destroyin classAbstractCreative
-
mraidAdCollapsed
public void mraidAdCollapsed()
-
handleMRAIDEventsInCreative
public void handleMRAIDEventsInCreative(MraidEvent mraidEvent, WebViewBase oldWebViewBase)
-
setTwoPartNewWebViewBase
public void setTwoPartNewWebViewBase(PrebidWebViewBase twoPartNewWebViewBase)
-
-