AdMob Cordova Plugin, provides a way to request AdMob ads natively from JavaScript.
- Android, using Google Play Service for Android, r19
- iOS, using AdMob SDK for iOS, v6.12.2
- Windows Phone, using AdMob SDK for Windows Phone 8, v6.5.13
To install this plugin, follow the Command-line Interface Guide.
cordova plugin add com.rjfun.cordova.plugin.admob
Note: ensure you have a proper AdMob account and create an Id for your app.
APIs:
setOptions(options, success, fail);
createBannerView(options, success, fail);
requestAd(options, success, fail); // optional, will be absolete
showAd(true/false, success, fail);
destroyBannerView();
createInterstitialView(options, success, fail);
requestInterstitialAd(options, success, fail); // optional, will be absolete
showInterstitialAd();
Check the [test/index.html] (https://github.com/floatinghotpot/cordova-plugin-admob/blob/master/test/index.html).
See the working example code in demo under test folder, and here are some screenshots.
iPhone:
This plugin is mainly maintained by Raymond Xie, and also thanks to following contributors:
- @jumin-zhu, added interstitial support for Android.
- @fersingb, added interstitial support for iOS.
- @AlexB71, improved WP8 support.
- @ihshim523, added initial WP8 support.
- And, bugfix patches from @chrisschaub, @jmelvin, @mbektchiev, @grahamkennery, @bastaware, @EddyVerbruggen, @codebykevin, @codebykevin, @zahhak.
You can use this plugin for FREE. To support the project, donation is welcome.
- Donate via PayPal to rjfun.mobile@gmail.com
- Keep the 2% Ad traffic sharing code.
Forking and improving is welcome. Please ADD VALUE, instead of changing the name only.
Totally re-designed AdMob PluginPro is more recommended.
Highlights:
- Easy-to-use: Display Ad with single line of javascript code.
- Powerful: Support banner, interstitial, and video Ad.
- Max revenue: Support mediation with up to 8 leading mobile Ad services.
- Multi-size: Multiple banner size, also support custom size.
- Flexible: Fixed and overlapped mode, put banner at any position with overlap mode.
- Smart: Auto fit on orientation change.
- Same API: Exactly same API with other Ad plugins, easy to switch from one Ad service to another.
- Up to date: Latest SDK and Android Google play services.
- Good support: Actively maintained, prompt response.
Platforms supported:
- Android
- iOS
- Windows Phone
Tested with:
- Apache Cordova CLI, v3.0+
- Intel XDK, r1095+
- IBM Worklight, v6.2+
- Google Mobile Chrome App, v0.5.0+
- Adobe PhoneGap Build, since 2014.12.9
Mediation with:
- AdMob
- DFP (DoubleClick for Publisher)
- Facebook Audience Network
- Flurry
- iAd
- InMobi
- Millennial Media
- MobFox
News:
- Recommended by Telerik in Verified Plugins Marketplace. read more ...
- Recommended by William SerGio in code project (20 Jun 2014), read more ...
- Recommended by Arne in Scirra Game Dev Forum (07 Aug, 2014), read more ...
- Recommended by Intel XDK team (08/22/2014), read more ...
Ad PluginPro series for the world leading Mobile Ad services:
- GoogleAds PluginPro, for Google AdMob/DoubleClick.
- iAd PluginPro, for Apple iAd.
- FacebookAds PluginPro, for Facebook Audience Network.
- FlurryAds PluginPro, for Flurry Ads.
- mMedia PluginPro, for Millennial Meida.
- MobFox PluginPro, for MobFox.
- MoPub PluginPro, for MoPub.
All Ad plugins implemented with exactly same API, so very easy to switch from one Ad service to another.
More Cordova/PhoneGap plugins by Raymond Xie, find them in plugin registry.
Customization, project outsourcing and consulting service is also available. Please contact us if you have the business needs.