Android 利用TCP通信 實現環境數據顯示及控制指令下發

通信過程記錄展示

0:實現的功能

1)發送數據

2)接收數據並顯示

3)控制指令下發

 

1:UI界面的xml文件(activity_main.xml)

<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
   >

    <TextView
        android:id="@+id/co2_value"
        android:layout_width="49dp"
        android:layout_height="31dp"
        android:layout_marginBottom="8dp"
        android:layout_marginTop="8dp"
        android:text=
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章