Quantcast
Channel: Ionic Forum - Latest posts
Viewing all articles
Browse latest Browse all 229111

AdmobFree Banner problem while no internet connection

$
0
0

Hey there,
I have no problem with admobfree Banner while internet connection is OK. But, when there’s no internet connection, admobfree.banner prepare returns Ok. And it tries to load it, bu it can not because, banner has no isReady function like Interstitial. And a black bar is laying down on my page right now.
What should I do? I was thinking about try to check internet conenction with this.network.onDisconnect().subscribe(() => … but it does not seems super cool to me. What should I do? any ideas?

here’s my code;

 ionViewWillEnter(){
 const bottomBannerConfig: AdMobFreeBannerConfig =  {
            id: 'ca-app-pub-3940256099942544/6300978111',
           isTesting: true,
           autoShow: false,
           bannerAtTop: true
       };

 this.admobFree.banner.config(bottomBannerConfig);
        this.admobFree.banner.prepare()
          .then((result) => {
            console.log("preparethen:"+result);
              this.admobFree.banner.show()
                .then((result) => {
                  console.log("showthen:"+result);
                })
                .catch((err) =>  {
                  console.log("showcatch");
               }); 
          })
          .catch((err) =>  {
            console.log("preparecatch");
            this.admobFree.banner.hide();
          }); 

}

Viewing all articles
Browse latest Browse all 229111

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>