Search docs/

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?

If you're building a serious project, you can't afford to spend hours troubleshooting. Ionic's experts offer official maintenance, support, and integration help.

Contact Us Today!

Installation

ionic cordova plugin add cordova-plugin-admobpronpm install @ionic-native/admob-pro
Ionic Native Enterprise comes with fully supported and maintained plugins from the Ionic Team. Learn More or if you're interested in an enterprise version of this plugin Contact Us

Supported Platforms

  • Android
  • iOS
  • Windows Phone 8

Usage

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