有谁能告诉我如何在我的Android应用程序中从smartband获取数据? 从onServicesDiscovered我不知道该怎么做......
@Override
public void onServicesDiscovered(BluetoothGatt gatt, int status) {
super.onServicesDiscovered(gatt, status);
if (status == BluetoothGatt.GATT_SUCCESS) {
for (BluetoothGattService service : gatt.getServices()) {
Log.w("Service", service.getUuid().toString());
for (BluetoothGattCharacteristic characteristic : gatt.getService(service.getUuid()).getCharacteristics()) {
Log.e("Characteristic", characteristic.getUuid().toString());
}
}
}
}