4

I need to build a Chat App in Android, but i want to deal with PHP Server for storing the data. I heard about Socket that is used for making Chat Apps. I have a sample codes of a Server Socket and Client Socket App to make a connection between them, but the two App are using Android, but i want to Server Side in my App. What is the best Approach for Achieving that ?

3
  • 1
    To clarify, you want to send messages directly between phones without going through a server? Commented Mar 6, 2014 at 18:22
  • 1
    No, I want to go through the server for storing the messages like Facebook Messenger Commented Mar 6, 2014 at 19:07
  • hi can u provide me an example for it? Commented Sep 12, 2014 at 8:57

1 Answer 1

3

I recommend you Ejabberd + Asmack.

You can instal ejabberdin your server easily in Linux, check this. Ejabberd is based in XMPP protocol (the same used by whatsapp (I don't know if they still use it, but at least is based on XMPP).

Then for your mobilephones there is a library (Asmack, check here)

There are lots of sample codes of using this library that will help you to set up your chat application.

You will have to register your users in your server in order to be able to log in the system.

Some extra helful links:

Ejabberd configuration guide

Sample XMPPConection

Hope it helps

Sign up to request clarification or add additional context in comments.

5 Comments

Great, Asmack Library is very simple and easy to be used. But i can't deal with Ejabberd, I'm working with Free Server, Can i setup Ejabberd on this Free Server ?
If your server is in Linux you should not have any problem.
@zozelfelfo can you tell me how can i used it with shared server like i want to use it in go daddy. then what requirements i need plz help me.
@Madhav_nimavat I have never worked with godaddy, the only thing you need is a Linux kernel and go for it. You need ejabberd installed as a system service, cannot do it otherwise
@zozelfelfo i just need to know how can i use it in shared server

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.