Open the Data usage in the Setting

Hi, im doing automation test on Android. i want to open the Data usage in the Setting. i dont know how to do it.

i know how to open the AIRPLANE_MODE_SETTINGS :
command(“adb -s “+ID+” shell am start -a android.settings.AIRPLANE_MODE_SETTINGS”);

and i also know how to open Development Settings :

command(“adb -s “+ID+” shell am start -n com.android.settings/.DevelopmentSettings”);

How to open the Data usage ?

Thanks !

@gilb try:


        Activity activity = new Activity("com.android.settings",".Settings$DataUsageSummaryActivity");
        ((AndroidDriver) driver).startActivity(activity);

Like this ?

command(“adb -s “+ID+” shell am start -n com.android.settings/.DataUsageSummaryActivity”);

its not working :frowning:

why you trying with ADB? try with driver.

Im getting an errore …

Thanks !

  1. your import is: “import io.appium.java_client.android.Activity;” ?
  2. java-client version is 5.0.0-+?

o.k. Now its work. Thanks !!! :slight_smile: