Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using your own XMPP server for android chat app (Smack API)

Tags:

I am new to Android programming.I have completed the basics though and wish to learn XMPP for making a chat application on Android. I've gone through tutorials, but have not got the way to use a custom pc as server for the application.I want to use my laptop as a server for sending messages between 2 android devices.My laptop should be able to recieve and direct the messages between the two.Can anyone please help me get started?

like image 355
user3419596 Avatar asked Mar 18 '14 13:03

user3419596


People also ask

What is Smack XMPP?

Smack is an Open Source XMPP client library for instant messaging and presence. A pure Java library, it can be embedded into your applications to create anything from a full XMPP client to simple XMPP integrations such as sending notification messages and presence-enabling devices.

Which app uses XMPP?

Bruno the Jabber™ BearAndroid.

How XMPP works step by step?

As mentioned above, XMPP works by passing small, structured chunks of XML data between endpoints (clients) via intermediary servers. In other words, if you send a message to your friend using XMPP, that message, as part of an XML document, first travels to a server instead of traveling directly to your friend's device.


1 Answers

First of all, you need to install in your laptop a XMPP server. Here are a list of available ones. People used to say Openfire is easy to install and configure, but to production purposes Ejabberd (linux and mac only) seems to be more robust.

To develop your app, you can use Smack, which is large well documented, with code snapshots to connect to a server, create a chat, send and receive messages etc.

like image 136
Plinio.Santos Avatar answered Jan 03 '23 00:01

Plinio.Santos