Home Manual Reference Source

Cordova AdMob Plugin

A free, no ad-sharing version of Google AdMob plugin for Cordova.

Status

I have been asking the interest about funding this project a while, got some encouraging feedback, finally have setup a funding page.

I am actively developing admob-plus for the last few weeks, it is usable for most cases, please try it out and give feedback.

While my focus is admob-plus, I will keep maintaining cordova-plugin-admob-free until all exisiting features are available with the new plugin.

If you are earning more than USD$200 monthly from using this plugin, please consider funding my work.

Features

Compare to other projects

Project No Ad-Sharing Fully Open Sourced No Remote Control
admob Not Sure Not Sure
cordova-admob
cordova-plugin-ad-admob
cordova-plugin-admob-free
cordova-plugin-admob-simple
cordova-plugin-admobpro

Click ❌ to see the detail.

NOTE(2018-03-17): cordova-plugin-admobpro is using cordova-plugin-extension for its compiled code, the author removed the repository casusing the above broken links. For those interested could download the npm tarball for investigation.

Installation

cordova plugin add cordova-plugin-admob-free --save

Note that cordova plugin add [GIT_URL] is not supported.

Usage

1. Create Ad Unit ID for your banner and interstitial.

Go to the AdMob portal and add your app (if you haven't done so already), once your app is added to your AdMob account, create a new ad unit for it.

2. Display advertisements

Banner Ad

Interstitial Ad

Reward Video Ad

3. Profit

If you find this plugin useful, please star it on Github.

Screenshots

Android Banner Android Interstitial
ScreenShot ScreenShot
iOS Banner iOS Interstitial
ScreenShot ScreenShot

API

See documentation page.

Customize Google Play Services versions (Android only)

The default PLAY_SERVICES_VERSION is set to 11.0.4. If you need a different version, edit config.xml with following,

<plugin name="cordova-admob-sdk" spec="~0.13.1">
    <variable name="PLAY_SERVICES_VERSION" value="11.6.0" />
</plugin>

Note that if you are adding these lines to an existing project, you need to remove both admob-free plugin and android platform and add them back again to affect the version number.

Contributing

You can use this Cordova plugin for free. You can contribute to this project in many ways:

Help with documentation is always appreciated and can be done via pull requests.

Read Contributing Guide to learn how to contribute.

Ionic Support

While the Ionic community have provided an Ionic Native Plugin, plugin users need more examples and tutorials.

As I (@ratson) don't use Ionic myself, it would be great if some experienced Ionic developers could help answering questions or come up with more examples. HELP WANTED HERE.

Credits

Thanks for the cordova-plugin-admob-simple author for forking the original project cordova-plugin-admob to make it functional and open source it.

Screenshots are copied from cordova-admob-pro.

Disclaimer

This is NOT an official Google product. It is just a community-driven project, which use the Google AdMob SDKs.

License

MIT