merbin2012 / cordova-plugin-codeplay-facebookads-free

Free facebook audience network ads for cordova user. This supports banner ads, Interstitial ads and video ads.
23 stars 9 forks source link

Already banner is showing #28

Closed diaxotora closed 2 years ago

diaxotora commented 2 years ago

Hello, My code contains a banner and an interstitial called at the very start of the application, i.e. at the start of the onDeviceReady function, This is what my code looks like : cordova.plugins.codeplayfacebookads.loadAndShowBannerAds({ bannerid:"xxxx", isTesting:false }, e => { console.log(e); if(e == "AdImpression") { cordova.plugins.codeplayfacebookads.loadInterstitialAds({ interstitialid:"xxxx", isTesting:false }, e => { console.log(e); if(e == "AdLoaded") { cordova.plugins.codeplayfacebookads.showInterstitialAds(e => { console.log(e); }, res => { console.log(res); }); } }, res => { console.log(res); }); } }, res => { console.log(res); }); The problem is that when I run my application sometimes both ads work and sometimes both ads do not work or one of the two at least and I have the following error in the console: Already banner is showing thank you in advance for your help

diaxotora commented 2 years ago

OK I solved the problem, it was enough to call the destroy method before exiting the application, thanks