Class AndroidConnectionOptions
- Namespace
- Bluetooth.Abstractions.Scanning.Options.Android
- Assembly
- Bluetooth.Abstractions.Scanning.dll
Android platform-specific connection options.
public record AndroidConnectionOptions : IEquatable<AndroidConnectionOptions>
- Inheritance
-
AndroidConnectionOptions
- Implements
- Inherited Members
Properties
AutoConnect
Gets a value indicating whether to automatically reconnect if the connection is lost.
public bool? AutoConnect { get; init; }
Property Value
- bool?
Remarks
Maps to the autoConnect parameter in BluetoothDevice.connectGatt(). When true, the system will automatically reconnect when the device becomes available. This may result in longer initial connection times but provides automatic reconnection.
ConnectionPriority
Gets the preferred connection priority/performance mode.
public ConnectionPriority? ConnectionPriority { get; init; }
Property Value
Remarks
Sets the preferred connection parameters via BluetoothGatt.requestConnectionPriority(). This affects latency, throughput, and power consumption.
GattReadRetry
Gets the retry configuration for GATT read operations.
public RetryOptions? GattReadRetry { get; init; }
Property Value
Remarks
Defaults to 2 retries with 100ms delay.
GattWriteRetry
Gets the retry configuration for GATT write operations.
public RetryOptions? GattWriteRetry { get; init; }
Property Value
Remarks
Replaces hardcoded 3 retries with 200ms delay in AndroidBluetoothRemoteCharacteristic. Defaults to Default (3 retries with 200ms delay).
PreferredPhy
Gets the preferred PHY (Physical Layer) for the connection (Android 8.0+).
public PhyMode? PreferredPhy { get; init; }
Property Value
Remarks
Specifies the preferred PHY for connections on Android 8.0 (API 26) and higher. Common values: LE_1M, LE_2M, LE_CODED.
ServiceDiscoveryRetry
Gets the retry configuration for service discovery operations.
public RetryOptions? ServiceDiscoveryRetry { get; init; }
Property Value
Remarks
Used when DiscoverServices fails or times out. Android BLE stack can fail service discovery due to timing issues. Defaults to 2 retries with 300ms delay.
TransportType
Gets the preferred transport type for the connection.
public TransportType? TransportType { get; init; }
Property Value
Remarks
Maps to the transport parameter in BluetoothDevice.connectGatt(). Controls whether to use LE, BR/EDR, or automatic transport selection.