Skip to content

PulseStages 0.4.1

Choose a tag to compare

@github-actions github-actions released this 20 Oct 12:55
· 13 commits to main since this release

"Ask Sleep as Android to sync" now waits until a night is complete before it asks Sleep as Android to import it, so
Sleep as Android no longer keeps a night that OHealth published cut short while you were still asleep. Install it
over 0.4.0 like any update (same signing key): the app keeps its data and settings, and no night becomes stale.
Nights Sleep as Android already holds cut short must be deleted there once (below).

Fixed

  • Sleep as Android kept nights that were cut short. OHealth publishes a night in steps: on the development phone it
    wrote each of the nights of 17–19 October 2026 first with an end at about 07:29, while the user was still asleep, and
    extended the same session to the real wake later, up to about five hours later. Sleep as Android imports a night
    once and never updates it, and 0.4.0 asked it to sync right after PulseStages' first write of a night, so it kept
    the 07:29 versions (confirmed on the development phone). "Ask Sleep as Android to sync" now sends its request, and
    the second one 10 minutes later, only once the recent nights are complete: PulseStages has processed every recent
    session of the enabled sources as it is now, the heart rate of each session's own app reaches "Merge gap" + 30
    minutes past its end (60 minutes by default) and was uploaded after the session last changed, and this holds for 15
    minutes and through one more look for late heart rate, which the next check then makes even within the hour. The
    request therefore usually comes 1–2 hours after you wake up instead of minutes after the first write, and a
    recompute waits at least 15 minutes; PulseStages still writes every version to Health Connect at once. While a
    request waits, the message of a run you started says "Sleep as Android will be asked to sync once the nights are
    complete.", and the log says what it waits for ("not asked yet: …"); the setting's hint and the privacy screen say
    that the request comes once a night is complete. A second request still pending from 0.4.0 waits for complete
    nights as well. The work sleep-as-android-follow-up now reads Health Connect (one read of the sleep sessions of
    the last 30 days and one heart-rate read per source, at most about four times an hour while a request is owed):
    without background access the request is sent, without a new check, 15 minutes after a run in the foreground such
    as "Estimate new" found the nights complete, and otherwise waits for such a run. Nights that Sleep as Android
    already holds cut short stay as they are: delete them there (cloud icon; do not undo the deletion), then tap
    "Recompute" on them in PulseStages, or "Sync now" twice in Sleep as Android in the afternoon (confirmed on the
    development phone for three nights); do not tap "Sync now" there in the morning. On the development phone,
    with test builds of this version, OHealth published the night of 20 October cut at 07:29 and extended it twice;
    PulseStages wrote all three versions and asked Sleep as Android nothing while OHealth's heart rate had not passed
    the end, and a request after a recompute went out after the wait, followed by the second one 10 minutes later.
    Sleep as Android's import of a night after the wait is not yet confirmed
    (user guide,
    health-connect.md §8.3, PLAN.md §2).

Downloads

File Use
PulseStages-0.4.1.apk Signed release build for everyday use. Later releases install over it as updates.
PulseStages-0.4.1-debug.apk Debug build for testing, with the demo mode.
SHA256SUMS.txt SHA-256 checksums of both APKs: sha256sum -c --ignore-missing SHA256SUMS.txt

The two APKs are signed with different keys, so neither can update the other. To switch, uninstall first.
The sessions PulseStages wrote stay in Health Connect; grant its permissions again after the reinstall.

To get every later release installed as an update, add PulseStages to Obtainium
(user guide).

Release signing certificate SHA-256: ce5546e83c03eac9837b93fc2c04d2e37abd1b778c3ef9e01b67cd1602e35be5

Debug signing certificate SHA-256: b557d5d55ea3c6d98e72493b1e82f228465201e7271d93f7ace577ff1c5b35cc (a later debug APK installs over an earlier one only if this value is the same)