GattDeviceService GattDeviceService GattDeviceService GattDeviceService Class

Definition

Represents a GATT Primary Service on a Bluetooth device. The GattDeviceService class represents a GATT service on a Bluetooth LE device. It is instantiated by using a device service instance path, obtained by finding a device using the Windows.Devices.Enumeration API.

public : sealed class GattDeviceService : IGattDeviceService, IGattDeviceService2, IGattDeviceService3, IClosablepublic sealed class GattDeviceService : IGattDeviceService, IGattDeviceService2, IGattDeviceService3, IDisposablePublic NotInheritable Class GattDeviceService Implements IGattDeviceService, IGattDeviceService2, IGattDeviceService3, IDisposable// You can use this class in JavaScript.
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0 - for Xbox, see UWP features that aren't yet supported on Xbox)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Properties

AttributeHandle AttributeHandle AttributeHandle AttributeHandle

Gets the handle used to uniquely identify GATT-based service attributes as declared on the Bluetooth LE device.

public : ushort AttributeHandle { get; }public ushort AttributeHandle { get; }Public ReadOnly Property AttributeHandle As ushort// You can use this property in JavaScript.
Value
ushort ushort ushort ushort

Handle to uniquely identify GATT-based service attributes.

Device Device Device Device

Gets the BluetoothLEDevice object describing the device associated with the current GattDeviceService object.

public : BluetoothLEDevice Device { get; }public BluetoothLEDevice Device { get; }Public ReadOnly Property Device As BluetoothLEDevice// You can use this property in JavaScript.
Value
BluetoothLEDevice BluetoothLEDevice BluetoothLEDevice BluetoothLEDevice

The BluetoothLEDevice object describing the device associated with the current GattDeviceService object.

See Also

DeviceAccessInformation DeviceAccessInformation DeviceAccessInformation DeviceAccessInformation

Gets the device access information associated with the current GattDeviceService object.

public : DeviceAccessInformation DeviceAccessInformation { get; }public DeviceAccessInformation DeviceAccessInformation { get; }Public ReadOnly Property DeviceAccessInformation As DeviceAccessInformation// You can use this property in JavaScript.
Value
DeviceAccessInformation DeviceAccessInformation DeviceAccessInformation DeviceAccessInformation

The device access information associated with the current GattDeviceService object.

Additional features and requirements
Device family
Windows 10 Creators Update (introduced v10.0.15063.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v4)

DeviceId DeviceId DeviceId DeviceId

Get the string that represents the GATT service instance path used to instantiate the GattDeviceService.

public : PlatForm::String DeviceId { get; }public string DeviceId { get; }Public ReadOnly Property DeviceId As string// You can use this property in JavaScript.
Value
PlatForm::String string string string

String that represents the GATT service instance path used to instantiate the GattDeviceService.

ParentServices ParentServices ParentServices ParentServices

Gets the read-only list of parent services for this service.

public : IVectorView<GattDeviceService> ParentServices { get; }public IReadOnlyList<GattDeviceService> ParentServices { get; }Public ReadOnly Property ParentServices As IReadOnlyList<GattDeviceService>// You can use this property in JavaScript.
Value
IVectorView<GattDeviceService> IReadOnlyList<GattDeviceService> IReadOnlyList<GattDeviceService> IReadOnlyList<GattDeviceService>

A read-only list of parent services from which this object is derived, if this GattDeviceService is an included service; Otherwise, null.

Session Session Session Session

Gets the session for this GATT device service instance.

public : GattSession Session { get; }public GattSession Session { get; }Public ReadOnly Property Session As GattSession// You can use this property in JavaScript.
Value
GattSession GattSession GattSession GattSession

The session for this GATT device service instance.

Additional features and requirements
Device family
Windows 10 Creators Update (introduced v10.0.15063.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v4)

SharingMode SharingMode SharingMode SharingMode

Gets the sharing mode for this GATT device service instance.

public : GattSharingMode SharingMode { get; }public GattSharingMode SharingMode { get; }Public ReadOnly Property SharingMode As GattSharingMode// You can use this property in JavaScript.
Value
GattSharingMode GattSharingMode GattSharingMode GattSharingMode

