Files
corescope-rx/test
efiten f280dec686 android: keep the WebView running with the screen off
Three v1.24.3 field logs of 2026-11-11 (three phones) show the same thing:
about 60 s after "app hidden" every upload, RF sample, region ask and uplink
ping stops until the screen is back on, for 7 to 25 minutes, while receptions
and discover go on. The catch-up of 149e39b keeps monitorTick alive but not
the jobs that wait on a timer, on IndexedDB or on the broker.

What changes:
- AlwaysVisibleWebView reports its window as visible at all times, so
  Chromium never treats the page as hidden. An app copy of
  capacitor_bridge_layout_main.xml puts it in place of CapacitorWebView.
- MainActivity sends appHidden / appVisible on onStop / onStart, because
  visibilitychange no longer fires. app.js logs both, wakelock.js re-acquires
  the screen lock on appVisible and leaves one that is still held alone.
- Service worker cache v64.

Verified: npm test, 485 of 485 pass. assembleDebug builds, and aapt2 shows
eu.on8ar.coredriverx.AlwaysVisibleWebView in the APK's layout.

Not verified: that this stops the freeze. No phone has run this build yet.
Battery use with the screen off is not measured. No version bump and no
release notes: those follow once a screen-off drive confirms it.
The web app (Chrome, Bluefy) is not changed by this and still freezes.
2026-11-11 20:09:21 +01:00
..