androidtelephonymanager

Android TelephonyManager getCelllLocation, getting deprecated?


As per Android doc, it says getCellLocation API call will be deprecated in future. Does anyone have an idea why it is getting deprecated? If this is deprecating then, is there any other alternative to get Cell Location information?

Reference


Solution

  • The replacement method will be TelephonyManager.getAllCellInfo().

    From the description in the documentation:

    This method is preferred over using getCellLocation(). However, for older devices, getAllCellInfo() may return null. In these cases, you should call getCellLocation() instead.