public class CBImpression
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
AdTypeTraits |
adTypeTraits |
AdUnit |
adUnit |
boolean |
animatingIn |
ImpressionCallback |
callback |
boolean |
clicked |
CBRequest |
clickRequest |
boolean |
closed |
FileCache |
fileCache |
boolean |
isPaused |
boolean |
isShowProcessed
Use this to indicate if the fact that tasks that must be run upon showing
and impression have been processed.
|
java.lang.String |
location |
int |
mediaType |
CBNetworkService |
networkService |
PopupImpressionView |
parentView |
boolean |
playbackDidComplete |
boolean |
playbackDidStart |
RequestBodyFields |
requestBodyFields |
SharedPreferences |
sharedPreferences |
int |
state |
java.lang.String |
templateHtml |
CBTrack |
track |
Handler |
uiHandler |
CBUIManager |
uiManager |
CBURLOpener |
urlOpener |
CBViewController |
viewController |
CBWebImageCache |
webImageCache |
| Constructor and Description |
|---|
CBImpression(AdUnit adUnit,
ImpressionCallback callback,
FileCache fileCache,
CBNetworkService networkService,
RequestBodyFields requestBodyFields,
SharedPreferences sharedPreferences,
CBTrack track,
Handler uiHandler,
CBUIManager uiManager,
CBURLOpener urlOpener,
CBViewController viewController,
CBWebImageCache webImageCache,
AdTypeTraits adTypeTraits,
java.lang.String location,
java.lang.String templateHtml,
RelativeLayout externalView,
PrivacyPresenter privacyPresenter) |
| Modifier and Type | Method and Description |
|---|---|
void |
cleanUpViews()
destroy just the impression's views, not associated data
|
void |
destroy()
destroy impression's view and view data
|
java.lang.String |
getAdID() |
RelativeLayout |
getHostView() |
java.lang.Boolean |
getShouldDisplayOnHostView() |
CBViewProtocol.CBViewBase |
getView() |
CBViewProtocol |
getViewProtocol() |
void |
notifyDidCompleteAd() |
void |
onAnimateInBegin() |
void |
onAnimateInFinish() |
boolean |
onBackPressed()
return true if we should swallow the back button event
|
boolean |
onClick(JSONObject clickCoordinates) |
void |
onClickExchange(java.lang.String url,
JSONObject clickCoordinates) |
void |
onClose() |
void |
onDisplay() |
void |
onFailure(CBError.CBImpressionError error) |
void |
onHide() |
void |
onHideAll() |
void |
onPause() |
void |
onPlaybackCompleted() |
void |
onPlaybackStarted() |
void |
onResume() |
void |
onShow() |
void |
onShowAll() |
void |
onStart() |
boolean |
prepare() |
boolean |
reinitialize()
call this to attempt to recreate the view of a previously shown impression.
|
void |
sendVideoCompleteRequest() |
void |
setOnShowTask(java.lang.Runnable task) |
boolean |
shouldDismissAfterClick() |
void |
shownFully()
for an impression that needs to show some UI elements
before fully shown (eg a rewarded view that can be declined),
call this to indicate when it has definitely been fully shown.
|
CBError.CBImpressionError |
tryCreatingView(RelativeLayout hostView)
Attempt to create the view associated with this view protocol's impression.
|
boolean |
wasClosed() |
public int mediaType
public int state
public final AdTypeTraits adTypeTraits
public final FileCache fileCache
public final CBNetworkService networkService
public final RequestBodyFields requestBodyFields
public final CBTrack track
public final Handler uiHandler
public final CBUIManager uiManager
public final CBURLOpener urlOpener
public final CBViewController viewController
public final CBWebImageCache webImageCache
public final ImpressionCallback callback
public final java.lang.String location
public final java.lang.String templateHtml
public final AdUnit adUnit
public final SharedPreferences sharedPreferences
public CBRequest clickRequest
public PopupImpressionView parentView
public boolean isShowProcessed
public boolean animatingIn
public boolean playbackDidComplete
public boolean playbackDidStart
public boolean clicked
public boolean isPaused
public boolean closed
public CBImpression(AdUnit adUnit, ImpressionCallback callback, FileCache fileCache, CBNetworkService networkService, RequestBodyFields requestBodyFields, SharedPreferences sharedPreferences, CBTrack track, Handler uiHandler, CBUIManager uiManager, CBURLOpener urlOpener, CBViewController viewController, CBWebImageCache webImageCache, AdTypeTraits adTypeTraits, java.lang.String location, java.lang.String templateHtml, RelativeLayout externalView, PrivacyPresenter privacyPresenter)
public boolean prepare()
public boolean shouldDismissAfterClick()
public void onClose()
public void onDisplay()
public void onClickExchange(java.lang.String url,
JSONObject clickCoordinates)
public boolean onClick(JSONObject clickCoordinates)
public void onFailure(CBError.CBImpressionError error)
public void onPlaybackCompleted()
public void notifyDidCompleteAd()
public void onPlaybackStarted()
public boolean reinitialize()
public void destroy()
public void cleanUpViews()
public CBError.CBImpressionError tryCreatingView(RelativeLayout hostView)
hostView - if this is present, the impression will be added to the hostView instead of
the fullscreen activitypublic CBViewProtocol.CBViewBase getView()
public void onShow()
public void onHide()
public void onShowAll()
public void onHideAll()
public void setOnShowTask(java.lang.Runnable task)
public void onAnimateInBegin()
public void onAnimateInFinish()
public java.lang.String getAdID()
public void shownFully()
public boolean onBackPressed()
public void onResume()
public void onStart()
public void onPause()
public CBViewProtocol getViewProtocol()
public boolean wasClosed()
public void sendVideoCompleteRequest()
public RelativeLayout getHostView()
public java.lang.Boolean getShouldDisplayOnHostView()