I\'m trying to get the neighbouring cell info in Android but the function getNeighboringCellInfo()
always return null.
I used the following code :
I think, maybe you haven't set all necessary permissions in Manifest. look here Null Issue with NeighboringCellInfo, CID and LAC
If you think you have them, put the manifest in the question, too, please.
If you can run logcat, try running logcat -b radio. If you are lucky, the RIL code will be spitting out debug messages, showing the actual request to the modem for the neighboring cell info. It could well be that the modem is just returning an empty list. If this is the case, it has nothing to do with permissions, and there is not much you can to fix it.
The cellid implementation varies from mobile device to mobile device since these features are considered to be optional. for example:
Samsung (all devices): getNeigbouringCells () is not supported at all and always returns an empty list.
according to this: http://wiki.opencellid.org/wiki/Android_library
and this: https://code.google.com/p/android/issues/detail?can=2&start=0&num=100&q=&colspec=ID%20Type%20Status%20Owner%20Summary%20Stars&groupby=&sort=&id=24306