The sharing mode for this GATT device service instance.

Additional features and requirements
Device family
Windows 10 Creators Update (introduced v10.0.15063.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v4)

Uuid Uuid Uuid Uuid

The GATT Service UUID associated with this GattDeviceService.

public : PlatForm::Guid Uuid { get; }public Guid Uuid { get; }Public ReadOnly Property Uuid As Guid// You can use this property in JavaScript.
Value
PlatForm::Guid Guid Guid Guid

A 128-bit Bluetooth GATT Service UUID, represented as a standard GUID object.

Methods

Close() Close() Close() Close()

Releases the resources associated with the GattDeviceService class. This allows other apps to access the resources of the GattDeviceService in question. A GattDeviceService object should not be used after Close is invoked, instead a new GattDeviceService object should be instantiated using the FromIdAsync method.

public : void Close()This member is not implemented in C#This member is not implemented in VB.Net// You can use this method in JavaScript.

ConvertShortIdToUuid(UInt16) ConvertShortIdToUuid(UInt16) ConvertShortIdToUuid(UInt16) ConvertShortIdToUuid(UInt16)

Converts a Bluetooth SIG defined short Id to a full GATT UUID.

public : static PlatForm::Guid ConvertShortIdToUuid(unsigned short shortId)public static Guid ConvertShortIdToUuid(UInt16 shortId)Public Static Function ConvertShortIdToUuid(shortId As UInt16) As Guid// You can use this method in JavaScript.
Parameters
shortId
unsigned short UInt16 UInt16 UInt16

A 16-bit Bluetooth GATT Service UUID.

Returns
PlatForm::Guid Guid Guid Guid

The corresponding 128-bit GATT Service UUID, that uniquely identifies this service.

Dispose() Dispose() Dispose() Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

This member is not implemented in C++void Dispose()Sub Disposevoid Dispose()

FromIdAsync(String) FromIdAsync(String) FromIdAsync(String) FromIdAsync(String)

Instantiates a new GattDeviceService from the device ID.

public : static IAsyncOperation<GattDeviceService> FromIdAsync(PlatForm::String deviceId)public static IAsyncOperation<GattDeviceService> FromIdAsync(String deviceId)Public Static Function FromIdAsync(deviceId As String) As IAsyncOperation( Of GattDeviceService )// You can use this method in JavaScript.
Parameters
deviceId
PlatForm::String String String String

The GATT device ID.

Returns

The object for managing the asynchronous operation, which, upon completion, returns the newly instantiated GattDeviceService.

Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0 - for Xbox, see UWP features that aren't yet supported on Xbox)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)
Capabilities
bluetooth

Remarks

The first time this method is invoked by a store app, it should be called from a UI thread in order to display the consent prompt. After the user has granted consent, the method can be invoked from any application thread.

If a store app has not declared the right capabilities or the user does not grant consent, the method returns a null object.

For Windows 10Universal Windows Platform (UWP) apps, use the bluetooth capability. For more info see App capability declarations.For Windows 8.x store apps, see How to specify device capabilities for Bluetooth (Windows) to declare the right capabilities.

FromIdAsync(String, GattSharingMode) FromIdAsync(String, GattSharingMode) FromIdAsync(String, GattSharingMode) FromIdAsync(String, GattSharingMode)

Instantiates a new GattDeviceService object from the device ID.

public : static IAsyncOperation<GattDeviceService> FromIdAsync(PlatForm::String deviceId, GattSharingMode sharingMode)public static IAsyncOperation<GattDeviceService> FromIdAsync(String deviceId, GattSharingMode sharingMode)Public Static Function FromIdAsync(deviceId As String, sharingMode As GattSharingMode) As IAsyncOperation( Of GattDeviceService )// You can use this method in JavaScript.
Parameters
deviceId
PlatForm::String String String String

The GATT device ID.

sharingMode
GattSharingMode GattSharingMode GattSharingMode GattSharingMode

The sharing mode of the GATT device.

