Gatt​Service​Provider Gatt​Service​Provider Gatt​Service​Provider Class

Definition

This class is used to advertise a GATT service.

public sealed class GattServiceProvider : IGattServiceProviderpublic sealed class GattServiceProvider : IGattServiceProviderPublic NotInheritable Class GattServiceProvider Implements IGattServiceProvider
Attributes
Windows 10 requirements
Device family
Windows 10 Creators Update (introduced v10.0.15063.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v4)

Properties

AdvertisementStatus AdvertisementStatus AdvertisementStatus

Gets the advertisement status of this GATT service.

public GattServiceProviderAdvertisementStatus AdvertisementStatus { get; }public GattServiceProviderAdvertisementStatus AdvertisementStatus { get; }Public ReadOnly Property AdvertisementStatus As GattServiceProviderAdvertisementStatus
Attributes

Service Service Service

Gets the GATT service.

public GattLocalService Service { get; }public GattLocalService Service { get; }Public ReadOnly Property Service As GattLocalService
Attributes

Methods

CreateAsync(Guid) CreateAsync(Guid) CreateAsync(Guid)

Creates a new GATT service with the specified serviceUuid

public static IAsyncOperation<GattServiceProviderResult> CreateAsync(Guid serviceUuid)public static IAsyncOperation<GattServiceProviderResult> CreateAsync(Guid serviceUuid)Public Static Function CreateAsync(serviceUuid As Guid) As IAsyncOperation( Of GattServiceProviderResult )
Parameters
serviceUuid
System.Guid System.Guid System.Guid

The service UUID.

Returns

An asynchronous operation that completes with a GattServiceProviderResult object.

Attributes

StartAdvertising() StartAdvertising() StartAdvertising()

Start advertising the GATT service.

public void StartAdvertising()public void StartAdvertising()Public Function StartAdvertising() As void
Attributes

StartAdvertising(GattServiceProviderAdvertisingParameters) StartAdvertising(GattServiceProviderAdvertisingParameters) StartAdvertising(GattServiceProviderAdvertisingParameters)

Start advertising the GATT service.

public void StartAdvertising(GattServiceProviderAdvertisingParameters parameters)public void StartAdvertising(GattServiceProviderAdvertisingParameters parameters)Public Function StartAdvertising(parameters As GattServiceProviderAdvertisingParameters) As void
Parameters
Attributes

StopAdvertising() StopAdvertising() StopAdvertising()

Stop advertising the GATT service.

public void StopAdvertising()public void StopAdvertising()Public Function StopAdvertising() As void
Attributes

Events

AdvertisementStatusChanged AdvertisementStatusChanged AdvertisementStatusChanged

An event that is triggered when the advertisement status has changed.

public event TypedEventHandler AdvertisementStatusChangedpublic event TypedEventHandler AdvertisementStatusChangedPublic Event AdvertisementStatusChanged
Attributes