您的位置:首页 > 移动开发 > Android开发

android-startLeScan

2016-07-17 12:59 381 查看


startLeScan

Added in API level 18
boolean startLeScan (UUID[] serviceUuids,
BluetoothAdapter.LeScanCallback callback)


This method was deprecated in API level 21.

use 
startScan(List,
ScanSettings, ScanCallback)
 instead.
Starts a scan for Bluetooth LE devices, looking for devices that advertise given services.开始扫描蓝牙设备,寻找设备,广告服务。
Devices which advertise all specified services are reported using the 
onLeScan(BluetoothDevice,
int, byte[])
 callback.设备所有指定的广告服务报告使用onLeScan(BluetoothDevice,int,byte[])的回调函数。
Requires 
BLUETOOTH_ADMIN
 permission.
Parameters
serviceUuids
UUID
: Array of services to look for寻找一系列服务
callback
BluetoothAdapter.LeScanCallback
: the callback LE scan results are delivered
Returns
boolean
true, if the scan was started successfully真的,如果扫描成功开始


startLeScan

Added in API level 18
boolean startLeScan (BluetoothAdapter.LeScanCallback callback)


This method was deprecated in API level 21.

use 
startScan(List,
ScanSettings, ScanCallback)
 instead.
Starts a scan for Bluetooth LE devices.
Results of the scan are reported using the 
onLeScan(BluetoothDevice,
int, byte[])
 callback.
Requires 
BLUETOOTH_ADMIN
 permission.
Parameters
callback
BluetoothAdapter.LeScanCallback
: the callback LE scan results are delivered
Returns
boolean
true, if the scan was started successfully
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: