Class AndroidDebugger

java.lang.Object
org.jivesoftware.smack.debugger.SmackDebugger
org.jivesoftware.smack.debugger.AbstractDebugger
org.jivesoftware.smackx.debugger.android.AndroidDebugger

public class AndroidDebugger extends org.jivesoftware.smack.debugger.AbstractDebugger
Very simple debugger that prints to the android log the sent and received stanzas.

Only use this debugger if really required, Android has a good java.util.logging implementation, therefore JulDebugger is preferred.

It is possible to not only print the raw sent and received stanzas but also the interpreted packets by Smack. By default,interpreted packets won't be printed. To enable this feature just change the printInterpreted static variable to true.
  • Field Summary

    Fields inherited from class org.jivesoftware.smack.debugger.AbstractDebugger

    printInterpreted

    Fields inherited from class org.jivesoftware.smack.debugger.SmackDebugger

    connection
  • Constructor Summary

    Constructors
    Constructor
    Description
    AndroidDebugger(org.jivesoftware.smack.XMPPConnection connection)
    Constructs a new Smack debugger for Android.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    log(String logMessage)
     
    protected void
    log(String logMessage, Throwable throwable)
     

    Methods inherited from class org.jivesoftware.smack.debugger.AbstractDebugger

    incomingStreamSink, onIncomingStreamElement, onOutgoingStreamElement, outgoingStreamSink, userHasLogged

    Methods inherited from class org.jivesoftware.smack.debugger.SmackDebugger

    newConnectionReader, newConnectionWriter, onIncomingElementCompleted, onOutgoingElementCompleted

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • AndroidDebugger

      public AndroidDebugger(org.jivesoftware.smack.XMPPConnection connection)
      Constructs a new Smack debugger for Android.
      Parameters:
      connection - the connection to debug.
  • Method Details

    • log

      protected void log(String logMessage)
      Specified by:
      log in class org.jivesoftware.smack.debugger.AbstractDebugger
    • log

      protected void log(String logMessage, Throwable throwable)
      Specified by:
      log in class org.jivesoftware.smack.debugger.AbstractDebugger