4
I created an application with Ionic version: 3.20.1
and set up with admobfree:
cordova plugin add cordova-plugin-admob-free --save --variable ADMOB_APP_ID="ca-app-pub-XXXXXXXXXXXXXXXX/XXXXXXXXXX"
ionic cordova plugin add cordova-plugin-admob-free --save --variable ADMOB_APP_ID="ca-app-pub-XXXXXXXXXXXXXXXX/XXXXXXXXXX"
It is already included in config.xml
<plugin name="cordova-plugin-admob-free" spec="0.25.0">
<variable name="ADMOB_APP_ID" value="ca-app-pub-XXXXXXXXXXXXXXXX/XXXXXXXXXX" />
</plugin>
And on my TS are all settings requested:
import { Component } from '@angular/core';
import { NavController, Platform } from 'ionic-angular';
import { BarcodeScanner, BarcodeScannerOptions, BarcodeScanResult } from '@ionic-native/barcode-scanner';
import { ScanResultPage } from '../scan-result/scan-result';
import { AdMobFree, AdMobFreeBannerConfig } from '@ionic-native/admob-free';
@Component({
selector: 'page-home',
templateUrl: 'home.html'
})
export class HomePage {
constructor(
private platform:Platform,
public navCtrl: NavController,
private barcodeScanner: BarcodeScanner,
private admobFree: AdMobFree) {
let bannerConfig: AdMobFreeBannerConfig = {
autoShow: true,
id : 'ca-app-pub-XXXXXXXXXXXXXXXX/XXXXXXXXXX'
};
this.admobFree.banner.config(bannerConfig);
this.admobFree.banner.prepare().then(() => {
}).catch(e => alert(e));
}
The ad comes out, but it’s just showing the test ad:
Does anyone know how I can proceed ?
Newsletter Previousnews03/02/2019
I tried to see with this plugin too, more unsuccessfully: Using Admob With Ionic Framework
tested with
isTesting: false
?– HudsonPH
Yes, without a doubt
– Chefe Druida