List<CellInfo> cellInfoList = telephonyManager.getAllCellInfo();
First, I got total cellInfoList
, and separated to CellInfo
cellRSRP = ((CellSignalStrengthNr) ((CellInfoNr) cellInfo).getCellSignalStrength()).getCsiRsrp();
I tried to get 5G RSRP rate for a few days, and this is the best I can approach and this doesn't work.
When It comes to LTE Cell Data,
cellRSRP = ((CellInfoLte) cellInfo).getCellSignalStrength().getRsrp();
It works like this, and It outputs the value well.
The Difference of these two Codes is:
Change
CellInfoLte
->CellInfoNr
Additional
CellSignalStrengthNr
casting
(Because(CellInfoNr) cellInfo).getCellSignalStrength()
returnsCellSignalStrength
, NotCellSignalStrengthNr
.)(Deliberately casted.)
Is 5G Cell Signal Strength measurement isn't ready by now?
I've spent a lot of time in this problem, but didn't found a single solution.
I have a similar issue and the following casting seems to be working. Unfortunately, there is not possible to test it on real 5g radio in our country.