npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@idleflowgames/admob

v9.0.0

Published

A native plugin for AdMob

Readme

Idle Flow Games AdMob

Internal fork of capacitor-community/admob. See internal maintenance and receipt APIs before updating or releasing.

Maintainers

| Maintainer | GitHub | Social | Website | | ------------------- | ------------------------------------------------ | ----------------------------------------------- | ----------------------------------------------- | | Masahiko Sakakibara | rdlabo | @rdlabo | rdlabo.dev | | Saninn Salas Diaz | Saninn Salas Diaz | @SaninnSalas | — |

Maintenance Status: Actively Maintained

Contributors ✨

Made with contributors-img.

Demo

Demo code is here.

Screenshots

| | Banner | Interstitial | Reward | App Open | | :---------- | :----------------------------------: | :----------------------------------------: | :----------------------------------: | :---------------------------------: | | iOS | | | | | | Android | | | | |

Overview

Capacitor community plugin for native AdMob. This plugin wraps the Google Mobile Ads SDK for iOS and Android so you can display banner, interstitial, rewarded, rewarded interstitial, and app open ads in Capacitor apps. It also covers Google User Messaging Platform (UMP) consent and App Tracking Transparency helpers on iOS.

Installation

This plugin already ships Google Mobile Ads SDK. Install the package, then add your AdMob application ID in AndroidManifest / Info.plist. Google's Get started guides for Android and iOS explain app IDs and SKAdNetwork identifiers (Apple's ad conversion IDs); do not add a second Mobile Ads dependency.

@idleflowgames/admob v9 requires Capacitor 8.5.1 or later within 8.x. Plugin version 9 does not target Capacitor 9. It supports iOS 15 or later and Android API 24 or later. See the migration guide and release notes.

npm install @idleflowgames/admob
npx cap sync

This internal fork targets Capacitor 8; use the upstream package for older Capacitor versions.

Google Mobile Ads SDK versions

This major version pins Google Mobile Ads SDK 25.4.0 on Android and 13.9.0 on iOS (Swift Package Manager and CocoaPods). Leave those versions unless you have a specific need. Google's Next-Gen SDK for Android waits until the next plugin major. See Migration for the policy behind the pins.

Android configuration

In android/app/src/main/AndroidManifest.xml, add the following under <application>:

<meta-data
  android:name="com.google.android.gms.ads.APPLICATION_ID"
  android:value="@string/admob_app_id" />

In android/app/src/main/res/values/strings.xml:

<string name="admob_app_id">[APP_ID]</string>

Replace [APP_ID] with your AdMob application ID, not an ad unit ID.

Variables

You can leave these unset. Override them in your app's variables.gradle only when you need a specific artifact version:

| Variable | Artifact | Default | | ------------------------------ | ------------------------------------------------ | -------- | | playServicesAdsVersion | com.google.android.gms:play-services-ads | 25.4.+ | | userMessagingPlatformVersion | com.google.android.ump:user-messaging-platform | 4.0.0 | | androidxCoreKTXVersion | androidx.core:core-ktx | 1.15.0 |

iOS configuration

Add the following inside the outermost <dict> in ios/App/App/Info.plist:

<key>GADIsAdManagerApp</key>
<true/>
<key>GADApplicationIdentifier</key>
<string>[APP_ID]</string>
<key>SKAdNetworkItems</key>
<array>
  <dict>
    <key>SKAdNetworkIdentifier</key>
    <string>cstr6suwn9.skadnetwork</string>
  </dict>
</array>
<key>NSUserTrackingUsageDescription</key>
<string>This identifier will be used to deliver personalized ads to you.</string>

Replace [APP_ID] with your AdMob application ID, and describe your actual tracking use in NSUserTrackingUsageDescription.

The SKAdNetworkItems snippet includes Google's own identifier. Add the other IDs from Google's iOS setup guide.

Troubleshooting

If CocoaPods cannot resolve Google-Mobile-Ads-SDK:

[error] Error running update: Analyzing dependencies
[!] CocoaPods could not find compatible versions for pod "Google-Mobile-Ads-SDK":

Run pod repo update in ios/, then npx cap sync ios again.

First test banner

After installation and platform setup, initialize the SDK, request consent, and show a Google demo banner. Use the platform banner IDs from Testing—do not create your own ad unit for this first check.

