Table of Contents

Class NearbyAndroidOptions

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

Provides Android-specific configuration, exposed on every target framework.

public sealed class NearbyAndroidOptions
Inheritance
NearbyAndroidOptions
Inherited Members

Remarks

The settings on this type map onto Google Nearby Connections settings for which Multipeer Connectivity has no counterpart. They are exposed on every target framework so shared code compiles without #if ANDROID. Running on iOS, nothing reads them and they have no effect.

Nesting these settings under options.Android is deliberate disclosure: an expression such as options.Android.Topology names the platform it applies to at the call site, rather than leaving that fact to be discovered only by reading this comment.

Properties

ConnectionType

Gets or sets how aggressively a connection may use the radio.

public NearbyConnectionType ConnectionType { get; set; }

Property Value

NearbyConnectionType

One of the NearbyConnectionType values. The default is Balanced.

Remarks

Android only. This is a distinct setting from Topology: topology decides who may connect to whom, and this decides how hard the radio works once a connection exists.

Topology

Gets or sets how devices may connect to one another.

public NearbyTopology Topology { get; set; }

Property Value

NearbyTopology

One of the NearbyTopology values. The default is Cluster.

Remarks

Android only. Multipeer Connectivity always behaves as a mesh and has no equivalent setting. The advertising device and the discovering device must agree on this value, or they do not find each other.

UseLowPower

Gets or sets whether advertising and discovery are restricted to low-power radios.

public bool UseLowPower { get; set; }

Property Value

bool

true to restrict advertising and discovery to low-power radios such as Bluetooth Low Energy; otherwise, false. The default is false.

Remarks

Android only. Enabling this option reduces battery consumption at the cost of range and throughput.