public Device(BleContext context, BluetoothLEDevice native) { this.context = context; this.native = native; var mac = this.ToMacAddress(native.BluetoothAddress); this.Uuid = this.GetDeviceId(mac); //this.Uuid = this.GetDeviceId(native.DeviceId); }
public Device(BleContext context, BluetoothLEDevice native) { this.connSubject = new Subject <ConnectionStatus>(); this.context = context; this.native = native; var mac = this.ToMacAddress(native.BluetoothAddress); this.Uuid = this.GetDeviceId(mac); //this.Uuid = this.GetDeviceId(native.DeviceId); }
public Adapter() { this.scanStatusSubject = new Subject <bool>(); this.context = new BleContext(); this.radio = new Lazy <Radio>(() => Radio .GetRadiosAsync() .AsTask() .Result .FirstOrDefault(x => x.Kind == RadioKind.Bluetooth) ); }
public Device(BleContext context, CBPeripheral peripheral) : base(peripheral.Name, peripheral.Identifier.ToGuid()) { this.context = context; this.peripheral = peripheral; }
public Adapter() { this.manager = (BluetoothManager)Application.Context.GetSystemService(Application.BluetoothService); this.context = new BleContext(this.manager); this.scanStatusChanged = new Subject <bool>(); }
public Adapter(BleAdapterConfiguration config = null) { this.context = new BleContext(config); this.scanStatusChanged = new Subject <bool>(); }