public Device(Adapter adapter, CBPeripheral nativeDevice, string name, int rssi, List<AdvertisementRecord> advertisementRecords) : base(adapter) { _nativeDevice = nativeDevice; Id = Guid.ParseExact(_nativeDevice.Identifier.AsString(), "d"); Name = name; Rssi = rssi; AdvertisementRecords = advertisementRecords; // TODO figure out if this is in any way required, // https://github.com/xabre/xamarin-bluetooth-le/issues/81 //_nativeDevice.UpdatedName += OnNameUpdated; }
public async void CheckMyAdapter(Adapter adapter) { await adapter.StartScanningForDevicesAsync(); }
public Device(Adapter adapter, CBPeripheral nativeDevice) : this(adapter, nativeDevice, nativeDevice.Name, nativeDevice.RSSI?.Int32Value ?? 0, new List<AdvertisementRecord>()) { }
public Device(Adapter adapter, CBPeripheral nativeDevice) : this(adapter, nativeDevice, nativeDevice.Name, nativeDevice.RSSI?.Int32Value ?? 0, new List <AdvertisementRecord>()) { }