powered by Jive Software

Unable to see Smack 4.1 debug output in Logcat on Android


#1

I am using Smack version 4.1.1(tried with 4.1 as well) on Android Kitkat 4.4.2 &

even after setting SmackConfiguration.DEBUG to true I don’t see the XML stanzas

being exchanged between Android & chat server in logcat output.

Please help.


#2

Share some code so the viewer will be able to understand your exact problem.
I’m able to to see the stanzas by setting :

XMPPTCPConnectionConfiguration.Builder configBuilder = XMPPTCPConnectionConfiguration

.builder();

configBuilder.setDebuggerEnabled(true);


#3

one more thing i want to ask.
have you imported smack debug jars in your debug folder??

like… smack-debug-4.1.0.jar


#4

does that work in android ?


#5

yeah thats working fine in android.


#6

Thanks. I Forgot about smack debug jar. I will add it & see if it

produces the log.

FYI: Don’t use configBuilder.setDebuggerEnabled(true) on

Android, it is meant only for non-Android applications & will

crash your app.


#7

Do you have smack-android in your dependencies?


#8

Thanks for the advice bro but I have used this method as per smack 4.1 official documentation snippet and its running quite fine in my android application


#9

I have both Smack-android & smack-android-extensions jars in my path.

Also, I have added smack-debug-slf4j-4.1.1 & smack-debug-4.1.1 in

my build path, but still don’t see the stanza exchange.

I am using Android KitKat v4.4.2


#10

This thread is a bit ancient, but what’s the official way to enable debugging on Android:

  • of stanza contents only?
  • of the full Smack debug output?

I’ve enabled SmackConfiguration.DEBUG and it seems to work on the first connection, but some time later I don’t see any more stanzas in the logcat output.