Call startAdMob from a user action or after the UI is ready (for example a button or post-navigation hook), not only at module evaluation time.

import { Capacitor } from '@capacitor/core';
import { AdMob, AdmobConsentStatus, BannerAdOptions, BannerAdSize, BannerAdPosition } from '@idleflowgames/admob';

const bannerAdId =
  Capacitor.getPlatform() === 'ios'
    ? 'ca-app-pub-3940256099942544/2934735716'
    : 'ca-app-pub-3940256099942544/6300978111';

async function startAdMob() {
  await AdMob.initialize();

  let consentInfo = await AdMob.requestConsentInfo();
  if (consentInfo.isConsentFormAvailable && consentInfo.status === AdmobConsentStatus.REQUIRED) {
    consentInfo = await AdMob.showConsentForm();
  }

  if (!consentInfo.canRequestAds) {
    // Consent not ready — no banner is shown.
    return;
  }

  const options: BannerAdOptions = {
    adId: bannerAdId,
    adSize: BannerAdSize.ADAPTIVE_BANNER,
    position: BannerAdPosition.BOTTOM_CENTER,
    margin: 0,
  };
  await AdMob.showBanner(options);
}

Expected result: when canRequestAds is true, a Google test banner appears at the bottom of the native screen. When canRequestAds is false, the function returns and no banner is shown. The banner sits above the WebView and can cover HTML—see Banner Ads to inset your layout. Details: Configuration, Consent, and Testing.

Choose by advertising goal

| Goal | Ad format | Guide | | ----------------------------------------------------------------- | ------------------------- | ------------------------------------------ | | Keep an ad visible alongside app content | Banner | Banner Ads | | Show a full-screen ad at a natural break without granting a reward | Interstitial | Interstitial Ads | | Offer a dedicated rewarded experience | Rewarded | Rewarded Ads | | Offer a reward at a natural transition | Rewarded interstitial | Rewarded Ads | | Monetize an app-open experience | App Open | App Open Ads |

Documentation

Start with Installation above, then Configuration and Consent. Run the first test banner, then use Testing for demo units and devices. Pick an ad format from the table above. The same guides are also on the documentation site (English and Japanese). If you opened this README on npm, use that site for the guides — the docs/ files live in the GitHub repository. Method signatures are in the API section below.

  • ConfigurationAdMob.initialize and SDK options.
  • Consent — privacy consent and iOS tracking authorization.
  • Testing — demo ad units, test devices, and consent testing.
  • Banner Ads — banner options, lifecycle, and events.
  • Full-screen ads:
    • Interstitial Ads — load, show, and multiple prepared ads.
    • Rewarded Ads — rewarded video, rewarded interstitial, and server-side verification.
  • App Open Ads — load and present on foreground transitions.
  • Ad Events — shared lifecycle events, errors, and revenue data.
  • Migration Guide — historical notes when upgrading from older plugin versions.

Index

API

initialize(...)

initialize(options?: AdMobInitializationOptions | undefined) => any

Initializes the Google Mobile Ads SDK.

| Param | Type | Description | | ------------- | --------------------------------------------------------------------------------- | ------------------------------------- | | options | AdMobInitializationOptions | Optional SDK initialization settings. |

Returns: any

Since: 1.1.2


trackingAuthorizationStatus()

trackingAuthorizationStatus() => any

Returns the current App Tracking Transparency authorization status on iOS 14 and later. Returns authorized on earlier iOS versions, Android, and web.

Returns: any

Since: 3.1.0


requestTrackingAuthorization()

requestTrackingAuthorization() => any

Requests App Tracking Transparency authorization on iOS 14 and later. Resolves without taking action on earlier iOS versions, Android, and web.

Returns: any

Since: 5.2.0


setApplicationMuted(...)

setApplicationMuted(options: ApplicationMutedOptions) => any

Reports whether the application audio is muted to the Google Mobile Ads SDK.

| Param | Type | | ------------- | --------------------------------------------------------------------------- | | options | ApplicationMutedOptions |

Returns: any

Since: 4.1.1


setApplicationVolume(...)

setApplicationVolume(options: ApplicationVolumeOptions) => any

Reports the application audio volume to the Google Mobile Ads SDK.

| Param | Type | | ------------- | ----------------------------------------------------------------------------- | | options | ApplicationVolumeOptions |

Returns: any

Since: 4.1.1


loadAppOpen(...)

