Table of Contents

Class DotNetCoreBluetoothLocalService

Namespace
Bluetooth.Maui.Platforms.DotNetCore.Broadcasting
Assembly
Bluetooth.Maui.Platforms.DotNetCore.dll

Base class for Bluetooth broadcaster services.

public class DotNetCoreBluetoothLocalService : BaseBluetoothLocalService, IBluetoothLocalService, INotifyPropertyChanged, IAsyncDisposable
Inheritance
DotNetCoreBluetoothLocalService
Implements
Inherited Members

Constructors

DotNetCoreBluetoothLocalService(IBluetoothBroadcaster, Guid, string?, bool, ILogger<IBluetoothLocalService>?)

Initializes a new instance of the BaseBluetoothLocalService class.

public DotNetCoreBluetoothLocalService(IBluetoothBroadcaster broadcaster, Guid id, string? name = null, bool isPrimary = true, ILogger<IBluetoothLocalService>? logger = null)

Parameters

broadcaster IBluetoothBroadcaster

The broadcaster that owns this service.

id Guid

The unique identifier of the service.

name string

The name of the service (optional).

isPrimary bool

Indicates whether this service is a primary service (default: true).

logger ILogger<IBluetoothLocalService>

The logger instance to use for logging (optional).

Exceptions

PlatformNotSupportedException

Methods

NativeCreateCharacteristicAsync(Guid, BluetoothCharacteristicProperties, BluetoothCharacteristicPermissions, string?, TimeSpan?, CancellationToken)

Creates a new local Bluetooth characteristic with the specified parameters.

protected override ValueTask<IBluetoothLocalCharacteristic> NativeCreateCharacteristicAsync(Guid id, BluetoothCharacteristicProperties properties, BluetoothCharacteristicPermissions permissions, string? name = null, TimeSpan? timeout = null, CancellationToken cancellationToken = default)

Parameters

id Guid
properties BluetoothCharacteristicProperties
permissions BluetoothCharacteristicPermissions
name string
timeout TimeSpan?
cancellationToken CancellationToken

Returns

ValueTask<IBluetoothLocalCharacteristic>

Exceptions

PlatformNotSupportedException