Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"Timed out waiting for ad response", when trying add admob into my application

I am trying to add admob banner ads into my Android application, but after I followed all the instructions from Google, and did all the things, I found no ads displayed in application. When I checked LogCat in Eclipse, I found the error below. I am sure that I did edit all the files correctly, because when I tried to test the sample file. I got the same error message.

01-04 18:43:52.448: W/Ads(5936): Timed out waiting for ad response.

01-04 18:43:52.448: I/Ads(5936): Scheduling ad refresh 60000 milliseconds from now.

01-04 18:43:52.458: W/Ads(5936): Failed to load ad: 2

Could anyone give me some advice please? Many Thanks!

1st Edited

I have added the adUnitId into my layout file:

        <com.google.android.gms.ads.AdView 
        android:id="@+id/adView"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_below="@+id/label_status"
        android:layout_marginTop="30dp"
        ads:adUnitId="ca-app-pub-1183612543061916/9999996585"
        ads:adSize="BANNER" />

and also, I added test device in my code:

        adView = (AdView) findViewById(R.id.adView);
        AdRequest adRequest = new AdRequest.Builder()
        .addTestDevice("F84FF00544A8000C28E55068B835F2BD")
        .build();

        adView.loadAd(adRequest);
like image 329
Rui Geng Avatar asked Jan 04 '14 08:01

Rui Geng


People also ask

How long does it take to integrate AdMob into an app?

When apps are newly registered with AdMob, it typically takes up to an hour and a few ad requests to allow inventory to build. Because of this, you may not see live impressions immediately. Note: In some cases, it may take longer than an hour. Please wait 24 hours before seeking additional help.

How long does it take for an AdMob ad unit ID to become active?

Wait up to 24 hours after you create your account. When you first sign up for AdMob, your account is reviewed before it's approved. This typically takes up to 24 hours, but in rare cases can take up to 2 weeks.

Why is AdMob not working?

Make sure you have updated AdMob with your payment details. Make sure that the ads you created in AdMob are banner ads. Check your AdMob dashboard to see the status of your ads, are they active? Verify you used the correct Ad Unit Id.


2 Answers

Make sure you don't have adBlock installed!

I had this issue as well, and since adBlock only blocked on wifi, it started to work again as soon as I turned off wifi and went on mobile instead.

like image 54
JohnyTex Avatar answered Oct 22 '22 05:10

JohnyTex


Your code looks good.

I think the answer is in

01-04 18:43:52.448: W/Ads(5936): Timed out waiting for ad response.

It sounds to me like either

  • you have a slow connection to the server or
  • the ad server is slow to fill your request

Probably the first of those. I think the timeout is about 5 seconds. Any longer than that and it gives up until next time.

Make sure you have a good connection and try again.

like image 43
William Avatar answered Oct 22 '22 06:10

William