I tried to retrieve Cid and Lac for currently connected cell, but using
public void GetCid(){
int CID;
int LAC;
GsmCellLocation xXx = new GsmCellLocation();
CID = xXx.getCid();
LAC = xXx.getLac();
Toast output = Toast.makeText(getApplicationContext(), "Base station LAC is "+LAC+"\n"
+"Base station CID is " +CID, Toast.LENGTH_SHORT);
output.show();
}
The only thing I get is -1 value for both parameters (I am on 2G). May be I do something wrong or there is another way to get Cid and Lac of current cell?