如何在Android开放系统数据的使用活动? [英] How to open System Data Usage Activity in android?

查看:153
本文介绍了如何在Android开放系统数据的使用活动?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

谁能告诉我如何从我的应用程序的Andr​​oid设置的开放数据的使用情况?我现在不,我应该调用的意图。

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

推荐答案

它非常适合于使用下面的code。在我的项目:

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

你可以从这里看到包装信息: <一href="https://github.com/CyanogenMod/android_packages_apps_Settings/blob/cm-12.0/AndroidManifest.xml" rel="nofollow">https://github.com/CyanogenMod/android_packages_apps_Settings/blob/cm-12.0/AndroidManifest.xml

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

这篇关于如何在Android开放系统数据的使用活动?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