Skip to content

v0.2.1 — Local interval log + disconnect/reconnect hardening

Latest

Choose a tag to compare

@abcsds abcsds released this 03 May 22:04
· 1 commit to main since this release

Adds an optional local fallback log on the scan screen and hardens the disconnect/reconnect path.

New

  • Save intervals to file toggle on the scan screen (off by default). When enabled, every RR/PP value that goes out over LSL is also appended to a text file at Android/data/io.github.abcsds.rrstreamer/files/Documents/<YYYY-MM-DD_HH-MM-SS-MS>.txt — one rounded-ms int per line. A safety net for sessions where the LSL stream isn't recorded over the network. Pull via adb pull, the system Files app, or USB.
  • The writer flushes after every line, so a kill never loses more than the in-flight sample. Logger failures (missing SD card, I/O hiccup) are logged and swallowed — they never break the live BLE → LSL pipeline.

Fixed

  • FGS ANR after stop+restart: startForeground() is now called in onStartCommand too. With BIND_AUTO_CREATE the service can outlive a stop()+stopSelf(), so a follow-up startForegroundService(...) reaches an existing instance whose onCreate doesn't re-run. Without re-asserting startForeground the 5-second FGS watchdog ANRs.
  • UI stuck in Connecting after reconnect: per-session resources (LSL streamer, log file) are now torn down on disconnect/error, not just on stop. Without the streamer close the lazy first-sample init skipped the state transition and the UI stayed on Connecting forever even while samples were flowing.
  • 3-frame protocol decision window: the Polar H10 sometimes emits an HR-only 0x2A37 frame before computing the first R-R interval (especially right after reconnect). Committing to PolarPpi on that single frame stranded the client waiting for PPI from a band that doesn't produce it.
  • PMD CP error responses parsed: bands like the H10 expose the PMD service but answer START_PPI with NOT_SUPPORTED (error code 3). The app now surfaces a clean error and you can retry, instead of waiting forever for frames that won't arrive.
  • Cross-thread session fields use @Volatile + null-then-close so a stop() on the main thread can't race a write-after-close from the BLE binder thread.

Install

Sideload RRStreamer-v0.2.1.apk on Android 8.0+ (API 26+). The package identifier changed in this release, so Android treats this as a different app from earlier builds — uninstall any previous RRStreamer first, otherwise the install will be refused.