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

emi-indo-cordova-plugin-admob

v3.0.1

Published

Cordova/Quasar/Capacitor Plugin Admob Android IOS

Downloads

1,124

Readme

emi-indo-cordova-plugin-admob

NPM version Downloads License

[!IMPORTANT] 🔮 The Future is Here: AdMob Next Gen

While this plugin (emi-indo) remains actively maintained and supported for existing users, we are developing the next evolution of AdMob integration at SwapLab Engine.

👉 Check out cordova-plugin-admob-nextgen

  • New Projects: We highly recommend using the Next Gen plugin for modern architecture and long-term stability.
  • Existing Projects: You are safe to stay here, updates will continue as usual.

Cordova/Quasar/Capacitor Plugin for AdMob (Android & iOS)

This plugin supports the latest Mobile Ads SDK, User Messaging Platform (UMP), CMP, and various ad formats including Collapsible Banners.

[!NOTE] Revenue Policy:

  • No Ad-Sharing: This plugin is purely rewritten and clean of 3rd party revenue-sharing code.
  • 100% Revenue: All ad revenue goes directly to you.
  • No Remote Control: You have full control over your implementation.

🎉 New Milestone 2026

We are starting the year strong! Version 2.8.9 - 3.0.+ is now available with significant improvements.


☁️ Cloud Build (Quick Test)

Fastest test (APK Debug): ⚡ With github action (Optional)


🚀 Features & Methods

  • Core: initialize, targeting, globalSettings
  • Privacy & Consent:
    • AppTrackingTransparency (ATT)
    • CMP SDK (IAB TCF v2.2)
    • UMP SDK
    • CustomConsentManager
  • Ad Formats:
    • App Open Ads
    • Banner Ads (including Collapsible & Adaptive)
    • Interstitial Ads
    • Rewarded Ads
    • Rewarded Interstitial Ads
  • Revenue & Advanced:
    • AdSense Support
    • Mediation (Meta, Unity, AppLovin, etc.)
    • Impression-level ad revenue
    • Targeting Request (targetingAdRequest, setPersonalizationState, setPPS)

📢 Version 2.9.+ - 3+ Highlights

📦 Current SDK Versions (Maintained & Up-to-Date)

This plugin is regularly updated to support the latest standards.

| Component | Platform | Version | Release Notes | | :--- | :--- | :--- | :--- | | Mobile Ads SDK | Android | 25.2.0 | View Notes | | UMP SDK | Android | 4.0.0 | View Notes | | Mobile Ads SDK | iOS | 13.3.0 | View Notes | | UMP SDK | iOS | 3.1.0 | View Notes |


📱 Supported Frameworks

This plugin works seamlessly with the following frameworks:


🛠 Installation Cordova

1. Install Plugin

Android Only:

cordova plugin add emi-indo-cordova-plugin-admob --save --variable APP_ID_ANDROID=ca-app-pub-xxx~xxx

iOS Only:

cordova plugin add emi-indo-cordova-plugin-admob --save --variable APP_ID_IOS=ca-app-pub-xxx~xxx

Both Platforms (Recommended):

cordova plugin add emi-indo-cordova-plugin-admob --save --variable APP_ID_ANDROID=ca-app-pub-xxx~xxx --variable APP_ID_IOS=ca-app-pub-xxx~xxx

Remove Plugin:

cordova plugin rm emi-indo-cordova-plugin-admob

2. Important Steps for iOS

[!WARNING] To prevent Xcode warnings or errors:

  1. After adding the platform/plugin, go to your project root and run: cordova prepare
  2. Navigate to the iOS folder: cd platforms/ios
  3. Run Pod install: pod install --repo-update

📸 Screenshots & Demos

Video Demos:

Banner Ad: No Overlapping

The body height is reduced by the height of the banner. Auto-detects full-screen mode.

Banner Ad: Overlapping

The banner overlaps on top of the body. Auto-detects full-screen mode.

Other Formats


📖 API & Usage Guide

1. Initialization (Required)

You must initialize the plugin before using any ads.