loadAppOpen(options: AppOpenAdOptions) => any

Loads an App Open ad and returns the loaded ad unit ID.

| Param | Type | | ------------- | ------------------------------------------------------------- | | options | AppOpenAdOptions |

Returns: any


showAppOpen(...)

showAppOpen(options?: AdShowOptions | undefined) => any

Shows a loaded App Open ad.

| Param | Type | Description | | ------------- | ------------------------------------------------------- | -------------------------------------------------------------------------------------- | | options | AdShowOptions | Optional. Pass { adId } to show a specific prepared ad instead of the most recent one. |

Returns: any


isAppOpenLoaded(...)

isAppOpenLoaded(options?: AdShowOptions | undefined) => any

Checks whether an App Open ad is loaded.

| Param | Type | Description | | ------------- | ------------------------------------------------------- | -------------------------------------------------------------------------------------- | | options | AdShowOptions | Optional. Pass an adId to check a specific prepared ad instead of the most recent one. |

Returns: any


addListener(AppOpenAdPluginEvents.Loaded, ...)

addListener(eventName: AppOpenAdPluginEvents.Loaded, listenerFunc: (info: AdLoadInfo) => void) => any

Listens for App Open ad load events.

| Param | Type | | ------------------ | ------------------------------------------------------------------------------ | | eventName | AppOpenAdPluginEvents.Loaded | | listenerFunc | (info: AdLoadInfo) => void |

Returns: any


addListener(AppOpenAdPluginEvents.FailedToLoad, ...)

addListener(eventName: AppOpenAdPluginEvents.FailedToLoad, listenerFunc: (error: AdMobError) => void) => any

Listens for App Open ad load failures.

| Param | Type | | ------------------ | ------------------------------------------------------------------------------------ | | eventName | AppOpenAdPluginEvents.FailedToLoad | | listenerFunc | (error: AdMobError) => void |

Returns: any


addListener(AppOpenAdPluginEvents.Opened, ...)

addListener(eventName: AppOpenAdPluginEvents.Opened, listenerFunc: () => void) => any

Listens for App Open ad opened events.

| Param | Type | | ------------------ | ------------------------------------------------------------------------------ | | eventName | AppOpenAdPluginEvents.Opened | | listenerFunc | () => void |

Returns: any


addListener(AppOpenAdPluginEvents.Closed, ...)

addListener(eventName: AppOpenAdPluginEvents.Closed, listenerFunc: () => void) => any

Listens for App Open ad closed events.

| Param | Type | | ------------------ | ------------------------------------------------------------------------------ | | eventName | AppOpenAdPluginEvents.Closed | | listenerFunc | () => void |

Returns: any


addListener(AppOpenAdPluginEvents.FailedToShow, ...)

addListener(eventName: AppOpenAdPluginEvents.FailedToShow, listenerFunc: (error: AdMobError) => void) => any

Listens for App Open ad show failures.

| Param | Type | | ------------------ | ------------------------------------------------------------------------------------ | | eventName | AppOpenAdPluginEvents.FailedToShow | | listenerFunc | (error: AdMobError) => void |

Returns: any


addListener(AppOpenAdPluginEvents.AdImpression, ...)

addListener(eventName: AppOpenAdPluginEvents.AdImpression, listenerFunc: (data: AdMobRevenueData) => void) => any

Listens for App Open impression-level ad revenue events.

| Param | Type | | ------------------ | ------------------------------------------------------------------------------------ | | eventName | AppOpenAdPluginEvents.AdImpression | | listenerFunc | (data: AdMobRevenueData) => void |

Returns: any


showBanner(...)

showBanner(options: BannerAdOptions) => any

Displays a banner ad.

| Param | Type | Description | | ------------- | ----------------------------------------------------------- | ---------------------------------- | | options | BannerAdOptions | AdOptions |

Returns: any

Since: 1.1.2


hideBanner()

hideBanner() => any

Hides the current banner without destroying it.

Returns: any

Since: 1.1.2


resumeBanner()

resumeBanner() => any

Shows a previously hidden banner.

Returns: any

Since: 1.1.2


removeBanner()

removeBanner() => any

Destroys the current banner and removes it from the screen.

Returns: any

Since: 1.1.2


addListener(BannerAdPluginEvents.SizeChanged, ...)

