Receive CID, LAC and signal strength of all cell towers within range

I am currently trilaterating my Android with cells on my network. This is even more accurate than I thought. But not as accurate as I want. So I want to attract more towers than get from getNeighboringCellInfo. I want to get the cell id and signal level of each tower in range. About each network operator. Is there a way to "ping" the towers, so they respond to cellID, Lac and signalstrength? Somehow it should be possible. And is it possible to scan 2G and 3G (and 4G) in parallel? Or can I switch between them programmatically? Any suggestions? I hope I'm clear enough.

+5
source share
1 answer

, TelephonyManager getNeighboringCellInfo() - , .

, :

/* first you wanna get a telephony manager by asking the system service */
TelephonyManager tm = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);

/* then you can query for all the neighborhood cells */
List<NeighboringCellInfo> neighbors = tm.getNeighboringCellInfo();

/* here something you can get from NeighboringCellInfo */
for (NeighboringCellInfo n : neighbors) {
    Log.v("CellInfo", "" + n.getCid());
    Log.v("CellInfo", "" + n.getLac());
    Log.v("CellInfo", "" + n.getPsc());
    Log.v("CellInfo", "" + n.getRssi());
}

, , ACCESS_COARSE_LOCATION READ_PHONE_STATE, , API , .

, 2G. 3G .

+1

All Articles