public static final class BleAdvertiseData.Builder extends Object
| 构造器 | 说明 |
|---|---|
Builder() |
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
BleAdvertiseData.Builder |
addManufacturerData(int manufacturerId,
byte[] data) |
Adds the specified manufacturer data to this advertisement.
|
BleAdvertiseData.Builder |
addServiceData(SequenceUuid uuid,
byte[] serviceData) |
Adds the specified service data to this advertisement.
|
BleAdvertiseData.Builder |
addServiceUuid(SequenceUuid serviceUuid) |
Adds a specified service UUID to this advertisement.
|
BleAdvertiseData |
build() |
Builds a
BleAdvertiseData object. |
public BleAdvertiseData.Builder addServiceUuid(SequenceUuid serviceUuid)
serviceUuid - Indicates the service UUID to add.IllegalArgumentException - Throws this exception if serviceUuid is null.public BleAdvertiseData.Builder addServiceData(SequenceUuid uuid, byte[] serviceData)
uuid - Indicates the UUID of the service data to add.serviceData - Indicates the service data to add.IllegalArgumentException - Throws this exception if uuid or serviceData is null.public BleAdvertiseData.Builder addManufacturerData(int manufacturerId, byte[] data)
manufacturerId - Indicates the manufacturer ID assigned by Bluetooth SIG.data - Indicates the manufacturer data to add.IllegalArgumentException - Throws this exception if manufacturerId is a negative number or data is null.public BleAdvertiseData build()
BleAdvertiseData object.BleAdvertiseData object.