我使用AdMob广告插件的离子以及与此代码,我表现出间质广告:显示通过AdMob广告在离子插页式广告,每2分钟
function initAd(){
// it will display smart banner at top center, using the default options
if(AdMob) AdMob.createBanner({
adId: admobid.banner,
bannerId: admobid.banner,
position: AdMob.AD_POSITION.BOTTOM_CENTER,
autoShow: true,
isTesting: false,
success: function() {
console.log('banner created');
},
error: function() {
console.log('failed to create banner');
}
});
window.AdMob.prepareInterstitial({
adId:admobid.interstitial, autoShow:false
});
window.AdMob.showInterstitial();
}
是否有一种方式来显示间质性广告,每2分钟?有人告诉我添加这个:setInterval(showInterstitial,1*60*1000)
,但我不知道在哪里添加?
提供的答案是否可以帮助您解决问题? – Nikola
您正在使用哪个Admob插件? – Paul