Best way to integrate AdMob . Any chance?

  • 1
  • Question
  • Updated 6 years ago
  • Answered
I need to integrate admob without install eclipse and that.

Any way?
Photo of Miguel Beltran Sanz

Miguel Beltran Sanz

  • 2 Posts
  • 0 Reply Likes

Posted 7 years ago

  • 1
Photo of Amir

Amir

  • 8261 Posts
  • 263 Reply Likes
Hello

App compiled with Build currently couldn't work correctly with Admob or other ad platform which requires SDKs or additional plugins.

Thanks.
Photo of Miquel

Miquel

  • 16 Posts
  • 21 Reply Likes
From today it's possible as described in this post.

To enable Admob ads, place the following tag in your `config.xml` file:


<gap:plugin name="com.admob.google" source="plugins.cordova.io" />


You can test the phonegap admob demo app here
Photo of Liming Xie

Liming Xie

  • 23 Posts
  • 6 Reply Likes
Thanks to PhoneGap Build team for making big changes to the policy, and allow all plugins in Cordova plugin registry can be used.

After 1 year, the long waited AdMob plugin can be used by PhoneGap Build users, by simply configuring it in config.xml:

The javascript call is quite simple, as the purpose of the plugin is: # Show Mobile Ad with single line of javascript code #

if(AdMob) AdMob.createBanner( {
adId:"ca-app-pub-xxx/kkk", // your admob ad unit id
position:AdMob.AD_POSITION.TOP_CENTER,
autoShow:true} );

For more instructions or example code, just go to the github homepage of the plugin project:
https://github.com/floatinghotpot/cor...

Besides AdMob, there are several other options:
http://plugins.cordova.io/#/search?se...

They are:
* Facebook AudienceNetwork
* Flurry Ads from Yahoo
* iAd
* MobFox
* MoPub
* MillennialMedia

All with exactly same API interface with the AdMob plugin.

Thanks again to PGB team for the amazing work!