Set test device programmatically

362 Views Asked by At

How and where do I implement the code to set my test device ID for Admob in Flutter apart from setting it in my ADMOB UI? This line "Use RequestConfiguration.Builder().setTestDeviceIds(Arrays.asList("myTestDeviceId"))" keeps popping

1

There are 1 best solutions below

0
Qazi Muaaz On

Add

RequestConfiguration configuration =
  RequestConfiguration(testDeviceIds: ["ID HERE"]);

And

MobileAds.instance.updateRequestConfiguration(configuration)

To your main function after mobileads.instance.initialize();

Next to the message you mentioned would be your device id ..

No need to add it in the admob setting after this

And then use actual ad units afterwards