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

查看:209
本文介绍了如何检测该应用程序是否正在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天全站免登陆