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

[Health]: Remove Google Fit support #1014

Merged
merged 22 commits into from
Aug 22, 2024
Merged

Conversation

SlimShadyIAm
Copy link
Contributor

@SlimShadyIAm SlimShadyIAm commented Aug 8, 2024

Google will soon be turning down support for Google Fit in favor of Google Health Connect in the coming months, and as such we have previously planned to remove support for it in the health plugin.

This PR includes also includes a cleanup of the Android code and updates to the documentation.

Changelog

  • Remove Google Fit support in the Android code, as well as Google FIt related dependencies and references throughout the documentation
  • Remove useHealthConnectIfAvailable from the parameters of Health().configure()
  • Remove support for various HealthWorkoutActivityTypes which were supported by Google Fit. Some of these do not have suitable alternatives in Google Health Connect (and are not supported on iOS). The list of removed types include:
    • MOVE_MINUTES
    • AEROBICS
    • BIATHALON
    • BIKING_HAND
    • BIKING_MOUNTAIN
    • BIKING_ROAD
    • BIKING_SPINNING
    • BIKING_UTILITY
    • CIRCUIT_TRAINING
    • CROSS_FIT
    • DIVING
    • ELEVATOR
    • ESCALATOR
    • GARDENING
    • HORSEBACK_RIDING
    • HOUSEWORK
    • IN_VEHICLE
    • INTERVAL_TRAINING
    • KAYAKING
    • KETTLEBELL_TRAINING
    • KICK_SCOOTER
    • KITE_SURFING
    • MEDITATION
    • MIXED_MARTIAL_ARTS
    • P90X
    • POLO
    • RUNNING_JOGGING
    • RUNNING_SAND
    • SKATING_CROSS
    • SKATING_INDOOR
    • SKATING_INLINE
    • SKIING_BACK_COUNTRY
    • SKIING_KITE
    • SKIING_ROLLER
    • SLEDDING
    • STANDUP_PADDLEBOARDING
    • STILL
    • TEAM_SPORTS
    • TILTING
    • TREADMILL
    • VOLLEYBALL_BEACH
    • VOLLEYBALL_INDOOR
    • WAKEBOARDING
    • WALKING_FITNESS
    • WALKING_NORDIC
    • WALKING_STROLLER
    • WALKING_TREADMILL
    • WINDSURFING
    • ZUMBA
  • Add support for OTHER workout type on Android
  • Remove the disconnect method which was previously used to disconnect from Google Fit.
  • Remove the flowRate value from writeBloodOxygen as this is not supported by Health Connect.

@SlimShadyIAm SlimShadyIAm marked this pull request as ready for review August 8, 2024 11:13
@SlimShadyIAm SlimShadyIAm linked an issue Aug 12, 2024 that may be closed by this pull request
Copy link

@yuanchen233 yuanchen233 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@bardram
Copy link
Contributor

bardram commented Aug 21, 2024

Remember to add entry to CHANGELOG and bump version before publishing.

@bardram
Copy link
Contributor

bardram commented Aug 21, 2024

When testing on iOS and pressing "Add Data" the app throws an uncaught exception:

*** Terminating app due to uncaught exception '_HKObjectValidationFailureException', reason: 'HKDiscreteQuantitySample 28D6521E-928C-4889-A5A8-C7A4F7B5699D 30 ms  (2024-08-21 16:10:24 +0200 - 2024-08-21 16:30:24 +0200) requires unit of type Mass. Incompatible unit: ms'

@SlimShadyIAm
Copy link
Contributor Author

When testing on iOS and pressing "Add Data" the app throws an uncaught exception:

*** Terminating app due to uncaught exception '_HKObjectValidationFailureException', reason: 'HKDiscreteQuantitySample 28D6521E-928C-4889-A5A8-C7A4F7B5699D 30 ms  (2024-08-21 16:10:24 +0200 - 2024-08-21 16:30:24 +0200) requires unit of type Mass. Incompatible unit: ms'

Fixed - when writing health datapoints, we weren't checking if the data type is available on the platform. The example app was trying to write Android-exclusive data.

@SlimShadyIAm SlimShadyIAm merged commit e076c8e into master Aug 22, 2024
1 check passed
@SlimShadyIAm SlimShadyIAm deleted the feature/remove-google-fit branch August 30, 2024 12:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[HEALTH] Remove support for Google Fit
3 participants