TelephonyManager tm = (TelephonyManager)getSystemService(TELEPHONY_SERVICE);
CellInfo ci = tm.getAllCellInfo().get(0) ; // Registered Cell Tower
if (ci instanceof CellInfoGsm) {
((CellInfoGsm)ci).getCellIdentity().getArfcn();
} else if (ci instanceof CellInfoWcdma) {
((CellInfoWcdma)ci).getCellIdentity().getUarfcn();
} else if (ci instanceof CellInfoLte) {
((CellInfoLte)ci).getCellIdentity().getEarfcn();
}错误:
'CellIdentityLte'
中的getArfcn解析方法
发布于 2020-11-11 11:49:03
解决问题;
安装sdkversion到24没有引起注意,这是在API 24中添加的。
https://stackoverflow.com/questions/64784904
复制相似问题