[Office Hours] Retroactive Observations not showing up #38
-
Related DiscussionWhen I try to add observations (specifically step count) that are backdated, they do not get sent to the firebase and do not show up as observations in the mock upload tab. Reproduction
Additional contextThis feature is more important for debugging, as I want to simulate data being collected throughout a week to test data visualizations. I'm not sure how this issue would manifest in an actual use case, as I assume passive data like step count is usually updated in real time. Code of Conduct
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Hi @jennxu23, Happy to provide some help with your question and the issue you are describing. The behavior your are describing is expected, and what we want the default behavior in the CardinalKit HealthKit Module to be like:
Nevertheless, there are use cases where an application might want to collect data retroactively and also gets the user's consent to do so. We currently don't support that feature, but we would be happy to collect what requirements you would have! Do you need this for your project to support a specific feature, and do you generally need to collect data retrospectively? If so, would you like to provide a hard-coded start date, or do you want this to be dynamic, e.g., 14 days before the user provides consent? Regarding your comment about debugging: An alternative for debugging would be changing the system clock (on your mac), then restarting the simulator (quit the simulator app and open it again) and therefore setting the iOS simulator to a different time (e.g., in the future) to test the behavior of the app in the future. |
Beta Was this translation helpful? Give feedback.
Hi @jennxu23,
Happy to provide some help with your question and the issue you are describing.
The behavior your are describing is expected, and what we want the default behavior in the CardinalKit HealthKit Module to be like:
The first time an application gets permission to access HealthKit data, it stores the current data as a starting date. All data that is available in the metric with a start date after that date is automatically queried and reported to the application. Any values added before that are not retrieved. This is generally done so for two reasons: