I used smack 1.5 and it worked ok, but now I use version 2.2 and my program has one error left. It said that there’'s not <Chat.setFilteredOnThreadID(false)> anymore. Any one has any idea to fix this.
Thank you for reading this thread. Hope to see your reply.
Smack now attempts to “just do the right thing” whenever possible. The Javadoc for the Chat class states:
“A chat is a series of messages sent between two users. Each chat has a unique thread ID, which is used to track which messages are part of a particular conversation. Some messages are sent without a thread ID, and some clients don’'t send thread IDs at all. Therefore, if a message without a thread ID arrives it is routed to the most recently created Chat with the message sender.”
So, even if the other person you’‘re chatting with isn’‘t setting a threadID, you should still be getting the messaes. Any chance you’'re creating multiple Chat objects with the same person?
My guess is that you’‘re creating two chat objects that are using different thread ID’‘s. You need to make sure you use matching thread ID’‘s or don’'t use them at all.