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 ?
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With