Android非页内广告添加测试设备

Android非页内广告添加测试设备

本文介绍了Android非页内广告添加测试设备?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您可以轻松添加带有横幅广告的测试设备,以免被意外点击而被禁止。但是,我找不到如何在插页式广告中添加测试设备。我认为如果您不小心单击它们也可以被禁止。

You can easily add test devices with banner ads so you don't get banned by accidentally clicking on them. However I cannot find how to add test devices to interstitial ads. I assume you also can be banned if you click accidentally on them.

可以向其中添加测试设备吗?如果可以,如何添加?我在官方的Google指南或SA上找不到它。 看起来确实很有希望,但没有添加测试设备的答案。

Can you add test devices to these and if so, how? I can't find it on the official google guide, nor on SA. How to get test ad Banners and test Interstitial ads working for adMob? did look promising, but there was no answer on how to add test devices.

推荐答案

因此,您可以开始:

// request test interstitial ads
        AdRequest adRequestInterstitial = new AdRequest.Builder()
            .addTestDevice(AdRequest.DEVICE_ID_EMULATOR)
            .addTestDevice(testDeviceId)
            .build();

// request test banner ads
  AdRequest adRequestBanner = new AdRequest.Builder()
            .addTestDevice(AdRequest.DEVICE_ID_EMULATOR)
            .addTestDevice(testDeviceId)
            .build();

这篇关于Android非页内广告添加测试设备?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-03 01:41