Community
cancel
Showing results for 
Search instead for 
Did you mean: 
wahdat_k_
Beginner
48 Views

app not showing admob ads

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 (2)
0 Kudos
1 Reply
PaulF_IntelCorp
Employee
48 Views

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.

Reply