コード例 #1
0
 public Bluetooth(Context context)
 {
     _manager      = (BluetoothManager)context.GetSystemService(Class.FromType(typeof(BluetoothManager)));
     _scanner      = _manager.Adapter.BluetoothLeScanner;
     _scanCallback = new ScanCallback(this);
     _identifier   = Injection.GetDeviceId(context);
 }
コード例 #2
0
 public override void DiscoveredCharacteristic(CBPeripheral peripheral, CBService service, NSError error)
 {
     _characteristic = service.GetCharacteristic(CharacteristicUuid);
     EnableNotification();
     _handler.Connect(_adapterName, Encoding.UTF8.GetBytes(Injection.GetDeviceId()));
 }