Test mode Android


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

  1. Load your ads on device.

  2. View the message with the instanceId of the device in the logcat:

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. Add a call to ad.withTestDevices() to your code and pass the ID of the test device or multiple devices to it.

MyTargetConfig myTargetConfig = new MyTargetConfig.Builder()
.withTestDevices("aa5e068d-fdba-46f6-b84a-d1369e76de13")
.build();
MyTargetManager.setSdkConfig(myTargetConfig);
4. Restart the application, now this instance will receive test ads.

5. Make sure this mode is disabled on the prod
Was this article helpful?