Page 647 - 3-2
P. 647

data = socket_in.readLine();
            output.post(new Runnable() {
            public void run() {
            /* output.setText(data);*/
            }
            });
            }
            } catch (Exception e) {
            }
            }
            };
            worker.start();
            }


            @Override
            protected void onStop() {
            // TODO Auto-generated method stub
            super.onStop();
            try {
            socket.close();
            } catch (IOException e) {
            e.printStackTrace();
            }
            }
            }
            //AndroidManifest.xml
            <?xml version="1.0" encoding="utf-8"?>
            <manifest xmlns:android="http://schemas.android.com/apk/res/android"
            package="com.example.user.mosquito_empty_1">
            <uses-permission android:name="android.permission.INTERNET" />
            <application
            android:allowBackup="true"
            android:icon="@mipmap/ic_launcher"
            android:label="Mosquito_empty_1"
            android:roundIcon="@mipmap/ic_launcher_round"
            android:supportsRtl="true"
            android:theme="@style/AppTheme">
            <activity android:name=".MainActivity">
            <intent-filter>
            <action android:name="android.intent.action.MAIN" />


            <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
            </activity>
            </application>


                                                         - 647 -
   642   643   644   645   646   647   648   649   650   651   652