Hi,

I am trying to build a small XMPP client for Android using the Smack
API for Java. I have setup the API in  my eclipse environment.

I am using the foll. code

void sendAMsg()
    {
        try {

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

            conn = new XMPPConnection(cc);
            conn.connect();
            conn.login("earlenceferns", "tezroyd1987");
            //Message m = new Message();
            //m.setTo("earlencefe...@darkdna.net");
            //m.setSubject("Test msg");
            //m.setBody("Hey man, what up?");
            //m.setType(Message.Type.chat)
;
            //conn.sendPacket(m);
            conn.disconnect();

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


    }

I just call this method in a button click handler

When i debug the app, i get the foll. errors in LogCat
(The exception is thrown when the conn.connect() method is
encountered)

12-19 20:22:06.552: ERROR/OSNetworkSystem(229): unknown socket error
-1
12-19 20:22:08.932: DEBUG/--EARL--(229): XMPPError connecting to
jabber.org:5222.: remote-server-error(502) XMPPError connecting to
jabber.org:5222.
12-19 20:22:08.932: DEBUG/--EARL--(229):   -- caused by:
java.net.SocketException: unknown error

Please help me figure this error out. I am a little short of time.

(OS - Windows XP, Eclipse version - 3.4 Ganymede, Android SDK version
- android-sdk-windows-1.0_r2)

Thanks,
Earlence Fernandes

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to