如何在android中打开系统数据使用活动?

时间:2013-12-10 08:25:53

标签: android android-intent

有人能告诉我如何从我的应用程序的Android设置中打开数据使用情况吗?我现在不应该打电话给哪个意图。

enter image description here

2 个答案:

答案 0 :(得分:3)

在我的项目中使用以下代码非常有用:

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);

你可以从这里看到包裹信息: https://github.com/CyanogenMod/android_packages_apps_Settings/blob/cm-12.0/AndroidManifest.xml

答案 1 :(得分:-1)

以下是Android Intents并找到ACTION_MANAGE_NETWORK_USAGE意图。

也可能this link会帮助你。