Each device now advertises a friendly name over mDNS ("Patrick's MacBook"),
and the LAN transport records every tether device on the network — regardless
of room — into a discovered table. New Engine.nearby() -> [Peer] exposes that
list for an AirDrop-style picker; entries prune after 30s unseen. Peer carries
{id, name, source, room} so the UI can offer "pair" (join that device's room).
Engine::new gains a `name` param (5th); all callers updated (apps pass
UIDevice.name / Host.localizedName / Build.MODEL, agent passes hostname or
--name). Auto-connect stays room-scoped; only the *visibility* is broadened.
Proven by examples/nearby.rs: two engines in different rooms discover each
other by name over mDNS — and it picks up real devices on the LAN too.
iOS caveat unchanged: mDNS needs the multicast entitlement, so nearby() is
empty there until that lands. Desktop/Android work today.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.