How to define and use a system property in Android Instrumentation test?

前端 未结 7 1022
时光说笑
时光说笑 2020-12-02 23:25

I am trying to use some arguments for an Instrumentation test. I noticed that I can read system properties with System.getProperty() function. So I use setprop

7条回答
  •  时光取名叫无心
    2020-12-03 00:02

    import android.os.SystemProperties

    String s = SystemProterties.get("ro.xxx.xxx","default value if property not set");

提交回复
热议问题