Last active
August 29, 2015 14:28
-
-
Save theblanchard/9c48b9167641e31352e1 to your computer and use it in GitHub Desktop.
Ad Mob Banners In PhoneGap Apps
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$("#contentPage").live("pagebeforehide", function() { | |
AdMob.hideBanner(); | |
}); | |
$("#contentPage").live("pageshow", function() { | |
initApp(); | |
}); | |
function initApp() { | |
if (AdMob) { | |
AdMob.createBanner({ | |
adId : '/ID_NUMBER/AD_NAME', | |
adSize:'CUSTOM', width:300, height:250, | |
position : AdMob.AD_POSITION.BOTTOM_CENTER, | |
isTesting: false, | |
autoShow : true, | |
bgColor: '#000000' | |
}); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment