Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Distance missing from Save workout #357

Closed
SeanDunford opened this issue Apr 30, 2024 · 1 comment · Fixed by #356
Closed

Distance missing from Save workout #357

SeanDunford opened this issue Apr 30, 2024 · 1 comment · Fixed by #356

Comments

@SeanDunford
Copy link
Contributor

Background

Save Workout did not include distance which is an odd api choice because fetch workout does include distance. For my own personal needs adding distance to workout saving was necessary and i imagine it will be valuable to other users as well. I did mention a notice of missing permissions somewhere in the code but i tested this code and it works as is. Modeled it after the way calories and intensity are optionally added into the save workout payload.

Mention in comments about permission restriction
https://github.com/StasDoskalenko/react-native-google-fit/blob/master/android/src/main/java/com/reactnative/googlefit/ActivityHistory.java#L390

    // distance scope is missing here due to permission restriction
    // will be added in the future while distance is also available from saveWorkout()

Proposed Solution

Add distance in a similar manner to calories/intensity

@SeanDunford
Copy link
Contributor Author

PR:
#356

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant