public class RewardedInterstitialAd

  1. Object
  2. RewardedInterstitialAd

A rewarded interstitial: a full screen ad shown at a transition that can grant a reward but, unlike RewardedAd, is not strictly opt-in. The ad network requires an intro screen with an opt-out, which the underlying SDK presents automatically.

The API mirrors RewardedAd: register an OnUserEarnedRewardListener and optionally setServerSideVerificationOptions(ServerSideVerificationOptions).

Constructors

public RewardedInterstitialAd(String adUnitId)Creates a rewarded interstitial for the given ad unit id.

Methods

public void setOnUserEarnedRewardListener(OnUserEarnedRewardListener listener)Sets the reward listener used by show().
public void setServerSideVerificationOptions(ServerSideVerificationOptions options)Configures server side verification (SSV) of the reward.
public void show(OnUserEarnedRewardListener listener)Presents the ad and registers the reward listener in one call.
public void setAdListener(AdListener listener)Sets the listener notified of this ad’s lifecycle events.
public AdListener getAdListener()The listener notified of this ad’s lifecycle events, may be null.
public void load()Loads an ad with default targeting.
public void load(AdRequest request)Loads an ad using the supplied targeting metadata.
public boolean isLoaded()True when an ad is loaded and ready to show().
public void show()Presents the loaded ad.
public void dispose()Releases the resources held by this ad.

Inherited methods

Constructor details

RewardedInterstitialAd

public RewardedInterstitialAd(String adUnitId)
Creates a rewarded interstitial for the given ad unit id.

Parameters

adUnitId String
the ad unit identifier from the network console

Method details

setOnUserEarnedRewardListener

public void setOnUserEarnedRewardListener(OnUserEarnedRewardListener listener)
Sets the reward listener used by show().

setServerSideVerificationOptions

public void setServerSideVerificationOptions(ServerSideVerificationOptions options)
Configures server side verification (SSV) of the reward. Must be set before show().

show

public void show(OnUserEarnedRewardListener listener)
Presents the ad and registers the reward listener in one call.

Parameters

listener OnUserEarnedRewardListener
notified when the reward is earned

setAdListener

public void setAdListener(AdListener listener)
Sets the listener notified of this ad’s lifecycle events.

getAdListener

public AdListener getAdListener()
The listener notified of this ad’s lifecycle events, may be null.

load

public void load()
Loads an ad with default targeting.

load

public void load(AdRequest request)
Loads an ad using the supplied targeting metadata.

Parameters

request AdRequest
optional targeting metadata, may be null

isLoaded

public boolean isLoaded()
True when an ad is loaded and ready to show().

show

public void show()
Presents the loaded ad. Does nothing if no ad is loaded.

dispose

public void dispose()
Releases the resources held by this ad.