cordova-plugin-admob-free
cordova-plugin-admob-free copied to clipboard
interstitial.show() - ERROR: interstitial not ready yet.
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"
};
same problem here in ionic 3
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!!!
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)
);