getAllCellInfo returns null in android 4.2.1 -
my android version 4.2.1 , trying make use of telephonymanager.getallcellinfo() method. in manifest file have access_coarse_updates, access_coarse_location, access_fine_location permissions. method returns null.
from telephonymanager.getallcellinfo() javadoc:
this preferred on using getcelllocation although older devices may return null in case getcelllocation should called.
some sources report method implemented on cdma/lte devices, , other types of devices (including gsm/lte ones) return null. implemented, return lte cells.
telephonymanager.getcelllocation() return gsm/umts or cdma cells. it limited 1 cell, 1 device registered. safest bet if sure code running on gsm/umts or cdma devices, , if interested in cell device registered.
to information other surrounding cells, use telephonymanager.getneighboringcellinfo(). however, limited gsm/umts cells. also, implementation depends on radio firmware. samsung devices (and quite few others) return empty list.
conclusion: getting information nearby cells on android pretty messy business @ moment. may need use combination of 3 methods information want, , way, things may inaccessible.
Comments
Post a Comment