screentinker/android/app/src/main/java/com/remotedisplay/player/service
ScreenTinker 57cdaf7e4e feat(apk): v4 liveness contract + caching-cluster fix + reconnect-safe downloads
APK v4 — client-only (Android player). Brings the reference client up to the locked
v4 liveness contract and fixes the "stuck downloading / offline in CMS" caching bug:
- v4 liveness watchdog (LivenessWatchdog): half-open detection via server-silence,
  arm-ONLY-after device:heartbeat-ack (degrade-safe), 45s±10s jittered threshold,
  exp backoff 1/2/4/8/16→30s ±20%, no-poll; reconnect delegates to the #148
  ConnectionGuard (teardown-before-reopen, single socket).
- Caching two-root fix: callTimeout + .part+Content-Length integrity + atomic swap
  (CacheValidation), onPlayerError advance, re-ack cached content + reconnect re-ack.
- Screen resilience (PlaylistSelection): a pending/failed download never blanks the
  screen — keep-current, swap only fully-valid content.
- Reconnect-safe background downloads (DownloadCoordinator): single-flight per
  contentId + bounded pool + failure backoff + cancellation; a reconnect mid-fetch
  can't orphan/duplicate/storm. Refuse 206 partials.
- v4 client identity block on register (client_type/version/platform/contract_version).
Tests: 52 JVM unit tests (watchdog, cache validation, reproduce-then-prove download
stall/truncation/reconnect-mid-download, screen selection, assembly soak).
Depends on the server device:heartbeat-ack (core pass) — degrade-safe until then.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-08 09:57:53 -05:00
..
BootReceiver.kt fix(player): auto-relaunch after OTA self-update (#96) 2026-06-12 22:34:32 -05:00
ConnectionGuard.kt fix(#148) android root cause: single-socket-per-device invariant (no duplicate connections) 2026-07-02 19:29:50 -05:00
LivenessWatchdog.kt feat(apk): v4 liveness contract + caching-cluster fix + reconnect-safe downloads 2026-07-08 09:57:53 -05:00
MediaProjectionService.kt fix(android): Android 14+ MediaProjection / foreground-service compliance (#5) 2026-06-08 17:19:56 -05:00
OtaThrottle.kt fix(ota): surface stuck OTA on dashboard + read APK signer correctly on API 28/29 (#139) 2026-06-23 22:49:01 -05:00
PackageReplacedReceiver.kt fix(player): auto-relaunch after OTA self-update (#96) 2026-06-12 22:34:32 -05:00
PowerAccessibilityService.kt fix(android): OTA install never completed; auto-confirm for kiosks (1.7.10) 2026-06-09 16:14:08 -05:00
Relauncher.kt fix(player): auto-relaunch after OTA self-update (#96) 2026-06-12 22:34:32 -05:00
ScreenCaptureService.kt fix(android): Android 14+ MediaProjection / foreground-service compliance (#5) 2026-06-08 17:19:56 -05:00
UpdateChecker.kt fix(#144): OTA update-check circuit-breaker + phantom guard + per-device keying 2026-06-28 23:36:52 -05:00
WebSocketService.kt feat(apk): v4 liveness contract + caching-cluster fix + reconnect-safe downloads 2026-07-08 09:57:53 -05:00