Skip to content

AdMob Plugin for Cordova/PhoneGap, support Android, iOS and Windows Phone. Monetize your Cordova apps/games.

License

Notifications You must be signed in to change notification settings

z1ad/cordova-plugin-admob

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cordova-plugin-admob

AdMob Cordova Plugin, provides a way to request AdMob ads natively from JavaScript.

Platform SDK supported

  • 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

How to use?

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.

Javascript API

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();

Example code

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.

Screenshots (banner Ad / interstitial Ad)

iPhone:

ScreenShot

Credits

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.

Forking and improving is welcome. Please ADD VALUE, instead of changing the name only.

AdMob PluginPro

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

See Also

Ad PluginPro series for the world leading Mobile Ad services:

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.

About

AdMob Plugin for Cordova/PhoneGap, support Android, iOS and Windows Phone. Monetize your Cordova apps/games.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 38.4%
  • Java 26.2%
  • Objective-C 22.9%
  • JavaScript 7.8%
  • HTML 4.7%