What I am trying to do
- Get users location at specified interval using a
Service
so that as long as application is runningLocation
can be retrieved
Problem I am facing
- Even if I am in same location for long time, each time the
Latitude
,Longitude
changes with differentAccuracy
levels - Due to this, even if user has not changed his location, if I am plotting the
Location
inGoogleMap
it makes jump to very near by places being my zoom level18.0f
mGoogleMap.animateCamera(CameraUpdateFactory.newLatLngZoom(currentLatLon, 18.0f));
I have tried approaches mentioned in stackoverflow Link One and stackoverflow Link Two
But even though I am sitting in the same location and retrieving location in regular interval, the Lat and Lon differs like this , see the highlighted values at end of every lat lon:
Latitude: 12.8379283 Long: Longitude: 77.6647266
Latitude: 12.8379233 Long: Longitude: 77.6647368
Latitude: 12.8379285 Long: Longitude: 77.6647506
Latitude: 12.8379245 Long: Longitude: 77.6647546
- Now I experimented with this approach GITHub reference
but still every time the Accuracy
differs and Lat Lon slightly changes.
As my code trials are exactly same as mentioned in link's I am not just copy pasting here. How can this be resolved