如何在xdk中集成Admob



我使用了下面的链接,并且在设备上总是收到此错误admob插件未就绪

[https://github.com/floatinghotpot/cordova-plugin-admob][https://software.intel.com/en-us/html5/articles/adding-google-play-services-to-your-cordova-application]

我该怎么办?请帮帮我。

提前谢谢。

您正在等待deviceready启动广告吗?(请参阅此处的答案:https://stackoverflow.com/a/26214464/4025963):

document.addEventListener("deviceready", onDeviceReady, false);
function onDeviceReady() {
  document.removeEventListener("deviceready", onDeviceReady, false);
  if (admob) {
     // YOUR ADMOB KEY HERE
    admob.createBannerView({publisherId: 'ca-app-pub-xxx/xxx'});
    admob.requestInterstitialAd({interstitialAdId: 'ca-app-pub-xxx/xxx', autoShowInterstitial: true});
  }
}

我正在使用这个插件:https://github.com/appfeel/admob-google-cordova它对我有效,它还有一个与英特尔XDK集成的例子,我在iPhone中测试过。

最新更新