Is there a method to get the Resource of the friend?(e.g. Resource like smack, park,psi, exodus...)

Is there a method to get the Resource of the friend? I have looked in the javadoc of packet and presence but I couldn’t find one. If there isn’t one, I will be glad if I can get a pointer to write the method myself.

Thanks,

win

Yes, there is. Here are the codes from the very basic packet to resource

Message message = (Message) packet;

String resource = StringUtils.parseResource(message.getFrom());