【发布时间】:2022-07-14 11:20:56
【问题描述】:
我正在尝试在调用我的函数时显示奖励广告(使用 admob)。我也尝试过使用 Interstitial,但没有显示任何内容。我正在使用谷歌测试广告和 ID
let rewarded;
document.addEventListener('deviceready', async () => {
await admob.start().then(() => {
console.log('AdMob started.');
}).catch(e => console.log(e));
rewarded = new admob.RewardedAd({
adUnitId: 'ca-app-pub-3940256099942544/5224354917'
});
}, false)
function Reward() {
rewarded.on('load', (evt) => {
await rewarded.load();
})
rewarded.load()
rewarded.show()
}
我尝试了很多修改,但仍然没有显示广告。也许问题是我需要 config.xml 文件中的某些内容 请帮忙
【问题讨论】:
标签: javascript admob cordova-admob