XMPP and Android

Hi,

I am trying to build an XMPP client in Android. I downloaded smack.jar and set it up in eclipse. However, whenever i try to use the connect() method, the process stops unexpectedly. I have not used the patched version of smack.jar. I this is the cause of the problem, can someone send me a download link or a copy at my email address?

(i have setup internet permissions in the manifest)

Thanks in advance,

Earlence Fernandes

Note: - this is the code i’m using.

void sendAMsg()
{
try {

cc = new ConnectionConfiguration(“jabber.org”, 5222);

conn = new XMPPConnection(cc);
conn.connect();
conn.login("$$$$$$$$", “$$$$$$$” );

conn.disconnect();

}catch(XMPPException ex1) { Log.d("–EARL–", ex1.toString()); }

}

i just call the function in a button event handler

I’ve been trying to work on the same thing, and here’s what I found.

With the 1.0r2 version of the SDK, a simple XMPP testapp that’s been “patched” fails to run on the emulator. The error crops up during a DNS lookup during connect. The problem is that the Android API is missing huge chunks of the javax namespace, so the VM can’t find the needed classes, and throwing an exception.

I’ve herd rumors that people have gotten Smack to work on Android, and I’m wondering how they did it, and what steps need to be taken. One workaround I was trying was to port some of the GNU Classpath classes that were missing from the Android API, but it was turning into a large amount of work.

Thanks for the info, I’ve been searching for alternative XMPP java libraries. I found one known as Jabber Stream objects (JSO). It is on

the dev.java.net communications-incubator page. I am trying to get that working on Android right now.

Earlence