/// <summary> /// /// </summary> public virtual void OnLeScan(BluetoothDevice device, int rssi, byte[] scanRecord) { // Get Address. string address = device.GetAddress(); if (string.IsNullOrEmpty(address)) { return; } Log.i("BluetoothScanner", address); // int i = deviceList.FindIndex((x) => (x.address == address)); if (i == -1) { deviceList.Add(new DeviceInfo { name = device.GetName(), address = address }); if (callback != null) { callback.OnDeviceListChanged(); } } else { address = device.GetName(); if (!string.IsNullOrEmpty(address)) { deviceList[i].name = address; } if (callback != null) { callback.OnDeviceListChanged(); } } }