Admob not loading ads

I’m having some problems getting ads to work. I can’t rap my brain around why it isn’t working. I have the following plugins installed:

  • com.google.playservices 19.0.0 “Google Play Services for Android”
  • com.rjfun.cordova.plugin.admob 2.1.7 “AdMob”

I’ve have used this tutorial: https://blog.nraboy.com/2014/06/using-admob-ionicframework/

This is my code in the apps.js:

   .run(function ($ionicPlatform) {
    $ionicPlatform.ready(function () {
        // Hide the accessory bar by default (remove this to show the accessory bar above the keyboard
        // for form inputs)
        if (window.cordova && window.cordova.plugins.Keyboard) {
            cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true);
        }
        if (window.StatusBar) {
            StatusBar.styleDefault();
        }

        // select the right Ad Id according to platform
        if (window.plugins && window.plugins.AdMob) {
            var admob_key = "ca-app-pub-xxxxxxxxxxxxxxxx/xxxxxxxxxx";
            var admob = window.plugins.AdMob;
            admob.createBannerView(
                {
                    'publisherId': admob_key,
                    'adSize': admob.AD_SIZE.BANNER,
                    'bannerAtTop': false
                },
                function () {
                    admob.requestAd(
                        {'isTesting': false},
                        function () {
                            admob.showAd(true);
                        },
                        function () {
                            console.log('failed to request ad');
                        }
                    );
                },
                function () {
                    console.log('failed to create banner view');
                }
            );
        }
    });
});

This results in a black banner area at the bottom of the app, however no ad is ever loaded. This code is currently live, on the admob site I can see a couple hundred session. However my impressions and Request rpm are both at zero for a couple of days now. Anybody have any idea what might be wrong?

Anybody? Still can’t get it to work :frowning:

If you are using admobpro by floatinghotspot

follow there example on github
https://github.com/floatinghotpot/cordova-admob-pro.

and depending on your phone you testing on I believe banner will not show up if the screen is smaller then the banner maybe try smart_banner if that works you know where your problem is

Got it fixed, the problem was an incorrect setup in admob.

can you provide screenshots?

In our project AdMob cant be found. Even trying at window.AdMob or cordova.plugins.AdMob or even AdMob. Do you guys have any tip? Thanks in advance.

What kind of wrong setup?
Can explain please…
I am also facing same problem.

Explain please!! Same problem here.