How do I calculate the distance covered by the user using the google fit API? Currently I am using google Fit History Api like this :
DataReadRequest readRequest
You have to add the scope as below:
.addScope(new Scope(Scopes.FITNESS_LOCATION_READ))