GetNeighboringCellInfo () returns a null list

I'm trying a bit to get information about neighboring cells (for the current cell information, everything works fine):

mTelephMgr=(TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE); neighbours=mTelephMgr.getNeighboringCellInfo(); 

I tried with 2G / 3G networks with Galaxy S (2.2.1) and Nexus S (2.3.1) and two different operators, but I always get an empty list for neighbors. Networks are based on GSM (Spain).

I was looking for time to search the Internet, and although some people report the same problem, others seem to work fine.

Any suggestions?

Thank you very much in advance.

+6
android telephonymanager
source share
2 answers

This is not a problem with the phone brand, the reason is that using a 3G connection you cannot get information about neighboring cells (returns an empty list). You need to switch to 2G to get it.

0
source share

Any ways, I'm not sure if this works. Because your code does not return a LIST. it should be a list. This is what I did: -

 TelephonyManager teleManager = (TelephonyManager)getApplicationContext().getSystemService(Context.TELEPHONY_SERVICE); List<NeighboringCellInfo> neighborInfo = teleManager.getNeighboringCellInfo(); Log.e("xxxxx", "Size: " + neighborInfo.size() ); 

This works because I used it. But if anyone finds out why the List is always empty, please let me know.

0
source share

All Articles