cordova-plugin-admob-free icon indicating copy to clipboard operation
cordova-plugin-admob-free copied to clipboard

interstitial.show() - ERROR: interstitial not ready yet.

Open charlyBerthet opened this issue 7 years ago • 3 comments

Hello,

I first call

this.admobFree.interstitial.prepare()
    .then(() => {
      this.interstitialPrepared = true;
      console.log('AdMob Interstitial Ad is prepared, will be presented if autoShow is true, otherwise, call showInterstitial().');
    })
    .catch((err) => {
      console.error(err);
    })

And this.interstitialPrepared = true; is called so I assume my ad is ready.

But if I call this.admobFree.interstitial.show() after my this.interstitialPrepared var switch to true, I still have the following error "ERROR: interstitial not ready yet.".

Notice : It works well with the following config :

this.adMobProvider.interstitialConfig = {
        autoShow: false,
        isTesting : true
};

But not when I want to test with real ads

this.adMobProvider.interstitialConfig = {
        autoShow: false,
        isTesting : false,
        id:"ca-app-pub-277368299xxxxxxxx"
};

charlyBerthet avatar Jan 09 '18 19:01 charlyBerthet

same problem here in ionic 3

Riyaz0001 avatar Jun 11 '18 19:06 Riyaz0001

In my case autoShow: true worked for me. Remember when autoShow is true you don't need to call the interstitial.show() function. Hope it works. Cheers!!!

ahayder avatar Oct 16 '18 15:10 ahayder

Yes, in my case this is working example:

//INTERSTITIAL
this.admobFree.interstitial.config(this.interstitialConfig);
this.admobFree.interstitial.prepare().then(() => {
  console.log('INTERSTIAL LOADED AND SHOWING')
}).catch(e =>
  console.log('ERRORL: ', e)
);

thepianist2 avatar Dec 18 '20 17:12 thepianist2