Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Chat application - which tech is better to implement chat app in Android

*I have to make an android application which is basically a chat application.*In this chat app the user can interact with single user as well in a group that means Group chat is also there. I am using php as the back end for database . I have never done this type of work earlier so need some suggestions or guidance.

The options i have seen is as follow :

1. Web-services 

2. Socket Programming 

3. XMPP using the smack api 

Now i am confused in them that which is better to implement chat feature in android. Also i didn't get any sample code for that. One of my team member is asking me to use the socket programming but i didn't get any sample app or anything for socket programming in android. I don't know socket programming this time. How we can connect the our phone to the server and then some other device. Hope you get me what i want to Conway you.

So can any one please guide me and show me the right direction to move on. Also if you can provide me any sample code, that can be really helpful. Any help is appreciated

like image 765
Naresh Sharma Avatar asked Oct 03 '12 06:10

Naresh Sharma


People also ask

What technology is used to build WhatsApp?

WhatsApp uses a customized version of the open standard Extensible Messaging and Presence Protocol (XMPP).


1 Answers

Another option (besides XMPP, which is certainly a valid approach for chat, since it was designed for that) would be using WebSocket. Using WebSocket would open the possiblity of having a pure browser client as well.

For WebSocket on Android, there is AutobahnAndroid, part of the Autobahn family of WebSocket and WAMP implementations.

WAMP is a RPC and PubSub over WebSocket protocol with multiple implementations. There is also a PHP implementation of WebSocket/WAMP: Ratchet.

Disclaimer: I am author of Autobahn/WAMP and work for Tavendo.

like image 115
oberstet Avatar answered Sep 24 '22 16:09

oberstet