MonitoringAndDiagnosticsConnection

constructor(centralManager: CentralManager, peripheral: Peripheral, scope: CoroutineScope)

Creates a new instance of MonitoringAndDiagnosticsConnection with the given CentralManager and Peripheral.

This constructor can be used with a 'native' or 'mock' CentralManager, or with a Peripheral that is not otherwise connected by the application.

Parameters

centralManager

The central manager to use for connection.

peripheral

The peripheral to connect to.

scope

The coroutine scope.


constructor(environment: NativeAndroidEnvironment, bluetoothDevice: BluetoothDevice, scope: CoroutineScope)

Creates a new instance of MonitoringAndDiagnosticsConnection with the given NativeAndroidEnvironment and BluetoothDevice.

This constructor is for legacy applications that use the Android Bluetooth API.

Parameters

environment

The native Android Environment object.

bluetoothDevice

The Bluetooth device to connect to.

scope

The coroutine scope.