Commit Graph
255 Commits
Author SHA1 Message Date
efiten fb34bd3725 android: the deployment card says step by step what to do
Three testers asked what to enter under Settings > Deployment. Until a deployment is chosen
the card now stands out (blue, title "First step: choose where your data goes") and lists
the steps: open your CoreScope on another screen, open Coverage, scan its QR code or type
the address under it. Once chosen it shrinks to one line naming where the app uploads.
2026-11-12 16:54:49 +01:00
efiten 4d388e0eb8 Merge pull request #49 from efiten/fix/qr-same-deployment
android: scanning the deployment already in use no longer restarts the app
2026-11-11 22:19:12 +01:00
efiten f83db5bd92 Merge pull request #48 from efiten/feat/r8
android: turn on R8 and send its mapping file to Play
2026-11-11 22:17:26 +01:00
efiten 734c0d0a8d android: scanning the deployment already in use no longer restarts the app
Choosing a deployment saves it and reloads the page, also when it is the one in use. On a
phone the QR scan of the same deployment dropped the companion link and cleared the debug
log. The same deployment now changes nothing; a different one asks first while connected.
2026-11-11 22:14:35 +01:00
efiten 64de7f1da4 android: log the update check's result on every start
The first R8 test run on a phone showed no update line: a check that finds nothing logged
nothing, so a check that ran was indistinguishable from one that never returned.
2026-11-11 22:07:11 +01:00
efiten eab6eb5fc1 android: turn on R8 and send its mapping file to Play
Play Console flagged the bundle: DEX optimisation low, obfuscation 1%, no deobfuscation
file, no native debug symbols. Release builds now run R8 with resource shrinking and put
the native symbol table in the bundle; play-upload.mjs --mapping uploads mapping.txt.
Release APK 6.45 MB -> 3.35 MB. Capacitor's consumer rules keep every plugin class: the
seven plugins, MainActivity and AlwaysVisibleWebView keep their names in mapping.txt.
2026-11-11 21:58:27 +01:00
efiten d1227ead81 Merge pull request #46 from efiten/release/v1.25.0
release: v1.25.0
v1.25.0
2026-11-11 21:38:50 +01:00
efiten 28f25b01f9 release: v1.25.0 notes include the update note (#47) 2026-11-11 21:38:28 +01:00
efiten 45bf0ed486 Merge remote-tracking branch 'origin/master' into release/v1.25.0 2026-11-11 21:38:12 +01:00
efiten 68e92da4f2 Merge pull request #47 from efiten/feat/update-notice
android: tell on Home when a newer version exists
2026-11-11 21:38:09 +01:00
efiten 3aa6e1ec2c android: tell on Home when a newer version exists
Google Play updates silently and late, and a GitHub APK never updates by itself. At start
the app asks Play's in-app update API (@capawesome/capacitor-app-update 8.1.1); for a Play
install Play decides, and a tap starts the update in Play. Any other install compares its
version with version.json of its deployment, now written by every web build.
2026-11-11 21:37:10 +01:00
efiten 088ad29c35 release: v1.25.0 2026-11-11 21:31:14 +01:00
efiten 45c9c3e23c Merge pull request #45 from efiten/fix/web-stale-fix
web: never stamp a reception with a fix from before the page went to the background
2026-11-11 21:29:53 +01:00
efiten e3d7d96b54 web: never stamp a reception with a fix from before the page went to the background
A hidden page gets no GPS updates while Web Bluetooth can still deliver packets, so a
reception was stamped with the last position from before the page was hidden. Fixes now
carry their receive time; a hidden page only uses a fix up to 30 s old (receptions, RF
samples, pings). After a minute or more in the background while connected, Home says how
long and how many receptions were saved or not saved.
2026-11-11 21:27:19 +01:00
efiten 891c536e3b Merge pull request #44 from efiten/fix/ask-refused
regions: name the companion's refusal of an ask instead of 'no send-ack'
2026-11-11 21:25:05 +01:00
efiten dd512261a4 regions: name the companion's refusal of an ask instead of 'no send-ack'
A companion up to firmware v1.16 answers CMD_SEND_ANON_REQ for a repeater that is not a
contact with ERR_CODE_TABLE_FULL when its contact list is full
(BaseChatMesh::allocateContactSlot); v1.17 reserves 8 slots for these asks. The app only
listened for RESP_CODE_SENT, so the refusal showed as a 4-second 'no send-ack'. The ask
now resolves on that error, logs the cause, and the header counts the refusals.
2026-11-11 21:22:42 +01:00
efiten 7c35733bdb Merge pull request #43 from efiten/docs/batched-releases
AGENTS: batch releases instead of one per fix
2026-11-11 21:19:31 +01:00
efiten abba0beb0e AGENTS: fix PRs say whether they need a release now 2026-11-11 21:19:04 +01:00
efiten a378d773f1 AGENTS: batch releases instead of one per fix
Fix PRs land on master without version, release notes, SW cache bump or tag. A release PR
collects them and is then tagged, deployed, built and uploaded to Play as a draft. Each
Play upload is reviewed by Google and updates every tester.
2026-11-11 21:18:11 +01:00
efiten aaa845728a Merge pull request #42 from efiten/fix/rf-resume-cadence
rf: re-arm the sampler at the moving cadence when moving again (v1.24.5)
v1.24.5
2026-11-11 21:10:23 +01:00
efiten e7376f0990 rf: re-arm the sampler at the moving cadence when moving again
While parked the next RF sample is armed 5 minutes out. On 'moving again' that timer kept
running, so the first minutes of a drive had no samples (4 min 19 s in a 2026-11-11 log,
20:20:28 to 20:24:47). setPaused(false) now re-arms it at 15 s when it was due later.

Release v1.24.5, SW cache v65.
2026-11-11 20:43:07 +01:00
efiten 406802f8a2 Merge pull request #41 from efiten/fix/webview-stays-visible
android: keep the WebView running with the screen off (v1.24.4)
v1.24.4
2026-11-11 20:29:20 +01:00
efiten be7cb06372 release: v1.24.4
Version bump and release notes for f280dec (Android WebView stays running
with the screen off).

Tested on one OnePlus, stationary, screen off about 4 minutes, on USB and on
battery: uploads continued, the broker link stayed up, no 'app hidden' line.
Not tested: region asks and pings with the screen off, a drive, other phones,
battery use.
2026-11-11 20:25:47 +01:00
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
efiten a802ff72b1 Merge pull request #40 from efiten/feat/play-upload
scripts: upload a signed bundle to a Play test track as a draft
2026-11-11 20:02:23 +01:00
efiten 158120ec06 scripts: upload a signed bundle to a Play test track as a draft
Uses a service account key outside the repo and node:crypto for the OAuth JWT, so no new
dependency. The draft keeps the track's live release (tracks.update replaces the whole
list) and replaces an older draft. Release notes are the summary line of
docs/releases/vX.Y.Z.md, checked against Play's 500-character limit. An edit that is not
committed is deleted so it cannot block the next run.

