Signal Strength
Pre-requisite: The LiveView should be already started before making any interactions.
Collecting the signal strength
client.signalStrength is a StateFlow<Int?> carrying the camera’s Wi-Fi signal strength in dBm. It is null until the first reading arrives, and then holds the most recent one:
viewModelScope.launch {
client.signalStrength.collectLatest { signalStrength ->
signalStrength?.let { render(it) }
}
}
The value is negative, and the closer it is to 0 the stronger the signal — -38 is a better reading than -72.
How readings arrive
Nothing needs to be started. Once the WebRTC data channel opens, the client checks whether the camera reports the signal strength capability and, if it does, begins polling it over the data channel every 10 seconds. The loop stops on its own when the data channel closes, so closing the client is enough to end it.
A reading of 0 means the camera had no measurement to report; it is discarded rather than emitted, so the flow keeps the last good value instead of dropping to zero.
Availability
Only cameras whose cluster reports the capability publish a signal strength. Check it before showing a signal indicator at all:
if (cluster.supportsRSSI()) {
// show the signal indicator
}
See Device Cluster for how to fetch the cluster. On a camera without the capability the flow stays null for the life of the stream — treat null as “no reading available”, not as “no signal”.
Reading the value
dBm is not meaningful to most users, so map it to a quality band before displaying it. These are the bands the InstaVision app uses; they are a UI convention rather than an SDK guarantee, so adjust them if your own indicator has a different number of levels:
| Signal strength | Quality |
|---|---|
-30 to 0 | Excellent |
-45 to -31 | Good |
-81 to -46 | Fair |
Below -81 | Poor |