Q:

How to detect if the app is running on Google Play Pre-Launch report devices?

As I upload a new version of my app to Google Play I get a Pre-Launch testing report that's pretty nice and fine, but the issue is that most of the time the AI just wanders around the setup and does not test the actual UI.  I'd like to pre-complete the setup quickly and randomly for those devices.
So my question is, is there a way to detect that it's running on those test devices? 

A:

You can detect a pre-launch test device with the following:
private boolean isTestDevice() {  
  String testLabSetting = Settings.System.getString(getContentResolver(), "firebase.test.lab");
  return "true".equals(testLabSetting);
}

See:
https://firebase.google.com/docs/test-lab/android/android-studio#modify_instrumented_test_behavior_for

