Admob ads on android apps made using phonegap build ? Is it possible ?

  • 4
  • Question
  • Updated 6 years ago
I have a publisher id for my admob account and I embedded the following code directly in index.html and uploaded index.html to build.phonegap.com , the resulting apk not showing any ads both on device and emulator .
<!--
<html>
<head>

<script type="text/javascript" src="cordova.js" ></script>
<script type="text/javascript" src="phonegap.js"></script>

</head>
<body>
<script type="text/javascript">
var admob_vars = {
pubid: 'pubid', // publisher id
bgcolor: '000000', // background color (hex)
text: 'FFFFFF', // font-color (hex)
test: true // test mode, set to false if non-test mode
};
</script>
<script type="text/javascript" src="http://mmv.admob.com/static/iphone/ia...>

</body>
</html>
-->
Photo of Bhaskar Rao

Bhaskar Rao

  • 9 Posts
  • 0 Reply Likes

Posted 8 years ago

  • 4
Photo of Andrew Lunny

Andrew Lunny

  • 1911 Posts
  • 199 Reply Likes
Make sure you have the right access tags in your config.xml file:
https://build.phonegap.com/docs/confi...
Photo of Finbar Tracey

Finbar Tracey

  • 2 Posts
  • 0 Reply Likes
Hmm This will not work. Google have stopped the admob service for mobile web and merged it with adsense.

Adsense will not allow you to serve ads to apps only mobile websites.
Photo of Andrew Lunny

Andrew Lunny

  • 1911 Posts
  • 199 Reply Likes
This will probably need a PhoneGap Plugin, then.
Photo of sjstrutt

sjstrutt

  • 3 Posts
  • 0 Reply Likes
Is a Phonegap Build plugin for AdMob in the works?
Photo of Andrew Lunny

Andrew Lunny

  • 1911 Posts
  • 199 Reply Likes
We don't have immediate plans for an AdMob plugin - the next plugins we work on will depend on user demand, so it may indeed be one of them.
Photo of Kenny F

Kenny F

  • 1 Post
  • 0 Reply Likes
I would love to see this (been waiting months for an update).
Photo of Luke Pammant

Luke Pammant

  • 1 Post
  • 0 Reply Likes
I just want to be able to put ads on my free version of my app and it seems impossible to do so with phonegap now :(
Photo of Gerhard Teschl

Gerhard Teschl

  • 25 Posts
  • 0 Reply Likes
have the same problem... want to integrate admob into my phonegap-build app... is there no solution?
Photo of Daniel Iancu

Daniel Iancu

  • 28 Posts
  • 2 Reply Likes
Not exactly an answer but I used inner-active's AdTag which does work with build.phonegap
Photo of Gerhard Teschl

Gerhard Teschl

  • 25 Posts
  • 0 Reply Likes
hi daniel!

thx! can u descripe your "workaround" a little bit closer?

best regards
Photo of Daniel Iancu

Daniel Iancu

  • 28 Posts
  • 2 Reply Likes
Basicaly if you decide to use inneractive, do this:

First, register at inner-active.com . Once granted access to your very own inneractive dashboard, go ahead and download AdTag SDK. Integrate into your application's code according to the technical documentation and you are all set!
Doc: https://inneractive.jira.com/wiki/dis... .

Hope that helps
Photo of Jacques Pomme de Pin

Jacques Pomme de Pin

  • 2 Posts
  • 0 Reply Likes
Hi, please can you provide us with example? I am trying to implement inner-active into my app but when I click on ad it opens in WebView and not in external browser. THX
Photo of Robbie Dorstijn

Robbie Dorstijn

  • 2 Posts
  • 0 Reply Likes
Any updates on the matter?

I do not have the luxury of being able to up a paid version (targets are very professional in downloading paidversions of apps). So I will need a free add version.
Photo of harsj j

harsj j

  • 1 Post
  • 0 Reply Likes
hello friends

I am using Icenium for developing Hybrid app?
Can we display some in app advertising in Phone Gap app,Will it poosible ?
if Yes then please suggest me some plugin and procedure to use them?
Photo of Sandip Borad

Sandip Borad

  • 2 Posts
  • 0 Reply Likes
How to load interestial add in phonegap android.. i only show the banner add that work perfectly fine but not worked interestrestieal add give me some article if do it.
Photo of ismael jimoh

ismael jimoh

  • 4116 Posts
  • 192 Reply Likes
Sorry please clarify your message as I do not understand it.

Thanks.
Photo of Reinaldo Fernandes Dos Santos

Reinaldo Fernandes Dos Santos

  • 2 Posts
  • 0 Reply Likes
Does anyone know any form of ads using phonegap build that works for Android and iOS?

Thanks.
Photo of Liming Xie

Liming Xie

  • 23 Posts
  • 6 Reply Likes
you can use the plugin iAd, for apple iAd service, so far more than 1000+ apps are using it.

but plugin for admob not avaiable yet, it's rejected as it need use the binary jar or binary .a file from google.
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
Hi guys, there is some great new changes.

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:

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

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!