5
votes

ASmack library refers to the documentation at http://www.igniterealtime.org/builds/smack/docs/latest/documentation/index.html which I think it is outdated and does not provide accurate info. Examples are the following: - Debugging:

        XMPPConnection.DEBUG_ENABLED = true;

-- even in the latest Readme file, it is not working:

XMPPConnection.DEBUG

this is not working. - Also, ChatManager: 1st (in docs) is not working, 2nd after googling...

 ChatManager chatmanager = connection.getChatManager();

 ChatManager chatmanager = ChatManager.getInstanceFor(connection);

So how I can enable verbose debugging as this what I get in the log cat using the basic sample in the documentation:

05-26 11:15:11.237    4633-4633/com.ex.myapplication4.app W/System.err﹕ org.jivesoftware.smack.SmackException$ConnectionException
05-26 11:15:11.237    4633-4633/com.ex.myapplication4.app W/System.err﹕ at org.jivesoftware.smack.XMPPTCPConnection.connectUsingConfiguration(XMPPTCPConnection.java:455)
05-26 11:15:11.237    4633-4633/com.ex.myapplication4.app W/System.err﹕ at org.jivesoftware.smack.XMPPTCPConnection.connect(XMPPTCPConnection.java:865)

And where I can find a reliable documentation or tutorial that works with the latest version (a)Smack 4.0.0-rc2 ?

2
I have the same problem like you. Today do you know where we can learn about asmack 4?Dani
one possibility is to use asmack-android-7-beem-jingle.jar, It has been widely recovered and it works pretty well with my implementation.aselims
Until asmack team publish asmack 4 docs, i am decide to continue using asmack-android-9-0.8.9 version. It's a shame but we can't doing nothing more...Dani
Let's do something about it! Please, give us a documentation! A crowd documentation, this way we own could build based on our own experiences.richardaum

2 Answers

2
votes

It doesn't answer your question.

But I was stucked on same (using aSmack 4.0 - asmack-android-8-4.0.0.jar):

06-17 13:42:22.466: W/System.err(16848): org.jivesoftware.smack.SmackException$ConnectionException
06-17 13:42:22.466: W/System.err(16848):    at org.jivesoftware.smack.tcp.XMPPTCPConnection.connectUsingConfiguration(XMPPTCPConnection.java:431)
06-17 13:42:22.467: W/System.err(16848):    at org.jivesoftware.smack.tcp.XMPPTCPConnection.connectInternal(XMPPTCPConnection.java:799)
06-17 13:42:22.467: W/System.err(16848):    at org.jivesoftware.smack.XMPPConnection.connect(XMPPConnection.java:391)

And I discovered what was the problem (if you want details please ask).

Does your connection is running on main thread? I solved that problem putting the code over AsyncTask, doInBackground method.

0
votes

I have used asmack-android-7-beem-jingle.jar for XMPP msgs over Android and it works pretty fine. I created a gist for the code I used: https://gist.github.com/aselims/92da8b2ad3692fdec699
I hope this helps!