- 它与服务器通信以通过WiFi获取位置吗？ （例如，将WIFIS的SIDS发送到Web服务）
I read that Android (and similar operation systems, e.g. iOS) get the current coarse location by using either WiFi or GSM tower triangulation. I get the basic idea but have questions about the details.
It is really up to the developer as to how to implement the location service. The full description is available on the Android Developers official site (as captured on 24 Sep 2010)
The graph about 1/3rd down the page is pretty useful to see what a typical app might do, but again, it is completely up to the app developer. The location service types are:
If the app requests permission for coarse location only, it will not use the GPS to determine location.
To answer your questions:
An article by Francisco Kattan on "Dynamic Cell-ID" has some of the detail. The short version is that, when you use an app like Google Maps, the app will send the current Cell-ID information back along with your current GPS fix. In this way, Google gets a very good sampling of the signal strengths in various locations and is able to build a very rich database.
A lot of this is carrier-specific and I'm not a dev but here's what I could piece together from the interwebs and the trainings I've had in electronic crime investigation:
Your phone knows what the closest towers are.
There is a provider database for each country in which the location of tower IDs on the map is stored. This database might be small enough to be preinstalled by your provider or supplied over the air. How an Android phone gets this data, I don't know.
Does it communicate with the carrier to get the position via the GSM towers or is this done on the device?
The device could be used if you want to use triangulation, but you need to use the carrier if you want to match the Cell-ID and the localization of the GSM (or CDMA) tower.