Use this file to discover all available pages before exploring further.
import { RewardedInterstitialAd } from 'admob-plus-cordova'const rewardedInterstitial = new RewardedInterstitialAd({ adUnitId: 'ca-app-pub-xxx/yyy'})await rewardedInterstitial.load()await rewardedInterstitial.show()
RewardedInterstitialAd is a full-screen ad format that rewards users for watching video ads. It combines the features of interstitial and rewarded ads, appearing at natural transition points while offering rewards.
const rewardedInterstitial = new RewardedInterstitialAd({ adUnitId: 'ca-app-pub-xxx/yyy'})rewardedInterstitial.on('reward', (event) => { const { reward } = event console.log(`User earned ${reward.amount} ${reward.type}`) // Grant the user their reward grantPowerUp(reward.amount)})rewardedInterstitial.on('dismiss', () => { console.log('User dismissed the ad') // Load the next ad rewardedInterstitial.load()})await rewardedInterstitial.load()await rewardedInterstitial.show()
const rewardedInterstitial = new RewardedInterstitialAd({ adUnitId: 'ca-app-pub-xxx/yyy', serverSideVerification: { userId: 'user123', customData: 'bonus_level_reward' }})rewardedInterstitial.on('reward', (event) => { // Your server will receive a callback from Google // to verify this reward before you grant it console.log('Reward event received, awaiting server verification')})await rewardedInterstitial.load()await rewardedInterstitial.show()
const rewardedInterstitial = new RewardedInterstitialAd({ adUnitId: 'ca-app-pub-xxx/yyy'})// Preload the adawait rewardedInterstitial.load()// Show at a natural transition point (e.g., between levels)function onLevelComplete() { rewardedInterstitial.on('reward', (event) => { // Give bonus rewards for watching grantBonusCoins(event.reward.amount * 2) }) rewardedInterstitial.on('dismiss', async () => { // Continue to next level loadNextLevel() // Preload next ad await rewardedInterstitial.load() }) if (await rewardedInterstitial.isLoaded()) { rewardedInterstitial.show() } else { // Ad not ready, continue without showing loadNextLevel() }}