Admob banner ad (even the test ones) not visible in Ionic 4 Android app

I am trying to integrate Admob ads with my Ionic 4 (Angular) Android app. So, I installed the plugin by executing the following commands.

cordova plugin add cordova-plugin-admob-free --save --variable ADMOB_APP_ID=<..MY APP ID HERE...>
npm install @ionic-native/admob-free --save

After that, I put the AdmobFree service in the app.module and put the below things in the app.component.ts

 initializeApp() {
    this.platform.ready().then(() => {
      this.statusBar.styleLightContent();
      this.statusBar.backgroundColorByHexString('#4d4d4d');
      this.splashScreen.hide();
    });

    const bannerConfig: AdMobFreeBannerConfig = {
      isTesting: true,
      autoShow: true
    };
    this.admobFree.banner.config(bannerConfig);

    this.admobFree.banner.prepare()
      .then(() => {
      })
      .catch(e => console.log(e));
  }

Then I built the app following Ionic’s documentation. However, the test banner app is not appearing at all in the mobile device. What is possibly going wrong?

As you can see in the Description of the Plugin you use here, the owner created a newer still maintained AdMob Plugin: https://github.com/admob-plus/admob-plus.

Please try this, i’m integrating it at the Moment and it works so far.

Are there any tutorials? Like, should the methods be the same?

Documentation is here: https://admob-plus.github.io

When I am trying to import Admob like this:

import { AdMob } from "@ionic-native/admob-plus";

I am getting this because of the constructor parameter:

'AdMob' refers to a value, but is being used as a type here.ts(2749)

Should I just use typeof before the constructor parameter?

Also, when I am trying to add “AdMob” to the providers in app.module, I am getting:

Type 'AdMobOriginal' is not assignable to type 'Provider'.
  Type 'AdMobOriginal' is missing the following properties from type 'any[]': length, pop, push, concat, and 26 more.

But, what is the problem if I use Admob Free? I remember using it on an app in January to try it out and it worked fine. Same .apk I installed today and the test ad is not even coming (I don’t know about production one).

I wrote an articule in medium, it may help you with your integration.

Going through it. Thank you!

I don’t know. I only see that both Plugins are from the same Developer, who said using ** admob-plus** is preferred. The latest Commit to the Free was May 2019 and the latest to plus was 9 days ago, so it is better maintained.

Thanks to both of you for taking the time to reply. My problem was happening because of some plugin corruption I guess. Once I created the new project and installed Admob Free, it worked as expected.

I have a small question. I removed the “isTesting” property and added my banner-ad id. Now, after I built the apk, I installed it on my phone (not yet uploaded to the play store) and it still shows a test ad. Is this normal behaviour until I put it on the Play Store?

There are some small points that we need to check only than the plugin will work nicely. You can check this link http://ionicwhiz.in/ionic/ionic4-admob-tutorial/. This is working fine

You need to add /ngx to it, when you import the package in your comment