Add an Android app that drives the same tethercore engine (SSE + RTC) as the iOS/macOS apps via generated Kotlin/UniFFI bindings — proving the shared core reaches a fourth language with no protocol reimplementation. Engine surface is identical to Swift: Engine(server,room,from,source) / start / send / stop. Includes the Gradle/Compose project, a TetherStore that bridges the engine to ClipboardManager (auto-send via OnPrimaryClipChangedListener — Android allows foreground clipboard observation, unlike iOS), per-install RoomIdentity, and core/build-android.sh (cargo-ndk → jniLibs + Kotlin bindgen). Not built here: this machine has no Android SDK/NDK, so the native .so and Kotlin binding are generated (git-ignored), not committed. README documents the NDK install + build steps. The binding itself was confirmed to generate. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1.5 KiB
1.5 KiB
tether — Android client
Compose UI over the shared tethercore Rust engine (SSE + RTC) via UniFFI
Kotlin bindings. Same engine as the iOS/macOS apps and the desktop agent; only
the UI and the binding language differ.
Build (requires the Android NDK)
This machine had no Android toolchain when the app was scaffolded, so the
native .so and Kotlin bindings are not committed — they're generated:
- Install the toolchain:
- Android Studio (SDK + NDK), or
sdkmanager "ndk;26.x" cargo install cargo-ndkrustup target add aarch64-linux-android x86_64-linux-android- export
ANDROID_NDK_HOME=/path/to/ndk
- Android Studio (SDK + NDK), or
- Generate native libs + bindings:
This places
../core/build-android.shlibtethercore.sounderapp/src/main/jniLibs/<abi>/and the Kotlin binding underapp/src/main/java/uniffi/tethercore/. - Build/run the app: open
android/in Android Studio (it generates the Gradle wrapper on first sync), then Run. From the CLI, generate the wrapper once withgradle wrapper, then./gradlew :app:assembleDebug.
Notes
- Default server is
http://10.0.2.2:8765— the emulator's alias for the host machine'slocalhost. On a physical device use the relay's LAN address. - Android (unlike iOS) lets a foreground app observe clipboard changes, so the
app auto-sends via
OnPrimaryClipChangedListener. A foreground Service would extend that to the background (future work). - The room id is a per-install UUID (
RoomIdentity); account-derived shared rooms are future work, matching the iOS plan.