如何获得可用的网络供应商的名单?如何获得、供应商、名单、网络

2023-09-12 06:49:10 作者:等不出结果

我试图让现有的蜂窝网络供应商的名单。不幸的是,我找不到任何服务或类可能会帮助我。有没有人对如何管理这一点的想法?它必须是可能的,因为你可以看到列表中,当你去到你的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 。我想你可以做同样的 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将被调用来遍历可用网络