Table of Contents

Enum NearbyDeviceStatus

Namespace
Plugin.Maui.NearbyConnectivity
Assembly
Plugin.Maui.NearbyConnectivity.dll

Specifies where a NearbyDevice sits in its lifecycle, from first discovery through to an established connection.

public enum NearbyDeviceStatus

Fields

Connected = 3

A connection is established.

Connection returns a connection for a device in this state, and only in this state.

Connecting = 2

A connection handshake is in progress, started by either side.

This state is advisory, not a guaranteed step in the lifecycle: on iOS, a device can move straight from an invitation to a disconnected state without ever being observed here, both when the invitation is declined and, less commonly, on error. Do not treat reaching this state as a precondition for clearing pending connection state.

RequestReceived = 1

The device has requested a connection and is awaiting a response.

Accepting or declining the request is what moves the device out of this state.

Visible = 0

The device is in range with no connection negotiation in progress.

The initial state for a newly discovered device, and the state a device returns to once a connection ends or a request is declined while this session is discovering. When it is not, the device is removed instead: nothing vouches for it still being in range.

Remarks

A device stays in Devices across every one of these states. The status on the device changes, the device does not move between collections.