Exemple #1
0
        public async Task ConnectDeviceAsync(IDevice device)
        {
            await ADAPTER.ConnectToDeviceAsync(device);

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