Get Accuracy of myLocationOverlay

764 Views Asked by At

Is there a way to get the accuracy of the fix from MyLocationOverlay? It obviously knows how accurate it is since it draws the circle of the area of how accurate it is. Is there away to get this value?

Thanks

2

There are 2 best solutions below

0
Howard Hodson On BEST ANSWER

Code from my location listener in one of my apps...

      public void onLocationChanged(Location location) {
        currentLatitudeE6 = (int) (location.getLatitude() * 1E6);
        currentLongitudeE6 = (int) (location.getLongitude() * 1E6);
        currentAccuracy = location.getAccuracy();
        hasCurrentPosition = true;
        gpsMessage = "GPS Tracking";
        updateMap();
    }
0
jeet On

Implement Location Listener by locationManager.requestLocationUpdates method, check following link:

http://hejp.co.uk/android/android-gps-example/