Table of Contents

Class ServiceCollectionExtensions

Namespace
Bluetooth.Maui
Assembly
Bluetooth.Maui.dll

Extension methods for registering Bluetooth services in a service collection.

public static class ServiceCollectionExtensions
Inheritance
ServiceCollectionExtensions
Inherited Members

Methods

AddBluetoothServices(IServiceCollection)

Adds Bluetooth scanner and broadcaster services to the service collection. Registers all core Bluetooth services including the adapter, scanner, broadcaster, and characteristic access services as singletons.

public static void AddBluetoothServices(this IServiceCollection services)

Parameters

services IServiceCollection

The service collection to add services to.

Remarks

This method registers unified facade implementations (BluetoothScanner and BluetoothBroadcaster) that wrap platform-specific implementations. Client projects can inherit from these facades to add custom behavior without dealing with platform-specific conditional compilation.