addListener(eventName: BannerAdPluginEvents.SizeChanged, listenerFunc: (info: AdMobBannerSize) => void) => any

Listens for changes to the displayed banner dimensions.

| Param | Type | Description | | ------------------ | --------------------------------------------------------------------------------- | ------------------- | | eventName | BannerAdPluginEvents.SizeChanged | bannerAdSizeChanged | | listenerFunc | (info: AdMobBannerSize) => void | |

Returns: any

Since: 3.0.0


addListener(BannerAdPluginEvents.Loaded, ...)

addListener(eventName: BannerAdPluginEvents.Loaded, listenerFunc: () => void) => any

Listens for banner ad load events.

| Param | Type | Description | | ------------------ | ---------------------------------------------------------------------------- | -------------- | | eventName | BannerAdPluginEvents.Loaded | bannerAdLoaded | | listenerFunc | () => void | |

Returns: any

Since: 3.0.0


addListener(BannerAdPluginEvents.FailedToLoad, ...)

addListener(eventName: BannerAdPluginEvents.FailedToLoad, listenerFunc: (info: AdMobError) => void) => any

Listens for banner ad load failures.

| Param | Type | Description | | ------------------ | ---------------------------------------------------------------------------------- | -------------------- | | eventName | BannerAdPluginEvents.FailedToLoad | bannerAdFailedToLoad | | listenerFunc | (info: AdMobError) => void | |

Returns: any

Since: 3.0.0


addListener(BannerAdPluginEvents.Opened, ...)

addListener(eventName: BannerAdPluginEvents.Opened, listenerFunc: () => void) => any

Listens for banner overlay opened events.

| Param | Type | Description | | ------------------ | ---------------------------------------------------------------------------- | -------------- | | eventName | BannerAdPluginEvents.Opened | bannerAdOpened | | listenerFunc | () => void | |

Returns: any

Since: 3.0.0


addListener(BannerAdPluginEvents.Closed, ...)

addListener(eventName: BannerAdPluginEvents.Closed, listenerFunc: () => void) => any

Listens for banner overlay closed events.

| Param | Type | Description | | ------------------ | ---------------------------------------------------------------------------- | -------------- | | eventName | BannerAdPluginEvents.Closed | bannerAdClosed | | listenerFunc | () => void | |

Returns: any

Since: 3.0.0


addListener(BannerAdPluginEvents.AdImpression, ...)

addListener(eventName: BannerAdPluginEvents.AdImpression, listenerFunc: () => void) => any

Listens for banner impression events.

| Param | Type | Description | | ------------------ | ---------------------------------------------------------------------------------- | ------------ | | eventName | BannerAdPluginEvents.AdImpression | AdImpression | | listenerFunc | () => void | |

Returns: any

Since: 3.0.0


addListener(BannerAdPluginEvents.AdPaid, ...)

addListener(eventName: BannerAdPluginEvents.AdPaid, listenerFunc: (data: AdMobRevenueData) => void) => any

Listens for banner impression-level ad revenue events.

| Param | Type | | ------------------ | -------------------------------------------------------------------------------- | | eventName | BannerAdPluginEvents.AdPaid | | listenerFunc | (data: AdMobRevenueData) => void |

Returns: any


requestConsentInfo(...)

requestConsentInfo(options?: AdmobConsentRequestOptions | undefined) => any

Request user consent information

| Param | Type | Description | | ------------- | --------------------------------------------------------------------------------- | --------------------- | | options | AdmobConsentRequestOptions | ConsentRequestOptions |

Returns: any

Since: 5.0.0


showPrivacyOptionsForm()

showPrivacyOptionsForm() => any

Shows a google privacy options form (rendered from your GDPR message config).

Returns: any

Since: 7.0.3


showConsentForm()

showConsentForm() => any

Shows a google user consent form (rendered from your GDPR message config).

Returns: any

Since: 5.0.0


resetConsentInfo()

resetConsentInfo() => any

Resets the UMP SDK state. Call requestConsentInfo function again to allow user modify their consent

Returns: any

Since: 5.0.0


prepareInterstitial(...)

prepareInterstitial(options: AdOptions) => any

Loads an interstitial ad and returns the loaded ad unit ID.

| Param | Type | Description | | ------------- | ----------------------------------------------- | ---------------------------------- | | options | AdOptions | AdOptions |

Returns: any

Since: 1.1.2


showInterstitial(...)

