getAllCellInfo returns null in android 4.2.1
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: My Android version is 4.2.1 and I am trying to make use of TelephonyManager.getAllCellInfo() method. In my manifest file I have the ACCESS_COARSE_UPDATES , ACCESS_COARSE_LOCATION , ACCESS_FINE_LOCATION permissions. However that method returns null . 回答1: From TelephonyManager.getAllCellInfo() javadoc: This is preferred over 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, and other types of