2

Can anybody tell me how to open Data usage from android settings from my app? I do not now which Intent I should call.

enter image description here

moallemi
  • 2,448
  • 2
  • 25
  • 28

2 Answers2

3

It works well for using the below code in my project:

Intent intent = new Intent(Intent.ACTION_MAIN);
        intent.setComponent(new ComponentName("com.android.settings",
                "com.android.settings.Settings$DataUsageSummaryActivity"));
        intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP);
        startActivity(intent);

And you can see the package info from here: https://github.com/CyanogenMod/android_packages_apps_Settings/blob/cm-12.0/AndroidManifest.xml

Geek4IT
  • 592
  • 5
  • 13
-1

ACTION_MANAGE_NETWORK_USAGE

public static final String ACTION_MANAGE_NETWORK_USAGE

Activity Action: Show settings for managing network data usage of a specific application. Applications should define an activity that offers options to control data usage.

Constant Value: android.intent.action.MANAGE_NETWORK_USAGE

Also maybe this link will help you.

Nikos Hidalgo
  • 3,666
  • 9
  • 25
  • 39
Val
  • 4,225
  • 8
  • 36
  • 55