I have to update ads in an app (which somebody else made). I need to enable Test Ads, without using Test IDs. (the IDs must be the same as the other developer put it). Also, I want test ads, just because google threatens to disable the account if we test on real ads. (see screenshot)
Please dont refer to "Admob shows Test ads but not real ads". What I want is completely opposite scenario.
CodePudding user response:
You can add a test device which enables you to test ads with real ad units.
Setting up a test device lets you safely test production ads and verify your implementation code without violating AdMob’s invalid traffic policy.
CodePudding user response:
@Jabbar's answer is helpful. I Also found out that we can do it programmatically by just putting this code,
MobileAds.instance.updateRequestConfiguration(
RequestConfiguration(
testDeviceIds: [
/* These are `IDs` of different mobile phones on which I have installed and tested my app. */
'140A01B86DF7D67991BF3A31AEEE9041',
"85BB5D148620523D06692E2F45ED4A30",
"2F4C6DEC28A5611835CA2C3EE14EF31C",
],
),
);
To find your own mobile phone's ID
Check the console or logcat output for a message that looks like this:
I/Ads: Use
RequestConfiguration.Builder
.setTestDeviceIds(Arrays.asList("33BE2250B43518CCDA7DE426D04EE231"))
to get test ads on this device.
links: https://developers.google.com/admob/flutter/test-ads#android