I'm working on an app that's using admob to display ads. I have added test id's for 3 devices ( 1 running android 6 and 2 running android 8) and they work fine in debug mode being correctly identified as test devices.
AdRequest.Builder adRequestBuilder = new AdRequest.Builder();
// My Phone
adRequestBuilder.addTestDevice("AD9EA3690D287AA4A5A75279684045A1");
//Phone2 and 3
adRequestBuilder.addTestDevice("8438F5ABA7A67FAC92A26AAED589C8F1");
adRequestBuilder.addTestDevice("ED0430F25A6DA673BF0AA414AFDD7688");
// emulator
adRequestBuilder.addTestDevice(AdRequest.DEVICE_ID_EMULATOR);
AdRequest adRequest = adRequestBuilder.build();
// get whether it's a test device to enable developer functionality.
isTest = adRequest.isTestDevice(this);
Note: codes changed for this post
But in a release build the 2 android 8 phones are returning false in the call to adRequest.isTestDevice(this);. The android 6 phone works perfectly.
How do I overcome this bug in android 8?