Software Engineering for Internet Applications Mobile Apps Programming - Android Socket ADF 1/11/2019
Java Socket Remember Socket Programming? Multi-client chat via TCP Socket Build Android Socket for Client 1/11/2019
Server Chat Use the same Server.java Modify ServerThread.java Remove buffered reader as the input is no longer from string stream, change to Data Input Stream Create new Android Project for Client 1/11/2019
Server Thread ServerThread.java 1/11/2019
Server Thread ServerThread.java 1/11/2019
Android Client Create an Empty Project 1/11/2019
Android Manifest As the application will try to connect the network, add permission in the manifest file 1/11/2019
UI Layout 2 views Login panel view (vertical linear layout) Username input text Server address input text Connect button Chatting panel view(vertical linear layout) Chatting input text Send button Disconnect button Scroll view chat log 1/11/2019
UI Layout 1/11/2019
UI Layout View Chat Panel only when the connection is established Set chat panel visibility “gone” Give hint to input text username, server address, input chat Best practice to set all text value in string.xml 1/11/2019
UI Layout 1/11/2019
UI Layout 1/11/2019
UI Layout – Login Panel 1/11/2019
UI Layout – Chat Panel 1/11/2019
Client Thread Class Create client thread class 1/11/2019
Client Thread Class 1/11/2019
Client Thread Class 1/11/2019
Client Thread Class 1/11/2019
Client Thread Class 1/11/2019
Client Thread Class 1/11/2019
Main Activity Set server port number Add all element 1/11/2019
Main Activity Initialize resource activity in onCreate() method 1/11/2019
Main Activity Create Listener for each button 1/11/2019
Main Activity 1/11/2019
Main Activity Set onClickListener in onCreate() method 1/11/2019
Run Application Run Server Run Android Client Connect to IP Server 1/11/2019
1/11/2019