document.addEventListener("deviceready", function(){

    // 1. Initialize
    cordova.plugins.emiAdmobPlugin.initialize({
        isUsingAdManagerRequest: false, // true = AdManager | false = AdMob (Default false)
        isResponseInfo: false,          // Default false (Debug true)
        isConsentDebug: false,          // Default false (Debug true)
    });

    // 2. Listen for SDK Ready
    document.addEventListener('on.sdkInitialization', (data) => {
        // Data available: version, adapters, consentStatus, gdprApplies, etc.
        console.log("On Sdk Initialization version: " + data.version);
        console.log("On Consent Status: " + data.consentStatus);
    });


     
     /*
          If you want to experiment,
          you can use the development method cordova.plugins.emiAdmobPlugin.consentReset()
          or option cordova.plugins.emiAdmobPlugin.showPrivacyOptionsForm()
     */
     // Optional New version 2.7.9+
     document.addEventListener('on.personalization.state', (data) => {
          // https://developers.google.com/admob/android/privacy/ad-serving-modes
          /*
          const personalizationState = data.personalizationState;
          const purposeConsents = data.purposeConsents;
          const gdprApplies = data.gdprApplies;
          */
         //  [INFO:CONSOLE:140] "on personalization state: {"isTrusted":false,"personalizationState":"PERSONALIZED","purposeConsents":"11111111111","gdprApplies":1}"
         console.log("on personalization state: " + JSON.stringify(data))

         if (data.personalizationState === "PERSONALIZED"){
            console.log("PERSONALIZED")
         } else if (data.personalizationState === "NON_PERSONALIZED"){
            console.log("NON_PERSONALIZED")
         } if (data.personalizationState === "LIMITED_OR_NO_ADS"){
           console.log("LIMITED_OR_NO_ADS")
        } else {
          console.log("UNKNOWN")
        }

 });



}, false);

Privacy & Consent (UMP/CMP/ATT):

// Show Privacy Options Form
cordova.plugins.emiAdmobPlugin.showPrivacyOptionsForm();

// Reset Consent (For testing)
cordova.plugins.emiAdmobPlugin.consentReset();

// iOS: Request App Tracking Transparency (ATT)
cordova.plugins.emiAdmobPlugin.requestIDFA();

// CMP SDK 2.2 (Get Data)
// Optional
cordova.plugins.emiAdmobPlugin.getIabTfc((IABTFC) => { 
    console.log(JSON.stringify(IABTFC)); 
});
// Optional
document.addEventListener('on.get.consent.status', () => {
   console.log("on get consent status");
});
// Optional
document.addEventListener('on.TCString.expired', () => {
   console.log("on TCString expires 360 days");
   cordova.plugins.emiAdmobPlugin.consentReset();
});

2. Banner Ads

const bannerConfig = {
   adUnitId: "ca-app-pub-xxx/xxx", 
   position: "bottom-center", //  bottom-center | top-center
   size: "adaptive", // adaptive | banner | large_banner | full_banner | leaderboard
   collapsible: false, // default false
   autoShow: true, // default false
   isOverlapping: false, // The height of the body is reduced by the height of the banner.
// padding: 0, // Optional: only isOverlapping: false, Extra 20px distance between WebView and Banner
// loadInterval: 5 // Opsional: Anti-Flicker/Spam, Default interval 5 seconds, disable 0
}

// Load
cordova.plugins.emiAdmobPlugin.loadBannerAd(bannerConfig);

// Other Methods
cordova.plugins.emiAdmobPlugin.showBannerAd();
cordova.plugins.emiAdmobPlugin.hideBannerAd();
cordova.plugins.emiAdmobPlugin.removeBannerAd();
on.banner.load
on.banner.failed.load
on.banner.click
on.banner.close
on.banner.impression
on.banner.open
on.banner.revenue
on.banner.remove
on.banner.hide
on.is.collapsible
on.bannerAd.responseInfo

// Example:
document.addEventListener('on.is.collapsible', function(event) {
    console.log("Collapsible Status: " + event.collapsible);
});

3. Interstitial Ads

// Load
cordova.plugins.emiAdmobPlugin.loadInterstitialAd({ 
    adUnitId: "ca-app-pub-xxx/xxx", 
    autoShow: true,
 // loadInterval: 5 // Opsional: Anti Spam, Default interval 5 seconds, disable 0 
});

// Show manually (if autoShow is false)
cordova.plugins.emiAdmobPlugin.showInterstitialAd();
on.interstitial.loaded
on.interstitial.failed.load
on.interstitial.click
on.interstitial.dismissed
on.interstitial.failed.show
on.interstitial.impression
on.interstitial.show
on.interstitial.revenue
on.interstitialAd.responseInfo

// Reload after dismiss:
document.addEventListener('on.interstitial.dismissed', () => {
   console.log("Ad dismissed. Reloading...");
   // loadInterstitialAd(...);
});

4. Rewarded Ads

// Load
cordova.plugins.emiAdmobPlugin.loadRewardedAd({ 
    adUnitId: "ca-app-pub-xxx/xxx", 
    autoShow: true,
// loadInterval: 5 // Opsional: Anti Spam, Default interval 5 seconds, disable 0  
});

// Show
cordova.plugins.emiAdmobPlugin.showRewardedAd();
on.rewarded.loaded
on.rewarded.failed.load
on.rewarded.click
on.rewarded.dismissed
on.rewarded.failed.show
on.rewarded.impression
on.rewarded.show
on.reward.userEarnedReward
on.rewarded.revenue
on.rewarded.ad.skip
on.rewardedAd.responseInfo

5. Rewarded Interstitial Ads

