I had this problem, when calculating the distance between two points on the map, the data update is not every 1 kilometer there at least, but every 50 - 90 km I count like this:
public void getDistanceMeters() { Location locationA = new Location("point A"); locationA.setLatitude(lat); locationA.setLongitude(lng); Location locationB = new Location("point B"); locationB.setLatitude(lat2); locationB.setLongitude(lng2); int currentDistance = (int) locationA.distanceTo(locationB) / 1000; totalDistance += Math.abs(distance - currentDistance); distance = currentDistance; }
Maybe you need to change something that would be updated more often?