I have a humidity sensor that broadcasts the last ten values as a single array after a fixed time interval. I want to display these values in ten Textview
's.
My current code displays all the values in a single TextView
, how can I modify this?
How could it possible?
@Override
public void onCharacteristicRead(BluetoothGatt gatt,
BluetoothGattCharacteristic characteristic, int status) {
if (status == BluetoothGatt.GATT_SUCCESS) {
if (BleUuid.READ_SENSOR
.equalsIgnoreCase(characteristic.getUuid().toString())) {
final String values = characteristic.getStringValue(0);
byte[] bytes =values.getBytes();
final String value = new String(bytes);
runOnUiThread(new Runnable() {
public void run() {
statuslv.setText(value);
setProgressBarIndeterminateVisibility(false);
}
});