• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps Which technology should I use to develop a simple chat app for Android?

javi9375

Lurker
Hi, I'm trying to develop a simple chat app for Android. I'm having serious trouble trying to decide which technology I will use to implement the communication between clients and server. I have found 2 options:
-Using XMPP: It's seems that XMPP is the better protocol to implement a chat application, but I have 2 problems with it. First, the project I'm doing is for my University course, the important part of the app the teacher wants, is the communication between server and client, and XMPP APIs almost does it alone. The second problem is that I've only found a good XMPP API for my Android client (aSMACK) and it seems to be pretty unofficial so might not be the better option for a University project.
-Using POST method of httpservlet: this solution is pretty much complex, but the app won't be more than a login and a simple chat interface so I can define my own XML files and process myself the messages. The problem I found here is that in order to achieve an almost real time application I will have to use polling on the client to receive new messages from other users. I'm not used to work with httpservlets so,
 
For a simple chat application for university (I actually did this project when I was in university) it's easy enough to just use Socket and ServerSocket classes to create the connection, then design your own protocol to use during message passing. Obviously, as with any network application, getting your threading right is important.
 
Whatsapp Architecture

Optimizing Ejabberd server (open source Jabber server written in Erlang language) using ERLANG is the best way to build a chat system that accommodates huge communications with high sustainability.

Whatsapp’s techies did the same thing, however they refined it by modifying Ejabbered, developing an in-house XMPP protocol, code restructuring etc.

ERLANG is instant in adapting changes and updates. So you don’t need restarts to induce a new functionality or update.
To build an Android chat app similar to Whatsapp I would suggest Contus Fly, an Ejabbered based instant messaging solution developed with heavy inspiration on Whatsapp.

Its database is laid on Mnesia and MySQL. For flashy read/write speed the app solution uses Cassandra database.

And finally, being a programmer, you can check for its genuineness by yourself.

For further details on Whatsapp’s technicalities I suggest this blog might help you.
 
Last edited by a moderator:
Building a chat app in android/iOS, becomes easier and high level technology is near to you. I would suggest highly performing technologies like Ejabberd, XMPP, Amazon Web services, Mnesia & MySQL, Cassandra.

1. The Ejabberd is an open source server provide customized the app to get better performance and XMPP protocol helps to speed up sign in and re-sign in the sessions
2. An Amazon web service, where we can store and manage the video/audio content securely.
3. Mnesia & MySQL maintain the user login details, other personal data.
4. Cassandra database saves chat history to retrieve the chat easily to re-communicate again.
 
Last edited by a moderator:
Google codelabs made a Friendly Chat app tutorial
What you learn to do
  • Allow users to sign in.
  • Sync data using the Firebase Realtime Database.
  • Receive background messages with Firebase Notifications.
  • Configure an application with Firebase Remote Config.
  • Track application usage flows with Firebase Analytics.
  • Allow users to send invitations to install with Firebase Invites.
  • Display ads with AdMob.
  • Report crashes with Firebase Crash Reporting.
  • Test your app with Firebase Test Lab.
You can go and check out this tutorial link below.
https://codelabs.developers.google.com/codelabs/firebase-android/#0
 
Back
Top Bottom