Optional
androidAndroid scanning specific options. The defaults should cover majority of use cases. Be sure to check documentation for the various values for Android Bluetooth.
Optional
callback*** Only available on Android 23+ *** The callback type flags for the scan. TODO: Add documentation on the valid values for callbackTypes.
Optional
legacy?: booleanSet whether only legacy advertisements should be returned in scan results. Legacy advertisements include advertisements as specified by the Bluetooth core specification 4.2 and below. This is true by default for compatibility with older apps.
true if only legacy advertisements will be returned
Optional
match*** Only available on Android 23+ *** The match mode can be one of android.bluetooth.le.ScanSettings.MATCH_MODE_AGGRESSIVE (1) or android.bluetooth.le.ScanSettings.MATCH_MODE_STICKY (2) DEFAULT: MATCH_MODE_AGGRESSIVE (2).
Optional
match*** Only available on Android 23+ *** The num of matches can be one of android.bluetooth.le.ScanSettings.MATCH_NUM_ONE_ADVERTISEMENT (1), android.bluetooth.le.ScanSettings.MATCH_NUM_FEW_ADVERTISEMENT (2), or android.bluetooth.le.ScanSettings.MATCH_NUM_MAX_ADVERTISEMENT (3) DEFAULT: MATCH_NUM_MAX_ADVERTISEMENT(3)
Optional
phy?: Phy*** Only available on Android 23+ *** Set the Physical Layer to use during this scan. This is used only if ScanSettings.Builder#setLegacy is set to false and only on Android 0reo or newer. android.bluetooth.BluetoothAdapter#isLeCodedPhySupported may be used to check whether LE Coded phy is supported by calling android.bluetooth.BluetoothAdapter#isLeCodedPhySupported. Selecting an unsupported phy will result in failure to start scan.
Can be one of BluetoothDevice#PHY_LE_1M, BluetoothDevice#PHY_LE_CODED or ScanSettings#PHY_LE_ALL_SUPPORTED
Optional
reportSet report delay timestamp for Bluetooth LE scan.
Delay of report in milliseconds. Set to 0 to be notified of results immediately. Values > 0 causes the scan results to be queued up and delivered after the requested delay or when the internal buffers fill up.
IllegalArgumentException If {@code reportDelayMillis} < 0.
Optional
scan*** Only available on Android 21+ *** The scan mode can be one of android.bluetooth.le.ScanSettings.SCAN_MODE_LOW_POWER (0), android.bluetooth.le.ScanSettings.SCAN_MODE_BALANCED (1) , or android.bluetooth.le.ScanSettings.SCAN_MODE_LOW_LATENCY (2). DEFAULT: SCAN_MODE_LOW_LATENCY (2)
Optional
useSeveral phones may have some issues when it comes to offloaded filtering. Even if it should be supported, it may not work as expected. It has been observed for example, that setting 2 filters with different devices addresses on Nexus 6 with Lollipop gives no callbacks if one or both devices advertise. See https://code.google.com/p/android/issues/detail?id=181561.
true to enable (default) hardware offload filtering. If false a compat software filtering will be used (uses much more resources).
Optional
avoidAvoid duplicates with the same serviceUUID in "onDiscovered" callback. If true, only the first discovered peripheral with the same serviceUUID will be reported.
Optional
filtersZero or more services which the peripheral needs to broadcast. Default: [], which matches any peripheral.
Optional
deviceOptional
deviceOptional
manufacturerOptional
serviceUUID?: stringOptional
onThis callback is invoked when a peripheral is found.
This callback is invoked when a peripheral is found.
Optional
secondsThe number of seconds to scan for services. Default: unlimited, which is not really recommended. You should stop scanning manually by calling 'stopScanning'.
Optional
skip*** ANDROID ONLY *** Set this to true if you don't want the plugin to check (and request) the required Bluetooth permissions. Particularly useful if you're running this function on a non-UI thread (ie. a Worker).
Generated using TypeDoc
The options object passed into the startScanning function.