Ionic 3 AdMob Free: Banner Size Configuration

Viewed 1537

I’ve used AdMob Free Plugin in an Ionic 3 project. I’ve a problem with banner size. I tried to show it Large banner, but phone is still showing the small banner(320x50).

here is my func;

public funcBottomBanner(){

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

    this.admobFree.banner.config(bottomBannerConfig)

    this.admobFree.banner.prepare().then(() => {
        this.admobFree.banner.show();
    })
    .catch(e => console.log(e)); 
}

by the way, this Id is a test Id which given by google here; googleBanner. What I miss?

1 Answers

Just replace your

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

to

let interstitialConfig: AdMobFreeInterstitialConfig = {
        id: 'ca-app-pub-3940256099942544/6300978111',
        isTesting: true, // Remove in production
        autoShow: true

 };

And Create your Interstitial Ad in Admob Dashboard ! And paste its Ad Id in the above config.

Related