本文介绍了获取MCC和MNC对黑莓运营商的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想获得MCC和MNC BlackBerry设备。我用这code:

I am trying to get the MCC and MNC for the blackberry device. I am using this code:

int code = RadioInfo.getCurrentNetworkIndex();
int mcc = RadioInfo.getMCC(code);
int mnc = RadioInfo.getMNC(code);
String mccS = Integer.toString(mcc);
String mncS = Integer.toString(mnc);

我在互联网上正确的价值观搜索时得到的值,BYT,我发现,MCC和MNC从我在这个code获得的那些不同。例如在黎巴嫩运营商阿尔法,我应该得到:

I am getting values, byt when searching for the right values on the internet, I found that the MCC and MNC differ from the ones I obtained in this code. For example for the operator alfa in lebanon, I should obtain:

中冶= 415和MNC = 1

Mcc = 415 and MNC = 1

我获得:

中冶= 1045和MNC = 1

Mcc = 1045 and MNC = 1

这是为什么发生?这是获得MCC和MNC的正确方法?在此先感谢

Why Is that happening? Is this the right way to get the MCC and MNC? Thanks in advance

推荐答案

您使用
获得MCC

you get mcc by using

String mcc = Integer.toHexString(RadioInfo.getMCC(RadioInfo.getCurrentNetworkIndex()));

这篇关于获取MCC和MNC对黑莓运营商的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-25 04:45