jjzjj

testDevices

全部标签

ios - 为 testDevices 和测试广告查找 Google DFP SDK 设备 ID

我正在尝试使用Google的测试广告单元使用Google的DFPSDK调试和开发我的应用程序。这样做需要将设备的标识符(如Google定义的那样)添加到DFPRequest对象的request.testDevices[]属性中。最新版本的DFPSDK添加了一条日志消息以显示当前设备的ID,还添加了对kGADSimulatorID的支持以在sim中运行。这允许开发人员运行应用程序,从控制台复制设备ID,然后修改代码以将其添加到testDevices[]数组。但是,不存在用于在运行时检测ID并始终注册当前设备以接收测试广告的文档或设施。我如何获得与Google的-[GADDevicedev

ios - 要在此设备上获取测试广告,请调用 : request. testDevices = [NSArray arrayWithObjects :GAD_SIMULATOR_ID, nil];

当我在模拟器中测试Admob时,它会抛出以下错误Togettestadsonthisdevice,call:request.testDevices=[NSArrayarrayWithObjects:GAD_SIMULATOR_ID,nil];我的代码bannerView_=[[GADBannerViewalloc]initWithAdSize:kGADAdSizeBanner];bannerView_.adUnitID=@"8de66ecc3525495d";bannerView_.rootViewController=self;[self.viewaddSubview:bannerV

ios - 要在此设备上获取测试广告,请调用 : request. testDevices = [NSArray arrayWithObjects :GAD_SIMULATOR_ID, nil];

当我在模拟器中测试Admob时,它会抛出以下错误Togettestadsonthisdevice,call:request.testDevices=[NSArrayarrayWithObjects:GAD_SIMULATOR_ID,nil];我的代码bannerView_=[[GADBannerViewalloc]initWithAdSize:kGADAdSizeBanner];bannerView_.adUnitID=@"8de66ecc3525495d";bannerView_.rootViewController=self;[self.viewaddSubview:bannerV

android - 在发布之前,我是否需要删除 android 中 AdView 的 testDevice 代码?

AdViewmAdView=(AdView)findViewById(R.id.adViewGame);AdRequestadRequest=newAdRequest.Builder().addTestDevice("27CBA8D2XXXXXXXXXD7996125").build();mAdView.loadAd(adRequest);在生成用于发布的签名apk之前,我是否需要从上面的代码中删除任何一行? 最佳答案 不,它是您设备的唯一ID,因此,如果您尝试从PlayStore在此设备上安装此应用程序,您将看到测试广告,而不是真