BluetoothAdapter.ILeScanCallback.OnLeScan 方法

定义

回调报告函数 BluetoothAdapter#startLeScan 启动的设备扫描期间发现的 LE 设备。

[Android.Runtime.Register("onLeScan", "(Landroid/bluetooth/BluetoothDevice;I[B)V", "GetOnLeScan_Landroid_bluetooth_BluetoothDevice_IarrayBHandler:Android.Bluetooth.BluetoothAdapter/ILeScanCallbackInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public void OnLeScan (Android.Bluetooth.BluetoothDevice? device, int rssi, byte[]? scanRecord);
[<Android.Runtime.Register("onLeScan", "(Landroid/bluetooth/BluetoothDevice;I[B)V", "GetOnLeScan_Landroid_bluetooth_BluetoothDevice_IarrayBHandler:Android.Bluetooth.BluetoothAdapter/ILeScanCallbackInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member OnLeScan : Android.Bluetooth.BluetoothDevice * int * byte[] -> unit

参数

device
BluetoothDevice

标识远程设备

rssi
Int32

蓝牙硬件报告的远程设备的 RSSI 值。 如果没有 RSSI 值可用,则为 0。

scanRecord
Byte[]

远程设备提供的广告记录的内容。

属性

注解

适用于 . 的 android.bluetooth.BluetoothAdapter.LeScanCallback.onLeScan(android.bluetooth.BluetoothDevice, int, byte[])Java 文档

本页的某些部分是根据 Android 开放源代码项目创建和共享的工作进行的修改,并根据 Creative Commons 2.5 属性许可证中所述的术语使用。

适用于