-
Notifications
You must be signed in to change notification settings - Fork 338
06. How To Use with Meteor
Raymond Xie edited this page Jun 9, 2015
·
7 revisions
Add plugin: meteor add cordova:cordova-plugin-admobpro
Run the simluator (iOS): meteor run ios
or (Android), meteor run android
Also, make sure that your code is in Meteor.startup(), to ensure that the Cordova plugin is available.
eteor.startup(function () {
if (Meteor.isCordova) {
if (AdMob) {
AdMob.createBanner( {
adId: 'ca-app-pub-xxx/xxx',
position: AdMob.AD_POSITION.BOTTOM_CENTER,
isTesting: true,
autoShow: true,
success: function() {
console.log("Received ad");
},
error: function() {
console.log("No ad received");
}
});
} else {
console.log("No Admob");
}
} else {
console.log("No Cordova ");
}
}