Skip to content

Commit

Permalink
Disable speed and distance scopes
Browse files Browse the repository at this point in the history
  • Loading branch information
mahnuh committed Nov 17, 2023
1 parent 051d0dc commit ddf36ee
Showing 1 changed file with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ public class GoogleFitPlugin extends Plugin {
.addDataType(DataType.TYPE_WEIGHT, FitnessOptions.ACCESS_READ)
.addDataType(DataType.TYPE_CALORIES_EXPENDED, FitnessOptions.ACCESS_READ)
.addDataType(DataType.AGGREGATE_CALORIES_EXPENDED, FitnessOptions.ACCESS_READ)
.addDataType(DataType.TYPE_DISTANCE_DELTA, FitnessOptions.ACCESS_READ)
.addDataType(DataType.AGGREGATE_DISTANCE_DELTA, FitnessOptions.ACCESS_READ)
.addDataType(DataType.TYPE_SPEED, FitnessOptions.ACCESS_READ)
// .addDataType(DataType.TYPE_DISTANCE_DELTA, FitnessOptions.ACCESS_READ)
// .addDataType(DataType.AGGREGATE_DISTANCE_DELTA, FitnessOptions.ACCESS_READ)
// .addDataType(DataType.TYPE_SPEED, FitnessOptions.ACCESS_READ)
.addDataType(DataType.TYPE_ACTIVITY_SEGMENT, FitnessOptions.ACCESS_READ)
.addDataType(DataType.TYPE_HEIGHT, FitnessOptions.ACCESS_READ)
.build();
Expand Down Expand Up @@ -276,8 +276,8 @@ public void getActivities(final PluginCall call) throws ParseException {
.read(DataType.TYPE_ACTIVITY_SEGMENT)
.read(DataType.TYPE_CALORIES_EXPENDED)
.read(DataType.TYPE_STEP_COUNT_DELTA)
.read(DataType.TYPE_DISTANCE_DELTA)
.read(DataType.TYPE_SPEED)
// .read(DataType.TYPE_DISTANCE_DELTA)
// .read(DataType.TYPE_SPEED)
.setTimeRange(startDate, endDate, TimeUnit.MILLISECONDS)
.bucketByActivitySegment(1, TimeUnit.MINUTES)
.build();
Expand Down Expand Up @@ -331,13 +331,13 @@ private JSObject processData(DataReadResponse response) {
summary.put("activityTypeId", dataPoint.getValue(Field.FIELD_ACTIVITY).asInt());
break;

case "com.google.distance.delta":
summary.put("distance", dataPoint.getValue(Field.FIELD_DISTANCE).asFloat());
break;
// case "com.google.distance.delta":
// summary.put("distance", dataPoint.getValue(Field.FIELD_DISTANCE).asFloat());
// break;

case "com.google.speed.summary":
summary.put("speed", dataPoint.getValue(Field.FIELD_AVERAGE).asFloat());
break;
// case "com.google.speed.summary":
// summary.put("speed", dataPoint.getValue(Field.FIELD_AVERAGE).asFloat());
// break;

case "com.google.calories.expended":
summary.put("calories", dataPoint.getValue(Field.FIELD_CALORIES).asFloat());
Expand Down

0 comments on commit ddf36ee

Please sign in to comment.