Пример #1
0
        public void OnDeviceDiscovered(Android.Bluetooth.LE.ScanResult obj)
        {
            try
            {
                //Debug.Write(obj.Rssi);

                //if (obj.Rssi >= -50)
                //{
                DeviceDiscovered?.Invoke(new BluetoothDeviceInfo()
                {
                    Name = obj.Device.Name, Address = obj.Device.Address
                });
                //}
                //else
                //{
                //    DeviceDiscovered?.Invoke(new BluetoothDeviceInfo() { Name = obj.Device.Name, Address = obj.Device.Address });
                //}
            }
            catch (System.Exception ex)
            {
                string title = this.GetType().Name + " - " + System.Reflection.MethodBase.GetCurrentMethod().Name;
                BalizaFacil.App.Instance.UnhandledException(title, ex);
            }
        }
Пример #2
0
 public override void OnScanResult(ScanCallbackType callbackType, SR result)
 {
     this.callback(new ScanEventArgs(result.Device, result.Rssi, result.ScanRecord));
 }
Пример #3
0
 public override void OnScanResult(ScanCallbackType callbackType, SR result)
 => this.callback(result);