public class BluetoothScanFilter extends Object
BluetoothScanFilter
class represents a scan filter which may be used in order to filter scan results
during a scan.
Scan filters can be created by calling the static methods of this class.
Modifier and Type | Method and Description |
---|---|
static BluetoothScanFilter |
fieldEquals(byte type,
byte[] data)
Creates a new scan filter.
|
static BluetoothScanFilter |
fieldExists(byte type)
Creates a new scan filter.
|
static BluetoothScanFilter |
fieldStartsWith(byte type,
byte[] data)
Creates a new scan filter.
|
static BluetoothScanFilter |
noFilter()
Creates a new scan filter.
|
public static BluetoothScanFilter fieldEquals(byte type, byte[] data)
type
- the type of the field which must be present within the advertisement data (see
BluetoothDataTypes
).data
- the data that the field must be equal to.public static BluetoothScanFilter fieldExists(byte type)
type
- the type of the field which must be present within the advertisement data (see
BluetoothDataTypes
).public static BluetoothScanFilter fieldStartsWith(byte type, byte[] data)
type
- the type of the field which must be present within the advertisement data (see
BluetoothDataTypes
).data
- the data that the field must start with.public static BluetoothScanFilter noFilter()