File transfer in group chat with XMPP

2019-09-02 19:22发布

问题:

I am using group chat with open fire.

i can able to send messages but how to send file to group with Smack library.

i can able to send file to single user with below but i don't know how to send to group chat (MUC) so all users in room will receive that file

OutgoingFileTransfer transfer = manager.createOutgoingFileTransfer("usre2@myHost/Smack");

回答1:

Use XEP-0066: Out of Band Data - this is small extension to standard groupchat message with url and description. Other users will receive link to the file. Smack library does not have standard implementation, but it is very simple.