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

Breaking Change: Update heart rate sensor for Wear OS 4+ target #4552

Merged

Conversation

jpelgrom
Copy link
Member

@jpelgrom jpelgrom commented Aug 3, 2024

Summary

Update the permission requirements for the heart rate sensor on Wear OS 4+ to handle the new behavior when targeting it. These permissions need to be requested in two stages like background location. Any user with the sensor currently enabled on Wear OS 4+, will need to re-enable it after updating.

Screenshots

n/a

Link to pull request in Documentation repository

Documentation: home-assistant/companion.home-assistant#1087 n/a

Any other notes

Copy link
Member

@dshokouhi dshokouhi left a comment

Choose a reason for hiding this comment

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

Well this sucks, hopefully Google will change that some day or hopefully health connect will allow it to be pulled. I agree lets merge alongside the API bump.

@dshokouhi
Copy link
Member

Given what we know in #4500 (comment) should we hold off on this?

@jpelgrom
Copy link
Member Author

jpelgrom commented Sep 5, 2024

Oh I completely forgot about your comment, I still wanted to test this because I couldn't find it the first time. I'll do that in a couple of hours and comment.

@jpelgrom
Copy link
Member Author

jpelgrom commented Sep 5, 2024

You're right, I must have missed something during previous tests (or an update happened). Handling this like background location with requesting the main permission first, then the background permission, seems to work. Updating the PR to change it.

(Still a breaking change in a way: because a permission is added, users need to toggle the sensor on again.)

@jpelgrom jpelgrom changed the title Remove heart rate sensor for Wear OS 4+ Update heart rate sensor for Wear OS 4+ target Sep 5, 2024
 - Requesting the background permission separately seems to work and allows the user to keep using this sensor after changing the target SDK version
@jpelgrom jpelgrom requested a review from dshokouhi September 5, 2024 22:12
Copy link
Member

@dshokouhi dshokouhi left a comment

Choose a reason for hiding this comment

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

Thank you for testing and updating the PR so we don't lose a feature :)

@dshokouhi dshokouhi changed the title Update heart rate sensor for Wear OS 4+ target Breaking Change: Update heart rate sensor for Wear OS 4+ target Sep 6, 2024
@dshokouhi dshokouhi merged commit 5b82c20 into home-assistant:master Sep 6, 2024
4 checks passed
@jpelgrom jpelgrom deleted the heart-rate-sensor-android-13 branch September 6, 2024 04:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants