AdmobFree is not working

#1

hey, i am trying to use admobfree plugin but it is not working at all and showing error.

import { AdMobFree, AdMobFreeBannerConfig } from '@ionic-native/admob-free/ngx';

  constructor(
    public navCtrl: NavController, 
    public navParams: NavParams, 
    private admobFree: AdMobFree
  ) {
    const bannerConfig: AdMobFreeBannerConfig = {
        // add your config here
        // for the sake of this example we will just use the test config
        isTesting: true,
        autoShow: true
      };
       this.admobFree.banner.config(bannerConfig);
      
       this.admobFree.banner.prepare()
         .then(() => {
           // banner Ad is ready
           // if we set autoShow to false, then we will need to call the show method here
        })
        .catch(e => console.log(e));
  }

I just tried the same example given in documentation but i am getting this error

TypeError: Object(…) is not a function

Ionic:

ionic (Ionic CLI) : 4.1.2 (C:\Users\mathewkutty\AppData\Roaming\npm\node_modules\ionic)
Ionic Framework : ionic-angular 3.9.2
@ionic/app-scripts : 3.2.1

Cordova:

cordova (Cordova CLI) : 8.0.0
Cordova Platforms : android 7.0.0
Cordova Plugins : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 2.3.1, (and 5 other plugins)

these are my environment info.

i am using ionic cordova 0.20 version and tried newest versions also

@ionic-native/admob-free”: “^5.0.0”,
“cordova-plugin-admob-free”: “^0.20.0”,

any got this error.please help.

#2

Use Lower Version of this plugin.!

#3

can you tell me which is the stable version lower then 5.0.0