将用户发送到数据使用设置窗口 [英] Send user to data usage settings window

查看:138
本文介绍了将用户发送到数据使用设置窗口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

直到android 5,用户都可以从漫游设置窗口中打开蜂窝数据. 因此,Settings.ACTION_DATA_ROAMING_SETTINGS用于将用户发送到那里.

Till android 5, user could turn on cellular data from the roaming settings window. So Settings.ACTION_DATA_ROAMING_SETTINGS is used to send user there.

尽管在棒棒糖中,您不再可以这样做,并且打开移动数据的选项位于数据使用情况"窗口下.问题是,由于设置"似乎没有任何帮助,如何将用户发送到该窗口.

In lollipop though, you no longer can do that and the option to turn on mobile data is under data usage window. Question is, how can send user to that window as Settings don't seem to have anything to help me.

谢谢

推荐答案

我认为目前还没有办法以编程方式显示Lollipop 5.0上的设置-数据使用情况"屏幕.

I don't think there is currently a way to show programmatically the Settings - Data Usage screen on Lollipop 5.0.

android.provider.Settings 类包含的所有可能值意向动作.

The class android.provider.Settings contains all possible values for Intent actions.

我尝试了所有这些值,因为它们没有导致数据使用:

I tried all of these values by they did not lead to Data Usage:

  • ACTION_NETWORK_OPERATOR_SETTINGS
  • ACTION_WIRELESS_SETTINGS
  • ACTION_DATA_ROAMING_SETTINGS

作为后备,您可以显示通用的设置"屏幕(ACTION_SETTINGS)或显示Toast通知,告知用户启用移动数据网络.

As a a fallback you can either show the generic Settings screen (ACTION_SETTINGS) or show a Toast notification telling the user to enable the Mobile Data Network.

这篇关于将用户发送到数据使用设置窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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