我正在开发一款湿度传感器应用程序。 传感器每秒都会连续向应用程序发送数据。 我需要在多个文本视图中显示它,每秒都有一个更新。
目前我的接收部件代码是
@Override
public void onCharacteristicRead(BluetoothGatt gatt,
BluetoothGattCharacteristic characteristic, int status) {
if (status == BluetoothGatt.GATT_SUCCESS) if (BleUuid.READ_TIME
.equalsIgnoreCase(characteristic.getUuid().toString())) {
final String names = characteristic.getStringValue(0);
Textview1.setText(names);
}
}