AndroidScannerViewModel
Constructors
Properties
User preference that controls whether BLE scanning auto-starts when the Connections screen opens.
Combined bonded + scanned BLE devices for the UI.
Transient, fine-grained status text emitted during connect/bonding (e.g. "Bonding…", "Requesting config…"). Nullable because serviceRepository.connectionProgress does not emit during steady-state.
User preference that controls whether NSD network scanning auto-starts when the Connections screen opens.
The persisted device name from the last selection, for use as a UI fallback.
Non-null variant of selectedAddressFlow that substitutes NO_DEVICE_SELECTED for null.
Whether the BLE section is visible in the Connections device list. Defaults to true.
Whether the Network (TCP/NSD) section is visible in the Connections device list. Defaults to true.
Whether the USB section is visible in the Connections device list. Defaults to true.
Functions
Called by the UI when a device has been tapped. BLE and USB entries may still need bonding/permission — the concrete return value tells the caller whether the connection was initiated immediately.
Persist the user's intent to auto-scan the network on next screen entry without flipping the active scan flag. Used by the Connections screen when it must defer the actual scan start until after the system permission grant dialog resolves — the persisted intent ensures auto-start fires once permission is granted.
Convenience command: start scanning if idle, stop otherwise. Persists the resulting state to prefs.
Convenience command: start scanning if idle, stop otherwise. Persists the resulting state to prefs.