【发布时间】:2019-02-08 02:21:24
【问题描述】:
当我尝试使用此代码在我的设备中运行我的应用程序时:
ionic cordova build android
它生成了一个 APK 并安装在我的设备中。当我使用此代码构建时,广告有效:
showAd() {
const bannerConfig: AdMobFreeBannerConfig = {
isTesting: true,
autoShow: true
};
this.admobFree.banner.config(bannerConfig);
this.admobFree.banner.prepare()
.then(() => {
// banner Ad is ready
// if we set autoShow to false, then we will need to call the show method here
})
.catch(e => console.log(e));
}
当我使用其他代码构建时,广告不显示:
showAd() {
const bannerConfig: AdMobFreeBannerConfig = {
id: 'MY-ID-FROM-ADMOB',
isTesting: false,
autoShow: true
};
this.admobFree.banner.config(bannerConfig);
this.admobFree.banner.prepare()
.then(() => {
// banner Ad is ready
// if we set autoShow to false, then we will need to call the show method here
})
.catch(e => console.log(e));
}
请有人帮帮我...
对不起,如果我写错了,我的英文不太好......
【问题讨论】:
标签: ionic-framework ionic3 admob cordova-plugins