- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
i tried to integrate admob in my app but the app is not showing ads this is the code....
var admobid = {};
if( /(android)/i.test(navigator.userAgent) ) {
admobid = { // for Android
banner: 'ca-app-pub-xxxxxxxxxxx/xxxxxxxxxx',
};
} else if(/(ipod|iphone|ipad)/i.test(navigator.userAgent)) {
admobid = { // for iOS
banner: 'your iOS admob ad unit id'
};
} else {
admobid = { // for Windows Phone
banner: 'your windows phone admob ad unit id'
};
}
//
function initApp() {
if (AdMob) {
AdMob.createBanner({
adId : admobid.banner,
position : AdMob.AD_POSITION.BOTTOM_CENTER,
autoShow : true
});
}
}
- Tags:
- HTML5
- Intel® XDK
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sorry, but we are not experts on the many hundreds of third-party plugins that are available for use with Cordova apps. I recommend you check for some example code in the respective AdMob repo or check Stack Overflow for posts by other Cordova (aka PhoneGap) developers who have also experienced issues with the AdMob plugin you are using (there are many such plugins out there). For example, searching SO for something like "admob plugin cordova phonegap" should give you a good list of issues to check.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page