Browse Source

merge Kommunikation Version 1.2 UDP Socket

ko
Miguel Siebenhaar 1 year ago
parent
commit
df9b28c830

+ 2
- 2
app/src/main/java/com/example/ueberwachungssystem/WifiCommunication.java View File

@@ -37,7 +37,7 @@ public class WifiCommunication {
} catch (SocketException | UnknownHostException e) {
throw new RuntimeException(e);
}
mainActivity.runOnUiThread(() -> mainActivity.tvMessages.setText("Communication running"));
//mainActivity.runOnUiThread(() -> mainActivity.tvMessages.setText("Communication running"));
}
private class ReceiveThread extends Thread {
private StringBuffer rxStringBuffer = new StringBuffer();
@@ -58,7 +58,7 @@ public class WifiCommunication {
rxString = new String(rxPacket.getData());
if(!previousRxString.equals(rxString)) {
rxStringBuffer.append(rxString).append("\n");
mainActivity.runOnUiThread(() -> mainActivity.tvMessages.setText(rxStringBuffer));
//mainActivity.runOnUiThread(() -> mainActivity.tvMessages.setText(rxStringBuffer));
previousRxString = rxString;
}


Loading…
Cancel
Save