diff --git a/CLAUDE.md b/CLAUDE.md index a4d0f05..562996f 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -199,7 +199,9 @@ Low-latency desktop/game streaming stack, Linux-first, with a shared Rust protoc `punktfunk-core`; phone + Android TV): NDK `AMediaCodec` hardware HEVC decode → `SurfaceView` incl. **HDR10** (Main10/BT.2020 PQ) with low-latency tuning + a live stats HUD (`decode.rs`/`stats.rs`), Opus/Oboe audio + mic uplink (`audio.rs`/`mic.rs`), gamepad input with rumble/HID feedback - (`feedback.rs`), `NsdManager` mDNS discovery, SPAKE2 PIN pairing + TOFU (Keystore identity + + (`feedback.rs`), **native `mdns-sd` mDNS discovery** (`discovery.rs`, polled over JNI — the same + browse the Linux/Windows clients use, replacing the flaky per-OEM `NsdManager`; Kotlin keeps only + the `MulticastLock` + permission UX), SPAKE2 PIN pairing + TOFU (Keystore identity + known-host store), Compose UI (Connect/Settings/Stream) with D-pad/controller focus nav. Built for `arm64-v8a` + `x86_64`; published to Google Play (Internal Testing) via `android.yml` (`ci/play-upload.py`). Next: real-device gamepad/HDR live-verify, presenter/latency polish. diff --git a/Cargo.lock b/Cargo.lock index 0469fd7..9d25097 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2547,6 +2547,7 @@ dependencies = [ "jni", "libc", "log", + "mdns-sd", "ndk", "opus", "punktfunk-core", diff --git a/clients/android/README.md b/clients/android/README.md index 92fe991..8f54da5 100644 --- a/clients/android/README.md +++ b/clients/android/README.md @@ -11,8 +11,8 @@ machine, trust logic) instead of re-porting it into Kotlin. | Side | Owns | |------|------| -| **Rust** (`clients/android/native` → `libpunktfunk_android.so`) | the JNI seam, `NativeClient` (QUIC control + UDP data plane), AnnexB→`AMediaCodec` decode, Opus+Oboe audio, VK keymap, latency math, trust/pairing | -| **Kotlin** (`clients/android`) | Compose UI (host grid / settings / stream), `SurfaceView` lifecycle, input capture, `NsdManager` discovery, Keystore identity, permissions | +| **Rust** (`clients/android/native` → `libpunktfunk_android.so`) | the JNI seam, `NativeClient` (QUIC control + UDP data plane), AnnexB→`AMediaCodec` decode, Opus+Oboe audio, VK keymap, latency math, trust/pairing, **mDNS discovery** (`mdns-sd`, the same browse the Linux/Windows clients use) | +| **Kotlin** (`clients/android`) | Compose UI (host grid / settings / stream), `SurfaceView` lifecycle, input capture, the Wi-Fi `MulticastLock` + permission UX, Keystore identity, permissions | The single seam is `io.unom.punktfunk.kit.NativeBridge` ⇄ `Java_io_unom_punktfunk_kit_NativeBridge_*`. @@ -30,7 +30,7 @@ clients/android/native/ Rust cdylib (workspace member) — links punktf clients/android/ Gradle project (this dir) settings.gradle.kts · build.gradle.kts · gradle.properties · gradlew app/ :app — Compose UI: Connect / Settings / Stream screens (phone + TV) - kit/ :kit — NativeBridge · discovery (NsdManager) · Gamepad · Keymap · + kit/ :kit — NativeBridge · discovery (native mdns-sd, polled) · Gamepad · Keymap · security (Keystore identity + known-host store) · cargo-ndk build ``` @@ -74,7 +74,8 @@ streaming experience: - **Audio** — Opus + Oboe playback with a jitter ring, plus mic uplink to the host. - **Input** — game controllers (buttons + axes) with rumble and HID feedback; D-pad / game-controller focus navigation for the couch (TV + phone). -- **Discovery & trust** — `NsdManager` mDNS host list, SPAKE2 PIN pairing and TOFU, with a +- **Discovery & trust** — native `mdns-sd` mDNS host list (polled over JNI; the same browse the + Linux/Windows clients use, not `NsdManager`), SPAKE2 PIN pairing and TOFU, with a Keystore-wrapped client identity and a known-host store. - **UI** — Compose host list / settings / stream screens, Material You theming. - **Shipping** — built for `arm64-v8a` + `x86_64`; published to Google Play (Internal Testing). diff --git a/clients/android/app/src/main/AndroidManifest.xml b/clients/android/app/src/main/AndroidManifest.xml index 310de54..4cadcfb 100644 --- a/clients/android/app/src/main/AndroidManifest.xml +++ b/clients/android/app/src/main/AndroidManifest.xml @@ -4,11 +4,13 @@ - + - +