Test mode Android


To test ads in your app, follow the steps below.

  1. Load your ads-integrated app and make an ad request.

  2. Check the logcat output for a message that looks like the one below, which shows you your device ID and how to add it as a test device:
D/[myTarget]: Device instanceId is aa5e068d-fdba-46f6-b84a-d1369e76de13. Use this value in adInstance.withTestDevices() to enable test mode on this device.
Copy your test device ID to your clipboard.

3. Modify your code to call ad.withTestDevices() and pass in a list of your test device IDs.
ad.withTestDevices("aa5e068d-fdba-46f6-b84a-d1369e76de13")
or
ad.withTestDevices("aa5e068d-fdba-46f6-b84a-d1369e76de13","aa5e068d-fdba-46f6-b84a-d1369e76de13")
Be sure to remove the code that sets these test device IDs before you release your app.

4. Re-run your app.
Was this article helpful?
Да
Нет