Returns
Additional features and requirements
Device family
Windows 10 Creators Update (introduced v10.0.15063.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v4)

GetAllCharacteristics() GetAllCharacteristics() GetAllCharacteristics() GetAllCharacteristics()

Gets the collection of all characteristics belonging to this GattDeviceService instance.

public : IVectorView<GattCharacteristic> GetAllCharacteristics()public IReadOnlyList<GattCharacteristic> GetAllCharacteristics()Public Function GetAllCharacteristics() As IReadOnlyList( Of GattCharacteristic )// You can use this method in JavaScript.
Returns
IVectorView<GattCharacteristic> IReadOnlyList<GattCharacteristic> IReadOnlyList<GattCharacteristic> IReadOnlyList<GattCharacteristic>

The collection of all characteristics belonging to this GattDeviceService instance.

GetAllIncludedServices() GetAllIncludedServices() GetAllIncludedServices() GetAllIncludedServices()

Gets the collection of all included services belonging to this GattDeviceService instance.

public : IVectorView<GattDeviceService> GetAllIncludedServices()public IReadOnlyList<GattDeviceService> GetAllIncludedServices()Public Function GetAllIncludedServices() As IReadOnlyList( Of GattDeviceService )// You can use this method in JavaScript.
Returns
IVectorView<GattDeviceService> IReadOnlyList<GattDeviceService> IReadOnlyList<GattDeviceService> IReadOnlyList<GattDeviceService>

The collection of all included services belonging to this GattDeviceService instance.

GetCharacteristics(Guid) GetCharacteristics(Guid) GetCharacteristics(Guid) GetCharacteristics(Guid)

Returns a vector of characteristics, that are identified by the specified UUID and belong to this GattDeviceService instance.

public : IVectorView<GattCharacteristic> GetCharacteristics(PlatForm::Guid characteristicUuid)public IReadOnlyList<GattCharacteristic> GetCharacteristics(Guid characteristicUuid)Public Function GetCharacteristics(characteristicUuid As Guid) As IReadOnlyList( Of GattCharacteristic )// You can use this method in JavaScript.
Parameters
characteristicUuid
PlatForm::Guid Guid Guid Guid

The UUID for the characteristics to be retrieved.

Returns
IVectorView<GattCharacteristic> IReadOnlyList<GattCharacteristic> IReadOnlyList<GattCharacteristic> IReadOnlyList<GattCharacteristic>

A vector of GattCharacteristic objects whose UUIDs match characteristicUuid.

Remarks

Only a single app can access a single service. If one app has registered a GATT notification trigger, this method will throw an exception for all other apps that sub subsequently call this API.

GetCharacteristicsAsync() GetCharacteristicsAsync() GetCharacteristicsAsync() GetCharacteristicsAsync()

Gets the characterisitics that are part of this GattDeviceService instance.

public : IAsyncOperation<GattCharacteristicsResult> GetCharacteristicsAsync()public IAsyncOperation<GattCharacteristicsResult> GetCharacteristicsAsync()Public Function GetCharacteristicsAsync() As IAsyncOperation( Of GattCharacteristicsResult )// You can use this method in JavaScript.
Returns
Additional features and requirements
Device family
Windows 10 Creators Update (introduced v10.0.15063.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v4)

GetCharacteristicsAsync(BluetoothCacheMode) GetCharacteristicsAsync(BluetoothCacheMode) GetCharacteristicsAsync(BluetoothCacheMode) GetCharacteristicsAsync(BluetoothCacheMode)

Gets the characterisitics that are part of this GattDeviceService instance.

public : IAsyncOperation<GattCharacteristicsResult> GetCharacteristicsAsync(BluetoothCacheMode cacheMode)public IAsyncOperation<GattCharacteristicsResult> GetCharacteristicsAsync(BluetoothCacheMode cacheMode)Public Function GetCharacteristicsAsync(cacheMode As BluetoothCacheMode) As IAsyncOperation( Of GattCharacteristicsResult )// You can use this method in JavaScript.
Parameters
Returns
Additional features and requirements
Device family
Windows 10 Creators Update (introduced v10.0.15063.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v4)

