Prevent firebase test labs from clicking ads
Asked Answered
S

2

6

I used Firebase Test Lab to test my app before uploading it to Google Play.

Looking at the screenshots and video it looks like real ads are displayed from admob and then clicked on.

Now I know you can set test devices to show test ads but I cannot find any ids for firebase test devices, or can I in code somehow identify that this is a robo test so I can prevent real ads?

Also I wonder if google play pre launch report tests has the same issues?

Shiver answered 21/11, 2019 at 18:38 Comment(2)
It would be great if you could join the test-lab channel in the Firebase Community Slack and let the team know about this. Robo tries to detect ads, but it doesn't work all the time. The team can take a look at your test and see what can be done going forward.Hopper
yes I will do that, thank youShiver
H
6

You can detect if the device is running in Firebase Test Lab in your code by looking for the environment variable firebase.test.lab as documented in the official documentation.

String testLabSetting = Settings.System.getString(getContentResolver(), "firebase.test.lab");
if ("true".equals(testLabSetting)) {
    // Do something when running in Test Lab
}

The same will work for Google Play Pre Launch reports.

Hopper answered 21/11, 2019 at 18:58 Comment(2)
Thank you, I skimmed through the documentation but I guess the wording didn't attract me to read it as a solution to the problem, I hope this is the cause to why my admob account got limitedShiver
If you can set up your app to use test ads, that's always a good thing. But many Robo tests, particularly those coming from the Play Pre-Launch Report, are crawling production apps with real ads. Therefore all FTL devices use IP addresses that are added to a special list (consumed by AdMob and some other ad networks) that should mark those tests as "do-not-monetize-ad-clicks" and "this-is-not-ad-spam" so that FTL users' accounts don't get flagged as abusive.Aesir
S
0

It is now being filtered

AdMob now ignores clicks which it receives from devices running inside our infrastructure.

You can read this article and the comment section. https://danielvido.medium.com/be-extremely-careful-with-pre-launch-reports-on-android-9f43c090bf4d

Solomonsolon answered 27/6, 2021 at 2:20 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.