powered by Jive Software

Property Attributes of Presence Packet are getting lost

Hi,

I am creating a presence packet for subscription of a new user “user2” by user1 having XMPPConnection con and sending as below :

Presence presence = new Presence (Presence.Type.SUBSCRIBE);

presence.setTo(“user2@server”);

presence.setProperty(“userMessage” , “hi”);

presence.setProperty(“userName” , “user2”);

con.sendPacket(presence);

The presence packet on recieved by user2 at the same instant i.e. if the user2 is also logged when user1 sends the packet then all the attributes are coming fine but if the user2 is not logged in at this instant and logs in later then the packet collector do collect this packet but doesn;t have any values for the properties “userName” and “userMessage”. Is this the problem with Smack or do let me if any work around is possible .

Hey guys,

If you are not getting the problem do reply back ! I will surely try to elaborate more