Constructor and Description |
---|
FullScreenAdService() |
Modifier and Type | Method and Description |
---|---|
void |
bindTransitionAd(int timeForNext)
Binds an ad to appear periodically after a given timeout
|
protected abstract void |
clearPendingAd()
Removes the pending ad data so we can fetch a new ad
|
protected abstract ConnectionRequest |
createAdRequest()
Creates a new request for an ad
|
protected abstract boolean |
failed()
Returns true if the connection failed
|
protected abstract String |
getAdDestination()
Returns the URL for the ad
|
int |
getAdDisplayTime() |
protected abstract Component |
getPendingAd()
Component representing a given ad
|
int |
getTimeout()
The timeout in milliseconds for an ad request
|
protected abstract boolean |
hasPendingAd()
Just checks if an ad is already fetched
|
boolean |
isAllowSkipping() |
boolean |
isAllowWithoutNetwork()
If set to true this flag allows the application to load even if an Ad cannot be displayed
|
boolean |
isScaleMode() |
void |
setAdDisplayTime(int adDisplayTime) |
void |
setAllowSkipping(boolean allowSkipping) |
void |
setAllowWithoutNetwork(boolean allowWithoutNetwork)
If set to true this flag allows the application to load even if an Ad cannot be displayed
|
void |
setScaleMode(boolean scaleMode) |
void |
setTimeout(int timeout)
The timeout in milliseconds for an ad request
|
void |
showWelcomeAd()
Invoked on application startup, this code will download an ad or timeout
|
protected abstract ConnectionRequest createAdRequest()
protected abstract Component getPendingAd()
protected abstract boolean hasPendingAd()
protected abstract void clearPendingAd()
protected abstract String getAdDestination()
protected abstract boolean failed()
public void showWelcomeAd()
public void bindTransitionAd(int timeForNext)
timeForNext
- the timeout in which an ad should be shown in millisecondspublic boolean isAllowWithoutNetwork()
public void setAllowWithoutNetwork(boolean allowWithoutNetwork)
allowWithoutNetwork
- the allowWithoutNetwork to setpublic int getTimeout()
public void setTimeout(int timeout)
timeout
- the timeout to setpublic int getAdDisplayTime()
public void setAdDisplayTime(int adDisplayTime)
adDisplayTime
- the adDisplayTime to setpublic boolean isScaleMode()
public void setScaleMode(boolean scaleMode)
scaleMode
- the scaleMode to setpublic boolean isAllowSkipping()
public void setAllowSkipping(boolean allowSkipping)
allowSkipping
- the allowSkipping to setCopyright © 2022. All rights reserved.