如何检测应用程序是否在 Google Play 发布前报告设备上运行? [英] How to detect if the app is running on Google Play Pre-Launch report devices?

查看:20
本文介绍了如何检测应用程序是否在 Google Play 发布前报告设备上运行?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我将我的应用的新版本上传到 Google Play 时,我得到了一份发布前测试报告,该报告非常好,但问题是大多数时间 AI 只是在设置中徘徊,并没有测试实际的用户界面.我想快速、随机地为这些设备预先完成设置.

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?

推荐答案

您可以通过以下方式检测预发布测试设备:

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);
}

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

这篇关于如何检测应用程序是否在 Google Play 发布前报告设备上运行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