ratson / cordova-plugin-admob-free

New development has been moved to "admob-plus-cordova", https://github.com/admob-plus/admob-plus/tree/master/packages/cordova
https://github.com/admob-plus/admob-plus
MIT License
495 stars 211 forks source link

Interstitial not worked For live ad And for Test ad addEventListener triggered multiple times. #305

Open ConcaveIT opened 6 years ago

ConcaveIT commented 6 years ago

showInterstitialAds(){ const interstitialConfig: AdMobFreeInterstitialConfig = { id: 'ca-app-pub-6876559383946731/8334659242', isTesting: false, autoShow: true }; this.admobFree.interstitial.config(interstitialConfig);

    this.admobFree.interstitial.prepare()
    .then(() => {
        document.addEventListener('admob.interstitial.events.EXIT_APP', (event) => {
            console.log('clicked');
          });
    })
    .catch(e => console.log(e));    
}
yacinknn commented 6 years ago

same problem but with banner only

ConcaveIT commented 6 years ago

@Yacinknn, i did not found any proper solution But you solve this by create a variable false outside eventListener and inside make it true. That will work.