Reputation: 16053
When I override the above mentioned function, and log the CellLocation, I receive the following value
[425,56301,-1]
When I roam around a bit, The above value changes to
[425,56302,-1]
and [425,56303,-1]
What does these values represent? I think 56301
is CellId. What are other two?
Upvotes: 0
Views: 1954
Reputation: 35970
Since CellLocation can be either GsmCellLocation or CdmaCellLocation, you have to look at those classes.
In your case, you're using an instance of GsmCellLocation, whose "toString()" is implemented as follows:
@Override
public String toString() {
return "["+ mLac + "," + mCid + "," + mPsc + "]";
}
we can conclude that:
About LAC
Location Areas are the logical entity which are defined in cellular networks to decrease the signalling traffic in the network. In short, location area is a group of cells. Each location area is identified by LAC.
When you're moving around, your phone is using different base stations. The phone always knows which base station it can use, because phone is measuring the signal levels pretty often.
On example: if you are in a range of a cell A, and then you move away, and some new cell will have a better range, your phone will notice that immediately. But it should not notify network about that fact, because it will generate enormous volume of signalling data (service cell is being changed pretty often).
On the other hand, what happens when someone is trying to call you? Network has to notify your phone. But it does not know where the phone is. Well, it could send a message to every base station and broadcast it over the radio, but again, this will be a huge amount of signalling traffic. So the network has to know here the phone is.
So, we have a two forces here:
Location Areas are a way of finding a good balance here.
Upvotes: 7