我使用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