George2456
George2456

Reputation: 340

Application doesn't show live Ads Banner on emulator

I tried to add Admob to my application and show real/live ads on my android emulator, However it only shows Test banner only.

Here's the AdView xml

 <com.google.android.gms.ads.AdView
    android:id="@+id/adView"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_gravity="center"
    ads:adSize="BANNER"
    ads:adUnitId="********************">
</com.google.android.gms.ads.AdView>

And here's my code

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

Upvotes: 2

Views: 1182

Answers (2)

Amit K. Saha
Amit K. Saha

Reputation: 5951

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

you need to add your emulator as test device.

Upvotes: 1

Nischal Hada
Nischal Hada

Reputation: 3288

Try to check it out in real device. Add usually doesnt show in emulator

Upvotes: 1

Related Questions