Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/202.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android BLE-编写命令后如何获得响应?_Android_Bluetooth_Android Bluetooth_Bluetooth Lowenergy_Android Ble - Fatal编程技术网

Android BLE-编写命令后如何获得响应?

Android BLE-编写命令后如何获得响应?,android,bluetooth,android-bluetooth,bluetooth-lowenergy,android-ble,Android,Bluetooth,Android Bluetooth,Bluetooth Lowenergy,Android Ble,我有一个带有“特定协议”的可扩展设备 我需要发送一个命令来检索心率测量值(使用通知) 我的问题是:在编写“send命令”后如何获得响应 我的步骤: 1) 检查设备上是否支持BLE 2) 启用蓝牙 3) 开始扫描设备 4) 如果我找到我的设备(智能手表),那么我会连接到它 5) 连接后,我将启动“发现服务” 6) 在onServicesDiscoveryd()中,我必须做什么 我必须在调用前编写(发送命令)setCharacteristicNotification()或反之亦然?如果您得到任何答案

我有一个带有“特定协议”的可扩展设备

我需要发送一个命令来检索心率测量值(使用通知)

我的问题是:在编写“send命令”后如何获得响应

我的步骤:

1) 检查设备上是否支持BLE

2) 启用蓝牙

3) 开始扫描设备

4) 如果我找到我的设备(智能手表),那么我会连接到它

5) 连接后,我将启动“发现服务”

6) 在
onServicesDiscoveryd()
中,我必须做什么


我必须在调用前编写(发送命令)
setCharacteristicNotification()
或反之亦然?

如果您得到任何答案,请告诉我。。。。。