14

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!!!

C. Tavares
  • 229
  • 3
  • 8

4 Answers4

7

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

C. Tavares
  • 229
  • 3
  • 8
  • I'm sure this had nothing todo with your payment Infos. It's a known behavior, that AdMob Needs its time when displaying no-testing ads for the first time. – felix9607 Feb 26 '18 at 14:34
  • In my case that was the issue. The waiting time would not take months. Also Ads started being served right after the payment info was added on AdMob page. If you look at the payment page , there say that If no address is informed your Ads will not be served. – C. Tavares Feb 27 '18 at 15:38
  • 1
    That's strange, since I added my payment Infos way later and my adds were served. – felix9607 Feb 28 '18 at 09:06
  • Maybe it's a new thing AdMob is requiring to serve ads – C. Tavares Mar 02 '18 at 00:05
1

Bro sorry for not helping you but from 3 days a go i don't know why my ionic doesn't work after installing admob-free this is the error i got while building app :

Dex: Error converting bytecode to dex: Cause: PARSE ERROR: class name (com/google/android/gms/base/R) does not match path (Com/google/android/gms/base/R.class) ...while parsing Com/google/android/gms/base/R.class
x0t0
  • 11
  • 3
0

I have faced this issue and some of the mistakes i did was:

1) I had placed my App-Id as my Ad-Id. You will get the correct Ad-Id when you create an ad instance in Admob

2) I had placed all my ad-configuration in the controller of my component, and what you are supposed to do is to place it in a ionViewDidLoad() method.

Rassamdul
  • 23
  • 4
0

Finally i find the problem

you need to build apk as release apk, not production apk read this https://ionicframework.com/docs/publishing/play-store

i think admob not showing real ads for debuggble apks

nisith
  • 11
  • 3