-
public abstract class AbstractCreativeSubclasses should provide their implementation, default is printing a log statement
-
-
Field Summary
Fields Modifier and Type Field Description private CreativeViewListenercreativeViewListenerprivate CreativeResolutionListenerresolutionListenerprivate ViewcreativeView
-
Constructor Summary
Constructors Constructor Description AbstractCreative(Context context, CreativeModel model, OmAdSessionManager omAdSessionManager, InterstitialManager interstitialManager)
-
Method Summary
Modifier and Type Method Description CreativeViewListenergetCreativeViewListener()voidsetCreativeViewListener(CreativeViewListener creativeViewListener)CreativeResolutionListenergetResolutionListener()voidsetResolutionListener(CreativeResolutionListener resolutionListener)ViewgetCreativeView()voidsetCreativeView(View creativeView)Sets currently used creative view for specific creative. abstract booleanisDisplay()abstract booleanisVideo()abstract booleanisResolved()abstract booleanisEndCard()voidpause()Pause creative execution voidresume()Resume creative execution voidunmute()UnMute creative voidmute()Mute creative booleanisPlaying()voidtrackVideoStateChange(InternalPlayerState state)Track video state change to OmEventTracker booleanisInterstitialClosed()longgetMediaDuration()longgetVideoSkipOffset()voidtrackVideoEvent(VideoAdEvent.Event event)VideoAdEvent. booleanisBuiltInVideo()abstract voidload()Specific creative load. abstract voidtrackAdLoaded()Executed after processing transaction and creating OmAdSession in AdViewManager abstract voiddisplay()Specific creative display. abstract voidcreateOmAdSession()Create OM session for specific creative. abstract voidstartViewabilityTracker()voiddestroy()Specific creative cleanup. abstract voidhandleAdWindowFocus()Executed when window gains focus (e.g. abstract voidhandleAdWindowNoFocus()Executed when window loses focus (e.g. voidchangeVisibilityTrackerState(boolean adWebViewWindowFocus)Changes the creativeVisibilityTracker state based on ad webView window focus. CreativeModelgetCreativeModel()voidupdateAdView(View view)voidaddOmFriendlyObstruction(InternalFriendlyObstruction friendlyObstruction)-
-
Constructor Detail
-
AbstractCreative
AbstractCreative(Context context, CreativeModel model, OmAdSessionManager omAdSessionManager, InterstitialManager interstitialManager)
-
-
Method Detail
-
getCreativeViewListener
CreativeViewListener getCreativeViewListener()
-
setCreativeViewListener
void setCreativeViewListener(CreativeViewListener creativeViewListener)
-
getResolutionListener
CreativeResolutionListener getResolutionListener()
-
setResolutionListener
void setResolutionListener(CreativeResolutionListener resolutionListener)
-
getCreativeView
View getCreativeView()
-
setCreativeView
void setCreativeView(View creativeView)
Sets currently used creative view for specific creative.
- Parameters:
creativeView- individual creative view.
-
isDisplay
abstract boolean isDisplay()
-
isVideo
abstract boolean isVideo()
-
isResolved
abstract boolean isResolved()
-
isEndCard
abstract boolean isEndCard()
-
pause
void pause()
Pause creative execution
-
resume
void resume()
Resume creative execution
-
unmute
void unmute()
UnMute creative
-
mute
void mute()
Mute creative
-
isPlaying
boolean isPlaying()
-
trackVideoStateChange
void trackVideoStateChange(InternalPlayerState state)
Track video state change to OmEventTracker
- Parameters:
state- to track
-
isInterstitialClosed
boolean isInterstitialClosed()
-
getMediaDuration
long getMediaDuration()
-
getVideoSkipOffset
long getVideoSkipOffset()
-
trackVideoEvent
void trackVideoEvent(VideoAdEvent.Event event)
VideoAdEvent.Event to track
-
isBuiltInVideo
boolean isBuiltInVideo()
-
load
abstract void load()
Specific creative load.
-
trackAdLoaded
abstract void trackAdLoaded()
Executed after processing transaction and creating OmAdSession in AdViewManager
-
display
abstract void display()
Specific creative display.
-
createOmAdSession
abstract void createOmAdSession()
Create OM session for specific creative. Each creative must create appropriate OM AdSession (e.g. for HTML and Native)
-
startViewabilityTracker
abstract void startViewabilityTracker()
-
destroy
void destroy()
Specific creative cleanup. Creative must cleanup it's internal state.
-
handleAdWindowFocus
abstract void handleAdWindowFocus()
Executed when window gains focus (e.g. when app is resumed from background)Used by AdViewManager to handle refresh on view visibility change
-
handleAdWindowNoFocus
abstract void handleAdWindowNoFocus()
Executed when window loses focus (e.g. when app is going in background).Used by AdViewManager to handle refresh on view visibility change
-
changeVisibilityTrackerState
void changeVisibilityTrackerState(boolean adWebViewWindowFocus)
Changes the creativeVisibilityTracker state based on ad webView window focus.If ad webView has no window focus - creativeVisibilityTracker execution will be stopped.If ad webView has window focus - creativeVisibilityTracker execution will be restarted.
- Parameters:
adWebViewWindowFocus- adWebView focus state
-
getCreativeModel
@NonNull() CreativeModel getCreativeModel()
-
updateAdView
void updateAdView(View view)
-
addOmFriendlyObstruction
void addOmFriendlyObstruction(InternalFriendlyObstruction friendlyObstruction)
-
-
-
-