public class AppLovinIncentivizedInterstitial
extends java.lang.Object
| Constructor and Description |
|---|
AppLovinIncentivizedInterstitial(AppLovinSdk sdk)
Create a new instance of AppLovinIncentivizedInterstitial.
|
AppLovinIncentivizedInterstitial(android.content.Context context)
Create a new instance of AppLovinIncentivizedInterstitial.
|
AppLovinIncentivizedInterstitial(java.lang.String zoneId,
AppLovinSdk sdk)
Create a new instance of AppLovinIncentivizedInterstitial.
|
| Modifier and Type | Method and Description |
|---|---|
static AppLovinIncentivizedInterstitial |
create(AppLovinSdk sdk)
Create a new instance of AppLovinIncentivizedInterstitial.
|
static AppLovinIncentivizedInterstitial |
create(android.content.Context context)
Create a new instance of AppLovinIncentivizedInterstitial.
|
static AppLovinIncentivizedInterstitial |
create(java.lang.String zoneId,
AppLovinSdk sdk)
Create a new instance of AppLovinIncentivizedInterstitial.
|
protected IncentivizedAdController |
createIncentivizedAdController(java.lang.String zoneId,
AppLovinSdk sdk)
Create a new controller that would load and render this ad.
|
void |
dismiss()
Deprecated.
Explicitly dismissing an ad has been deprecated and will be removed in a future SDK version.
|
java.lang.String |
getUserIdentifier()
Deprecated.
Please use
AppLovinSdk.getUserIdentifier() instead to properly identify your users in our system. This property is now deprecated and will be removed in a future SDK version. |
java.lang.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(java.lang.String userIdentifier)
Deprecated.
Please use
AppLovinSdk.setUserIdentifier(String) instead to properly identify your users in our system. This property is now deprecated and will be removed in a future SDK version. |
void |
show(AppLovinAd ad,
android.content.Context context,
AppLovinAdRewardListener adRewardListener,
AppLovinAdVideoPlaybackListener videoPlaybackListener,
AppLovinAdDisplayListener adDisplayListener,
AppLovinAdClickListener adClickListener)
Show a pre-loaded incentivized interstitial.
|
void |
show(android.content.Context context)
Show a pre-loaded incentivized interstitial.
|
void |
show(android.content.Context context,
AppLovinAdRewardListener adRewardListener)
Show a pre-loaded incentivized interstitial.
|
void |
show(android.content.Context context,
AppLovinAdRewardListener adRewardListener,
AppLovinAdVideoPlaybackListener videoPlaybackListener)
Show a pre-loaded incentivized interstitial.
|
void |
show(android.content.Context context,
AppLovinAdRewardListener adRewardListener,
AppLovinAdVideoPlaybackListener videoPlaybackListener,
AppLovinAdDisplayListener adDisplayListener)
Show a pre-loaded incentivized interstitial.
|
void |
show(android.content.Context context,
AppLovinAdRewardListener adRewardListener,
AppLovinAdVideoPlaybackListener videoPlaybackListener,
AppLovinAdDisplayListener adDisplayListener,
AppLovinAdClickListener adClickListener)
Show a pre-loaded incentivized interstitial.
|
void |
show(android.content.Context context,
java.lang.String placement,
AppLovinAdRewardListener adRewardListener,
AppLovinAdVideoPlaybackListener videoPlaybackListener,
AppLovinAdDisplayListener adDisplayListener,
AppLovinAdClickListener adClickListener)
Deprecated.
Placements have been deprecated and will be removed in a future SDK version. Please configure zones from the UI and use them instead.
|
java.lang.String |
toString() |
public AppLovinIncentivizedInterstitial(android.content.Context context)
context - Context to use.public AppLovinIncentivizedInterstitial(AppLovinSdk sdk)
sdk - An instance of AppLovinSdk to use.public AppLovinIncentivizedInterstitial(java.lang.String zoneId,
AppLovinSdk sdk)
zoneId - The id of the zone for which to load ads for.sdk - An instance of AppLovinSdk to use.public java.lang.String getZoneId()
public void preload(AppLovinAdLoadListener adLoadListener)
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..public void show(android.content.Context context)
public void show(android.content.Context context,
AppLovinAdRewardListener adRewardListener)
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.public boolean isAdReadyToDisplay()
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).
public void show(android.content.Context context,
AppLovinAdRewardListener adRewardListener,
AppLovinAdVideoPlaybackListener videoPlaybackListener)
context - Parent activity or application context. MUST be an activity if you want to show dialog prompt to view ad. Must not be null.videoPlaybackListener - Video playback listener to notify. Must not be null.adRewardListener - Reward listener to notify, if desired. May be null.public void show(android.content.Context context,
AppLovinAdRewardListener adRewardListener,
AppLovinAdVideoPlaybackListener videoPlaybackListener,
AppLovinAdDisplayListener adDisplayListener)
context - Parent activity or application context. MUST be an activity if you want to show dialog prompt to view ad. Must not be null.videoPlaybackListener - Video playback listener to notify. Must not be null.adDisplayListener - Ad display listener to notify, if desired. May be null.adRewardListener - Reward listener to notify, if desired. May be null.public void show(android.content.Context context,
AppLovinAdRewardListener adRewardListener,
AppLovinAdVideoPlaybackListener videoPlaybackListener,
AppLovinAdDisplayListener adDisplayListener,
AppLovinAdClickListener adClickListener)
context - Parent activity or application context. MUST be an activity if you want to show dialog prompt to view ad. Must not 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.adRewardListener - Reward listener to notify, if desired. May be null.public void show(AppLovinAd ad, android.content.Context context, AppLovinAdRewardListener adRewardListener, AppLovinAdVideoPlaybackListener videoPlaybackListener, AppLovinAdDisplayListener adDisplayListener, AppLovinAdClickListener adClickListener)
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.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.adRewardListener - Reward listener to notify, if desired. May be null.public static AppLovinIncentivizedInterstitial create(android.content.Context context)
context - Parent activity or application context. MUST be an activity if you want to show dialog prompt to view ad. Must not be null.public static AppLovinIncentivizedInterstitial create(AppLovinSdk sdk)
sdk - An instance of AppLovinSdk to use.public static AppLovinIncentivizedInterstitial create(java.lang.String zoneId, AppLovinSdk sdk)
zoneId - The id of the zone to load ads for.sdk - An instance of AppLovinSdk to use.protected IncentivizedAdController createIncentivizedAdController(java.lang.String zoneId,
AppLovinSdk sdk)
@Deprecated public void dismiss()
@Deprecated
public void show(android.content.Context context,
java.lang.String placement,
AppLovinAdRewardListener adRewardListener,
AppLovinAdVideoPlaybackListener videoPlaybackListener,
AppLovinAdDisplayListener adDisplayListener,
AppLovinAdClickListener adClickListener)
public void setUserIdentifier(java.lang.String userIdentifier)
AppLovinSdk.setUserIdentifier(String) instead to properly identify your users in our system. This property is now deprecated and will be removed in a future SDK version.public java.lang.String getUserIdentifier()
AppLovinSdk.getUserIdentifier() instead to properly identify your users in our system. This property is now deprecated and will be removed in a future SDK version.public java.lang.String toString()
toString in class java.lang.Object