GetCharacteristicsForUuidAsync(Guid) GetCharacteristicsForUuidAsync(Guid) GetCharacteristicsForUuidAsync(Guid) GetCharacteristicsForUuidAsync(Guid)

Gets the characterisitics that are part of this GattDeviceService instance and associated with the characteristicUuid.

public : IAsyncOperation<GattCharacteristicsResult> GetCharacteristicsForUuidAsync(PlatForm::Guid characteristicUuid)public IAsyncOperation<GattCharacteristicsResult> GetCharacteristicsForUuidAsync(Guid characteristicUuid)Public Function GetCharacteristicsForUuidAsync(characteristicUuid As Guid) As IAsyncOperation( Of GattCharacteristicsResult )// You can use this method in JavaScript.
Parameters
characteristicUuid
PlatForm::Guid Guid Guid Guid

The UUID for the characteristics to be retrieved.

Returns
Additional features and requirements
Device family
Windows 10 Creators Update (introduced v10.0.15063.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v4)

GetCharacteristicsForUuidAsync(Guid, BluetoothCacheMode) GetCharacteristicsForUuidAsync(Guid, BluetoothCacheMode) GetCharacteristicsForUuidAsync(Guid, BluetoothCacheMode) GetCharacteristicsForUuidAsync(Guid, BluetoothCacheMode)

Gets the characterisitics that are part of this GattDeviceService instance and associated with the characteristicUuid.

public : IAsyncOperation<GattCharacteristicsResult> GetCharacteristicsForUuidAsync(PlatForm::Guid characteristicUuid, BluetoothCacheMode cacheMode)public IAsyncOperation<GattCharacteristicsResult> GetCharacteristicsForUuidAsync(Guid characteristicUuid, BluetoothCacheMode cacheMode)Public Function GetCharacteristicsForUuidAsync(characteristicUuid As Guid, cacheMode As BluetoothCacheMode) As IAsyncOperation( Of GattCharacteristicsResult )// You can use this method in JavaScript.
Parameters
characteristicUuid
PlatForm::Guid Guid Guid Guid

The UUID for the characteristics to be retrieved.

Returns
Additional features and requirements
Device family
Windows 10 Creators Update (introduced v10.0.15063.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v4)

GetDeviceSelectorForBluetoothDeviceId(BluetoothDeviceId) GetDeviceSelectorForBluetoothDeviceId(BluetoothDeviceId) GetDeviceSelectorForBluetoothDeviceId(BluetoothDeviceId) GetDeviceSelectorForBluetoothDeviceId(BluetoothDeviceId)

Creates a suitable AQS Filter string for use with the CreateWatcher method, from a BluetoothDeviceId.

public : static PlatForm::String GetDeviceSelectorForBluetoothDeviceId(BluetoothDeviceId bluetoothDeviceId)public static string GetDeviceSelectorForBluetoothDeviceId(BluetoothDeviceId bluetoothDeviceId)Public Static Function GetDeviceSelectorForBluetoothDeviceId(bluetoothDeviceId As BluetoothDeviceId) As string// You can use this method in JavaScript.
Parameters
bluetoothDeviceId
BluetoothDeviceId BluetoothDeviceId BluetoothDeviceId BluetoothDeviceId

The bluetooth device ID.

Returns
PlatForm::String string string string

A suitable AQS Selector String which can be passed as a parameter to the CreateWatcher method, in order to retrieve a GATT service instance path

Additional features and requirements
Device family
Windows 10 Creators Update (introduced v10.0.15063.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v4)

GetDeviceSelectorForBluetoothDeviceId(BluetoothDeviceId, BluetoothCacheMode) GetDeviceSelectorForBluetoothDeviceId(BluetoothDeviceId, BluetoothCacheMode) GetDeviceSelectorForBluetoothDeviceId(BluetoothDeviceId, BluetoothCacheMode) GetDeviceSelectorForBluetoothDeviceId(BluetoothDeviceId, BluetoothCacheMode)

Creates a suitable AQS Filter string for use with the CreateWatcher method, from a BluetoothDeviceId.

