Inheritance: Plugin.BLE.Abstractions.AdapterBase
Esempio n. 1
0
        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();
 }
Esempio n. 3
0
 public Device(Adapter adapter, CBPeripheral nativeDevice)
     : this(adapter, nativeDevice, nativeDevice.Name, nativeDevice.RSSI?.Int32Value ?? 0,
         new List<AdvertisementRecord>())
 {
 }
Esempio n. 4
0
 public Device(Adapter adapter, CBPeripheral nativeDevice)
     : this(adapter, nativeDevice, nativeDevice.Name, nativeDevice.RSSI?.Int32Value ?? 0,
            new List <AdvertisementRecord>())
 {
 }