3

I am developing a chat application over android and i need an xmpp chat client that works with openfire... Can anyone suggest me in this?

coderslay
  • 13,960
  • 31
  • 73
  • 121
  • possible duplicate of [Android and XMPP: Currently available solutions](http://stackoverflow.com/questions/4769020/android-and-xmpp-currently-available-solutions) – legoscia Jun 02 '14 at 16:28

2 Answers2

6

It's worth taking a look at the asmack library. It's a fork from Ignite Realtime's desktop XMPP client library, Smack, that works on Android (Ignite Realtime developed Openfire). It's generally the most commonly used Android XMPP library as far as I'm aware.

If you're not looking to extend XMPP in any way (it sounds like you just need simple chat) then any Android-compatible library will work with an Openfire server in the same way, that's part of the beauty of XMPP being a protocol.

If you were going to develop desktop clients and/or extend the server in some way, then I would suggest asmack even more strongly as it would cut down on the amount you would have to relearn.

For documentation and more background info, I would suggest having a look at the original Smack website. A lot of the code in asmack is the same as Smack and the Smack javadocs are quite detailed.

Marc
  • 546
  • 5
  • 10
  • Hello Marc...thanks for the reply... I used smack 3.1.0 library in my android project and i get error for just a simple openfire connection like: XMPPError connecting to localhost:5222.: remote-server-error(502) XMPPError connecting to localhost:5222. caused by: java.net.ConnectException: localhost/127.0.0.1:5222 - Connection refused....... i just used this code ConnectionConfiguration config = new ConnectionConfiguration("localhost",5222); XMPPConnection connection = new XMPPConnection(config); connection.connect(); – coderslay Mar 25 '11 at 06:28
  • Was this code running on an Android handset? Because if so, localhost is referring to the handset as opposed to the computer running the Openfire server. You would need to swap 'localhost' for the local IP address, 192.168… perhaps. – Marc Mar 25 '11 at 10:24
  • Yup Thanks Marc..I was using it on Emulator.... Thanks for suggesting me using smack :) – coderslay Mar 25 '11 at 11:25
-1

here http://florentgarin.developpez.com/tutoriel/android/client-xmpp/

Source http://florentgarin.ftp-developpez.com/android/ClientJabber.zip

user2080866
  • 459
  • 2
  • 6
  • 18