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

admob.interstitial.prepare() automatically showing ad. It didn't wait for show().

Open designskiller opened this issue 6 years ago • 4 comments

Hi,

I am using this plugin in Ionic 3. Everything works fines Ads are visible instead of I want to preload interstitial ad and I am using admob.interstitial.prepare() for that but this automaticaly showing ads it didn't wait for my action where I want to show add using admob.interstitial.show().

below is my code

launchInterstitial() { let interstitialConfig: AdMobFreeInterstitialConfig = { isTesting: true, // Remove in production id: 'xxx xxxxx xxxx xxxxx' } this.admob.interstitial.config(interstitialConfig); return this.admob.interstitial.prepare(); } how do I stop ad after prepare and show when I need to show.

designskiller avatar Dec 04 '18 11:12 designskiller

AdMobFreeInterstitialConfig has an "autoShow" configuration. Set that to false.

rbrand21 avatar Dec 09 '18 21:12 rbrand21

I did that. I set "autoShow" false but it didn't do any effect still getting ad on prepare

designskiller avatar Dec 13 '18 05:12 designskiller

Same problem here. isTesting works but not autoShow. The weird thing is that it was working then stopped.

harryt2 avatar Nov 05 '19 15:11 harryt2

Same problem here. isTesting works but not autoShow. The weird thing is that it was working then stopped.

In my case I was modifying the interstitialConfig but I forgot to put the right attribute. So it was my code and not the plugin.

harryt2 avatar Nov 05 '19 15:11 harryt2