Verified against Play: 'tracks' lists alpha with 12403 (1.24.3) completed. Not yet
verified: an actual upload, which needs a new versionCode.
2026-11-11 19:55:55 +01:00
efiten 31cb42641e Merge pull request #39 from efiten/feat/battery-tip
release: v1.24.3, one-time battery tip in the Android app
v1.24.3
2026-11-11 14:26:38 +01:00
efiten 86de4f69ad android: one-time battery tip before the first Connect
A OnePlus closed the app during a test walk (exit reason o-kill, importance
125, so with the foreground service running). Without an extra permission
the app cannot prevent that, so before the first Connect in the Android app
a popup says to set the battery setting to Unrestricted, linking
dontkillmyapp.com. Shown once (localStorage flag); storage that throws skips
it rather than blocking Connect. Same text in the user guide.

Release v1.24.3, SW cache coredrive-rx-v63.
2026-11-11 14:02:18 +01:00
efiten a9ef9780ee Merge pull request #38 from efiten/fix/notification-permission
release: v1.24.2, ask for notification permission before capture
v1.24.2
2026-11-11 13:53:51 +01:00
efiten c761c65709 android: ask for notification permission before capture starts
On Android 13+ the foreground service notification stays hidden until the
user allows notifications, and background-geolocation does not ask.
NativeGps.start now calls LocalNotifications.requestPermissions() before
addWatcher; a refusal or error does not stop capture.

