I am writing my own background location updates for interval of every 5 minutes in android. I would like to know the difference between setInterval and setFastestInterval
Also: Is there an inbuilt function to check the location updates only if the distances of the first update are more than 20meters with the second update?
LocationRequest has a method you can use to set the minimum distance between updates.
int minimumDistanceBetweenUpdates = 20;
LocationRequest request = new LocationRequest();
request.setMinimumDisplacement(minimumDistanceBetweenUpdates);
// ... request.setInterval(interval); etc