You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Issue Description:
When querying step data in Health Connect using Samsung Health, if the startDate does not begin at the start of the day (00:00 hrs), no step values are returned for that date.
For example:
If the startDate is {2024-09-08T00:00:00Z} (ISO format for today’s start) and the endDate is {2024-09-08T23:59:59Z}, step records are returned as expected..
However, if the startDate is {2024-09-08T04:00:00Z} (4 hours after today’s start) and the endDate is {2024-09-08T23:59:59Z}, no step records are returned, even for the rest of the day and the records always returns empty Array.
Question:
Is this behavior normal when querying step data from Samsung Health via Health Connect? Should Health Connect provide step data for the remaining part of the day even if the startDate is not exactly at 00:00 hrs?
To Reproduce
Create Two Queries for Step Data:
-> Query 1: Set the startDate to the beginning of the day (00:00 hrs) and the endDate to the end of the day (23:59 hrs).
-> Expected: Step data for the entire day is returned.
Query 2: Set the startDate to 4 hours after the start of the day (e.g., 04:00 hrs) and the endDate to the end of the day (23:59 hrs).
->Expected: Step data from 04:00 hrs to the end of the day is returned.
->Observed: No step data is returned for the time range when the startDate is not 00:00 hrs.
Expected behavior
When querying step data in Health Connect using Samsung Health, if the startDate is set to any time within the day (e.g., 04:00 hrs) and the endDate is the end of the day (e.g., 23:59:59 hrs), Health Connect should return step records for the remaining part of the day (from the startDate to the endDate), even if the startDate does not begin at midnight (00:00 hrs).
This ensures that partial-day queries provide accurate step counts for the specified time range.
Minimal Reproducible
const { records } = await readRecords('Steps', {
timeRangeFilter: {
operator: 'between',
startTime: dayjs().toISOString(), //not the start of the day
endTime: dayjs().endOf('day').toISOString(),
},
});
Environment:
Health Connect Version: 3.2.1
React Native Version: 0.73.6
New architecture enabled: No
Using Expo: No
Android API Level: e.g API 34 (Android 14)
The text was updated successfully, but these errors were encountered:
Describe the bug
Issue Description:
When querying step data in Health Connect using Samsung Health, if the startDate does not begin at the start of the day (00:00 hrs), no step values are returned for that date.
For example:
If the startDate is {2024-09-08T00:00:00Z} (ISO format for today’s start) and the endDate is {2024-09-08T23:59:59Z}, step records are returned as expected..
However, if the startDate is {2024-09-08T04:00:00Z} (4 hours after today’s start) and the endDate is {2024-09-08T23:59:59Z}, no step records are returned, even for the rest of the day and the records always returns empty Array.
Question:
Is this behavior normal when querying step data from Samsung Health via Health Connect? Should Health Connect provide step data for the remaining part of the day even if the startDate is not exactly at 00:00 hrs?
To Reproduce
Create Two Queries for Step Data:
-> Query 1: Set the startDate to the beginning of the day (00:00 hrs) and the endDate to the end of the day (23:59 hrs).
-> Expected: Step data for the entire day is returned.
Query 2: Set the startDate to 4 hours after the start of the day (e.g., 04:00 hrs) and the endDate to the end of the day (23:59 hrs).
->Expected: Step data from 04:00 hrs to the end of the day is returned.
->Observed: No step data is returned for the time range when the startDate is not 00:00 hrs.
Expected behavior
When querying step data in Health Connect using Samsung Health, if the startDate is set to any time within the day (e.g., 04:00 hrs) and the endDate is the end of the day (e.g., 23:59:59 hrs), Health Connect should return step records for the remaining part of the day (from the startDate to the endDate), even if the startDate does not begin at midnight (00:00 hrs).
This ensures that partial-day queries provide accurate step counts for the specified time range.
Minimal Reproducible
const { records } = await readRecords('Steps', {
timeRangeFilter: {
operator: 'between',
startTime: dayjs().toISOString(), //not the start of the day
endTime: dayjs().endOf('day').toISOString(),
},
});
Environment:
The text was updated successfully, but these errors were encountered: