1

I'm most of code used a little trying to get neighbor cells info (for the current cell info, everything works fine)

 List<NeighboringCellInfo> neighborCells = telMgr.getNeighboringCellInfo();
 if (neighborCells == null) {
     Log.d("cells", "Neighbor cells is null");
 } else {
     for (NeighboringCellInfo cell : neighborCells) {
         Log.d("cells", cell.getCid()+"-"+cell.getLac()+" "+(-113+cell.getRssi()*2)+"dB");

         String neighboringcell= cell.getCid()+"-"+cell.getLac()+" "+(-113+cell.getRssi()*2)+"dB";

         Toast.makeText(getApplicationContext(), neighboringcell, Toast.LENGTH_LONG).show();
         mNeighboringcell.setText(neighboringcell);
     }
 }

i have used this code and give this permission

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_UPDATES" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />

and i am tested Samsung 4.0 and lava 4.1

Please give me solution

Thanks

Sunil
  • 53
  • 7
  • possible duplicate of [android: NeighboringCellInfo always empty !? why?](http://stackoverflow.com/questions/9328158/android-neighboringcellinfo-always-empty-why) – user1725145 Apr 28 '14 at 08:06