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.

I like your answer pretty much, but I'm not sure if your right on the "it's totally up to the developer"-part. As far as I can tell, the developer can only decide to get the fine or the coarse location. In other words he can use the LocationManager.NETWORK_PROVIDER and/or LocationManager.GPS_PROVIDER to obtain the location. I think he can not decide or even see, if Wifi or GSM is used, right?
–
Tim BütheSep 29 '10 at 10:25

In the most common case, the developer will not care if the data is coming from WiFi or Cell-ID, but the dev could put in restrictions to only allow the app to work when WiFi is disabled or GPRS/GSM is disabled. I took your question to mean: "Is there a standard sequence that all apps follow" and the answer to that is no. However, with specific regard to the difference between WiFi and Cell-ID, the app developer has limited capability to specifically request one type of location service.
–
JadeMasonSep 29 '10 at 13:43

1

do you know a way to submit Wi-Fi hotspots' location to their database so that I will have a better triangulations in my neighborhood/indoors? I have opened a thread for that questione of mine: android.stackexchange.com/questions/4715/…
–
ComptrolJan 14 '11 at 9:20

A lot of this is carrier specific and I'm not a dev but heres what I could piece together from the interwebs and the trainings I've had in electronic crime investigation:

Yes but it depends on the specific apps LBS priorities which are set by the dev and can be based on current course accuracy, power levels, predefined priorities...

Yes. The carriers have proprietary Wifi base station location DBs.

I can't speak to Android specifically, but generally this is going to be carrier and network type (CDMA or GSM). Phones are capable of both but at least a few years ago they did this work on the handset because of the bandwidth constraints of doing it ota.

I have slightly different answers for #3 : 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.

but is this an option that can be determined by an app developer or even an end user or is it something that is determined by the carrier?
–
MattSep 27 '10 at 20:59

It is mandatory, if you want to use this way for localizing a device. Using triangulation or another method allows you to know where you are versus antenna position. But if you don't know the lat/long of the antenna, you won't be able to get your position on a map. I home I'm clear :)
–
RobSep 28 '10 at 7:43

@Rob But you don't need the carrier to find the location of the tower. Each tower broadcasts a unique ID, anyone can independently pick that up and map it, with no carrier interaction. Google have been doing this for a while for cell towers and WiFi access points. The Google Streetview car picks the info up as it travels, and users of Google Maps on various platforms also send back anonymous data matching GPS fixes with antenna and wifi IDs and strength. This is similar to how Google pick up a lot of their traffic data in cities, they aggregate speed and positions from lots of Maps users.
–
GAThrawnSep 29 '10 at 10:28

Are you sure ? Looks surprising. For instance, in Germany (and other countries in Europe), Google has been sued for collecting wifi information, so looks like they did not use this resource. For the GSM database, if Google owns one, it should be accessible, and I never heard about it.
–
RobSep 29 '10 at 13:40

1

@Rob googlemobile.blogspot.com/2008/06/… "The phone knows the ID of the cell tower that it's currently using. If the phone has GPS, the Maps application on the phone sends the GPS coordinates along with the cell ID to the Google location server." can't find the link right now but they announced a while ago that the Blackberry Google Maps app was sending back nearby WiFi SSID and strength for the same reason. This isn't the same as the programming "error" in the Streetview software they're being sued over that captured more WiFi data than it was meant to.
–
GAThrawnSep 30 '10 at 11:39

You phone knows what the closest towers are. There is a provider database for each country which tower id is located where on the map. 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.