Moz
Moz

Reputation: 1510

Why are only my test adverts working on AdMob?

I have an app I have trying to place adverts on. The app is not yet published (not sure if this makes a difference). When I am trying to add an advert it was working perfectly in test mode. Once I removed line 3 in my example, I expected to get a proper advert but I get nothing. Looking at LogCat I can see I have a request for the advert.

    mAd = new AdView(this, AdSize.BANNER, "<my publisher id>");
    AdRequest ad = new AdRequest();
    ad.addTestDevice("<my phone id>");
    System.out.println(ad.isTestDevice(this));
    mAd.loadAd(ad);

LogCat: 01-08 21:26:57.982: I/Ads(7787): adRequestUrlHtml: .......

Is there anything else I need to do to see a real advert? Can I actually see a real advert if my app is unpublished? I am still running the app from eclipse onto my development phone.

Thanks.

Upvotes: 0

Views: 2026

Answers (2)

Dominic
Dominic

Reputation: 3473

In my experience you just have to wait until the first real ad shows up. When you create a new "website/application" on AdMob, it can take a while.

Note: The very first time AdMob sees your publisher ID it may take up to two minutes to receive an ad. This initial two minute lag will recur every time the ID goes unused for 24 hours.

Source: http://code.google.com/mobile/ads/docs/android/fundamentals.html

scroll to the bottom

Hope it helps :)

Edit: I would recommend, just open the Activity which contains the ad and let the phone lie on the table until something shows up.

Upvotes: 3

TryTryAgain
TryTryAgain

Reputation: 7820

For Real/Live Ads

Taken from: http://code.google.com/mobile/ads/docs/android/fundamentals.html

 AdView adView = new AdView(this, AdSize.BANNER, MY_AD_UNIT_ID);
// Lookup your LinearLayout assuming it’s been given
// the attribute android:id="@+id/mainLayout"
LinearLayout layout = (LinearLayout)findViewById(R.id.mainLayout);
// Add the adView to it
layout.addView(adView);
// Initiate a generic request to load it with an ad
adView.loadAd(new AdRequest());

Also, Take Note:

  • It may take some time for them to start coming in. Rarely, but possibly a day, initially.

  • Login to your admob.com account and make sure it shows communication is active.

For Test Mode

Best Practices for enabling Admob Test Ads:

http://code.google.com/mobile/ads/docs/bestpractices.html#testmode

AdRequest adRequest = new AdRequest();
adRequest.addTestDevice(AdRequest.TEST_EMULATOR);               // Emulator
adRequest.addTestDevice("TEST_DEVICE_ID");                      // Test Android Device

Upvotes: 0

Related Questions