feat(maestro): add Android daemon connection state machine
Ports the DaemonLink state machine from web/src/components/daemon/DaemonLink.tsx and crates/maestro-tui/src/daemon_link.rs to Android: LinkState (Connecting, Online, Reconnecting, Down, Updating), build-stamp identity comparison, a session catalog folded from the events WebSocket, and exponential backoff (500ms-10s) in place of the flat poll the LAN clients use, since a phone's network changes are bigger and longer-lived than a wifi blip. DaemonLink reacts to ProcessLifecycleOwner (foreground resume) and ConnectivityManager (network change) to re-probe and reconnect. DaemonPrefs persists the daemon base URL via SharedPreferences and exposes an intent extra key for overriding it at launch.
This commit is contained in:
@@ -13,6 +13,7 @@ kotlinxCoroutines = "1.9.0"
|
||||
[libraries]
|
||||
androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "coreKtx" }
|
||||
androidx-lifecycle-runtime-ktx = { group = "androidx.lifecycle", name = "lifecycle-runtime-ktx", version.ref = "lifecycleRuntimeKtx" }
|
||||
androidx-lifecycle-process = { group = "androidx.lifecycle", name = "lifecycle-process", version.ref = "lifecycleRuntimeKtx" }
|
||||
androidx-activity-compose = { group = "androidx.activity", name = "activity-compose", version.ref = "activityCompose" }
|
||||
androidx-compose-bom = { group = "androidx.compose", name = "compose-bom", version.ref = "composeBom" }
|
||||
androidx-ui = { group = "androidx.compose.ui", name = "ui" }
|
||||
|
||||
Reference in New Issue
Block a user