Google fit Recording stesp and scopes

Viewed 40

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

0 Answers
Related