Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Chat Application Development

I want to create a chat application for Android and I want to know the best way to do it. My first option is to use a socket connection between the phone and the server so the server can send any new messages to the phone.

The second option is to use C2DM.

A chat application like what's up how is implemented with socket or using C2DM?

Is there a better way to create such an application than the above?

Thank you.

like image 750
Catalin Avatar asked May 18 '12 23:05

Catalin


1 Answers

C2DM (now known as GCM) will not be good choice for building a chat application. Create a socket connection with the server when the app is in foreground, when app is in background use GCM for push notification purpose. You will have to host your own servers but I would suggest to not to reinvent the wheel and use something like Applozic (https://www.applozic.com) chat sdk which will give you features like whatsapp and a lot more within an hour.

like image 90
Brij Avatar answered Sep 28 '22 11:09

Brij