Add Android companion beacon app (v1)

Kotlin/Compose foreground service advertising a connectable legacy
advertisement at ~1 Hz with a counter that rotates in ServiceData every
10s: changed payload values make BlueZ emit PropertiesChanged even when
the RSSI repeats, keeping the daemon's freshness clock fed for a
stationary phone. Running from a foreground service with a battery
optimization exemption defeats the advertising pauses that caused the
false locks. Replaces third-party beacon apps; the daemon needs no
changes. Verified with a real Gradle build (AGP 8.13.2, Kotlin 2.3.21,
compileSdk 36).
This commit is contained in:
Bastian Mäuser committed 2026-11-05 15:15:03 +01:00
1 parent aef8e2af17
commit 44510411fc
19 files changed
+917

No files matched your search

+3
View File
@@ -39,6 +39,9 @@ rearms monitoring. See README.md for the full design.
- `src/locker.rs` — screen locking (logind or `lock_command`)
- `systemd/btle-proximity.service` — user service, `Type=notify`
- `config.toml.example` — shipped config sample with tuning guidance
- `android/` — companion beacon app (Kotlin/Compose, separate Gradle
build; see `android/README.md`). Counter-rotating ServiceData payload
defeats the BlueZ RSSI dedupe from the phone side.
## Domain gotchas (learned the hard way — see docs/HANDOFF.md)