powered by Jive Software

Android XMPP Client

Hi,

I have to develop a XMPP Client in Android. I have been looking for some API to use, but I don’t know which ones are compatible with Android.

Anyone can help?

I’ve already saw Asmack, but It’s look like an experimental version. Anyone tried that?

This tutorial also shows how to do a client with Smack: http://davanum.wordpress.com/2008/12/29/updated-xmpp-client-for-android/

But it’s seem like they had to make some kind of patch. My main purpose is to use the PubSub protocol, and probably it won’t work.

Anyone can give me some hint?

Hello, Could you clarify your question. You are looking for libraries compatable with smack to accomplish what tasks that smack does not already provide? I thought asmack was developed for the specific purpose of bringing smack to Android. I hoped that we could unify the various smack forks back into ignite’s version, but that has not happened yet.

Have you tried making it work and it failed or ?

daryl

Sorry, I made a mistake . I meant to say "I don’t know which ones are compatible with Android."
Well, I’ve considered three possible options:

a) Use standard Smack library;

b) Use a patched Smack library, in order to be used in Android;

c) Use asmack library.

I’ve already tried options b) and c), and I succedeed in connecting my client to gtalk. However, I want to use in the future some extensions of XMPP, like PubSub.

The purpose of my discussion, is to know the expert opinions, in order to know which option is more secure and stable (a, b or c).

asmack seems to be a good solution, but I don’t know if it is a stable version.

Considering all things, I just want to know your opinion, because I am a bit lost with all this diferrent versions of the API.

I don’t want to start developing my app using an API, and then realize that it is complety deprecated, and start all over again.

Thank you,

João Prudêncio

Thanks for your clarification, your question makes perfect sense now. Unfortunately, I don’t have any advise to offer you as I have no experience on the topic. I hope others here can help you out.

daryl

My advice at this time is to do 1 of 2 things.

  1. Patch Smack, which basically means changing the ProviderManager to read the smack.providers file from the resource directory instead of the META-INF directory in the jar file, where it resides by default. This is fairly simple to accomplish, but it does mean having a custom Smack jar.
  2. Add code to add the providers to the ProviderManager on startup. Basically doing what the ProviderManager is failing to do. A bit tedious, but still simple and then you can use the standard jar.
    There may be other Android related issues as well, but this is AFAIK the major one.

Either of these will allow you to use the standard Smack implementation, which includes the pubsub functionality you want.

I have not mentioned asmack since I believe it has basically been abondoned, as no work has been done on it for over a year.

Good luck.

The Android port of Smack (dubbed aSmack) can be found @

https://github.com/flowdalic/asmack