android-BluetoothAdapter.LeScanCallback

来源:互联网 发布:域名申请步骤 编辑:程序博客网 时间:2024/05/19 01:59

BluetoothAdapter.LeScanCallback

public static interface BluetoothAdapter.LeScanCallback 

android.bluetooth.BluetoothAdapter.LeScanCallback

Callback interface used to deliver LE scan results.回调接口用来实现扫描结果。

See also:

  • startLeScan(LeScanCallback)
  • startLeScan(UUID[], LeScanCallback)

Summary概要


Public methods

abstract voidonLeScan(BluetoothDevice device, int rssi, byte[] scanRecord)

Callback reporting an LE device found during a device scan initiated by the startLeScan(BluetoothAdapter.LeScanCallback) function.设备时发现设备扫描startLeScan发起的(BluetoothAdapter.LeScanCallback)功能时回调报告

Public methods


onLeScan

Added in API level 18
void onLeScan (BluetoothDevice device,                 int rssi,                 byte[] scanRecord)

Callback reporting an LE device found during a device scan initiated by the startLeScan(BluetoothAdapter.LeScanCallback) function.

ParametersdeviceBluetoothDevice: Identifies the remote device识别的远程设备rssiint: The RSSI value for the remote device as reported by the Bluetooth hardware. 0 if no RSSI value is available.远程设备的RSSI值据蓝牙硬件。如果没有可用的RSSI值是0。scanRecordbyte: The content of the advertisement record offered by the remote device.广告的内容记录提供的远程设备。
0 2