public static final class ScanSettings.Builder extends java.lang.Object implements ExternalScanSettingsExtension.Builder
ScanSettings.| Constructor and Description |
|---|
Builder() |
| Modifier and Type | Method and Description |
|---|---|
ScanSettings |
build()
Build
ScanSettings. |
ScanSettings.Builder |
setCallbackType(int callbackType)
Set callback type for Bluetooth LE scan.
|
ScanSettings.Builder |
setScanMode(int scanMode)
Set scan mode for Bluetooth LE scan.
|
ScanSettings.Builder |
setShouldCheckLocationServicesState(boolean shouldCheck)
Set whether a check if Location Services are (any Location Provider is) turned on before scheduling a BLE scan start.
|
public ScanSettings.Builder setScanMode(int scanMode)
scanMode - The scan mode can be one of ScanSettings.SCAN_MODE_LOW_POWER,
ScanSettings.SCAN_MODE_BALANCED or
ScanSettings.SCAN_MODE_LOW_LATENCY.java.lang.IllegalArgumentException - If the scanMode is invalid.public ScanSettings.Builder setCallbackType(int callbackType)
callbackType - The callback type flags for the scan.java.lang.IllegalArgumentException - If the callbackType is invalid.public ScanSettings.Builder setShouldCheckLocationServicesState(boolean shouldCheck)
ScanResult if Location Services are
disabled.
If set to true and Location Services are off a BleScanException will be emitted.
Default: true.
setShouldCheckLocationServicesState in interface ExternalScanSettingsExtension.BuildershouldCheck - true if Location Services should be checked before the scanpublic ScanSettings build()
ScanSettings.