0

I have one android application and this application uses Google admob GoogleAdMobAdsSdk-4.1.0 version. Now i wants to update my google admob SDK.

This is the message on google admob site Here.

We are deprecating all SDK versions that were released in 2010 or earlier. For Android, this includes any SDK released on or before November 9, 2010. If your code references com.admob.android.ads.*, then you will need to update your SDK.

I am just try to replace this GoogleAdMobAdsSdk-4.1.0 version to GoogleAdMobAdsSdk-6.3.1 .

But i am getting error regarding import about com.admob.android.ads.* this.

Please let me know the solution regarding this

Thanks

sam_k
  • 5,983
  • 14
  • 76
  • 110

1 Answers1

3

com.admob.android.ads.* references old AdMob SDKs released in 2010 or earlier. If your app was only using GoogleAdMobAdsSdk-4.1.0, you should only have references to com.google.ads.*.

To can check the docs for how to set location. You'll use com.google.ads.AdRequest#setLocation(location). However, AdMob recommends that you only pass location in your AdRequest if your app already makes use of location, since it requires adding extra permissions in your app.

Eric Leichtenschlag
  • 8,881
  • 1
  • 28
  • 28
  • This link gives the iphone example. So what short of changes i have to do in my code? i used above code which i mentioned in question so what i have to do please let me know i am really frustted with this error :( – sam_k Mar 15 '13 at 19:40
  • Can u please suggest me the way i am really stuck up – sam_k Mar 15 '13 at 20:14
  • Can u please check my updated question and please help me out – sam_k Mar 15 '13 at 21:34
  • Unfortunately the links show the iOS tab by default, so click the Android tab and the #hashtag link should work. – Eric Leichtenschlag Mar 16 '13 at 00:25
  • It looks like you're completely referencing the old AdMob API. You'll want to check out the getting started guide (here)[https://developers.google.com/mobile-ads-sdk/docs/admob/fundamentals] (remember to click android tab) to see how to set up the Google AdMob Ads SDK. – Eric Leichtenschlag Mar 16 '13 at 00:27
  • You can also download the basic Android sample app [here](https://code.google.com/p/google-mobile-dev/downloads/detail?name=Android_Fundamentals.zip&can=2&q=#makechanges) which basically replicates the code from the getting started guide. Just stick in the v6.3.1 SDK into the libs directory of that project, and swap in your AdMob publisher ID, and you should have a working ads example. – Eric Leichtenschlag Mar 16 '13 at 00:29
  • Thanks for Your reply.I have one question is it necessary to set location programatically? i can not use `` ? May be this is use for location automatically? am i right? – sam_k Mar 16 '13 at 04:20
  • That doesn't work with the Google AdMob SDK - that seems to have been the legacy AdMob way of setting location. – Eric Leichtenschlag Mar 17 '13 at 01:37