Closed gregstein closed 8 years ago
by the way is this javascript code that should be used ?:
var bannerAdUnit = "ca-app-pub-4906074177432504/9172302471";
var fullScreenAdUnit = "ca-app-pub-4906074177432504/7555968477";
var isOverlap = true; //true: overlap, false: split
var isTest = false;
/*
var bannerAdUnit;
var fullScreenAdUnit;
var isOverlap = true; //true: overlap, false: split
var isTest = true;
//android
if (navigator.userAgent.match(/Android/i)) {
bannerAdUnit = "ca-app-pub-4906074177432504/9172302471";
fullScreenAdUnit = "ca-app-pub-4906074177432504/1649035673";
}
//ios
else if (navigator.userAgent.match(/iPhone/i) || navigator.userAgent.match(/iPad/i)) {
bannerAdUnit = "ca-app-pub-4906074177432504/4602502071";
fullScreenAdUnit = "ca-app-pub-4906074177432504/7555968477";
}
//wp8
else if( navigator.userAgent.match(/Windows Phone/i) ) {
bannerAdUnit = "ca-app-pub-4906074177432504/4462901274";
fullScreenAdUnit = "ca-app-pub-4906074177432504/5939634477";
}
*/
document.addEventListener("deviceready", function(){
window.admob.setUp(bannerAdUnit, fullScreenAdUnit, isOverlap, isTest);
//banner ad callback
window.admob.showBannerAd('bottom-center', 'SMART_BANNER');
}, false);
/*
position: 'top-left', 'top-center', 'top-right', 'left', 'center', 'right', 'bottom-left', 'bottom-center', 'bottom-right'
size: 'BANNER' (320x50, Phones and Tablets)
'LARGE_BANNER' (320x100, Phones and Tablets)
'MEDIUM_RECTANGLE' (300x250, Phones and Tablets)
'FULL_BANNER' (468x60, Tablets)
'LEADERBOARD' (728x90, Tablets)
'SKYSCRAPER' (120x600, Tablets, ipad only)
'SMART_BANNER' (Auto size, Phones and Tablets, recommended)
*/
Please anyone ?
oh snap!! I was using wrong code.
Thank you <3
Hi again,
ads do not display unless I visit a website from the app and then go back , only then the ads start showing up. Any idea why ?
Thank you,