예제 #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);