How would I get the Nickname of a person and display
I think I might have to use gerParticipant? not sure.
An example would help.
What are you trying to achieve here? Do you need to get the name of a RosterEntry (a.k.a nickname) or do you need to get the XMPP user (e.g. email@example.com) of the participant of a chat?
In order to get the nickname of an entry you need to use RosterEntry.getName(). Whilst to get the XMPP user of the participant of a chat you need to use Chat.getParticipant(). If you need to get the nickname of the chat’'s participant then you have to do something like this:
String participant = chat.getParticipant();
RosterEntry rosterEntry = roster.getEntry(participant);
Also whats the difference between PacketListener and
The interface/class MessageListener does not exist. Smack expects a PacketListener wherever you see a message name like addMessageListener(listener).
Finally how would I recieve messages only when im in
Follow this link to learn on the different ways you have to receive chat messages. http://www.jivesoftware.com/jive/thread.jspa?forumID=39&threadID=11435&messageID =76232#76232
The compiler says CHAT cannot be found in: