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

v2.6.9

Published

Cordova/Quasar/Capacitor Plugin Admob Android IOS

Readme

emi-indo-cordova-plugin-admob

NPM version Downloads License

[!TIP] 🚀 Cloud Build Ready: > Tired of local environment errors? This plugin is fully tested and 100% compatible with SwapLab Public Build.

Build your Android/iOS apps instantly in the cloud without setting up Android Studio or Xcode. Supports Cordova, Framework7, and Capacitor stacks.

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.5.9-beta.1 is now available with significant improvements. 👉 Check out the Release Notes (v2.5.9-beta.1)


🚀 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.0.8+ 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 | 24.9.0 | View Notes | | UMP SDK | Android | 4.0.0 | View Notes | | Mobile Ads SDK | iOS | 12.14.0 | View Notes | | UMP SDK | iOS | 3.2.0 | View Notes |

Recommended config.xml Setup

<preference name="fullscreen" value="false" /> <preference name="android-minSdkVersion" value="23" />
<preference name="android-targetSdkVersion" value="36" />

📱 Supported Frameworks

This plugin works seamlessly with the following frameworks:


🛠 Installation

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: true, // true = AdManager | false = AdMob (Default true)
        isResponseInfo: true,          // Default false (Debug true)
        isConsentDebug: true,          // 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);
    });

}, 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)
cordova.plugins.emiAdmobPlugin.getIabTfc((IABTFC) => { 
    console.log(JSON.stringify(IABTFC)); 
});
document.addEventListener('on.get.consent.status', () => {
   console.log("on get consent status");
});

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",       // top-center, bottom-center, etc.
   size: "responsive_adaptive",     // responsive_adaptive, anchored_adaptive, banner, medium_rectangle...
   collapsible: "bottom",           // 'top' | 'bottom' | '' (disable)
   autoShow: true,                  // Show immediately
   isOverlapping: false
}

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

// Other Methods
cordova.plugins.emiAdmobPlugin.showBannerAd();
cordova.plugins.emiAdmobPlugin.hideBannerAd();
cordova.plugins.emiAdmobPlugin.removeBannerAd();

// Styling (Android Only)
cordova.plugins.emiAdmobPlugin.styleBannerAd({ padding: 50, margins: 50 });
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 
});

// 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 
});

// 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 
});

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 
});

7. Advanced Configuration (Android Only)

Targeting & PPS:

// 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
cordova.plugins.emiAdmobPlugin.setPersonalizationState({
    setPersonalizationState: "disabled" // "disabled" | "enabled"
});

// 3. PPS
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.

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)


❤️ Sponsor & Support

To maintain this plugin for the long run and ensure regular updates, please consider supporting the project.

Other Plugins by EMI-INDO