Skip to main content

RewardedInterstitialAd

import { RewardedInterstitialAd } from 'nitro-ui-admob'

A full-screen ad shown at transition points that grants a reward when watched, without an opt-in. Each loaded ad can be shown once, within one hour of loading. Guide: rewarded ads.

It has the same members as RewardedAd; only load resolves with a RewardedInterstitialAd.

MemberDescription
load(adUnitId, options?)Loads an ad.
expiresAtWhen the ad expires, one hour after loading.
rewardThe reward the ad grants.
onUserEarnedRewardCalled when the user earned the reward.
setServerSideVerificationOptions(options)Data for your server-side verification callback. Call before show().
show()Presents the ad once; throws if shown or expired.
CallbacksThe shared full-screen events.

load​

static load(adUnitId: string, options?: AdmobRequestOptions): Promise<RewardedInterstitialAd>

Loads an ad, starting the SDK if needed. options is an AdmobRequestOptions. Rejects with "<code>: <message>" from the SDK.

const ad = await RewardedInterstitialAd.load(Admob.testAdUnitId('rewardedInterstitial'))
ad.onUserEarnedReward = (reward) => grant(reward.amount, reward.type)
ad.show()