// Load
cordova.plugins.emiAdmobPlugin.loadRewardedInterstitialAd({ 
    adUnitId: "ca-app-pub-xxx/xxx", 
    autoShow: true,
// loadInterval: 5 // Opsional: Anti Spam, Default interval 5 seconds, disable 0 
});

Supports similar events to Rewarded Ads (replace rewarded with rewardedInt).

6. App Open Ads

cordova.plugins.emiAdmobPlugin.loadAppOpenAd({ 
    adUnitId: "ca-app-pub-xxx/xxx", 
    autoShow: true,
// loadInterval: 5 // Opsional: Anti Spam, Default interval 5 seconds, disable 0 
});

7. Advanced Configuration (Android Only)

Targeting & PPS:

// Optional
// 1. Targeting Request
const configAdRequest = {
    customTargetingEnabled: false,
    categoryExclusionsEnabled: false,
    ppIdEnabled: false,
    contentURLEnabled: false,
    brandSafetyEnabled: false,
    customTargetingValue: ["24", "25"], 
    categoryExclusionsValue: "automobile",
    ppIdValue: "AB123456789",
    contentURLValue: "[https://www.example.com](https://www.example.com)"
}
cordova.plugins.emiAdmobPlugin.targetingAdRequest(configAdRequest);

// 2. Personalization State
// Optional
cordova.plugins.emiAdmobPlugin.setPersonalizationState({
    setPersonalizationState: "disabled" // "disabled" | "enabled"
});

// 3. PPS
// Optional
cordova.plugins.emiAdmobPlugin.setPPS({
    ppsEnabled: true,
    iabContent: "IAB_AUDIENCE_1_1", 
    ppsArrValue: [6,284]
});

8. Advanced Configuration (iOS Only)

Force Privacy Form Display: Useful if TCString is null due to ATT status.

// Optional
document.addEventListener('on.sdkInitialization', (data) => {
    let userGdpr = data.gdprApplies;
    let userTCString = data.consentTCString;

    if (userGdpr === 1 && userTCString === null){
        cordova.plugins.emiAdmobPlugin.forceDisplayPrivacyForm();
    }
});

🤝 Mediation Support

1. Meta Audience Network

  • Default Adapter: 6.13.7.0
cordova plugin add emi-indo-cordova-plugin-mediation-meta

2. Unity Ads

  • Default Adapter: 4.6.1.0
cordova plugin add emi-indo-cordova-plugin-mediation-unity

3. AppLovin

  • Default Adapter: 11.8.2.0
cordova plugin add emi-indo-cordova-plugin-mediation-applovin

4. AdColony

  • Default Adapter: 4.8.0.1
cordova plugin add emi-indo-cordova-plugin-mediation-adcolony

5. Chartboost

  • Default Adapter: 9.2.1.0
cordova plugin add emi-indo-cordova-plugin-mediation-chartboost

6. ironSource

  • Default Adapter: 7.2.7.0
cordova plugin add emi-indo-cordova-plugin-mediation-ironsource

Locking Adapter Versions

To ensure stability, you can lock specific adapter versions using variables:

CLI Example:

cordova plugin add emi-indo-cordova-plugin-mediation-meta --save --variable META_ADAPTER_VERSION="xxxxx" --variable IOS_META_ADAPTER_VERSION="xxxxx"

Config.xml Example:

<preference name="META_ADAPTER_VERSION" value="xxxxx" />
<preference name="IOS_META_ADAPTER_VERSION" value="xxxxx" />

Available Variables:

  • META_ADAPTER_VERSION / IOS_META_ADAPTER_VERSION
  • UNITY_ADAPTER_VERSION / IOS_UNITY_ADAPTER_VERSION
  • APPLOVIN_ADAPTER_VERSION / IOS_APPLOVIN_ADAPTER_VERSION
  • ADCOLONY_ADAPTER_VERSION / IOS_ADCOLONY_ADAPTER_VERSION
  • CHARTBOOST_ADAPTER_VERSION / IOS_CHARTBOOST_ADAPTER_VERSION
  • IRONSOURCE_ADAPTER_VERSION / IOS_IRONSOURCE_ADAPTER_VERSION

📅 Older Versions / History

Minimum Engines

  • cordova-android version = 12.0.0
  • cordova-ios version = 7.0.0

iOS Notes

  • iOS 18 Support: Discussion #42
  • Mobile Ads SDK iOS 11.12.0: Requires cocoapods 1.16.2+
  • Xcode: Minimum 15.3+
  • macOS: Minimum 14.4+
  • Swift: 5.10+

Video Tests (Old Versions)


❤️ Support the Project

This plugin is developed and maintained in my free time. If it saved you hours of work, consider supporting the development!

Your support helps me keep the dependencies updated and the cleaner script running smoothly.

Other Plugins by EMI-INDO