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

Added Healthkit Write support #182

Closed
wants to merge 7 commits into from
Closed

Added Healthkit Write support #182

wants to merge 7 commits into from

Conversation

Matthew-Pitzer
Copy link
Contributor

I've added HealthKit write support with the following changes.

@thomasnilsson
Copy link
Contributor

Thanks for the PR, but we would like to have it available on both platforms. Do you know if it is possible on Android as well?

@Matthew-Pitzer
Copy link
Contributor Author

Right now Google has halted any new requests for apps to write to restricted data type for the foreseeable future, which unfortunately happens to encompass pretty much every vital reading. Here's the link where google talks about it: https://developers.google.com/fit/datatypes/restricted.

@thomasnilsson
Copy link
Contributor

Thanks a lot. I will take a closer look and merge when I have done so.

@thomasnilsson
Copy link
Contributor

@bardram

@carlleeswanson
Copy link

carlleeswanson commented Nov 21, 2020

Right now Google has halted any new requests for apps to write to restricted data type for the foreseeable future, which unfortunately happens to encompass pretty much every vital reading. Here's the link where google talks about it: https://developers.google.com/fit/datatypes/restricted.

From the link above, it appears to me that Google has not "halted" writing to restricted data types, but rather that the app must be verified for write access to those scopes. If that is true, then it seems that it is the responsibility of the app to ensure that it has the correct scopes and to fail gracefully if not. For those that go through Google's verification process, writes "should" work fine. So I hope that you will make this available for both Android and iOS. It would be sad (and confusing) to have parts of this package not work fully on Android.

@carlleeswanson
Copy link

Thanks a lot. I will take a closer look and merge when I have done so.

I am concerned/confused about the replacement of Metric units with Imperial units in this PR. That seems like a major breaking change. Wouldn't it be better to add Imperial units if they are needed?

@Matthew-Pitzer
Copy link
Contributor Author

@carlleeswanson I was only conveying that Google will not allow me to request permission to write for my account, so I have no way of testing the code I would have to write to enable Android support as well.

@carlleeswanson The switch of units is a good catch. It should be switched back.

@carlleeswanson
Copy link

@thomasnilsson Do you have any estimate of when this new (ios-only) write functionality might be released? I'm very eager to use it!

@bardram
Copy link
Contributor

bardram commented May 28, 2021

Hi @carlleeswanson and @Matthew-Pitzer -- is this still relevant? Thomas is no longer working for me, but I was looking into this PR and is considering to merge it.

@carlleeswanson
Copy link

carlleeswanson commented May 28, 2021

Hi @bardram. Yes, this is still relevant. I think this would be a very useful capability and would like to see it merged. At the same time, I understand and agree with Thomas' desire to have the health package consistent across mobile platforms. Having this functionality available only on iOS makes it less useful.

Do you have any ideas on how we might be able to include the support on Android? Unfortunately, I'm not familiar with Android native development, so can't be of much help. @Matthew-Pitzer, is it possible for you to implement the changes and have @bardram test them in his environment? Any other ideas?

@bardram
Copy link
Contributor

bardram commented Jun 2, 2021

Hi all. I will merge this PR.

BUT - before doing this - is the issue with the Metric versus Imperial metrics solved - @Matthew-Pitzer ?

@matsunanaro
Copy link

May I ask how's the issue with metric vs imperial unit ?
I believe many projects would really benefit from the capability of writing to Apple Health and Google Fit!

@matsunanaro
Copy link

Has anyone started implementing this feature on Android?

If not, I'll start working on it.

@carlleeswanson
Copy link

carlleeswanson commented Oct 3, 2021 via email

@bardram
Copy link
Contributor

bardram commented Dec 29, 2021

Write support on both platforms were added in version 3.3.0

@bardram bardram closed this Dec 29, 2021
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.

5 participants