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
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);
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.
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.
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.
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.
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
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With