12
votes

I just realized Google embeds AdMob into latest Google Play services (4+)

I was wondering, should I prefer https://developers.google.com/mobile-ads-sdk/docs/#play over https://developers.google.com/mobile-ads-sdk/docs/#android ? As I do not see Google official stand on this.

The reason I ask so, I found AdMob from Google Play services is pretty buggy still.

This is my observation.

  1. Create an smart banner from Java code, and place it in a middle of a scroll view.
  2. Whenever the smart banner fetches an advertisement from Google server successfully, the scroll view will auto scroll to make the smart banner visible.

This seems to be an undesired behavior from my point of view. That's why, I still hesitate to migrate over new Google Play services.

The full source code to demonstrate the bug can be found here : AdMob from Google Play Services will perform undesired auto scrolling

3
I found numerous bugs as well, with the latest Google Play Services 4.1. Whether anchored to bottom of screen, or inside ListView. Incorrect sizing after rotating screen, improper cropping of ads from mediation providers, timing out easily to certain mediation providers. resume() after pause() did not work well (animated ad appears frozen). Reverting to AdMob 6.4.1 jar fixed all these.TalkLittle
Unfortunately the AdMob website now says you must switch to Google Play Services by August 1, 2014. App updates with AdMob standalone jar will not be accepted into Google Play anymore after August 1. developers.google.com/mobile-ads-sdk/download#downloadandroidTalkLittle
@TalkLittle I place the full source code to demonstrate the mentioned bugs. You may test it out if you want. If the problem still exist, perhaps filling a bug report to Google team is a only way.Cheok Yan Cheng
I updated my app with standalone jar in Feb 15, and Google Play accepted it.Egemen Hamutçu

3 Answers

4
votes

If you want to integrate many ads SDK and if they are using Google play services as back-end support to deliver ads and you also want to show Admob banner ads then you should use it.

its very easy to use .just add goole play service lib project and then use

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:ads="http://schemas.android.com/apk/res-auto"

              android:id="@+id/linearLayout"
              android:orientation="vertical"
              android:layout_width="match_parent"
              android:layout_height="match_parent">
    <com.google.android.gms.ads.AdView android:id="@+id/adView"
                         android:layout_width="wrap_content"
                         android:layout_height="wrap_content"
                         ads:adUnitId="a1529793ead3391"
                         ads:adSize="BANNER"/>

</LinearLayout>

now you can simple add following snippet in activity where you want to show

 AdView adView = (AdView)findViewById(R.id.adView);
    AdRequest adRequest = new AdRequest.Builder().build();
    adView.loadAd(adRequest);
0
votes

Yes, definitely.
In this post standalone Android Google AdMob SDK (the “old” one) has been announced deprecated. Google warned that on August 1, 2014, the Play Store will stop accepting new or updated apps that use the standalone Google AdMob SDK.

-1
votes

Yes. Most definitely switch to the Admob classes from the Google Play Services library. This is the new means of distribution for Admob and will ensure that they can update the implementation of it much more readily as they can update the GPS implementation on the phones without requiring your to roll out a new version of your app.

Note that in the GPS library there are 2 versions of the Admob classes. The ones from the current package com.google.ads.* and the ones from the new package com.google.android.gms.ads.*. Use the ones from the new package.

If you are creating your AdRequest programatically then you will need to use a Builder now.

AdRequest adRequest = new AdRequest.Builder().build();

If you are defining your AdView in layout XML then make sure you update the package there too. Ie <com.google.android.gms.ads.AdView instead of <com.google.ads.AdView.