Jump to content
Fórum Script Brasil
  • 0

Código AdMob


jonibrod
 Share

Question

Pessoal criei uma conta nessa fórum para saber se algum pode me ajudar nesse codigo o que tem de errado nele segue apaixo


<script src"cordova.js"></script>

<script type="text/javascript">
var onDeviceReady=function(){
navigator.splashscreen.hide();
initiAdMob();
showAdMobInterestitial();
showAdMobBanner();
};

document.addEventListener("deviceready",onDeviceReady,false);

function initAdMob(){
if(window.plugins && window.plugins.AdMob){
var admob_key_banner = "xxxxxxxxxxxx";
var admob_key_interstitial = "xxxxxxxx";
window.plugins.AdMob.setOptions({
publisherId: admob_key_banner,
bannerAtTop: true, //set to true put banner at top
overlap: false, //set to true, to allow banner overlap webview
offsetTopBar: true,//set to true to avoid ios? stutus bar overlap
intertitialAdid: admob_key_intertitial,
autoShow: true, //autoshouw intertitial ad
isTesting: false // receiving test ad
});
}else{
    
    alert("AdMob plugins not ready");
    
}
}
function showAdMobBanner(){
    
    window.plugins.AdMob.createBannerView();
    
}
function showAdMobInterestitial(){
    
    window.plugins.AdMob.createInterestitialView();
}
</script>
<script type="application/javascript" src"admob/admob.js"></script>
[code/]

Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Forum Statistics

    • Total Topics
      149.6k
    • Total Posts
      646.2k
×
×
  • Create New...