plees-tracker icon indicating copy to clipboard operation
plees-tracker copied to clipboard

Integrate with Health Connect.

Open RokeJulianLockhart opened this issue 1 year ago • 3 comments

Reproducer steps

  1. As https://discuss.grapheneos.org/d/8285-will-health-connect-be-removed-hopefully/13 describes, install https://play.google.com/store/apps/details?id=com.google.android.apps.healthdata (it doesn't have to be via the Play Store, since it's an AOSP component – https://www.xda-developers.com/android-14-health-connect-built-in/ explains).
  2. Attempt to allow sleep data access to a fitness application that consumes sleep data (like Google Fit).

Actual result

Plees Tracker isn't listed.

Expected behavior

It should be, and it should provide its data to the connector so that other applications can consume it.

As an example, https://play.google.com/store/apps/details?id=com.urbandroid.sleep does.

RokeJulianLockhart avatar Jun 19 '24 15:06 RokeJulianLockhart

Is there technical specification for what an app has to implement so Health Connect recognizes it? https://play.google.com/store/apps/details?id=com.urbandroid.sleep seems to be proprietary, so we can't see how it implements this, I guess.

Also, are you interested in implementing this yourself?

If so, I don't mind taking a PR.

vmiklos avatar Jun 19 '24 18:06 vmiklos

https://github.com/vmiklos/plees-tracker/issues/479#issuecomment-2179286703

@vmiklos, interested, but not necessarily capable. I don't even know Java, much less AOSP development. I'll provide one if I become able, but it shan't be for a while.

I looked in https://play.google.com/store/apps/collection/promotion_3000e6f_googlefit_all for an OSS implementation of the API, but I didn't see one. I expect that it's documented adequately at https://developer.android.com/health-and-fitness/guides/health-connect/migrate/comparison-guide though.

RokeJulianLockhart avatar Jun 21 '24 12:06 RokeJulianLockhart

https://developer.android.com/health-and-fitness/guides/health-connect seems to be actual documentation. For now, this is up for grabs, if I get to this myself, I'll update this issue.

vmiklos avatar Jun 21 '24 20:06 vmiklos