Search code examples
androidmylocationoverlay

Get Accuracy of myLocationOverlay


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


Solution

  • 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();
        }