You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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
Proposed Solution
Add distance in a similar manner to calories/intensity
The text was updated successfully, but these errors were encountered: