我怎样才能得到有关netWorkOperator
信息CodeNameOne
?我需要从android获取mcc
和获取。mnc
我发现这段代码可以在android上得到它。
TelephonyManager tel = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);
String networkOperator = tel.getNetworkOperator();
if (networkOperator != null) {
int mcc = Integer.parseInt(networkOperator.substring(0, 3));
int mnc = Integer.parseInt(networkOperator.substring(3));
}