Overview
Most people install your app with months of sleep and heart data already in their phone’s health store. A one-time backfill reads that history and pushes it into the personal baselines, so “your normal” is ready on day one instead of warming up over the first week.
How far back it reaches depends on what the store kept: on Android typically
about 30 days of heart rate and 1–2 years of sleep; on iOS often years.
What gets pushed
Each night’s values are filed under the local date the person woke on:
The Flutter Health Connect sink also pushes
motion.steps_count and
motion.active_min for each day that is over, including days with no night.
A missing value is skipped, never sent as zero.
Resting HR. Flutter synheart_core 0.23 pushes the store’s resting-HR
record as cardiac.resting_hr_bpm and the mean HR asleep as
cardiac.overnight_hr_bpm, using the asleep mean for resting only when there is
no record. The Kotlin and Swift sinks (0.6 and later) push the asleep mean as
both.
These names are used from Flutter
synheart_core 0.20 and Kotlin and Swift
0.5 (runtime 0.42); cardiac.overnight_hr_bpm and motion.active_min from
Flutter 0.22 and Kotlin and Swift 0.6 (runtime 0.45). Earlier SDKs pushed
sleep_need, deep_sleep_min, rem_sleep_min, hrv_rmssd and resting_hr,
which runtime 0.42 and later refuse. Before Flutter 0.23 a backfill run with no
session open was refused value by value; daysIngested and dimensionsPushed
count only accepted values (since Flutter 0.22).Run it
Call it once, after the user grants the health permission and biosignals consent. A year of history can take 10 seconds or more on the first run.daysIngested), how many
values (dimensionsPushed), and, when nothing ran, why (skipped,
skipReason, for example “Health Connect not available on this device”).
When not to call it
- Before permission or consent. Without the health permission the sink
returns
skipped: true; without biosignals consent the person hasn’t agreed to their history being used. - On every launch. Pushing the same day twice only replaces it, but reading the health store each launch is wasteful. Run it on first launch, and again after a long gap.
Related
- Baselines: what these values feed
- Scoring models: what is computed once baselines are warm
- synheart-wear: the health-store readers