showInterstitial(options?: AdShowOptions | undefined) => any

Shows a loaded interstitial ad.

| Param | Type | Description | | ------------- | ------------------------------------------------------- | -------------------------------------------------------------------------------------- | | options | AdShowOptions | Optional. Pass { adId } to show a specific prepared ad instead of the most recent one. |

Returns: any

Since: 1.1.2


addListener(InterstitialAdPluginEvents.FailedToLoad, ...)

addListener(eventName: InterstitialAdPluginEvents.FailedToLoad, listenerFunc: (error: AdMobError) => void) => any

Listens for interstitial ad load failures.

| Param | Type | | ------------------ | ---------------------------------------------------------------------------------------------- | | eventName | InterstitialAdPluginEvents.FailedToLoad | | listenerFunc | (error: AdMobError) => void |

Returns: any


addListener(InterstitialAdPluginEvents.Loaded, ...)

addListener(eventName: InterstitialAdPluginEvents.Loaded, listenerFunc: (info: AdLoadInfo) => void) => any

Listens for interstitial ad load events.

| Param | Type | | ------------------ | ---------------------------------------------------------------------------------------- | | eventName | InterstitialAdPluginEvents.Loaded | | listenerFunc | (info: AdLoadInfo) => void |

Returns: any


addListener(InterstitialAdPluginEvents.Dismissed, ...)

addListener(eventName: InterstitialAdPluginEvents.Dismissed, listenerFunc: () => void) => any

Listens for interstitial ad dismissed events.

| Param | Type | | ------------------ | ------------------------------------------------------------------------------------------- | | eventName | InterstitialAdPluginEvents.Dismissed | | listenerFunc | () => void |

Returns: any


addListener(InterstitialAdPluginEvents.FailedToShow, ...)

addListener(eventName: InterstitialAdPluginEvents.FailedToShow, listenerFunc: (error: AdMobError) => void) => any

Listens for interstitial ad show failures.

| Param | Type | | ------------------ | ---------------------------------------------------------------------------------------------- | | eventName | InterstitialAdPluginEvents.FailedToShow | | listenerFunc | (error: AdMobError) => void |

Returns: any


addListener(InterstitialAdPluginEvents.Showed, ...)

addListener(eventName: InterstitialAdPluginEvents.Showed, listenerFunc: () => void) => any

Listens for interstitial ad shown events.

| Param | Type | | ------------------ | ---------------------------------------------------------------------------------------- | | eventName | InterstitialAdPluginEvents.Showed | | listenerFunc | () => void |

Returns: any


addListener(InterstitialAdPluginEvents.AdImpression, ...)

addListener(eventName: InterstitialAdPluginEvents.AdImpression, listenerFunc: (data: AdMobRevenueData) => void) => any

Listens for interstitial impression-level ad revenue events.

| Param | Type | | ------------------ | ---------------------------------------------------------------------------------------------- | | eventName | InterstitialAdPluginEvents.AdImpression | | listenerFunc | (data: AdMobRevenueData) => void |

Returns: any


prepareRewardVideoAd(...)

prepareRewardVideoAd(options: RewardAdOptions) => any

Loads a rewarded ad and returns the loaded ad unit ID.

| Param | Type | Description | | ------------- | ----------------------------------------------------------- | ---------------------------------------------- | | options | RewardAdOptions | RewardAdOptions |

Returns: any

Since: 1.1.2


showRewardVideoAd(...)

showRewardVideoAd(options?: RewardVideoShowOptions | undefined) => any

Shows a loaded rewarded ad and resolves when the user earns the reward.

| Param | Type | Description | | ------------- | ------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | | options | RewardVideoShowOptions | Optional. Pass { adId } to show a specific prepared ad instead of the most recent one. |

Returns: any

Since: 1.1.2


getRewardReceipt()

getRewardReceipt() => any

Read the bounded native Welcome Back receipt queue without initializing ads.

Returns: any


storeRewardReceipt(...)

storeRewardReceipt(options: { rewardReceipt: StoredWelcomeBackRewardReceipt; }) => any

Store an earned entitlement/dev receipt synchronously on the native side.

| Param | Type | | ------------- | ------------------------------------------------------------------------------------------------------------- | | options | { rewardReceipt: StoredWelcomeBackRewardReceipt; } |

Returns: any


clearRewardReceipt(...)

clearRewardReceipt(options: { mode: "exact"; expectedReceipt: StoredWelcomeBackRewardReceipt; } | { mode: "malformed_only" | "reset_all"; }) => any

Atomically compare-and-clear exact evidence, salvage malformed siblings, or reset all.

| Param | Type | | ------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | options | { mode: 'exact'; expectedReceipt: StoredWelcomeBackRewardReceipt; } | { mode: 'malformed_only' | 'reset_all'; } |

Returns: any


getRunBankRewardReceipt()

getRunBankRewardReceipt() => any

Read the isolated Android Run-bank X2 receipt queue.

Returns: any


storeRunBankRewardReceipt(...)

storeRunBankRewardReceipt(options: { runBankRewardReceipt: StoredRunBankRewardReceipt; }) => any

Store one exact pending/earned/consumed Run-bank X2 receipt.

| Param | Type | | ------------- | ------------------------------------------------------------------------------------------------------------ | | options | { runBankRewardReceipt: StoredRunBankRewardReceipt; } |

Returns: any


clearRunBankRewardReceipt(...)

clearRunBankRewardReceipt(options: { mode: "exact"; expectedReceipt: StoredRunBankRewardReceipt & { status: "pending" | "consumed"; }; } | { mode: "reset_all"; }) => any

Atomically compare-clear an exact Run-bank receipt, or reset all.

| Param | Type | | ------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | options | { mode: 'exact'; expectedReceipt: StoredRunBankRewardReceipt & { status: 'pending' | 'consumed'; }; } | { mode: 'reset_all'; } |

Returns: any


discardOrphanedRunBankRewardReceipt(...)

discardOrphanedRunBankRewardReceipt(options: { expectedReceipt: StoredRunBankRewardReceipt & { status: "pending"; }; }) => any

Clear an exact pending receipt only when no callback in this Android process owns it.

| Param | Type | | ------------- | -------------------------------------------------------------------------------------------------------------------------------- | | options | { expectedReceipt: StoredRunBankRewardReceipt & { status: 'pending'; }; } |

Returns: any


addListener(RewardAdPluginEvents.FailedToLoad, ...)

addListener(eventName: RewardAdPluginEvents.FailedToLoad, listenerFunc: (error: AdMobError) => void) => any

Listens for rewarded ad load failures.

| Param | Type | | ------------------ | ---------------------------------------------------------------------------------- | | eventName | RewardAdPluginEvents.FailedToLoad | | listenerFunc | (error: AdMobError) => void |

Returns: any


addListener(RewardAdPluginEvents.Loaded, ...)

addListener(eventName: RewardAdPluginEvents.Loaded, listenerFunc: (info: AdLoadInfo) => void) => any

Listens for rewarded ad load events.

| Param | Type | | ------------------ | ---------------------------------------------------------------------------- | | eventName | RewardAdPluginEvents.Loaded | | listenerFunc | (info: AdLoadInfo) => void |

Returns: any


addListener(RewardAdPluginEvents.Rewarded, ...)

addListener(eventName: RewardAdPluginEvents.Rewarded, listenerFunc: (reward: AdMobRewardItem) => void) => any

Listens for earned reward events.

| Param | Type | | ------------------ | -------------------------------------------------------------------------------- | | eventName | RewardAdPluginEvents.Rewarded | | listenerFunc | (reward: AdMobRewardItem) => void |

Returns: any


addListener(RewardAdPluginEvents.Dismissed, ...)

addListener(eventName: RewardAdPluginEvents.Dismissed, listenerFunc: () => void) => any

Listens for rewarded ad dismissed events.

| Param | Type | | ------------------ | ------------------------------------------------------------------------------- | | eventName | RewardAdPluginEvents.Dismissed | | listenerFunc | () => void |

Returns: any


addListener(RewardAdPluginEvents.FailedToShow, ...)

addListener(eventName: RewardAdPluginEvents.FailedToShow, listenerFunc: (error: AdMobError) => void) => any

Listens for rewarded ad show failures.

| Param | Type | | ------------------ | ---------------------------------------------------------------------------------- | | eventName | RewardAdPluginEvents.FailedToShow | | listenerFunc | (error: AdMobError) => void |

Returns: any


addListener(RewardAdPluginEvents.Showed, ...)

addListener(eventName: RewardAdPluginEvents.Showed, listenerFunc: () => void) => any

Listens for rewarded ad shown events.

| Param | Type | | ------------------ | ---------------------------------------------------------------------------- | | eventName | RewardAdPluginEvents.Showed | | listenerFunc | () => void |

Returns: any


addListener(RewardAdPluginEvents.AdImpression, ...)

addListener(eventName: RewardAdPluginEvents.AdImpression, listenerFunc: (data: AdMobRevenueData) => void) => any

Listens for rewarded impression-level ad revenue events.

| Param | Type | | ------------------ | ---------------------------------------------------------------------------------- | | eventName | RewardAdPluginEvents.AdImpression | | listenerFunc | (data: AdMobRevenueData) => void |

Returns: any


prepareRewardInterstitialAd(...)

prepareRewardInterstitialAd(options: RewardInterstitialAdOptions) => any

Loads a rewarded interstitial ad and returns the loaded ad unit ID.

| Param | Type | Description | | ------------- | ----------------------------------------------------------------------------------- | ---------------------------------------------------------------------- | | options | RewardInterstitialAdOptions | RewardInterstitialAdOptions |

Returns: any

Since: 1.1.2


showRewardInterstitialAd(...)

showRewardInterstitialAd(options?: AdShowOptions | undefined) => any

Shows a loaded rewarded interstitial ad and resolves when the user earns the reward.

| Param | Type | Description | | ------------- | ------------------------------------------------------- | -------------------------------------------------------------------------------------- | | options | AdShowOptions | Optional. Pass { adId } to show a specific prepared ad instead of the most recent one. |

Returns: any

Since: 1.1.2


addListener(RewardInterstitialAdPluginEvents.FailedToLoad, ...)

addListener(eventName: RewardInterstitialAdPluginEvents.FailedToLoad, listenerFunc: (error: AdMobError) => void) => any

Listens for rewarded interstitial ad load failures.

| Param | Type | | ------------------ | ---------------------------------------------------------------------------------------------------------- | | eventName | RewardInterstitialAdPluginEvents.FailedToLoad | | listenerFunc | (error: AdMobError) => void |

Returns: any


addListener(RewardInterstitialAdPluginEvents.Loaded, ...)

addListener(eventName: RewardInterstitialAdPluginEvents.Loaded, listenerFunc: (info: AdLoadInfo) => void) => any

Listens for rewarded interstitial ad load events.

| Param | Type | | ------------------ | ---------------------------------------------------------------------------------------------------- | | eventName | RewardInterstitialAdPluginEvents.Loaded | | listenerFunc | (info: AdLoadInfo) => void |

Returns: any


addListener(RewardInterstitialAdPluginEvents.Rewarded, ...)

addListener(eventName: RewardInterstitialAdPluginEvents.Rewarded, listenerFunc: (reward: AdMobRewardInterstitialItem) => void) => any

Listens for earned reward events.

| Param | Type | | ------------------ | -------------------------------------------------------------------------------------------------------- | | eventName | RewardInterstitialAdPluginEvents.Rewarded | | listenerFunc | (reward: AdMobRewardInterstitialItem) => void |

Returns: any


addListener(RewardInterstitialAdPluginEvents.Dismissed, ...)

addListener(eventName: RewardInterstitialAdPluginEvents.Dismissed, listenerFunc: () => void) => any

Listens for rewarded interstitial ad dismissed events.

| Param | Type | | ------------------ | ------------------------------------------------------------------------------------------------------- | | eventName | RewardInterstitialAdPluginEvents.Dismissed | | listenerFunc | () => void |

Returns: any


addListener(RewardInterstitialAdPluginEvents.FailedToShow, ...)

addListener(eventName: RewardInterstitialAdPluginEvents.FailedToShow, listenerFunc: (error: AdMobError) => void) => any

Listens for rewarded interstitial ad show failures.

| Param | Type | | ------------------ | ---------------------------------------------------------------------------------------------------------- | | eventName | RewardInterstitialAdPluginEvents.FailedToShow | | listenerFunc | (error: AdMobError) => void |

Returns: any


addListener(RewardInterstitialAdPluginEvents.Showed, ...)

addListener(eventName: RewardInterstitialAdPluginEvents.Showed, listenerFunc: () => void) => any

Listens for rewarded interstitial ad shown events.

| Param | Type | | ------------------ | ---------------------------------------------------------------------------------------------------- | | eventName | RewardInterstitialAdPluginEvents.Showed | | listenerFunc | () => void |

Returns: any


addListener(RewardInterstitialAdPluginEvents.AdImpression, ...)

addListener(eventName: RewardInterstitialAdPluginEvents.AdImpression, listenerFunc: (data: AdMobRevenueData) => void) => any

Listens for rewarded interstitial impression-level ad revenue events.

| Param | Type | | ------------------ | ---------------------------------------------------------------------------------------------------------- | | eventName | RewardInterstitialAdPluginEvents.AdImpression | | listenerFunc | (data: AdMobRevenueData) => void |

Returns: any


Interfaces

AdMobInitializationOptions

| Prop | Type | Description | Default | Since | | ---------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------ | ----- | | testingDevices | {} | Device IDs to register as test devices when {@link AdMobInitializationOptions.initializeForTesting} is true. Requests from registered devices receive test ads and do not generate invalid traffic. | | 1.2.0 | | initializeForTesting | boolean | Whether to register {@link AdMobInitializationOptions.testingDevices} as test devices. | false | 1.2.0 | | tagForChildDirectedTreatment | boolean | For purposes of the Children's Online Privacy Protection Act (COPPA), there is a setting called tagForChildDirectedTreatment. | | 3.1.0 | | tagForUnderAgeOfConsent | boolean | When using this feature, a Tag For Users under the Age of Consent in Europe (TFUA) parameter will be included in all future ad requests. | | 3.1.0 | | maxAdContentRating | MaxAdContentRating | The maximum ad content rating applied to all ad requests. Ads with a higher rating are excluded. | | 3.1.0 |

TrackingAuthorizationStatusInterface

The current iOS App Tracking Transparency authorization status.

| Prop | Type | Description | | ------------ | ------------------------------------------------------------------------ | --------------------------------------------------------------- | | status | 'authorized' | 'denied' | 'notDetermined' | 'restricted' | The authorization status reported by App Tracking Transparency. |

ApplicationMutedOptions

| Prop | Type | Description | Since | | ----------- | -------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----- | | muted | boolean | To inform the SDK that the app volume has been muted. Note: Video ads that are ineligible to be shown with muted audio are not returned for ad requests made, when the app volume is reported as muted or set to a value of 0. This may restrict a subset of the broader video ads pool from serving. | 4.1.1 |

ApplicationVolumeOptions

| Prop | Type | Description | Since | | ------------ | ---------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----- | | volume | 0 | 1 | 0.1 | 0.2 | 0.3 | 0.4 | 0.5 | 0.6 | 0.7 | 0.8 | 0.9 | If your app has its own volume controls (such as custom music or sound effect volumes), disclosing app volume to the Google Mobile Ads SDK allows video ads to respect app volume settings. Use a supported value from 0.0 (silent) to 1.0 (full volume). | 4.1.1 |

AppOpenAdOptions

Options for loading an App Open ad.

| Prop | Type | Description | | ---------- | ------------------- | -------------------------------- | | adId | string | The App Open ad unit ID to load. |

AdLoadInfo

Information returned after an ad loads successfully.

| Prop | Type | Description | | -------------- | ------------------- | -------------------------------- | | adUnitId | string | The ad unit ID of the loaded ad. |

AdShowOptions

Options for selecting a previously loaded ad to show or inspect.

| Prop | Type | Description | Since | | ---------- | ------------------- | ---------------------------------------------------------------------------------------------------------------------- | ----- | | adId | string | The ad unit ID of a previously prepared ad to target. If omitted, the operation targets the most recently prepared ad. | 8.0.1 |

PluginListenerHandle

| Prop | Type | | ------------ | ------------------------- | | remove | () => any |

AdMobError

An error returned by the Google Mobile Ads SDK.

| Prop | Type | Description | | ------------- | ------------------- | -------------------------------------- | | code | number | Gets the error's code. | | message | string | Gets the message describing the error. |

AdMobRevenueData

Impression-level ad revenue data emitted by a paid event.

| Prop | Type | Description | | ------------------ | ------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | | adUnitId | string | The ad unit ID associated with the paid event. | | valueMicros | number | The ad value in micros, where 1,000,000 micros equals one currency unit. | | currencyCode | string | The ISO 4217 currency code for valueMicros. | | precision | AdValuePrecision | The precision of the reported ad value.