0

Any idea what would be intent to launch application specific Data usage settings to enable/disable Restrict Background Data.

To launch general setting screen following is the post i referred and it worked also Which Intent for Settings - Data usage

But I need to launch for specific package id. Please check this launch screen

This screen is for Gmail This screen is for Gmail

Looking for an intent with parameters to launch this screen programmatically. Any help is appreciated.

Community
  • 1
  • 1
Coder
  • 21
  • 2
  • 4

1 Answers1

0

Try using this:

 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);
cylon
  • 735
  • 1
  • 11
  • 26
  • Solution menitioned by you is already available in the link provided in question.It launches Data Usage screen with 3 tabs, what I am looking for is, to launch the screen with a specific package. – Coder Oct 01 '15 at 12:39