Static Public Members

Detailed Description

This data can include the device name, GATT services offered by the device, and so on. The data set via this class will be used when advertising is started by calling QLowEnergyController::startAdvertising(). Objects of this class can represent an Advertising Data packet or a Scan Response packet.

Note: The actual data packets sent over the advertising channel cannot contain more than 31 bytes. If the variable-length data set via this class exceeds that limit, it will be left out of the packet or truncated, depending on the type.

Note: Discoverability information can only appear in an actual advertising data packet. If this object acts as scan response data, a call to this function will have no effect on the scan response sent.

Specifies that name should be broadcast as the name of the device. If the full name does not fit into the advertising data packet, an abbreviated name is sent, as described by the Bluetooth Low Energy specification.

On Android, the local name cannot be changed. Android always uses the device name. If this local name is not empty, the Android implementation includes the device name in the advertisement packet; otherwise the device name is omitted from the advertisement packet.

Sets the data to be advertised to data. If the value is not an empty byte array, it will be sent as-is as the advertising data and all other data in this object will be ignored. This can be used to send non-standard data.

Note: If data is longer than 31 bytes, it will be truncated. It is the caller's responsibility to ensure that data is well-formed.