Reputation: 1277
I'm working with one live chatting application via XMPP, Used aSmack as client and configured ejabberd for server end. I'm Implement one to one chat and it's working fantastic. Now I'm trying to integrate Broadcast message to Multiple user.
I'm learn XEP-0033 protocol because I know this protocol is responsible for message broadcasting and also getting full theoretically clarity on same Basically my question is
MultiUserChatLightManager
but this class is for Group chat but I need to first integrate Message broadcasting.I'm not too much expert on XMPP.
Upvotes: 0
Views: 520
Reputation: 812
i had the similar problem and was solved using this
upload a broadcast plugin to your openfire server.link is here and the read me link for the plugin here
for broadcasting the message follow the pattern to set To Id
all@[serviceName].[serverName]
where serviceName
is broadcast
and serverName
is our server name
send your xmpp message from your android client like this
Message msg = new Message();
msg.setBody(yourmessage);
msg.setFrom(yourJid);
msg.setTo("[email protected]");
yourXmppConnection.sendStanza(msg)
for other alternative and high customization in broadcasting message you can go for XEP-0060: Publish-Subscribe
here
and here is the smack e.g
Upvotes: 1