Table of Contents

Class BluetoothRemoteGATTService

Namespace
CSharpToJavaScript.APIs.JS
Assembly
CSharpToJavaScript.dll
NOTE
Experimental
The BluetoothRemoteGATTService interface of the Web Bluetooth API represents a
service provided by a GATT server, including a device, a list of referenced services,
and a list of the characteristics of this service.
[Value("BluetoothRemoteGATTService")]
public class BluetoothRemoteGATTService : EventTarget, CharacteristicEventHandlers, ServiceEventHandlers
Inheritance
BluetoothRemoteGATTService
Implements
Inherited Members

Remarks

Constructors

BluetoothRemoteGATTService()

public BluetoothRemoteGATTService()

Properties

Device

NOTE
Experimental
The BluetoothGATTService.device read-only property
returns information about a Bluetooth device through an instance of
BluetoothDevice.
[Value("device")]
public BluetoothDevice Device { get; }

Property Value

BluetoothDevice

An instance of BluetoothDevice.

Remarks

IsPrimary

NOTE
Experimental
The BluetoothGATTService.isPrimary read-only property
returns a boolean value that indicates whether this is a primary service. If it
is not a primary service, it is a secondary service.
[Value("isPrimary")]
public bool IsPrimary { get; }

Property Value

bool

A boolean value.

Remarks

Uuid

NOTE
Experimental
The BluetoothGATTService.uuid read-only property
returns a string representing the UUID of this service.
[Value("uuid")]
public string Uuid { get; }

Property Value

string

A string.

Remarks

Methods

GetCharacteristic(Union177)

NOTE
Experimental
The BluetoothGATTService.getCharacteristic() method
returns a Promise to an instance of
BluetoothRemoteGATTCharacteristic for a given universally unique identifier
(UUID).
[Value("getCharacteristic")]
public Task<BluetoothRemoteGATTCharacteristic> GetCharacteristic(Union177 characteristic)

Parameters

characteristic Union177

Returns

Task<BluetoothRemoteGATTCharacteristic>

A {{jsxref("Promise")}} to an instance of BluetoothRemoteGATTCharacteristic

Remarks

GetCharacteristics(Union177)

NOTE
Experimental
The BluetoothGATTService.getCharacteristics() method
returns a {{jsxref("Promise")}} to a list of BluetoothRemoteGATTCharacteristic
instances for a given universally unique identifier (UUID).
[Value("getCharacteristics")]
public Task<List<BluetoothRemoteGATTCharacteristic>> GetCharacteristics(Union177 characteristic = default)

Parameters

characteristic Union177

Returns

Task<List<BluetoothRemoteGATTCharacteristic>>

A Promise to an
{{jsxref("Array")}} of BluetoothRemoteGATTCharacteristic instances.

Remarks

GetIncludedService(Union176)

[Value("getIncludedService")]
public Task<BluetoothRemoteGATTService> GetIncludedService(Union176 service)

Parameters

service Union176

Returns

Task<BluetoothRemoteGATTService>

GetIncludedServices(Union176)

[Value("getIncludedServices")]
public Task<List<BluetoothRemoteGATTService>> GetIncludedServices(Union176 service = default)

Parameters

service Union176

Returns

Task<List<BluetoothRemoteGATTService>>