I've got a short question. How can I update a TextField without using an AsyncTask? In my Activity class I've got a function like this:
private void CheckBlueToothState(){
if (bluetoothAdapter == null){
status.setText("Bluetooth NOT support.");
}else{
if (bluetoothAdapter.isEnabled()){
if(bluetoothAdapter.isDiscovering()){
status.setText("Bluetooth is currently in device discovery process.");
}else{
status.setText("Bluetooth is Enabled");
search.setEnabled(true);
}
}else{
status.setText("Bluetooth is NOT Enabled");
Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);
startActivityForResult(enableBtIntent, REQUEST_ENABLE_BT);
}
}
}
Which checks if device got Bluetooth, is it enabled or disabled, you hopefully got the picture. So over to my question once again. How can I dynamically change the textfield status
if I turn of the bluetooth, and vice versa?