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

To receive HOURLY Step Count Health Data #359

Open
Lemiex opened this issue Jan 27, 2024 · 2 comments
Open

To receive HOURLY Step Count Health Data #359

Lemiex opened this issue Jan 27, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@Lemiex
Copy link

Lemiex commented Jan 27, 2024

Is your feature request related to a problem? Please describe.
Most of the get functions such as getStepCount() only take as input a day Date object for people to get a daily step count. However, I would find it to be extremely beneficial if hourly data is supported, since the Apple Health app presents hourly step count (and other sensor) data during the day. Currently, we have a a loss of data.
I find that if i specify an hour in the date for HealthInputOptions, such as

const options: HealthInputOptions = {
            date: new Date("2024-01-25T13:00:00").toISOString(),
            includeManuallyAdded: false,
        };

The step count data ignores the time and only takes in the day, and returns the daily step count.

Describe the solution you'd like
It would be great if the get functions took hourly Dates as parameters too, and returns step counts during those hours

For example,

const options: HealthInputOptions = {
            startTime: new Date("2024-01-25T13:00:00").toISOString(),
            startTime: new Date("2024-01-25T17:00:00").toISOString(),
            includeManuallyAdded: false,
        };

Additional context
I have also looked into background observers and adding listeners (which doesn't seem to work for most people), however that only provide current hourly/minute-ly data instead of past data.

If anyone knows a workaround please let me know!!! Thank you.

@Lemiex Lemiex added the enhancement New feature or request label Jan 27, 2024
@Lemiex Lemiex changed the title Receiving HOURLY Step Count Health Data To receive HOURLY Step Count Health Data Jan 27, 2024
@KesoGizmoYoshi
Copy link

I would also be interested in this.

@kfchan-git
Copy link

Tried to add unit: 'minute' and it crashed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants