设置数据漫游开启/关闭 [英] Set Data roaming on/off

查看:477
本文介绍了设置数据漫游开启/关闭的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我怎么能编程设置数据在我的Andr​​oid应用程序漫游开/关?

How could I programmatically set data roaming on/off in my android application ?

推荐答案

如果数据漫游是目前的话,我想你可以操纵的访问,以使其显示一个数据服务不可用点名称。请参阅此帖子这还链接到的 apndroid 。你可以浏览他们的源代码,看看他们采取的方法。

If data roaming is currently on, then I think you can manipulate the Access Points Names in order to make it appear that a data service isn't available. See this post which also links to apndroid. You could browse their source and see the approach they have taken.

如果数据漫游已设置为关闭的用户,那么这种做法是行不通的。虽然你可以提示用户打开它作为您的安装/设置过程中,这是路线apndroid采取的一部分。

If data roaming has been set to off by the user, then this approach won't work. Though you could prompt users to turn it on as part of your install/setup process, which is the route apndroid take.

apndroid还提供 API 改变这几样设置,这可能比重新实现相同的功能更加方便。

apndroid also provide an API for changing these kind of settings, which might be more convenient than reimplementing the same functionality.

这篇关于设置数据漫游开启/关闭的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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