Admob integration for phonegap doesn't show the advertise

橙三吉。 提交于 2019-12-25 03:37:28

问题


I'm experimenting with the Admob plugin for Phonegap but it is complex. I have this code but it doesn't show the advertise and I really don't know why.. Can you guys see something wrong in the code? Yes I imported the plugin.

http://pastebin.com/zbEs6D7H


回答1:


If you are using this plugin: https://github.com/appfeel/admob-google-cordova (cordova plugin add com.admob.google) you should wrap your code with deviceready event:

function configAds() {
  var enabledAdMob = true; // easily enable/disable AdMob
  ...
}
document.addEventListener("deviceready", configAds, false);

See complete phonegap example here: https://github.com/appfeel/admob-google-demo



来源:https://stackoverflow.com/questions/30469049/admob-integration-for-phonegap-doesnt-show-the-advertise

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!