Posts

Showing posts with the label build an chat application

Android Building Group Chat App using Sockets – Part 2

Image
In the 1st part, we have learned how to build the socket server and the web chat app. We also did tested the socket server using the web app. In this part we are going to build the next important component, i.e. android chat app. The app we are about to create will have two screens. The first screen will prompt the user to enter his/her name. This name is to identify the sender whenever a message is received. The second screen is to list the chat messages and to compose a new message. So let’s start the app by creating a new android project in Eclipse IDE. 6. Building The Android Chat App 1. In Eclipse create new android project by navigating to File ⇒ New ⇒ Android Application Project and fill out all the required details. I gave my project name as WebMobileGroupChat and package name as info.androidhive.webgroupchat. 2. Add the below color values in res ⇒ values ⇒ colors.xml file. colors.xml <?xml version="1.0" encoding="utf-8"?> <resources>     <col

Android Building Group Chat App using Sockets – Part 1

Image
We have seen a large number of applications come up in the recent past, to help us connect with each other across different mediums, like Hike, Whatsapp, Viber etc. You would be surprised to learn that its rather quite easy to develop one yourself. I thought providing an insight into developing such an application would be helpful for you guys. Today we are going to learn how to build a simple group chat app using sockets. I won’t say this is the only way to build a chat app, but it is the quick & easiest way to build one. The best and efficient way would be using the push notifications instead of sockets. Overall we are going to build three components in this article. The first and important component is the socket server. The socket server plays a major role like handling the socket client connections, passing the messages between clients. Second component is the web app where you can join the chat conversation from a browser. Finally the android app. The main advantage of this a