Beispiel #1
0
        private static void OnDiscoveredPeripheral(CBCentralManager central, CBPeripheral peripheral, NSDictionary advertisementData, NSNumber RSSI)
        {
            DiscoveredPeripheral?.Invoke(central, new CBDiscoveredPeripheralEventArgs(peripheral, advertisementData, RSSI));
            System.Diagnostics.Debug.WriteLine($"{peripheral.Identifier} {RSSI}");
            var e = new BluetoothAdvertisingEvent(peripheral, advertisementData, RSSI);

            AdvertisementReceived?.Invoke(central, e);
            _foundDevices.Add(peripheral);
        }
Beispiel #2
0
 internal static void OnAdvertisementReceived(BluetoothAdvertisingEvent advertisingEvent)
 {
     AdvertisementReceived?.Invoke(null, advertisingEvent);
 }