RewardedInterstitialAd

public abstract class RewardedInterstitialAd extends Object

Rewarded interstitials are full screen ads that reward users and can be shown without a user opt in.

This ad format is different than RewardedAd because rewarded ads require the user to opt-in to watching the video. This ad format is different than InterstitialAd because interstitial ads do not reward the user.

Public Constructor Summary

Public Method Summary

abstract Bundle
getAdMetadata()
Gets all available ad metadata for this RewardedInterstitialAd.
abstract String
getAdUnitId()
Returns the ad unit ID.
abstract FullScreenContentCallback
abstract OnAdMetadataChangedListener
abstract OnPaidEventListener
abstract ResponseInfo
getResponseInfo()
Returns information about the loaded ad.
abstract RewardItem
getRewardItem()
Gets reward item for the loaded rewarded interstitial ad.
static void
load(Context context, String adUnitId, AdRequest adRequest, RewardedInterstitialAdLoadCallback loadCallback)
static void
load(Context context, String adUnitId, AdManagerAdRequest adManagerAdRequest, RewardedInterstitialAdLoadCallback loadCallback)
abstract void
setFullScreenContentCallback(FullScreenContentCallback fullScreenContentCallback)
Registers a callback to be invoked when ads show and dismiss full screen content.
abstract void
setImmersiveMode(boolean immersiveModeEnabled)
Sets a flag that controls if this rewarded interstitial ad object will be displayed in immersive mode.
abstract void
setOnAdMetadataChangedListener(OnAdMetadataChangedListener listener)
Registers a callback to be invoked when the rewarded interstitial ad's metadata changes.
abstract void
setOnPaidEventListener(OnPaidEventListener listener)
Registers a callback to be invoked when this ad is estimated to have earned money.
abstract void
abstract void
show(Activity activity, OnUserEarnedRewardListener onUserEarnedRewardListener)
Shows the rewarded interstitial ad.

Inherited Method Summary

Public Constructors

public RewardedInterstitialAd ()

Public Methods

public abstract Bundle getAdMetadata ()

Gets all available ad metadata for this RewardedInterstitialAd. Ad metadata is empty if the ad doesn't have metadata. Ad metadata may update. Use OnAdMetadataChangedListener.onAdMetadataChanged() to listen for changes.

public abstract String getAdUnitId ()

Returns the ad unit ID.

public abstract FullScreenContentCallback getFullScreenContentCallback ()

public abstract OnAdMetadataChangedListener getOnAdMetadataChangedListener ()

public abstract OnPaidEventListener getOnPaidEventListener ()

public abstract ResponseInfo getResponseInfo ()

Returns information about the loaded ad.

public abstract RewardItem getRewardItem ()

Gets reward item for the loaded rewarded interstitial ad.

public static void load (Context context, String adUnitId, AdRequest adRequest, RewardedInterstitialAdLoadCallback loadCallback)

Parameters
context The context.
adUnitId The ad unit ID.
adRequest An ad request with targeting information.
loadCallback A callback to be invoked when a rewarded interstitial ad finishes loading.

public static void load (Context context, String adUnitId, AdManagerAdRequest adManagerAdRequest, RewardedInterstitialAdLoadCallback loadCallback)

Parameters
context The context.
adUnitId The ad unit ID.
adManagerAdRequest A Google Ad Manager ad request with targeting information.
loadCallback A callback to be invoked when a rewarded interstitial ad finishes loading.

public abstract void setFullScreenContentCallback (FullScreenContentCallback fullScreenContentCallback)

Registers a callback to be invoked when ads show and dismiss full screen content.

public abstract void setImmersiveMode (boolean immersiveModeEnabled)

Sets a flag that controls if this rewarded interstitial ad object will be displayed in immersive mode. Call this method before show(Activity, OnUserEarnedRewardListener). During show(Activity, OnUserEarnedRewardListener), if this flag is on and immersive mode is supported, SYSTEM_UI_FLAG_IMMERSIVE_STICKY & SYSTEM_UI_FLAG_HIDE_NAVIGATION will be turned on for the rewarded ad.

public abstract void setOnAdMetadataChangedListener (OnAdMetadataChangedListener listener)

Registers a callback to be invoked when the rewarded interstitial ad's metadata changes.

public abstract void setOnPaidEventListener (OnPaidEventListener listener)

Registers a callback to be invoked when this ad is estimated to have earned money.

public abstract void setServerSideVerificationOptions (ServerSideVerificationOptions options)

Sets ServerSideVerificationOptions for this rewarded interstitial ad.

public abstract void show (Activity activity, OnUserEarnedRewardListener onUserEarnedRewardListener)

Shows the rewarded interstitial ad.

Parameters
activity The activity from which the rewarded ad should be shown.
onUserEarnedRewardListener The listener to be notified when user earns a reward.