Thanks for your reply, rajesh
And I have a question about your code. What’s the defination of XMPPLogic?
By comparing the codes, I found some difference. The “connection” is XMPPConnection in your case. While it’s org.jivesoftware.smack.Connection in mine.
Thank you,
Strong Su