How is location accuracy measured in Android?

To answer one part of the question, the number is the radius of 68% confidence, meaning that there is a 68% chance that the true location is within that radius of the measured point in meters. Assuming that errors are normally distributed (which, as the docs say, is not necessarily true), that means that this is one standard deviation. For example, if Location.getAccuracy returns 10, then there's a 68% chance the true location of the device is within 10 meters of the reported coordinates.

http://developer.android.com/reference/android/location/Location.html#getAccuracy()


The location is a tricky task to do, when you have a limited battery life and when there is no GPS signal in buildings and in areas with many big building and etc. But Android makes it a much easier. When you request a location, you just have to specify what accuracy do you need.

If you specify that you want an accuracy for an example *100 meters*, Android will try to get the location and if it can get a location for accuracy 70 meters, it will return it to you, but if Android can get a location with an accuracy higher than 100 meters, your application will wait and will not receive anything till there is a location in such accuracy.

Typically Android will first get the Cell ID and then will send it to Google server, which maps such Cell IDs and the server will return a latitude and longitude with an accuracy which is low for an example 1000 meters. By this time Android will also try to see all WiFi networks in the area an will send information about them too to the Google server and if possible Google server will return a new location with higher accuracy for an example 800 meters.

By this time the GPS will be on. The GPS device needs at least 30 seconds from a cold start to get a fix, so if can get a fix it will return latitude and longitude but again with an accuracy, which will be the highest possible for an example 100 meters. The longer the GPS works, the better accuracy you will get.

Important notice: The first two methods requires an internet connection. If there is no data connection, you will have to wait for the GPS, but if the device is in a building, you will probably get no location.