I want to obtain the current Local Area Code of the Cell the handset is currently loged in to. How do I get this information?
How do I see which of the cells from the list am I connected to, or does the list only contains the neighbour cells?
Janusz
2010-02-16 21:13:05
I think that this is only the list of cells you are connected to.
skyman
2010-02-18 10:17:12
You are only connected to one cell at a time, the cells in the list are the cells that you could also be connected to.
Janusz
2010-02-22 12:28:07
A:
To get the current Local Area code you have to get a TelephonyManager
TelephonyManager tm = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);
then you can get a Gs,CellLocation from the TelephonyManager.
GsmCellLocation location = (((GsmCellLocation)tm.getCellLocation());
the GsmCellLocation has a getLac Method that returns the current LAC.
Janusz
2010-03-02 09:10:19
A:
You can get cell to which you are connected in a following way:
http://developer.android.com/reference/android/telephony/TelephonyManager.html#getCellLocation%28%29
TelephonyManager tm = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE)
CellLocation cl = tm.etCellLocation();
if (cl instanceof GsmCellLocation){
GsmCellLocation gcl = (GsmCellLocation)cl;
int lac = gcl.getLac();
}
radek-k
2010-08-18 22:43:47