Skip to main content

AdMob Pro

Plugin for Google Ads, including AdMob / DFP (DoubleClick for publisher) and mediations to other Ad networks.

IMPORTANT NOTICE: this plugin takes a percentage out of your earnings if you profit more than $1,000. Read more about this on the plugin's repo. For a completely free alternative, see AdMobPro Free.

https://github.com/floatinghotpot/cordova-admob-pro

Stuck on a Cordova issue?

Don't waste precious time on plugin issues.

If you're building a serious project, you can't afford to spend hours troubleshooting. Ionic’s experts offer premium advisory services for both community plugins and premier plugins.

Installation#

$ npm install cordova-plugin-admobpro
$ npm install @ionic-native/admob-pro
$ ionic cap sync

Supported Platforms#

  • Android
  • iOS
  • Windows Phone 8

Capacitor#

Not Compatible

Usage#

React#

Learn more about using Ionic Native components in React

Angular#

import { AdMobPro } from '@ionic-native/admob-pro/ngx';
import { Platform } from '@ionic/angular';
constructor(private admob: AdMobPro, private platform: Platform ) { }
ionViewDidLoad() {
this.admob.onAdDismiss()
.subscribe(() => { console.log('User dismissed ad'); });
}
onClick() {
let adId;
if(this.platform.is('android')) {
adId = 'YOUR_ADID_ANDROID';
} else if (this.platform.is('ios')) {
adId = 'YOUR_ADID_IOS';
}
this.admob.prepareInterstitial({adId: adId})
.then(() => { this.admob.showInterstitial(); });
}