Android在NR情况下获取5G的rsrp,rsrq和ssnr,pci和ci值。
TelephonyManager tm = (TelephonyManager) getApplicationContext().getSystemService(Context.TELEPHONY_SERVICE);
List<CellInfo> allCellInfo = tm.getAllCellInfo();
if (allCellInfo != null && allCellInfo.size() > 0) {
for (int i = 0; i < allCellInfo.size(); i++) {
CellInfo info = allCellInfo.get(i);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
//5G
if (info instanceof CellInfoNr) {
CellIdentityNr nr = (CellIdentityNr) ((CellInfoNr) info).getCellIdentity();
int pci = nr.getPci();
long ci = nr.getNci();
CellSignalStrengthNr nrStrength = (CellSignalStrengthNr) ((CellInfoNr) info).getCellSignalStrengt
now_rsrp = "-" + nrStrength.getSsRsrp() + "";
String s = ((CellInfoNr)CellInfoNr info).toString();
}
}
}
}
博客介绍了在Android系统中,于NR(新空口)情况下获取5G的rsrp、rsrq、ssnr、pci和ci值的相关内容,聚焦于Android系统与5G参数获取的信息技术。
316

被折叠的 条评论
为什么被折叠?



