public class VideoAd
extends java.lang.Object
| Constructor and Description |
|---|
VideoAd(android.content.Context context,
java.lang.String data) |
| Modifier and Type | Method and Description |
|---|---|
void |
bindView(VideoAdView bannerView) |
void |
clearCache()
Removes all video files from cache.
|
void |
destroy()
Destroy to clean-up resources if Ad no longer needed
If the Ad is in "loading ad" phase, destroy causes it's interrupting and cleaning-up all related resources
If the Ad is in "displaying ad" phase, destroy causes "closing ad" and cleaning-up all related resources
|
void |
dismiss()
Dismisses an banner ad
This method dismisses an banner ad and only if it is currently presented.
|
boolean |
isLoading()
Indicates whether `AdInterstitial`/`VideoAd` in "loading ad content" process.
|
boolean |
isReady()
Indicates whether ad content was loaded successfully and ready to be displayed.
|
boolean |
isRewarded() |
boolean |
isShowing()
Indicates whether `AdInterstitial`/`VideoAd` currently presented on screen.
|
void |
load()
Starts loading ad content process.
|
void |
pause()
Pauses video ad
Needs to be triggered on appropriate Activity life-cycle method "onPause()".
|
void |
resume() |
void |
setAdListener(VideoAdListener videoAdListener) |
void |
setDebugMode(boolean mode)
Use it for figure out any problems during integration process.
|
void |
setRewarded(boolean isRewarded) |
void |
setVideoCacheItem(VideoAdCacheItem adCacheItem) |
void |
show() |
void |
useMobileNetworkForCaching(boolean useMobile)
Defines, should use mobile network for caching video or not.
|
public void bindView(VideoAdView bannerView)
public void show()
public void dismiss()
After it banner ad requires "loading process" to be ready for displaying
As a result you'll receive onAdDismissed() notification
NOTE: should be triggered from UI thread
public void resume()
public void pause()
public boolean isRewarded()
public void setRewarded(boolean isRewarded)
public boolean isReady()
public boolean isShowing()
public boolean isLoading()
public void setAdListener(VideoAdListener videoAdListener)
videoAdListener - provides call back methods for AdSpot lifecyclepublic void useMobileNetworkForCaching(boolean useMobile)
useMobile - - true if need to cache video on mobile network,
false if need to cache video only on wi-fi network.public void setDebugMode(boolean mode)
If true - all debug logs will be in Logcat. If false - only main info logs will be in Logcat.
public void clearCache()
public void load()
public void destroy()
public void setVideoCacheItem(VideoAdCacheItem adCacheItem)