Reputation: 10139
I have developed cross platform application using Ionic 1 framework,
for the admob I have used cordova-admob-pro
plugin.
https://github.com/floatinghotpot/cordova-admob-pro
For the Interstitial showing, used following code portion. When I open up a page, an Interstitial is displayed for a while. Upto now Every thing is fine.
The problem is when I have attempted second and more times ,Interstitial is not displayed any more until I have killed an application then open it again.
Same problem is seen at both platform Android and IOS.
What should I do?
I have any problem with another banner at the top of the screen, it keeps displayed during application life cycle.
// preppare and load ad resource in background, e.g. at begining of game level
if(AdMob) AdMob.prepareInterstitial( {adId:admobid.interstitial, autoShow:false} );
// show the interstitial later, e.g. at end of game level
if(AdMob) AdMob.showInterstitial();
Upvotes: 0
Views: 548
Reputation: 10139
Each time before you call showInterstitial(), you must call prepareInterstitial() to load ad resource from server, and expect a onAdLoaded event.
In your code, you call showInterstitial() only once when init, which is not enough.
https://github.com/floatinghotpot/cordova-admob-pro/issues/568
Upvotes: 1