2017-09-26 106 views
2

我在Ionic 3項目中使用了AdMob Free Plugin。我的橫幅廣告尺寸存在問題。 我試圖展示它的大橫幅,但手機仍然顯示小橫幅(320x50)。Ionic 3 AdMob Free:橫幅尺寸配置

這是我的功能;

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)); 
} 

順便說一句,這個ID是一個測試ID,它由谷歌在這裏給出; googleBanner。 我想念什麼?

回答

0

只需更換您的

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

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

}; 

,並創建AdMob的儀表板的插頁式廣告!並將其Ad ID粘貼到上述配置中。

+0

請在您的帖子中添加一些說明。 – ivaigult