Release v1.24.2, SW cache coredrive-rx-v62.
2026-11-11 12:43:42 +01:00
efiten 90969d6f14 Merge pull request #37 from efiten/release/v1.24.1
release: v1.24.1, About card with privacy policy link
v1.24.1
2026-11-11 12:12:50 +01:00
efiten bb182e741c release: v1.24.1, About card with privacy policy link
Google Play requires a link to the privacy policy inside the app. Settings
gets an About card with the privacy policy, user guide and source code; in
the Android app the links open in the phone's browser (Bridge.launchIntent).
SW cache coredrive-rx-v61.
2026-11-11 11:59:51 +01:00
efiten 51a3494d0d Merge pull request #36 from efiten/feat/release-notes-collapsed
release notes: each body holds only its own release
2026-11-11 11:32:21 +01:00
efiten a73b615a55 release notes: each body holds only its own release
The folded history still made every body list all earlier releases, which
the GitHub releases list already shows. The body is now the tag's own
docs/releases file plus one link to the releases list. The job still fails
on a tag without a notes file.
2026-11-11 11:27:12 +01:00
efiten a3c99641fc release notes: folded summary is the first sentence only
Some release files open with a whole paragraph (v1.11.0 to v1.16.0), which
made their <summary> lines run over several lines.
2026-11-11 11:23:13 +01:00
efiten a7aa27f1c3 release notes: fold earlier releases into <details>
GitHub shows the assets below the release body. With all 45 release files
written out in full, the APK of v1.24.0 sat below an 88 KB body. The tag's own
notes stay in full; every older release becomes a closed <details> block under
'Earlier releases', summary = tag + its one-line summary. Nothing is dropped,
so the cumulative rule in AGENTS.md still holds.
2026-11-11 11:22:24 +01:00
efiten 0375d421f1 Merge pull request #35 from efiten/release/v1.24.0
release: v1.24.0, the Android app
v1.24.0
2026-11-10 23:19:04 +01:00
efiten 7ce3d4ad61 release: v1.24.0, the Android app
Version 1.24.0 in package.json (the APK takes its versionName and
versionCode 12400 from it), service-worker cache coredrive-rx-v60, and
docs/releases/v1.24.0.md. 475 tests pass.
2026-11-10 23:17:49 +01:00
efiten b3532f427d Merge pull request #34 from efiten/docs/play-screenshots
docs(play): phone screenshots with demo data
2026-11-10 23:16:20 +01:00
efiten a9e82681b1 docs(play): phone screenshots with demo data
Three 1080x1920 screenshots for the Play listing: Home, Map and
Settings (with the deployment card of the Android app). Rendered from
the local dev server in headless Chrome at 432x768 CSS px and 2.5x, with
made-up demo data injected into the DOM and a demo route drawn through
src/localmap.js; no real drive, node or companion. The version label
reads v1.23.0.
2026-11-10 23:15:24 +01:00
efiten a06325c9ff Merge pull request #33 from efiten/feat/android-capacitor
Android app via Capacitor, step 1 (issue #13)
2026-11-10 23:11:46 +01:00
efiten f92c505f19 docs(play): contact address, and raw packets declared as messages
The contact address in the privacy policy and store listing is
erwin@fiten.eu. Data safety declares raw received packets under
'Other in-app messages': they can carry other people's mesh messages,
private ones encrypted and not decrypted by the app.
2026-11-10 23:09:13 +01:00
efiten 0d15d346c0 docs(play): privacy policy, Data safety, permissions and store listing drafts
Material for the Google Play listing, under docs/play/:
- privacy-policy.md: what the app sends to the chosen deployment
  (src/publisher.js payloads, account login), what stays on the phone,
  the third parties it contacts (OpenStreetMap tiles, unpkg, Play services
  for QR scanning) and how to get data deleted.
- data-safety.md: draft answers for the Data safety form, with one open
  question (whether raw mesh packets count as messages).
- permissions-declaration.md: the permissions in the merged release
  manifest and the foreground service (location) declaration text. The app
  does not request ACCESS_BACKGROUND_LOCATION.
- store-listing.md: name, descriptions, graphics list.
- feature-graphic.png, drawn by scripts/play-graphics.ps1.
The contact email is a placeholder (CONTACT_EMAIL).
2026-11-10 23:07:30 +01:00
efiten c12b473228 build(android): release signing and version from package.json
versionName now comes from package.json and versionCode is
major*10000 + minor*100 + patch, so the APK and the web app carry one
version (1.23.0 -> 12300). A release build is signed when the gitignored
android/keystore.properties names a keystore; without it the release APK
stays unsigned. The keystore itself lives outside the repository.
assembleRelease checked with apksigner (CN=CoreDrive RX) and aapt2.
2026-11-10 22:42:28 +01:00
efiten 163ec8804c docs: tell the web app and the Android app apart on the home screen
A phone with both showed two identical "CoreDrive RX" icons. The web app
manifest now names it "CoreDrive RX Web"; the Android app keeps
"CoreDrive RX". The user guide gains an Android app section: how it finds
its deployment (URL or the QR code on the CoreScope Coverage page), why to
use one of the two (one Bluetooth link to the companion, separate queues),
and to remove the web app icon after installing the Android app. Existing
web app installs pick up the new name only once Chrome refreshes the
manifest; when that happens was not checked.
2026-11-10 22:38:22 +01:00
efiten 6a9caecf99 build(android): launcher icon and splash from the web app icon
The APK carried Capacitor's default icon and splash. scripts/android-icons.ps1
draws them from public/icon-512.png: the adaptive icon foreground (source at
86% of the 108 dp canvas, so the ring stays inside the 66 dp safe zone) on
the icon's own background #0F1115, the legacy square and round icons, and
the splash images with the icon centred. The Android 12+ splash background
uses the same colour. Installed on a OnePlus 15; how each launcher masks
the icon was not checked beyond that phone.
2026-11-10 22:34:48 +01:00
efiten 149e39bb50 fix(native): keep uploading with the screen off
Field log 2026-11-10: with the screen off the Android WebView stopped
running JavaScript timers while Bluetooth frames and GPS fixes kept
arriving. For eleven minutes receptions were queued but nothing was
published, no RF sample was taken, no discover, region ask or uplink ping
went out, and the broker dropped the link for want of a keepalive. The
116-record backlog went out when the screen came back on; positions and
rx_at in client_rx_observations were correct.

Every frame and GPS fix now calls catchUp, which runs the jobs whose timer
is overdue: the monitor tick, the drain, the pending RF sample and, when
the drain is late and the broker link is down, one reconnect per 15 s.
src/catchup.js holds the decision (test/catchup.test.mjs). The debug log
now records when the app is hidden and visible again. Not yet tested on
the phone.
2026-11-10 22:20:04 +01:00
efiten c2468ee0d2 fix(native): keep the layout clear of the status and navigation bars
The Android app draws edge to edge, so the header sat under the status bar
and the Home/Map/Settings bar under the navigation buttons. index.html now
pads the body and the bottom bar by the system bar insets: Capacitor's
--safe-area-inset-* variables, env(safe-area-inset-*) as fallback, 0 in a
desktop browser. Checked headless at phone width in a browser; not yet on
the phone.
2026-11-10 22:20:04 +01:00
efiten 3963704592 fix(native): share the debug log through the Android share sheet
In the Android app the Share button did nothing: the WebView has no
navigator.share, and the download-link fallback is ignored there. The
native app now writes the log to its cache (@capacitor/filesystem 8.1.5)
and opens the share sheet with it as a .txt attachment (@capacitor/share
8.0.3). The web paths are unchanged. pickShareMethod picks 'native' first;
test/sharelog.test.mjs covers it.
2026-11-10 22:20:03 +01:00
efiten 26e2b096ba feat(native): scan the deployment URL from a QR code
The Deployment card in Settings gets a "Scan QR code" button. It uses
BarcodeScanner.scan() of @capacitor-mlkit/barcode-scanning 8.2.1 (exact; 8.2.2
was 10 days old), which runs the Google code scanner in Play services: its own
camera screen, no camera permission, the module downloaded once on first use
with progress shown in the card. A scanned code must spell out https:// itself
and then goes through the same config.json check as a typed URL. A cancelled
scan is silent; a QR code that is not a deployment URL says so.

The QR code itself comes from CoreScope's Coverage page (clientRxCoverage.appUrl),
which is a separate change in the CoreScope repository.

android/app/build.gradle leaves libbarhopper_v3.so out of the APK: that is the
bundled ML Kit detector used only by startScan and readBarcodesFromImage, which
the app never calls. Debug APK 29.5 MB with it, 9.2 MB without (4.9 MB before
the plugin).

- src/qrscan.js + test/qrscan.test.mjs: 8 tests (468 total pass)
- web build checked headless: appver filled, Deployment card hidden

Not tested on a device: the scan, the module download and the size cut are
unverified on hardware.
2026-11-10 09:38:25 +01:00