public : static PlatForm::String GetDeviceSelectorForBluetoothDeviceId(BluetoothDeviceId bluetoothDeviceId, BluetoothCacheMode cacheMode)public static string GetDeviceSelectorForBluetoothDeviceId(BluetoothDeviceId bluetoothDeviceId, BluetoothCacheMode cacheMode)Public Static Function GetDeviceSelectorForBluetoothDeviceId(bluetoothDeviceId As BluetoothDeviceId, cacheMode As BluetoothCacheMode) As string// You can use this method in JavaScript.
Parameters
bluetoothDeviceId
BluetoothDeviceId BluetoothDeviceId BluetoothDeviceId BluetoothDeviceId

The bluetooth device ID.

Returns
PlatForm::String string string string

A suitable AQS Selector String which can be passed as a parameter to the CreateWatcher method, in order to retrieve a GATT service instance path

Additional features and requirements
Device family
Windows 10 Creators Update (introduced v10.0.15063.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v4)

GetDeviceSelectorForBluetoothDeviceIdAndUuid(BluetoothDeviceId, Guid) GetDeviceSelectorForBluetoothDeviceIdAndUuid(BluetoothDeviceId, Guid) GetDeviceSelectorForBluetoothDeviceIdAndUuid(BluetoothDeviceId, Guid) GetDeviceSelectorForBluetoothDeviceIdAndUuid(BluetoothDeviceId, Guid)

Creates a suitable AQS Filter string for use with the CreateWatcher method, from a BluetoothDeviceId and serviceUuid.

public : static PlatForm::String GetDeviceSelectorForBluetoothDeviceIdAndUuid(BluetoothDeviceId bluetoothDeviceId, PlatForm::Guid serviceUuid)public static string GetDeviceSelectorForBluetoothDeviceIdAndUuid(BluetoothDeviceId bluetoothDeviceId, Guid serviceUuid)Public Static Function GetDeviceSelectorForBluetoothDeviceIdAndUuid(bluetoothDeviceId As BluetoothDeviceId, serviceUuid As Guid) As string// You can use this method in JavaScript.
Parameters
bluetoothDeviceId
BluetoothDeviceId BluetoothDeviceId BluetoothDeviceId BluetoothDeviceId

The bluetooth device ID.

serviceUuid
PlatForm::Guid Guid Guid Guid

The GATT service ID.

Returns
PlatForm::String string string string

A suitable AQS Selector String which can be passed as a parameter to the CreateWatcher method, in order to retrieve a GATT service instance path

Additional features and requirements
Device family
Windows 10 Creators Update (introduced v10.0.15063.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v4)

GetDeviceSelectorForBluetoothDeviceIdAndUuid(BluetoothDeviceId, Guid, BluetoothCacheMode) GetDeviceSelectorForBluetoothDeviceIdAndUuid(BluetoothDeviceId, Guid, BluetoothCacheMode) GetDeviceSelectorForBluetoothDeviceIdAndUuid(BluetoothDeviceId, Guid, BluetoothCacheMode) GetDeviceSelectorForBluetoothDeviceIdAndUuid(BluetoothDeviceId, Guid, BluetoothCacheMode)

Creates a suitable AQS Filter string for use with the CreateWatcher method, from a BluetoothDeviceId and serviceUuid.

public : static PlatForm::String GetDeviceSelectorForBluetoothDeviceIdAndUuid(BluetoothDeviceId bluetoothDeviceId, PlatForm::Guid serviceUuid, BluetoothCacheMode cacheMode)public static string GetDeviceSelectorForBluetoothDeviceIdAndUuid(BluetoothDeviceId bluetoothDeviceId, Guid serviceUuid, BluetoothCacheMode cacheMode)Public Static Function GetDeviceSelectorForBluetoothDeviceIdAndUuid(bluetoothDeviceId As BluetoothDeviceId, serviceUuid As Guid, cacheMode As BluetoothCacheMode) As string// You can use this method in JavaScript.
Parameters
bluetoothDeviceId
BluetoothDeviceId BluetoothDeviceId BluetoothDeviceId BluetoothDeviceId

