# Class ScanSettings

java.lang.Object
com.codename1.bluetooth.le.ScanSettings

public class ScanSettings extends Object
Options for a BLE scan started via `BluetoothLE.startScan(ScanSettings, ScanListener)`. Fluent setters return `this` for chaining.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ScanSettings()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `ScanSettings`
  `addFilter(ScanFilter filter)`
  Adds a filter; multiple filters are OR-combined.
  `List<ScanFilter>`
  `getFilters()`
  The filters added via `addFilter(ScanFilter)`; empty means match-all.
  `ScanMode`
  `getScanMode()`
  The configured scan mode.
  `boolean`
  `isAllowDuplicates()`
  Whether duplicate sightings are reported.
  `boolean`
  `matches(ScanResult result)`
  `true` when the given result passes this settings object's filter set (no filters == match all).
  `ScanSettings`
  `setAllowDuplicates(boolean allow)`
  When `false` (the default) each device is reported once per scan; when `true` every advertisement sighting is reported -- required for RSSI tracking and beacon monitoring.
  `ScanSettings`
  `setScanMode(ScanMode mode)`
  The power/latency trade-off; defaults to `ScanMode.BALANCED`.

  ### Methods inherited from class Object

  `clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### ScanSettings

    public ScanSettings()

- ## Method Details

  - ### setScanMode

    public ScanSettings setScanMode(ScanMode mode)
    The power/latency trade-off; defaults to `ScanMode.BALANCED`.

  - ### setAllowDuplicates

    public ScanSettings setAllowDuplicates(boolean allow)
    When `false` (the default) each device is reported once per scan; when `true` every advertisement sighting is reported -- required for RSSI tracking and beacon monitoring.

  - ### addFilter

    public ScanSettings addFilter(ScanFilter filter)
    Adds a filter; multiple filters are OR-combined. A scan without filters reports every advertising device.

  - ### getScanMode

    public ScanMode getScanMode()
    The configured scan mode.

  - ### isAllowDuplicates

    public boolean isAllowDuplicates()
    Whether duplicate sightings are reported.

  - ### getFilters

    public List<ScanFilter> getFilters()
    The filters added via `addFilter(ScanFilter)`; empty means match-all.

  - ### matches

    public boolean matches(ScanResult result)
    `true` when the given result passes this settings object's filter set (no filters == match all). Used by the core scan demultiplexer.