Class AndroidScanningOptions
- Namespace
- Bluetooth.Abstractions.Scanning.Options.Android
- Assembly
- Bluetooth.Abstractions.Scanning.dll
Android platform-specific scanning options.
public record AndroidScanningOptions : IEquatable<AndroidScanningOptions>
- Inheritance
-
AndroidScanningOptions
- Implements
- Inherited Members
Remarks
These options map directly to Android's ScanSettings.Builder properties. See: https://developer.android.com/reference/android/bluetooth/le/ScanSettings.Builder
Properties
Legacy
Gets whether to scan for legacy advertisements only (API 26+).
public bool? Legacy { get; init; }
Property Value
- bool?
Remarks
When true, only legacy (pre-Bluetooth 5.0) advertisements are reported.
When false (default), both legacy and extended advertisements are reported.
Requires Android 8.0 (API 26) or higher. Ignored on lower API levels.
MatchMode
Gets the match mode for Bluetooth LE scan filters (API 23+).
public ScanMatchMode? MatchMode { get; init; }
Property Value
Remarks
Controls how aggressively the Bluetooth stack filters scan results:
- Aggressive: Few matches per filter (fewer false positives, default)
- Sticky: More matches per filter (higher discovery rate)
Requires Android 6.0 (API 23) or higher. Ignored on lower API levels.
Phy
Gets the PHY (Physical Layer) to use for scanning (API 26+).
public ScanPhy? Phy { get; init; }
Property Value
Remarks
Controls which Bluetooth 5.0 PHY layers to scan on:
- AllSupported: All supported PHYs (default, best compatibility)
- Le1M: 1M PHY only (standard Bluetooth LE)
- Le2M: 2M PHY (higher throughput, Bluetooth 5.0+)
- LeCoded: Coded PHY (Long Range, Bluetooth 5.0+)
Requires Android 8.0 (API 26) or higher and Bluetooth 5.0 hardware. Ignored on lower API levels or older hardware.
ReportDelay
Gets the delay before reporting scan results (API 23+).
public TimeSpan? ReportDelay { get; init; }
Property Value
Remarks
Setting a delay allows batching of scan results, reducing power consumption. A delay of Zero reports results immediately (default).
Example: 5-second delay batches all discovered devices and reports them together every 5 seconds, reducing callback frequency and improving battery life.
Requires Android 6.0 (API 23) or higher. Ignored on lower API levels.
ScanMatchNumber
Gets the number of advertisements to match per filter before reporting (API 23+).
public ScanMatchNumber? ScanMatchNumber { get; init; }