androidsocketschat

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.


Solution

  • asmack and OpenFire is the easiest way. No need to reinvent the wheel.

    But if you did want to RTW, then open a socket while the app is in the foreground, and use C2DM when it's not. BTW C2DM is a PITN to work with, so consider using a service like Urban Airship.