RewardedInterstitialAd

public abstract classRewardedInterstitialAdextendsObject

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

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

Public Constructor Summary

Public Method Summary

abstractBundle
getAdMetadata()
Gets all available ad metadata for this RewardedInterstitialAd.
abstractString
getAdUnitId()
Returns the ad unit ID.
abstractFullScreenContentCallback
abstract OnAdMetadataChangedListener
abstractOnPaidEventListener
abstractResponseInfo
getResponseInfo()
Returns information about the loaded ad.
abstractRewardItem
getRewardItem()
Gets reward item for the loaded rewarded interstitial ad.
static void
static void
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

publicRewardedInterstitialAd()

Public Methods

public abstractBundlegetAdMetadata()

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 abstractStringgetAdUnitId()

Returns the ad unit ID.

public abstractFullScreenContentCallback getFullScreenContentCallback()

public abstractOnAdMetadataChangedListener getOnAdMetadataChangedListener()

public abstractOnPaidEventListener getOnPaidEventListener()

public abstractResponseInfo getResponseInfo()

Returns information about the loaded ad.

public abstractRewardItem getRewardItem()

Gets reward item for the loaded rewarded interstitial ad.

public static voidload(Contextcontext, StringadUnitId, AdRequest adRequest, RewardedInterstitialAdLoadCallbackloadCallback)

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 voidload(Contextcontext, StringadUnitId, AdManagerAdRequest adManagerAdRequest, RewardedInterstitialAdLoadCallbackloadCallback)

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 voidsetFullScreenContentCallback(FullScreenContentCallback fullScreenContentCallback)

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

public abstract voidsetImmersiveMode(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 voidsetOnAdMetadataChangedListener(OnAdMetadataChangedListener listener)

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

public abstract voidsetOnPaidEventListener(OnPaidEventListener listener)

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

public abstract voidsetServerSideVerificationOptions(ServerSideVerificationOptions options)

Sets ServerSideVerificationOptionsfor this rewarded interstitial ad.

public abstract voidshow(Activityactivity, 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.