androidtelephonymanagercellid5g

How to get cellid and pci in 5g SA


I am developing an app in which i need some network parameters cell id and pci.I have 5g enable device with android 10. I am trying to access cell id through telephonic manager here is code.

List<CellInfo> allCellInfo = telephonyManager.getAllCellInfo();

for (CellInfo info : allCellInfo){ if (info instanceof CellInfoNr && info.isRegistered()){ }}

But allCellInfo getting null.I am talking about 5g SA (Qualcomm device).

I have seen this post this but not really helps. Please help


Solution

  • So search a lot but didnt find any relevant answer finally i update my Android 10 5g device to Android 11 5g device and it works for me with the same function.