AddTestDevice(): no ad to load!

153 views
Skip to first unread message

Angel M

unread,
Jan 20, 2014, 12:13:44 PM1/20/14
to google-adm...@googlegroups.com
Hello! 

My name is Ángel, I'm new in this community :).

I'm developing an android application, and now I've added an ad block. I want to use AddTestDevice when I debug the application, but when I use this method, the ad doesn't appear. In the logcat I can see: "No ad to load". When I use LoadAd with an AdRequest it appears.

What can I do?

Thanks you very much, and sorry for my bad english :) 

Kunal Verma

unread,
Jan 20, 2014, 1:03:30 PM1/20/14
to Google AdMob Ads Developers
Can you share your logcat for Ads here? Are you creating Android app? Is the SDK implemented by GPS(Google Play Services)? Can you share your ads code here? 

Best,
Kunal


--
 
---
You received this message because you are subscribed to the Google Groups "Google AdMob Ads Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-admob-ads...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Angel M

unread,
Jan 20, 2014, 1:16:00 PM1/20/14
to google-adm...@googlegroups.com
Of course :). I don't have the logcat now (I'm out), but later I will publish it. Yes, I'm creating the app. It's only available in the market for my beta-testers. The SDK is implemented by GPS, but I remember that other error in the logcat is: "No GooglePlayServices found", but It's added as a dependency in Gradle.

The code of the ads is:

private void showAds(){

        LinearLayout ads_wrap = (LinearLayout)findViewById(R.id.ads);

        anuncio = new AdView(this);
        anuncio.setAdUnitId(AD_BLOCK_ID);
        anuncio.setAdSize(AdSize.SMART_BANNER);

        ads_wrap.addView(anuncio);

        // Test nexus 4:
        //anuncio.loadAd(new AdRequest.Builder().addTestDevice(NEXUS_4_ID).build());
        anuncio.loadAd(new AdRequest.Builder().build());
    }

As you can see, the TestDevice code is commented, so I'm loading real ads when I'm debuging :(

And the Gradle's code is:

dependencies {
    compile ('com.actionbarsherlock:actionbarsherlock:4.4.0@aar'){
        exclude module: 'support-v4'
    }
    compile 'com.google.android.gms:play-services:4.0.+'
    compile 'com.android.support:support-v4:19.0.1'
    compile group: 'ly.apps', name: 'android-rest', version: '1.2-SNAPSHOT'
    compile fileTree(dir: 'libs', include: '*.jar')
}

Thanks you :)

El lunes, 20 de enero de 2014 19:03:30 UTC+1, Kunal Verma escribió:
Can you share your logcat for Ads here? Are you creating Android app? Is the SDK implemented by GPS(Google Play Services)? Can you share your ads code here? 

Best,
Kunal

Kunal Verma

unread,
Jan 20, 2014, 1:32:16 PM1/20/14
to Google AdMob Ads Developers
As I didnt face this error myself. For GPS not found, there is a similar thread here
For test Ads, do you see them on Emulator? Atleast on an emulator with test ads you can try click and back to app to see if there is any issue.

Best,
Kunal


Angel M

unread,
Jan 20, 2014, 1:36:58 PM1/20/14
to google-adm...@googlegroups.com
Thanks for the response. I will try it on emulator.

I have the same GPS error, thanks for the thread :)

El lunes, 20 de enero de 2014 19:32:16 UTC+1, Kunal Verma escribió:
As I didnt face this error myself. For GPS not found, there is a similar thread here
For test Ads, do you see them on Emulator? Atleast on an emulator with test ads you can try click and back to app to see if there is any issue.

Best,
Kunal

Eric Leichtenschlag

unread,
Jan 24, 2014, 8:13:43 PM1/24/14
to google-adm...@googlegroups.com
Hi Angel,

What is the preferred language on your device? It sounds like it could be spanish. I think we have to to update our test ads so they serve to all languages.

Thanks,
Eric

Angel M

unread,
Jan 26, 2014, 12:46:40 PM1/26/14
to google-adm...@googlegroups.com
Hello Eric,

Yes :), the preferred language on my device is Spanish. Now, my testers are loading real ads in their devices. Is there any trouble about this?

Thanks you for the response,
Ángel.

Eric Leichtenschlag

unread,
Jan 27, 2014, 5:10:10 PM1/27/14
to google-adm...@googlegroups.com
Just don't click these ads during testing.

Another way to test the advertising experience (with clicks) is to create your own house ad to always serve to a particular ad unit. You can click your own house ads to your heart's content, since nobody is being charged for those clicks.

Thanks,
Eric
Reply all
Reply to author
Forward
0 new messages