Google Play Ads are showing blank page (API 19)

45 views
Skip to first unread message

Umar S

unread,
Sep 9, 2014, 12:54:31 PM9/9/14
to google-adm...@googlegroups.com
Hi,

I am facing a very strange issue, i have followed all the instructions mentioned here: https://developers.google.com/mobile-ads-sdk/docs/admob/android/quick-start

to integrate ads in my application.

it shows blank area instead of showing ads in it.

please see my code: using SDK (4.4w)

1) Activity Code

 AdView adView = (AdView)this.findViewById(R.id.adView);
        AdRequest adRequest = new AdRequest.Builder()
            .addTestDevice(AdRequest.DEVICE_ID_EMULATOR)
            .build();
        adView.loadAd(adRequest);


2) Google play services are enabled on my phone just verified through  following code
int status = GooglePlayServicesUtil.isGooglePlayServicesAvailable(getApplicationContext());

3)  Layout code

<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/drawer_layout"
    android:layout_width="match_parent"
    android:layout_height="match_parent" >

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="@drawable/activity_background"
        android:orientation="vertical"
         >

<com.google.android.gms.ads.AdView 
            xmlns:ads="http://schemas.android.com/apk/res-auto"
    android:id="@+id/adView"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    ads:adUnitId="xxxxxxxxxxxxxx"
    ads:adSize="BANNER"
                       />

 </LinearLayout>
</android.support.v4.widget.DrawerLayout>

4) Manifest code:
 <activity
            android:name="com.google.android.gms.ads.AdActivity"
            android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize" />
        <meta-data android:name="com.google.android.gms.version"
           android:value="@integer/google_play_services_version"/>
 



Amy Quispe (AdMob SDK Team)

unread,
Sep 9, 2014, 7:47:48 PM9/9/14
to google-adm...@googlegroups.com
Hi Umar,

4.4w is the Android Wear SDK. The Mobile Ads SDK is not designed for use with it.

Amy Quispe
Reply all
Reply to author
Forward
0 new messages