Admob 测试广告被忽略,仅显示真实广告
我正在使用它来通过 Eclipse 中的 Admob 获取测试广告
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();
}
有人知道我做错了什么吗?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
直接使用Google AdMob Ads SDK时,调用request.addTestDevice是获取AdMob测试广告的方式。但在此示例中,您似乎正在尝试通过 AdWhirl 获取 AdMob 测试广告。要在 AdWhirl 中获取测试广告,请执行以下操作:
请注意,上述内容目前仅适用于模拟器。 AdWhirl 目前不具备将特定设备设置为测试模式的功能。
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:
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.