添加 Adwhirl 测试设备
我已经创建了 Adwhirl 帐户并将我的 Admob 网络添加到其中。当我使用 Adwhirl 时,我没有显示任何广告。我的 logcat 说
To get test ads on this device, call adRequest.addTestDevice("CF95DC53F383F9A836FD749F3EF439ZW");
如果我仅使用 Admob,我可以设置它:
adView = new AdView(this, AdSize.BANNER, "a14e9698a5e5ww3"); //Test
AdRequest adRequest = new AdRequest();
adRequest.addTestDevice("CF95DC53F383F9A836FD749F3EF439ZW");
adView.loadAd(adRequest);
但是当使用 Adwhir 时,这是不可能的:
AdWhirlManager.setConfigExpireTimeout(1000 * 60 * 5);
AdWhirlTargeting.setTestMode(true);
AdWhirlLayout adWhirlLayout = new AdWhirlLayout(this,"74c8934e149649e2a1211cb336f7e0b9"); //test
因为我无法像使用 Admob 时那样配置 adRequest。我认为将 setTestMode 设置为 true 可以解决问题,但事实并非如此,实际上我真的不知道该方法是什么,因为我的应用程序的行为与我设置为 false 时的行为相同。
基本上,我怎样才能像 Admob 那样使用 Adwhirl 在屏幕上显示测试广告?
I have created an account of Adwhirl and add my Admob network to it.I am not displaying any advert when I am using Adwhirl. My logcat says
To get test ads on this device, call adRequest.addTestDevice("CF95DC53F383F9A836FD749F3EF439ZW");
If I use Admob only I can set it:
adView = new AdView(this, AdSize.BANNER, "a14e9698a5e5ww3"); //Test
AdRequest adRequest = new AdRequest();
adRequest.addTestDevice("CF95DC53F383F9A836FD749F3EF439ZW");
adView.loadAd(adRequest);
But when using Adwhir, that is not possible:
AdWhirlManager.setConfigExpireTimeout(1000 * 60 * 5);
AdWhirlTargeting.setTestMode(true);
AdWhirlLayout adWhirlLayout = new AdWhirlLayout(this,"74c8934e149649e2a1211cb336f7e0b9"); //test
As I cant configure the adRequest as when I use Admob. I thought that setTestMode to true would do the trick, but it doesnt, and actually I dont really know for what is that method, as my app behavies the same that when I set to false.
So basically, how can I get on my screen a test advert with Adwhirl as I do for Admob?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
AdWhirl 代码 使用旧的 setTesting 方法,该方法仅在模拟器上设置测试模式。因此,它目前不支持输入设备 ID,因此您将在手机上看到真实的广告。
该代码是开源的,因此您可以编辑它以使用 addTestDevice 方法并重建 jar 文件。不过,这可能值得添加到开箱即用的适配器中。
The AdWhirl code uses the old setTesting method, which would only set test mode on the emulator. Therefore it currently does not have support for entering the device id so you will get real ads on your phone.
The code is open source, so you could edit this to use the addTestDevice method and rebuild the jar file. This is probably worth adding to the adapter out of the box, however.