Reputation: 26971
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?
Upvotes: 0
Views: 975
Reputation: 8931
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.
Upvotes: 3