From 55710fb722d51c9a5ee7f8e164e85211b76ab2e8 Mon Sep 17 00:00:00 2001 From: Nils Stinnesbeck Date: Sat, 17 Oct 2026 23:38:36 +0200 Subject: [PATCH] App 2.7.1: voice-key double press works; floating button removed The car's key report, from the on-screen key log in 2.7.0: android.intent.extra.hardkey.keycode = 287 (Integer), android.intent.extra.hardkey.down (Boolean; one report on press, one on release) and android.intent.extra.hardkey.longpress (Boolean). 2.7.0 only looked for short names like "keyCode", so it never found the code. SteeringKeyReport now matches extras by the last part of their name, case-insensitively, and is Android-free; its tests include the exact double press logged on the car (releases 279 ms apart). Replayed in the car's format on the emulator: double press opens the app, single and long presses do not. The floating button is removed (class, geometry and test, the overlay permission, setting, switch and strings): it did not show over the MG4 launcher. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01QLJfZQZeAKAwSqViTmLzki --- SPECS.md | 4 + app/build.gradle | 4 +- app/src/main/AndroidManifest.xml | 2 - .../com/evsuite/abrp/AbrpUploadService.java | 5 - .../java/com/evsuite/abrp/FloatingButton.java | 224 ------------------ .../evsuite/abrp/FloatingButtonGeometry.java | 31 --- .../java/com/evsuite/abrp/MainActivity.java | 32 +-- .../com/evsuite/abrp/SteeringKeyListener.java | 70 +----- .../com/evsuite/abrp/SteeringKeyReport.java | 82 +++++++ .../java/com/evsuite/abrp/UploadSettings.java | 8 - .../main/res/layout-w1000dp/pane_service.xml | 6 - app/src/main/res/layout/pane_service.xml | 6 - app/src/main/res/values/strings.xml | 6 - .../abrp/FloatingButtonGeometryTest.java | 37 --- .../evsuite/abrp/SteeringKeyReportTest.java | 66 ++++++ 15 files changed, 167 insertions(+), 416 deletions(-) delete mode 100644 app/src/main/java/com/evsuite/abrp/FloatingButton.java delete mode 100644 app/src/main/java/com/evsuite/abrp/FloatingButtonGeometry.java create mode 100644 app/src/main/java/com/evsuite/abrp/SteeringKeyReport.java delete mode 100644 app/src/test/java/com/evsuite/abrp/FloatingButtonGeometryTest.java create mode 100644 app/src/test/java/com/evsuite/abrp/SteeringKeyReportTest.java diff --git a/SPECS.md b/SPECS.md index c4c7e6d..0ec7454 100644 --- a/SPECS.md +++ b/SPECS.md @@ -114,6 +114,10 @@ tyre pressures, GPS (lat, lon, elevation, heading) and the is_* flags. It does * INGEST_TOKEN) into git and pushed it. Commit amended and force-pushed; both values regenerated in the now gitignored `k8s/secrets.yaml` (since moved to `k8s/secrets/secrets.yaml`, outside `kubectl apply -f k8s/`). Filled-in secrets live only there from now on. +- 2026-10-17 — App 2.7.1: the voice key works. The car's key report, read off the on-screen log: + `android.intent.extra.hardkey.keycode` (Integer), `.down` (Boolean, a report per press and per + release), `.longpress` (Boolean). 2.7.0 looked only for short names and never found the code. + Floating button removed (it did not show over the MG4 launcher). - 2026-10-17 — App 2.7.0: a double press of the steering wheel's voice key (code 287) opens the app, from the head unit's `com.saic.keyevent.hardkey.report` broadcast. Its extras are not documented; the usual names are tried and every report is listed raw on the Logs tab. The diff --git a/app/build.gradle b/app/build.gradle index d2e59ae..f38b18d 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -34,8 +34,8 @@ android { applicationId "com.stinnesbeck.nilsmg4" minSdk 27 targetSdk 36 - versionCode 64 - versionName "2.7.0" + versionCode 65 + versionName "2.7.1" // Nothing about the server ships in the APK: its URL and ingest token are entered in // the app's Server tab (ServerConfig), and the database is only reachable by the server. diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 191f880..36b8413 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -13,8 +13,6 @@ - -