I have integrated Admob's banner into my Ionic 3 app following the guidelines provided in the Ionic documentation at this link.
Below is the code snippet I used for displaying the banner on the homepage:
import { Component } from '@angular/core';
import { NavController } from 'ionic-angular';
import { AdMobFree, AdMobFreeBannerConfig} from '@ionic-native/admob-free';
@Component({
selector: 'page-home',
templateUrl: 'home.html'
})
export class HomePage {
constructor(public navCtrl: NavController, public admob: AdMobFree) {
this.showInterstitialAds();
}
showInterstitialAds() {
const bannerConfig: AdMobFreeBannerConfig = {
id: 'ca-app-pub-id',
isTesting: true,
autoShow: true
};
this.admob.interstitial.config(bannerConfig);
this.admob.interstitial.prepare()
.then(() => {
this.admob.interstitial.show()
})
.catch(e => console.log(e));
}
}
However, despite implementing the code correctly, the banner is not showing up when I run the app. I do not have any adblock extensions installed and have also created an account on Google Admob. Can someone point out what mistake I might be making?