java.lang.Object | |
↳ | com.applovin.adview.AppLovinIncentivizedInterstitial |
![]() |
This class implements rewarded videos..
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
AppLovinIncentivizedInterstitial(Context context)
Create a new instance of AppLovinIncentivizedInterstitial.
| |||||||||||
AppLovinIncentivizedInterstitial(AppLovinSdk sdk)
Create a new instance of AppLovinIncentivizedInterstitial.
| |||||||||||
AppLovinIncentivizedInterstitial(String zoneId, AppLovinSdk sdk)
Create a new instance of AppLovinIncentivizedInterstitial.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
static AppLovinIncentivizedInterstitial |
create(AppLovinSdk sdk)
Create a new instance of AppLovinIncentivizedInterstitial.
| ||||||||||
static AppLovinIncentivizedInterstitial |
create(String zoneId, AppLovinSdk sdk)
Create a new instance of AppLovinIncentivizedInterstitial.
| ||||||||||
static AppLovinIncentivizedInterstitial |
create(Context context)
Create a new instance of AppLovinIncentivizedInterstitial.
| ||||||||||
void |
dismiss()
Dismiss an incentivized interstitial prematurely, before video playback has completed.
| ||||||||||
String |
getUserIdentifier()
Get the last set user identifier.
| ||||||||||
String |
getZoneId()
The zone identifier this incentivized ad was initialized with and is loading ads for, if any.
| ||||||||||
boolean |
isAdReadyToDisplay()
Check if an ad is currently ready on this object.
| ||||||||||
void |
preload(AppLovinAdLoadListener adLoadListener)
Pre-load an incentivized interstitial.
| ||||||||||
void |
setUserIdentifier(String userIdentifier)
Set a user identifier that will be passed through to your server via S2S postbacks.
| ||||||||||
void |
show(Context context, AppLovinAdRewardListener adRewardListener, AppLovinAdVideoPlaybackListener videoPlaybackListener)
Show a pre-loaded incentivized interstitial.
| ||||||||||
void |
show(AppLovinAd ad, Context context, AppLovinAdRewardListener adRewardListener, AppLovinAdVideoPlaybackListener videoPlaybackListener, AppLovinAdDisplayListener adDisplayListener, AppLovinAdClickListener adClickListener)
Show a pre-loaded incentivized interstitial.
| ||||||||||
void |
show(Context context, AppLovinAdRewardListener adRewardListener, AppLovinAdVideoPlaybackListener videoPlaybackListener, AppLovinAdDisplayListener adDisplayListener)
Show a pre-loaded incentivized interstitial.
| ||||||||||
void |
show(Context context, String placement, AppLovinAdRewardListener adRewardListener, AppLovinAdVideoPlaybackListener videoPlaybackListener, AppLovinAdDisplayListener adDisplayListener, AppLovinAdClickListener adClickListener)
This method is deprecated.
Placements have been deprecated and will be removed in a future SDK version. Please configure zones from the UI and use them instead.
| ||||||||||
void |
show(Context context, AppLovinAdRewardListener adRewardListener)
Show a pre-loaded incentivized interstitial.
| ||||||||||
void |
show(Context context, AppLovinAdRewardListener adRewardListener, AppLovinAdVideoPlaybackListener videoPlaybackListener, AppLovinAdDisplayListener adDisplayListener, AppLovinAdClickListener adClickListener)
Show a pre-loaded incentivized interstitial.
| ||||||||||
void |
show(Context context)
Show a pre-loaded incentivized interstitial.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
IncentivizedAdController |
createIncentivizedAdController(String zoneId, AppLovinSdk sdk)
Create a new controller that would load and render this ad.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Create a new instance of AppLovinIncentivizedInterstitial.
context | Context to use. |
---|
Create a new instance of AppLovinIncentivizedInterstitial.
sdk | An instance of AppLovinSdk to use. |
---|
Create a new instance of AppLovinIncentivizedInterstitial.
zoneId | The id of the zone for which to load ads for. |
---|---|
sdk | An instance of AppLovinSdk to use. |
Create a new instance of AppLovinIncentivizedInterstitial.
sdk | An instance of AppLovinSdk to use. |
---|
Create a new instance of AppLovinIncentivizedInterstitial.
zoneId | The id of the zone to load ads for. |
---|---|
sdk | An instance of AppLovinSdk to use. |
Create a new instance of AppLovinIncentivizedInterstitial.
context | Parent activity or application context. MUST be an activity if you want to show dialog prompt to view ad. Must not be null. |
---|
Dismiss an incentivized interstitial prematurely, before video playback has completed. In most circumstances, this is not recommended, as it may confuse users by denying them a reward.
Get the last set user identifier.
The zone identifier this incentivized ad was initialized with and is loading ads for, if any.
Check if an ad is currently ready on this object. You must call preloadAndNotify in order to reach this state.
It is highly recommended that you implement an asynchronous flow (using an AppLovinAdDisplayListener with preload) rather than checking this method. This class does not contain a queue and can hold only one preloaded ad at a time. Further calls to preload will overwrite any existing ad. Therefore, you should NOT simply call preload any time this method returns false; it is important to invoke only one ad load - then not invoke any further loads until the ad has been closed (e.g., AppLovinAdDisplayListener's adHidden callback).
Pre-load an incentivized interstitial.
Calling this method will overwrite any existing cached ad. This is not a queue. Invoke once to preload, then do not invoke again until the ad has has been closed (e.g., AppLovinAdDisplayListener's adHidden callback). You may pass a null argument to preload if you intend to use the synchronous ( isAdReadyToDisplay ) flow. Note that this is NOT recommended; we HIGHLY RECOMMEND you use an ad load delegate. Note that we internally try to pull down the next ad's resources before you need it. Therefore, this method may complete immediately in many circumstances.
adLoadListener | Ad load listener to notify. May be null.. |
---|
Set a user identifier that will be passed through to your server via S2S postbacks.
If you are using reward validation, you can pass us a user identifier as a String. This could be something like a username, for example. We will pass it to your server when we make our S2S call during reward validation.
userIdentifier | Some string which will be passed to your server later, for purposes of identifying the user who should receive a reward. |
---|
Show a pre-loaded incentivized interstitial. You must call preload before calling show.
context | Parent activity or application context. MUST be an activity if you want to show dialog prompt to view ad. Must not be null. |
---|---|
adRewardListener | Reward listener to notify, if desired. May be null. |
videoPlaybackListener | Video playback listener to notify. Must not be null. |
Show a pre-loaded incentivized interstitial. You must call preload before calling show.
ad | The ad to render into this incentivized ad. Must not be null. |
---|---|
context | Parent activity or application context. MUST be an activity if you want to show dialog prompt to view ad. Must not be null. |
adRewardListener | Reward listener to notify, if desired. May be null. |
videoPlaybackListener | Video playback listener to notify. May be null. |
adDisplayListener | Ad display listener to notify, if desired. May be null. |
adClickListener | Ad click listener to notify, if desired. May be null. |
Show a pre-loaded incentivized interstitial. You must call preload before calling show.
context | Parent activity or application context. MUST be an activity if you want to show dialog prompt to view ad. Must not be null. |
---|---|
adRewardListener | Reward listener to notify, if desired. May be null. |
videoPlaybackListener | Video playback listener to notify. Must not be null. |
adDisplayListener | Ad display listener to notify, if desired. May be null. |
This method is deprecated.
Placements have been deprecated and will be removed in a future SDK version. Please configure zones from the UI and use them instead.
Show a pre-loaded incentivized interstitial. You must call preload before calling show.
context | Parent activity or application context. MUST be an activity if you want to show dialog prompt to view ad. Must not be null. |
---|---|
placement | Placement name to use. |
adRewardListener | Reward listener to notify, if desired. May be null. |
videoPlaybackListener | Video playback listener to notify. May be null. |
adDisplayListener | Ad display listener to notify, if desired. May be null. |
adClickListener | Ad click listener to notify, if desired. May be null. |
Show a pre-loaded incentivized interstitial. You must call preload before calling show.
context | Parent activity or application context. MUST be an activity if you want to show dialog prompt to view ad. Must not be null. |
---|---|
adRewardListener | Reward listener to notify, if desired. May be null. Using the reward listener, you will be able to verify with AppLovin servers the the video view is legitimate, as we will confirm whether the specific ad was actually served - then we will ping your server with a url for you to update the user's balance. The Reward Validation Listener will tell you whether we were able to reach our servers or not. If you receive a successful response, you should refresh the user's balance from your server. For more info, see the documentation. |
Show a pre-loaded incentivized interstitial. You must call preload before calling show.
context | Parent activity or application context. MUST be an activity if you want to show dialog prompt to view ad. Must not be null. |
---|---|
adRewardListener | Reward listener to notify, if desired. May be null. |
videoPlaybackListener | Video playback listener to notify. May be null. |
adDisplayListener | Ad display listener to notify, if desired. May be null. |
adClickListener | Ad click listener to notify, if desired. May be null. |
Show a pre-loaded incentivized interstitial. You must call preload before calling show.
Create a new controller that would load and render this ad. This method is called from the constructor. For internal usage only.