GattServiceProviderTrigger GattServiceProviderTrigger GattServiceProviderTrigger GattServiceProviderTrigger Class

Definition

Constructs a Generic Attributes (GATT) service that can be persisted in the background.

public : sealed class GattServiceProviderTrigger : IBackgroundTrigger, IGattServiceProviderTrigger
public sealed class GattServiceProviderTrigger : IBackgroundTrigger, IGattServiceProviderTrigger
Public NotInheritable Class GattServiceProviderTrigger Implements IBackgroundTrigger, IGattServiceProviderTrigger
// This class does not provide a public constructor.
Attributes
Windows 10 requirements
Device family
Windows 10 Creators Update (introduced v10.0.15063.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v4)

Remarks

GATT defines a hierarchical data structure that is exposed to connected Bluetooth low energy (LE) devices.

Properties

AdvertisingParameters AdvertisingParameters AdvertisingParameters AdvertisingParameters

Gets the advertising parameters which control whether the radio is connected/discoverable.

public : GattServiceProviderAdvertisingParameters AdvertisingParameters { get; set; }
public GattServiceProviderAdvertisingParameters AdvertisingParameters { get; set; }
Public ReadWrite Property AdvertisingParameters As GattServiceProviderAdvertisingParameters
var gattServiceProviderAdvertisingParameters = gattServiceProviderTrigger.advertisingParameters;
gattServiceProviderTrigger.advertisingParameters = gattServiceProviderAdvertisingParameters;

Remarks

When the device is discoverable, the service is published to a database so that other devices can see what services are available without having to connect to the device.

Service Service Service Service

Gets the service associated with this trigger.

public : GattLocalService Service { get; }
public GattLocalService Service { get; }
Public ReadOnly Property Service As GattLocalService
var gattLocalService = gattServiceProviderTrigger.service;

TriggerId TriggerId TriggerId TriggerId

Gets the trigger identifier.

public : Platform::String TriggerId { get; }
public string TriggerId { get; }
Public ReadOnly Property TriggerId As string
var string = gattServiceProviderTrigger.triggerId;
Value
Platform::String string string string

The trigger ID.

Methods

CreateAsync(String, Guid) CreateAsync(String, Guid) CreateAsync(String, Guid) CreateAsync(String, Guid)

Creates a GATT provider service.

public : static IAsyncOperation<GattServiceProviderTriggerResult> CreateAsync(Platform::String triggerId, Platform::Guid serviceUuid)
public static IAsyncOperation<GattServiceProviderTriggerResult> CreateAsync(String triggerId, Guid serviceUuid)
Public Static Function CreateAsync(triggerId As String, serviceUuid As Guid) As IAsyncOperation( Of GattServiceProviderTriggerResult )
Windows.ApplicationModel.Background.GattServiceProviderTrigger.createAsync(triggerId, serviceUuid).done( /* Your success and error handlers */ );
Parameters
triggerId
Platform::String String String String

The identifier for the trigger.

serviceUuid
Platform::Guid Guid Guid Guid

The universally unique identifier for the trigger.

Returns

See Also