The bluetooth device ID.

serviceUuid
PlatForm::Guid Guid Guid Guid

The GATT service ID.

Returns
PlatForm::String string string string

A suitable AQS Selector String which can be passed as a parameter to the CreateWatcher method, in order to retrieve a GATT service instance path

Additional features and requirements
Device family
Windows 10 Creators Update (introduced v10.0.15063.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v4)

GetDeviceSelectorFromShortId(UInt16) GetDeviceSelectorFromShortId(UInt16) GetDeviceSelectorFromShortId(UInt16) GetDeviceSelectorFromShortId(UInt16)

Creates a suitable AQS Filter string for use with the CreateWatcher method, from a 16-bit Bluetooth GATT Service UUID.

public : static PlatForm::String GetDeviceSelectorFromShortId(unsigned short serviceShortId)public static string GetDeviceSelectorFromShortId(UInt16 serviceShortId)Public Static Function GetDeviceSelectorFromShortId(serviceShortId As UInt16) As string// You can use this method in JavaScript.
Parameters
serviceShortId
unsigned short UInt16 UInt16 UInt16

A 16-bit Bluetooth GATT Service UUID.

Returns
PlatForm::String string string string

A suitable AQS Selector String which can be passed as a parameter to the CreateWatcher method, in order to retrieve a GATT service instance path

GetDeviceSelectorFromUuid(Guid) GetDeviceSelectorFromUuid(Guid) GetDeviceSelectorFromUuid(Guid) GetDeviceSelectorFromUuid(Guid)

Creates a suitable AQS Filter string for use with the CreateWatcher method, from a Bluetooth service UUID.

public : static PlatForm::String GetDeviceSelectorFromUuid(PlatForm::Guid serviceUuid)public static string GetDeviceSelectorFromUuid(Guid serviceUuid)Public Static Function GetDeviceSelectorFromUuid(serviceUuid As Guid) As string// You can use this method in JavaScript.
Parameters
serviceUuid
PlatForm::Guid Guid Guid Guid

A 128-bit Bluetooth GATT Service UUID, represented as a standard GUID object.

Returns
PlatForm::String string string string

A suitable AQS Selector String which can be passed as a parameter to the CreateWatcher method, in order to retrieve a GATT service instance path.

GetIncludedServices(Guid) GetIncludedServices(Guid) GetIncludedServices(Guid) GetIncludedServices(Guid)

Returns a vector of included services, that are identified by the specified UUID and belong to this GattDeviceService instance.

public : IVectorView<GattDeviceService> GetIncludedServices(PlatForm::Guid serviceUuid)public IReadOnlyList<GattDeviceService> GetIncludedServices(Guid serviceUuid)Public Function GetIncludedServices(serviceUuid As Guid) As IReadOnlyList( Of GattDeviceService )// You can use this method in JavaScript.
Parameters
serviceUuid
PlatForm::Guid Guid Guid Guid

The UUID for the included services to be retrieved.

Returns
IVectorView<GattDeviceService> IReadOnlyList<GattDeviceService> IReadOnlyList<GattDeviceService> IReadOnlyList<GattDeviceService>

A vector of included services whose UUIDs match serviceUuid.

GetIncludedServicesAsync() GetIncludedServicesAsync() GetIncludedServicesAsync() GetIncludedServicesAsync()

Gets the included services that are associated with this GattDeviceService instance.

public : IAsyncOperation<GattDeviceServicesResult> GetIncludedServicesAsync()public IAsyncOperation<GattDeviceServicesResult> GetIncludedServicesAsync()Public Function GetIncludedServicesAsync() As IAsyncOperation( Of GattDeviceServicesResult )// You can use this method in JavaScript.
Returns
Additional features and requirements
Device family
Windows 10 Creators Update (introduced v10.0.15063.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v4)

GetIncludedServicesAsync(BluetoothCacheMode) GetIncludedServicesAsync(BluetoothCacheMode) GetIncludedServicesAsync(BluetoothCacheMode) GetIncludedServicesAsync(BluetoothCacheMode)

Gets the included services that are associated with this GattDeviceService instance.

