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
callbackType?: CallbackType*** 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.
Optional
matchMode?: MatchMode*** 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
matchNum?: MatchNum*** 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.
Optional
reportDelay?: numberSet report delay timestamp for Bluetooth LE scan.
Optional
scanMode?: ScanMode*** 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
useHardwareBatchingIfSupported?: booleanSeveral 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.
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
onThis 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).
The options object passed into the startScanning function.