1

I have an app that uses a MapsActivity, the problem that I'm having is that when I got the realese key from the Android Developer site, the accuracy got a lot worse than with the debug key. When I was using the debug key, its accuracy was almost 100% good. Now my realese app with the realese key shows the location with a minimal error of 15 meters. Moreover, a friend of mine who used the app, told me that it actually showed his location 15 km far from his current position.

Is there any way to improve the Google Maps API's accuracy? Or is there any getLocation method improving it?

Thanks

Miquel Perez
  • 445
  • 1
  • 6
  • 17

1 Answers1

2

You can set the accuracy of the locationClient, using the locationRequest. E.g.

  mLocationRequest = LocationRequest.create();
  mLocationRequest.setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY);
  mLocationClient.requestLocationUpdates(mLocationRequest, (LocationListener) this);

You can also set the frequency of updates. If you need something highly precise, take a bunch of readings over a few seconds. Then look at the "accuracy" number on each reading. Toss out any readings whose accuracy is significantly less accurate than the others. Then average the rest

If you use lower accuracy, it's going to average gps data with wifi and cellular results. GPS consumes more battery, so it uses it less often on this setting. Wifi uses a physical address lookup, since its always moving me towards the public road near my house, even when I'm in the middle of it.

hunain60
  • 188
  • 3
  • 6