Sequenceablepublic final class BleScanFilter extends Object implements Sequenceable
The criteria for filtering scanning results can be set.
Constructing a filter requires the address, name, service data, service UUID, and manufacturer of a BLE peripheral device.
Sequenceable.Producer<T>| 构造器 | 说明 |
|---|---|
BleScanFilter() |
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
String |
getPeripheralAddress() |
Obtains the Bluetooth MAC address of the peripheral device to scan.
|
byte[] |
getPeripheralManufacturerData() |
Obtains the manufacturer data of the peripheral device to scan.
|
String |
getPeripheralName() |
Obtains the name of the peripheral device to scan.
|
UUID |
getPeripheralServcieUuid() |
Obtains the service UUID of the peripheral device to scan.
|
byte[] |
getPeripheralServiceData() |
Obtains the service data of the peripheral device to scan.
|
boolean |
marshalling(Parcel out) |
Marshals this
Sequenceable object into a Parcel. |
void |
setPeripheralAddress(String address) |
Sets the address of a BLE peripheral device.
|
void |
setPeripheralManufacturerData(int manufacturerId,
byte[] data,
byte[] mask) |
Sets the manufacturer data.
|
void |
setPeripheralName(String name) |
Sets the name of a BLE peripheral device.
|
void |
setPeripheralServiceData(UUID uuid,
byte[] data,
byte[] mask) |
Sets the service data of a BLE peripheral device.
|
void |
setPeripheralServiceUuid(UUID uuid,
UUID mask) |
Sets the service UUID of a BLE peripheral device.
|
boolean |
unmarshalling(Parcel in) |
Unmarshals this
Sequenceable object from a Parcel. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waithasFileDescriptorpublic void setPeripheralAddress(String address)
Ensure that the input address is valid.
address - Indicates the address in string.public void setPeripheralName(String name)
Ensure that the input name is valid.
name - Indicates the name in string.public void setPeripheralServiceData(UUID uuid, byte[] data, byte[] mask)
Empty data or mask is not allowed.
uuid - Indicates the service data UUID.data - Indicates the service data content.mask - Indicates the service data mask.public void setPeripheralServiceUuid(UUID uuid, UUID mask)
uuid - Indicates the service UUID.mask - Indicates the mask used by the service UUID.public void setPeripheralManufacturerData(int manufacturerId,
byte[] data,
byte[] mask)
Empty data or mask is not allowed.
manufacturerId - Indicates the device manufacturer ID.data - Indicates the manufacturer data.mask - Indicates the manufacturer data mask.public String getPeripheralAddress()
public String getPeripheralName()
public byte[] getPeripheralServiceData()
public UUID getPeripheralServcieUuid()
public byte[] getPeripheralManufacturerData()
public boolean marshalling(Parcel out)
SequenceableSequenceable object into a Parcel.marshalling 在接口中 Sequenceableout - Indicates the Parcel object to which the Sequenceable
object will be marshaled..true if the marshalling is successful; returns false otherwise.public boolean unmarshalling(Parcel in)
SequenceableSequenceable object from a Parcel.unmarshalling 在接口中 Sequenceablein - Indicates the Parcel object into which the Sequenceable
object has been marshaled.true if the unmarshalling is successful; returns false otherwise.