10 Commits
Author SHA1 Message Date
efiten 59169ac69e android: Stop & close button on Home
Back and Home keep capture running in the background, and Disconnect sits on
Settings, so testers had no easy way to end the app. The button (native app
only) asks first while connected, disconnects, then closes the app with
@capacitor/app exitApp. Queued receptions stay and upload on the next connect.
The capture notification now points to the button.
2026-11-14 10:22:12 +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 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 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 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 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 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 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
efitenandClaude Opus 5.5 9c30eef3ac build(android): Capacitor Android project and build notes
npx cap add android with appId eu.on8ar.coredriverx and
android.useLegacyBridge (the background-geolocation README: without it
updates stop after 5 minutes in the background). Manifest adds location,
POST_NOTIFICATIONS and Bluetooth permissions, BLUETOOTH_SCAN declared
neverForLocation. Copied web assets (including config.json) stay out of
git via the generated android/.gitignore. `npm run android:sync` builds
and copies dist/ into the project; README has the steps.

Not built: this machine has JDK 8 and no Android SDK.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 23:46:22 +01:00