java.lang.Object | |
↳ | android.bluetooth.le.AdvertiseData.Builder |
Builder for AdvertiseData
.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Add manufacturer specific data.
| |||||||||||
Add service data to advertise data.
| |||||||||||
Add a service UUID to advertise data.
| |||||||||||
Build the
AdvertiseData .
| |||||||||||
Set whether the device name should be included in advertise packet.
| |||||||||||
Whether the transmission power level should be included in the advertise packet.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Add manufacturer specific data.
Please refer to the Bluetooth Assigned Numbers document provided by the Bluetooth SIG for a list of existing company identifiers.
manufacturerId | Manufacturer ID assigned by Bluetooth SIG. |
---|---|
manufacturerSpecificData | Manufacturer specific data |
IllegalArgumentException | If the manufacturerId is negative or
manufacturerSpecificData is null.
|
---|
Add service data to advertise data.
serviceDataUuid | 16-bit UUID of the service the data is associated with |
---|---|
serviceData | Service data |
IllegalArgumentException | If the serviceDataUuid or serviceData is
empty.
|
---|
Add a service UUID to advertise data.
serviceUuid | A service UUID to be advertised. |
---|
IllegalArgumentException | If the serviceUuids are null.
|
---|
Set whether the device name should be included in advertise packet.
Whether the transmission power level should be included in the advertise packet. Tx power level field takes 3 bytes in advertise packet.