android 禁用2g,如何在Android SDK中启用/禁用3G / 2G

没有导出SDK功能可以在2G和3G之间切换.对于给定的设备,您可能可以找出私有功能,但除非使用系统密钥签名,否则它将无效.

您可以通过启用飞行模式禁用无线电.

并且您可以创建一个快捷方式来直接打开相应的设置活动,而不是通过几个级别的菜单来实现.

如果你自己构建,你可能会增加你真正想要的功能,但除了你自己以外,这对任何人都没有用.

编辑:更多细节 – 要了解它的工作原理,请查看设置菜单代码(默认版本,给定设备会有所不同):

Edit: AOSP is no longer served from kernel.org. A browsable mirror of

the current phone repository is at

07001 however due to

evolution of code organization there is no longer a Settings.java

there. One might either use git to reconstruct the version above from

this repository, or else try to figure out where the code has migrated

to in current releases.

您需要找出要在其间切换的实现特定的NT_MODE_常量集.并且您需要能够写入安全设置,这需要使用系统密钥进行签名.除非是自定义构建,否则您可能无法访问它.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值