如何获得可用的网络供应商的名单? [英] How to get a list of available network providers?

查看:160
本文介绍了如何获得可用的网络供应商的名单?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图让现有的蜂窝网络供应商的名单。不幸的是,我找不到任何服务或类可能会帮助我。有没有人对如何管理这一点的想法?它必须是可能的,因为你可以看到列表中,当你去到你的Andr​​oid设备上的设置。

I'm trying to get a list of the available cellular network providers. Unfortunately I can't find any service or class that might help me out. Does anyone have an idea on how to manage this? It has to be possible since you can see the list when you go to the settings on your Android device.

推荐答案

由于Android是开源的我看了一下源终于找到了一些所谓的 INetworkQueryService 。我想你可以做同样的<一个href="https://github.com/dzo/packages_apps_phone/blob/master/src/com/android/phone/NetworkSetting.java"相对=nofollow> Android的设置,执行并与该服务进行交互: 通过NetworkSettings.java一些指导意见:

Since Android is open source I had a look at the sources and finally found something called INetworkQueryService. I guess you can do the same as the android settings implementation and interact with this service: Some guidance through NetworkSettings.java:

  • 的onCreate开始NetworkQueryService并结合其
  • loadNetworksList()通知服务,以查询网络运营商
  • INetworkQueryServiceCallback是evalutated,如果事件EVENT_NETWORK_SCAN_COMPLETED有人提出,networksListLoaded将被调用来遍历可用网络

这篇关于如何获得可用的网络供应商的名单?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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