第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機(jī)立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

Cordova admobpro廣告未在Android設(shè)備上展示

Cordova admobpro廣告未在Android設(shè)備上展示

Qyouu 2021-04-05 12:15:44
我試圖將AdMob廣告放到我的離子android應(yīng)用中,并測試其功能,我制作了一個名為AdMobTest的離子應(yīng)用。我使用的插件是cordova-admob-pro插件。這是我的AdMob代碼:var admobid = {};if (/(android)/i.test(navigator.userAgent)) { //Android  admobid = {    banner : 'ca-app-pub-2586564966169402/9782816366',    interstitial : 'ca-app-pub-2586564966169402/8345912938',    gotHereMsg1 : 'banner and interstitial have the android IDs'  };} else if (/(ipod|iphone|ipad)/i.test(navigator.userAgent)) { //iOS  admobid = {    banner : 'Stand in iOS banner ID',    interstitial: 'stand in iOS interstitial ID',    gotHereMsg1 : 'banner and interstitial have the iOS IDs'  };} else { //Neither  admobid = {    gotHereMsg1 : 'banner and interstitial have no IDs'  }}if (window.AdMob) {  var admob = window.AdMob;  admob.createBanner ({    adId : admobid.banner,    position : admob.AD_POSITION.BOTTOM_CENTER,    isTesting : false, //False for live ; True for production    autoShow : true  });  admob.prepareInterstitial ({    adId : admobid.interstitial,    autoShow : false  });  gotHereMsg2 = "window.AdMob is true";} else {  gotHereMsg2 = "window.AdMob is not true";}//Got an ID and the actual ID'sdocument.getElementById("getIdCheck").innerHTML = admobid.gotHereMsg1;document.getElementById("bannerId").innerHTML = admobid.banner;document.getElementById("interstitialId").innerHTML = admobid.interstitial;//window.AdMob is true and banner is created + interstitial is prepareddocument.getElementById("isWindowAdmob").innerHTML = gotHereMsg2;//Show interstitial function is executed or has not been executeddocument.getElementById("startInterstitial").onclick = function () {為了顯示我在測試中使用“ gotHereMsg”變量所做的工作。所有變量都到達(dá)我希望它們?nèi)サ牡胤?。因此gotHereMsg1具有有關(guān)android ID的消息,并且ID也正確。gotHereMsg2返回“ window.AdMob為true”,這意味著正在執(zhí)行createBanner和prepareInterstitial函數(shù)。最后,當(dāng)我單擊按鈕時,getHereMsg3返回“顯示插頁式功能已執(zhí)行”。即使所有功能都在執(zhí)行中,并且顯然可以識別window.AdMob,也不會顯示任何橫幅。希望這提供了足夠的信息來解決此問題。可能值得注意的是,我正在使用ionicv1,并且代碼已寫入ionic的app.js文件中的$ ionicPlatform.ready函數(shù)下。
查看完整描述

1 回答

  • 1 回答
  • 0 關(guān)注
  • 208 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學(xué)習(xí)伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號