Debug XMPP Android client with aSmack, Eclipse and the enhanced debugger.

非 Y 不嫁゛ 提交于 2019-12-08 09:04:59

问题


I'm making an application with the Android XMPP library aSmack with Eclipse. I can not get debug is launched in a separate window as instructed smack documentation:

http://www.igniterealtime.org/builds/smack/docs/latest/documentation/debugging.html

I imported smackx-debug.jar inside the libs folder and I've added this line to the code:

Connection.DEBUG_ENABLED = false;

The debug occurs, but in console of logcat, not a Enhanced Debugger.


回答1:


aSmack is not able to use the enhanced debugger of smack. It's not possible that the Android app draws a new window on your PC running eclipse.

Instead all XMPP traffic is logged to the Android log and can be viewed with DDMS or adb shell logcat.




回答2:


I am using smack 4.3.0 Enable debugging in the logcat with

XMPPTCPConnectionConfiguration conf = XMPPTCPConnectionConfiguration.builder()
            .setXmppDomain(mServiceName)
            .setHost(mServiceName)
            .setResource("Rooster+")

            .setSendPresence(true)
            .enableDefaultDebugger()

.enableDefaultDebugger(), this sorted me out



来源:https://stackoverflow.com/questions/12263064/debug-xmpp-android-client-with-asmack-eclipse-and-the-enhanced-debugger

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!