Working AdMob Tutorial

I am not able to get the AdMob Pro plugin of ngCordova to work in my actual device. If any one has it working, please share the steps to do.

The plugin does not gets installed properly and even if it does after couple of time, the ads are not showing up.

The official docs are not clear in ngCordova.

Kindly do the needful.

which plugin are you using, a view steps to check.

  1. have you added the plugin before or after you added the platform
    if before remove platform and re-add
    2 Use the correct plugin with the correct tutorial.

I have found the following plugin working for me

the tutorial is pretty clear on there github or look in the example code they have in the project.

good luck.

Do I need to follow the steps mentioned in the GitHub wiki? If so what does ngCordova offers extra than the github version?

Is there any reason ngCordova maintains a version for this plugin?

my understanding is that ngCordova is just a wrapper for those plugins and does not maintain a version of it.

Therefore follow the github wiki and you should be good to go.

As the plugins change over time the github is maintain more promptly then the ngCordova

Thanks for your response.

As per my understanding, ngCordova provides wrapper to make the usage of plugin very easy. But it lacks documents now.

Will try again as per the wiki and will update here.

Thanks again.

I have got the AdMob plugin https://github.com/floatinghotpot/cordova-admob-pro working with a non-ngCordova implementation. However, I don’t think it has been fully implemented and definitely not documented yet in ngCordova. I commented on this a while ago https://github.com/driftyco/ng-cordova/issues/360 but it still looks like it hasn’t been updated…

@pbernasconi - Many thanks for the great work on ngCordova so far! Do you guys plan on updating this to use the https://github.com/floatinghotpot/cordova-admob-pro version of the plugin and also adding some docs?

The guys has done a real good job on bringing the ngCordova.

But it needs to be documented so that their work actually gets benefited. Another example is for AppRate where some documentation would be helpful for beginers like me.

I am still working on my first Ionic app coming from legacy Mainframe COBOL environment. I can help on documenting the process once I can get them work.

Wrapping the code inside deviceready, ads started to show using SMART_BANNER

document.addEventListener(“deviceready”, function() {
}

Here is another good tutorial: https://github.com/appfeel/admob-google-cordova/wiki/Angular.js,-Ionic-apps

Any chance anyone can share some code with me to show me how to get the admob-pro plugin up and running in ionic?

install the admob pro plugin add ngcordova as dependancy and add this code to your platform ready

if(admob){
// Set AdMobAds options:
var admob_key = device.platform == “Android” ? “key1” : "key2 ";
var admob_key_inter = device.platform == “Android” ? "key1 ":“key2”;
admob.setOptions({
publisherId: admob_key,
interstitialAdId: admob_key_inter,
adSize: tappx.AD_SIZE.BANNER,
bannerAtTop: false,
overlap: false,
offsetStatusBar: false,
isTesting: false,
autoShowBanner: true,
autoShowInterstitial: true
});

let me know if u get it working or not this my code

Any news on this? I cant get it done.

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 a lot.