From TelephonyManager.getAllCellInfo() javadoc:
This is preferable to using getCellLocation, although for older devices this may return null, in which case getCellLocation should be called.
Some sources report that this method is only implemented on CDMA / LTE devices, while other types of devices (including GSM / LTE) return null. Where implemented, it will return only LTE cells.
TelephonyManager.getCellLocation() will only return GSM / UMTS or CDMA cells. It is limited to one cell, the one with which the device is currently registered. This is your safest bet if you are sure that your code will only work on GSM / UMTS or CDMA devices, and if you are only interested in the cell with which the device is currently registered.
For information about other surrounding cells, use TelephonyManager.getNeighboringCellInfo() . However, it is limited to GSM / UMTS cells. In addition, its implementation depends on the firmware of the radio. Most Samsung devices (and many others) will return an empty list.
Conclusion: getting information about the nearest cells on Android is a pretty dirty business at the moment. You may need a combination of all three methods to get the information you need, and even then some things may not be available.
user149408
source share