How can i get LTE Cell id(PCI) and LAC on API 19 ?
i have tried to use:
List <CellInfo> cellInfoList = telephonyManager.getAllCellInfo();
etc.. But it seems that it returns empty list.
I've created an app that deals very closely with all the TelephonyManager and PhoneStateListener stuff, and I can tell you that there are tons of bugs between the two of them, mainly from different implementations by cell providers and manufacturers, with Samsung being the worse from what I can see. So, because you are getting that error I'll guess that you are using a Samsung device lol.
I've tested on many different devices and cell providers, TelephonyManager.getAllCellInfo() tends to work the best for getting the cell info. Your next bet is to listen for callbacks in PhoneStateListener.onCellInfoChanged().
Protip: Boths methods return a CellInfo object, but if you call them both at the same time, they will not always have the same values. ;)