| java.lang.Object | |
| ↳ | android.bluetooth.le.ScanFilter.Builder |
Builder class for ScanFilter.
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Build
ScanFilter.
| |||||||||||
Set filter on device address.
| |||||||||||
Set filter on device name.
| |||||||||||
Set filter on on manufacturerData.
| |||||||||||
Set filter on partial manufacture data.
| |||||||||||
Set filtering on service data.
| |||||||||||
Set partial filter on service data.
| |||||||||||
Set filter on partial service uuid.
| |||||||||||
Set filter on service uuid.
| |||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
Build ScanFilter.
| IllegalArgumentException | If the filter cannot be built. |
|---|
Set filter on device address.
| deviceAddress | The device Bluetooth address for the filter. It needs to be in the
format of "01:02:03:AB:CD:EF". The device address can be validated using
checkBluetoothAddress(String). |
|---|
| IllegalArgumentException | If the deviceAddress is invalid.
|
|---|
Set filter on device name.
Set filter on on manufacturerData. A negative manufacturerId is considered as invalid id.
Note the first two bytes of the manufacturerData is the manufacturerId.
| IllegalArgumentException | If the manufacturerId is invalid.
|
|---|
Set filter on partial manufacture data. For any bit in the mask, set it the 1 if it needs to match the one in manufacturer data, otherwise set it to 0.
The manufacturerDataMask must have the same length of manufacturerData.
| IllegalArgumentException | If the manufacturerId is invalid, or
manufacturerData is null while manufacturerDataMask is not,
or manufacturerData and manufacturerDataMask have different
length.
|
|---|
Set filtering on service data.
| IllegalArgumentException | If serviceDataUuid is null.
|
|---|
Set partial filter on service data. For any bit in the mask, set it to 1 if it needs to match the one in service data, otherwise set it to 0 to ignore that bit.
The serviceDataMask must have the same length of the serviceData.
| IllegalArgumentException | If serviceDataUuid is null or
serviceDataMask is null while serviceData is not or
serviceDataMask and serviceData has different length.
|
|---|
Set filter on partial service uuid. The uuidMask is the bit mask for the
serviceUuid. Set any bit in the mask to 1 to indicate a match is needed for the
bit in serviceUuid, and 0 to ignore that bit.
| IllegalArgumentException | If serviceUuid is null but
uuidMask is not null.
|
|---|
Set filter on service uuid.