public : IAsyncOperation<GattDeviceServicesResult> GetIncludedServicesAsync(BluetoothCacheMode cacheMode)public IAsyncOperation<GattDeviceServicesResult> GetIncludedServicesAsync(BluetoothCacheMode cacheMode)Public Function GetIncludedServicesAsync(cacheMode As BluetoothCacheMode) As IAsyncOperation( Of GattDeviceServicesResult )// You can use this method in JavaScript.
Parameters
Returns
Additional features and requirements
Device family
Windows 10 Creators Update (introduced v10.0.15063.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v4)

GetIncludedServicesForUuidAsync(Guid) GetIncludedServicesForUuidAsync(Guid) GetIncludedServicesForUuidAsync(Guid) GetIncludedServicesForUuidAsync(Guid)

Gets the included services from the serviceUuid that is associated with this GattDeviceService instance.

public : IAsyncOperation<GattDeviceServicesResult> GetIncludedServicesForUuidAsync(PlatForm::Guid serviceUuid)public IAsyncOperation<GattDeviceServicesResult> GetIncludedServicesForUuidAsync(Guid serviceUuid)Public Function GetIncludedServicesForUuidAsync(serviceUuid As Guid) As IAsyncOperation( Of GattDeviceServicesResult )// You can use this method in JavaScript.
Parameters
serviceUuid
PlatForm::Guid Guid Guid Guid

A 128-bit Bluetooth GATT Service UUID, represented as a standard GUID object.

Returns
Additional features and requirements
Device family
Windows 10 Creators Update (introduced v10.0.15063.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v4)

GetIncludedServicesForUuidAsync(Guid, BluetoothCacheMode) GetIncludedServicesForUuidAsync(Guid, BluetoothCacheMode) GetIncludedServicesForUuidAsync(Guid, BluetoothCacheMode) GetIncludedServicesForUuidAsync(Guid, BluetoothCacheMode)

Gets the included services from the serviceUuid that is associated with this GattDeviceService instance.

public : IAsyncOperation<GattDeviceServicesResult> GetIncludedServicesForUuidAsync(PlatForm::Guid serviceUuid, BluetoothCacheMode cacheMode)public IAsyncOperation<GattDeviceServicesResult> GetIncludedServicesForUuidAsync(Guid serviceUuid, BluetoothCacheMode cacheMode)Public Function GetIncludedServicesForUuidAsync(serviceUuid As Guid, cacheMode As BluetoothCacheMode) As IAsyncOperation( Of GattDeviceServicesResult )// You can use this method in JavaScript.
Parameters
serviceUuid
PlatForm::Guid Guid Guid Guid

A 128-bit Bluetooth GATT Service UUID, represented as a standard GUID object.

Returns
Additional features and requirements
Device family
Windows 10 Creators Update (introduced v10.0.15063.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v4)

OpenAsync(GattSharingMode) OpenAsync(GattSharingMode) OpenAsync(GattSharingMode) OpenAsync(GattSharingMode)

Opens the GATT device service with the specified sharingMode.

public : IAsyncOperation<GattOpenStatus> OpenAsync(GattSharingMode sharingMode)public IAsyncOperation<GattOpenStatus> OpenAsync(GattSharingMode sharingMode)Public Function OpenAsync(sharingMode As GattSharingMode) As IAsyncOperation( Of GattOpenStatus )// You can use this method in JavaScript.
Parameters
Returns
Additional features and requirements
Device family
Windows 10 Creators Update (introduced v10.0.15063.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v4)

RequestAccessAsync() RequestAccessAsync() RequestAccessAsync() RequestAccessAsync()

Requests access to the GattDeviceService.

public : IAsyncOperation<DeviceAccessStatus> RequestAccessAsync()public IAsyncOperation<DeviceAccessStatus> RequestAccessAsync()Public Function RequestAccessAsync() As IAsyncOperation( Of DeviceAccessStatus )// You can use this method in JavaScript.
Returns
Additional features and requirements
Device family
Windows 10 Creators Update (introduced v10.0.15063.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v4)

See Also