1

i am looking at this example https://developers.google.com/android/reference/com/google/android/gms/fitness/RecordingClient where they are using only scope with permission FitnessOptions.ACCESS_READ.

I want to develop simple Step counter. What scopes scope permission i need? I am not sure when i am using

Fitness.getRecordingClient(requireContext(), account)
            .subscribe(DataType.TYPE_STEP_COUNT_DELTA )

if i need only access_read

val fitnessOptions = FitnessOptions.builder()
        .addDataType(DataType.TYPE_STEP_COUNT_DELTA, FitnessOptions.ACCESS_READ)
        .addDataType(DataType.AGGREGATE_STEP_COUNT_DELTA, FitnessOptions.ACCESS_READ)
        .build()

thanks

Klimoma
  • 11
  • 2
  • I think you're on the right track. The scope TYPE_STEP_COUNT_DELTA is for capturing the number of steps taken. Other step counting is TYPE_STEP_COUNT_CADENCE this will let you capture the walking cadence, measured in steps per minute. – Arel Guatno May 10 '22 at 14:48

0 Answers0