Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IONIC 3 - Admob Free not displaying Ads when testing is false

I have a problem with Ionic 3 when trying to display ads with Admob Free plugin. My Ads will only show in test mode (isTesting: true). If I set it to false or comment the line, no Ads ...

This is my code:

showBannerAd(){    
    const bannerConfig: AdMobFreeBannerConfig = {
      id:'BANNER-ID',
      autoShow: true,
      isTesting: false
    }
    this.adMob.banner.config(bannerConfig);
    this.adMob.banner.prepare().then(()=>{      
      //this.adMob.banner.show();
    }).catch(err => console.log(err));         
  }

If I uncomment the line this.adMob.banner.show() to force the ads, only a black unit appears.

I thought it could be related to my project, so I even started a blank project and the results were the same.

Has anyone fixed before? Thanks!!!

like image 670
C. Tavares Avatar asked Feb 14 '18 22:02

C. Tavares


People also ask

Why is my AdMob account not showing ads?

Ads won't show if you haven't integrated the Google Mobile Ads SDK correctly. Is your ad implementation code working properly? Test your implementation code to check that ads can show. You can also use ad inspector to test your app's ad serving.

How long does it take for AdMob to show ads?

How long does it take for ads to begin appearing after the first ad request? When apps are newly registered with AdMob, it typically takes up to an hour and a few ad requests to allow inventory to build. Because of this, you may not see live impressions immediately. Note: In some cases, it may take longer than an hour.


1 Answers

Finally I solved this issue!

Since my code seemed to be right, as the test Ads were working, I went back to my Admob account and found out that I had missing payment info.

As soon as I added my address on the payment page, my live Ads started being served.

I have tested my app on Android (emulator and device) and IOS (emulator only) and the Live Ads are being served with no problem on both.

App with loaded Ads

like image 169
C. Tavares Avatar answered Oct 01 '22 00:10

C. Tavares