public async Task ConnectDeviceAsync(IDevice device) { await ADAPTER.ConnectToDeviceAsync(device); if (device.State == Plugin.BLE.Abstractions.DeviceState.Connected) { ConnectedDevice = device; } }
public async Task DisconnectDeviceAsync() { await ADAPTER.DisconnectDeviceAsync(ConnectedDevice); }
public async Task ScanForDevice(CancellationToken ctoken) { ADAPTER.ScanMode = ScanMode.LowPower; await ADAPTER.StartScanningForDevicesAsync(serviceUuids : new Guid[] { ConfigServiceGuid }, cancellationToken : ctoken); }