New Admob library 4.X.X +

76 views
Skip to first unread message

Steve

unread,
Aug 23, 2011, 5:56:54 AM8/23/11
to Google AdMob Ads Developers

I am a long-time user of Admob and have implemented in munerous apps.
I am using a pre-4 version, described the changelog file as version
"20101109-ANDROID".

Until now I have resisted upgrading to the new version because it
looks like there have been numerous changes to the SDK which (means
work for me), but today I decided to bite the bullet.

Is there a migration guide for users of the old version? I have read
the implementation guide but this assumes starting from scratch.

I looks to me as though meta data prarameters, such as
ADMOB_PUBLISHER_ID and ADMOB_ALLOW_LOCATION_FOR_ADS are no longer
supported. The publisher ID now seems to be as AdView attribute. Is
this correct or can I still use these meta-data values?

Do I still need my res/attrs.xml file or should I delete it?

AdManager.setTestDevices() seems to have gone. The equivalent seems to
invlove having to write code (creating an AdRequest). I can see the
code is not that complicated, but nevertheless a good thing about the
old version was that it could be completely set up in config files
only. I am right that this is no longer possible and we need to
implement it in code instead?

Setting ad colours etc also looks completely different than before and
is in code instead of xml file.

So I wonder, why such a redesign that involves significant work for
developers? Will it give me something so much better that all the
changes are worth while?

If there is a migration guide somwhere that would sure help!

Steve

Saša Šijak

unread,
Aug 23, 2011, 5:59:52 AM8/23/11
to google-adm...@googlegroups.com
There is no migration guide, but from your post I see that you
allready know how would you change your apps to the new SDK. I also
wondered why they changed design so much, and left out some good
stuff.

SPA Support

unread,
Aug 23, 2011, 6:34:30 AM8/23/11
to google-adm...@googlegroups.com
Having migrated, here is my perspective:

> Is there a migration guide for users of the old version? I have read
> the implementation guide but this assumes starting from scratch.

I haven't seen one, but the implementation guide seems sufficient.

> I looks to me as though meta data prarameters, such as
> ADMOB_PUBLISHER_ID and ADMOB_ALLOW_LOCATION_FOR_ADS are no longer
> supported. The publisher ID now seems to be as AdView attribute. Is
> this correct or can I still use these meta-data values?

The meta-data values are not necessary/used.

> Do I still need my res/attrs.xml file or should I delete it?

No - delete it, unless you feel compelled to keep it.

> AdManager.setTestDevices() seems to have gone. The equivalent seems to
> invlove having to write code (creating an AdRequest). I can see the
> code is not that complicated, but nevertheless a good thing about the
> old version was that it could be completely set up in config files
> only. I am right that this is no longer possible and we need to
> implement it in code instead?

Using "if" statements in the code allows you to set devices using
config files. Regardless, it requires code changes to migrate.

> So I wonder, why such a redesign that involves significant work for
> developers? Will it give me something so much better that all the
> changes are worth while?

It seems more like a shift in their Android SDK "philosophy" - XML has
more limitations and is really structured for convenience over
flexibility. It should allow them to provide better service for more
complex ad requests in the future. It still provides a simple
implementation if you don't care about such things.

> If there is a migration guide somwhere that would sure help!

Forum highlight problems, not enhancements - and the new SDK has
issues that cause different problems from the old SDK. The old SDK
would request ads even when an app was not active and had issues with
AsyncTask. That's been traded for problems with WebView (stopLoading
and cache) and AdRequest bad URL or other response errors.

I believe a migration guide would start with "remove all previous
AdMob code" and then essentially repeat the Implementation guide. I
might be exaggerating a bit, but Tim does a better job of describing
the "migration path" in this thread:
http://groups.google.com/group/google-admob-ads-sdk/browse_thread/thread/3b885d3fe5bb21a5

good luck,


-Jim

Steve

unread,
Aug 26, 2011, 11:34:18 AM8/26/11
to Google AdMob Ads Developers

Thanks for the responses, I have now converted one of my apps to the
new admob and it seems to be working OK.

Initially I got a nasty problem of the app randomly crashing, but that
appeared to be this problem:
http://groups.google.com/group/google-admob-ads-sdk/browse_thread/thread/b4508b08b6fac704
...which I was able to work around.

So, wasn't too onerous in the end - it's just a bit annoying when you
have using a library for a while and suddenly
the API changes without warning! Now I just need to change over my
other apps!

Steve

Reply all
Reply to author
Forward
0 new messages