Dela via


GattServiceProviderAdvertisingParameters.ServiceData Property

Definition

For Bluetooth Low Energy, this parameter adds an additional ServiceData section to the advertisement payload for the service's service UUID if space is available. If the service data is added to the advertisement, then the service UUID will also be included in the same section in the advertisement.

public:
 property IBuffer ^ ServiceData { IBuffer ^ get(); void set(IBuffer ^ value); };
IBuffer ServiceData();

void ServiceData(IBuffer value);
public IBuffer ServiceData { get; set; }
var iBuffer = gattServiceProviderAdvertisingParameters.serviceData;
gattServiceProviderAdvertisingParameters.serviceData = iBuffer;
Public Property ServiceData As IBuffer

Property Value

The service data included in a Bluetooth Low Energy advertising payload.

Windows requirements

Device family
Windows 10, version 1903 (introduced in 10.0.18362.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v8.0)

Remarks

The maximum size of the ServiceData section depends on the availability on the platform. But if the platform supports extended advertisement, and that's what's being requested, then the maximum theoretical size will be much larger. The actual value might be less than the theoretical value, depending on what's being shared on the system. The GattServiceProviderAdvertisementStatus.StartedWithoutAllAdvertisementData status indicates that the system was successfully able to issue the advertisement request, but not all of the requested data could be included in the advertisement.

Applies to