Android Chat Application - Prototype

Advisors: Giovanni Pau, Rita Tse, Witt Qu

Group Member: Julight Zhong, Alex Lei, Cindy Fang

1.1 Overview:

We joined exchange program which held by UCLA and MPI this summer. Our project aimed to meet the needs of chatting between two people through an Android App. The reason why we decided to do this chatting App is the large number of people use App to communicate each other nowadays. According to "Connected Life", there are 55% of internet user use instant messaging (IM) every day and 76% of user every week. Chatting Apps become a very important tool for people to communicate each other today. For this reason, we built an Android chatting App step by step. First Android Studio was used to produce a client application program, and then we tested it on virtual phone. Next Eclipse was used to write the server program. Finally, we connect client and server by invoking socket through Local Area Network (LAN).


1.2 Tools:

  • Programming language: Java
  • Database: MySQL
  • Server: Windows Sever 2008
  • Integrated development environment: Android Studio, Eclipse
  • Other software: MySQL Workbrench
  • Android devices: Sony Xperia Z5 Compact, LG Nexus 5

2.1 Sever:

We use Eclipse to write the program of the server. There are five methods in sever, namely a send method, a get method, a received method, a get contact method, a add contact method. For the send method, sever can receive the sender ID, receiver ID and message as well.

Furthermore, in order to enhance the performance of the classification algorithm, various corpus with high quality must be collected and utilized. Unfortunately, because of limited time, totally fitted corpus have not been collected and only small scale corpus with low quality are adopted.

2.2 Client:

We used Android Studio to develop the client side codes. The application layer protocol is the same like server side based on socket and TCP transport layer protocol. All classes of client in the App on android side.

2.3 Database:

Database includes conversation table and contact table. Conversation table includes conversationID, senderID, receiveID, msg and time. Contact table contains host and client.

2.4 User Interface:

When this application is started, the contact list screen will be showed. There are some contacts and the float action button which can add new contact. We do not have the ID and password instead of using the IMEI, which is unique to every phone, to identify the client. If you want to chat with somebody, you must know the IMEI of your friend’s phone.

3.1 Result:

Through Local Area Network (LAN), we finally realize the communication between two mobile phone users. First click the icon of this App, then we can see a contacts' interface (Figure.1). There are two options for user, one is to add a new contact by click the floating action button below (Figure.2), and another one is to chat by choosing a contact from the list (Figure.3). After user entering the chatting interface, there will be a chat record window, an edit text window and a send button (Figure.4). We type the message in the edit text window, and click the send button to send message to the other client (Figure.5).
Figure.1     Figure.2     Figure.3
Figure.4     Figure.5    


4.1 Experenice:

We have made our great efforts to accomplish our project. This is our first time get in touch with writing Android application; none of us has learned how to write an Android client-side before. Thus we met huge problems. First of all, we tried to test the connection between client and server. But we soon found out the problem. It was because Android can’t use Java RMI which was used to connect server. To solve this problem, we found the other library called LipeRMI to substitute Java RMI. LipeRMI can solve the connection problem. However, there was another problem. LipeRMI could not change the UI when we get data from the server. Finally, we used socket to communicate with server. Through our hard working we finally solve it. Besides one week working, we had fun in Los Angeles as well. We went to Universal Studios, San Diego and around UCLA, gained not just beautiful view but also plenty of humanity. The most important is, during this period of time, we faced the failure together and happiness together, that was unforgettable.