3

I converted one jquery script into Android app , Now i want to add admob into it , is this possible ???

1
  • When you say your converted a jquery script, what do you mean? Does your app run in the Android browser or is it a standalone Java app? Commented Dec 16, 2010 at 14:41

2 Answers 2

8

Google have since updated their documentation to forbid using AdSense in a mobile application:

"The use of AdSense for mobile in a mobile application is a violation of AdSense policies. A mobile application constitutes any downloadable application, even if a WebView is used to display the ad. Any AdSense for mobile ad units found in mobile applications will be disabled. If you’re looking for an advertising solution for your mobile application, please sign up for AdMob, Google’s leading mobile advertising display product."

The solution is to use the dedicated PhoneGap plugin.

10
  • 3
    I'd recommend coupling this together with a call to the PhoneGap Network API to first check if the device has a network connection, otherwise this won't work.
    – fil maj
    Commented Dec 28, 2010 at 20:05
  • 2
    The "Smart Phone Web App" option has been removed from AdMob. It appears the only solution for using AdMob, keeping in line with Goolge's T & C's, is to use native integration as opposed to a JavaScript solution. Example phone gap Android code: github.com/phonegap/phonegap/wiki/In-App-Advertisements - I guess that we'll need to take the plunge to extend to different platforms: docs.phonegap.com/en/2.1.0/guide_getting-started_index.md.html - I can only guess this is being enforced to make the distinction between apps and web sites (mobile flavour) (the latter should use AdSense). Commented Oct 2, 2012 at 0:45
  • @PhilipMurphy but surely the same principle applies to AdSense mobile ads? AdSense mobile is essentially the same product as AdMob. Commented Mar 5, 2013 at 12:58
  • @BenParsons "The use of AdSense for mobile in a mobile application is a violation of AdSense policies. A mobile application constitutes any downloadable application, even if a WebView is used to display the ad. Any AdSense for mobile ad units found in mobile applications will be disabled. If you’re looking for an advertising solution for your mobile application, please sign up for AdMob, Google’s leading mobile advertising display product." -- support.google.com/adsense/bin/answer.py?hl=en&answer=68724
    – TalkLittle
    Commented Apr 16, 2013 at 9:06
  • @TalkLittle, seriously, downvote on an answer given almost 2 1/2 years ago? You think maybe something might have changed in the time since..? Why don't you edit my answer to update the information, rather than downvoting? Commented Apr 16, 2013 at 12:58
1

You can do this with the android native code (I could recommend doing this instead of using mobile site code). There is a great explanation on how to do it on on phonegap.wiki.com, see this

Also check out this answer on stackoverflow, it prevents a bug where your local storage gets deleted: Android + HTML5(LocalStorage) + Admob: Bug?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.