0

I am using this to get test ads VIA Admob in eclipse

  try{  
     AdRequest request = new AdRequest();
    request.addTestDevice(AdRequest.TEST_EMULATOR);
    request.addTestDevice(DEVICEID);    // My T-Mobile G1 test phone
    LinearLayout layout = (LinearLayout) findViewById(R.id.layout_main);    
    AdWhirlLayout adWhirlLayout = new AdWhirlLayout(this, "APP_ID");
    RelativeLayout.LayoutParams adWhirlLayoutParams =
    new RelativeLayout.LayoutParams(
    LayoutParams.FILL_PARENT,
    LayoutParams.WRAP_CONTENT);
    layout.addView(adWhirlLayout, adWhirlLayoutParams);
    layout.invalidate();


    }

Does anyone have any idea of what i am doing wrong?

Eric Leichtenschlag
  • 8,881
  • 1
  • 28
  • 28
coder_For_Life22
  • 26,645
  • 20
  • 86
  • 118

1 Answers1

3

Calling request.addTestDevice is the way to get AdMob test ads when using the Google AdMob Ads SDK directly. But in this example it looks like you are trying to get AdMob Test Ads through AdWhirl. To get test ads in AdWhirl, do this instead:

 AdWhirlTargeting.setTestMode(true);

Note that the above will currently only work for the emulator. AdWhirl currently does not have the functionality to set a specific device for test mode.

Eric Leichtenschlag
  • 8,881
  • 1
  • 28
  • 28
  • Do you think i will get band from Admob since i was debugging on a real device and didnt know this only works for emulator in test mode? for fals impressions? – coder_For_Life22 Oct 18 '11 at 20:02
  • 1
    You will be fine. You can't really get around serving actual impressions when testing on a device using AdWhirl. I would just recommend you avoid clicking on these ads during testing. – Eric Leichtenschlag Oct 18 '11 at 21:37