Ionic with admob-free advertising displays only "Nice Job"

Asked

Viewed 221 times

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:

inserir a descrição da imagem aqui

inserir a descrição da imagem aqui

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 ?

  • Yes, without a doubt

1 answer

1

Probably Voce is using a id of tests, to make it work you need to create an account. After creating the account use the ID created on it. This will enable you to customize which ads should be displayed and show real ads.

Change your appid inside config.xml, but it might take a while to work, probably a day or more to start showing ads.

Source: @soEn

  • Actually I already have the account created and the ad as well. Is the Id is already production, even was in the part of admob linking the ad to the App on Google play

  • Try to delete the comments to not turn a forum, say "running" in relation to which command Voce is running to open Ionic? Ionic run? or using the release to release the app?

  • https://stackoverflow.com/questions/29489287/admob-only-sends-test-ad-not-real-ads?rq=1 here on not running in simulators or debug

  • I understood, then, both running the run with livereload , both as a release and even after hosted in the store and downloaded the App from the same thing, I will look at the link sent. Thank you

Browser other questions tagged

You are not signed in. Login or sign up in order to post.