I tried to get user location when user was movement. I wrote below code and i set smallest displacement to 30 meter and interval to 0 millisecond that i get location in every 30 meter movement but my application not worked correct. If i stop in a place, the application didn't get location and this is true but when i moved, sometimes i get location in 100 meter movement or more. Why? If i get location in more than 30 meter, i lost some points and this is important for me.
This is My Code for request location update:
private void createLocationRequest() {
mLocationRequest = new LocationRequest();
mLocationRequest.setInterval(0);//(UPDATE_INTERVAL_IN_MILLISECONDS);
mLocationRequest.setFastestInterval(0);//(FASTEST_UPDATE_INTERVAL_IN_MILLISECONDS);
mLocationRequest.setSmallestDisplacement(30);
mLocationRequest.setMaxWaitTime(MAX_WAITE_TIME);
mLocationRequest.setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY);
}