xmpp_plugin 1.1.9 xmpp_plugin: ^1.1.9 copied to clipboard
Xmpp plugin which helps to connect with xmpp via native channels and native libs like smack android and ios via xmppframework
xmpp_plugin #
- Connect to the xmpp server
final param = {
"user_jid":"jid/resource",
"password": "password",
"host": "xmpphost",
"port": "5222"
};
XmppConnection xmppConnection = XmppConnection(param);
await xmppConnection.start(_onReceiveMessage, _onError);
await xmppConnection.login();
- Send message to one-one chat
await xmppConnection.sendMessageWithType("xyz@domain", "Hi", "MSGID");
await xmppConnection.sendGroupMessageWithType("xyz@conference.domain", "Hi", "MSGID");
- Receive message from server
Future _onReceiveMessage(dynamic event) async {
// TODO : Handle the receive event
}
- Disconnect the xmppConnection
xmppConnection.logout();
- Creating a MUC
xmppConnection.createMUC("groupName", true);
- Joining MUC
xmppConnection.joinMucGroups(List<String> allGroupsId)
- Sending Custom Message
await xmppConnection.sendCustomMessage("xyz@domain", "Hi", "MSGID","customTest");
await xmppConnection.sendCustomGroupMessage("xyz@conference.domain", "Hi", "MSGID","customText");
- Sending Delivery Receipt
await flutterXmpp.sendDelieveryReceipt("xyz@domain", "Received-Message-Id", "Receipt-Id");
- Add members in group
await flutterXmpp.addMembersInGroup("groupName", List<String> allMembersId);
- Add Admins in group
await flutterXmpp.addAdminsInGroup("groupName", List<String> allMembersId);
- getMembers
await flutterXmpp.getMembers("groupName");
- getAdmins
await flutterXmpp.getAdmins("groupName");
- getOwners
await flutterXmpp.getOwners("groupName");
- Remove members from group
await flutterXmpp.removeMember("groupName", List<String> allMembersId);
- Remove admins from group
await flutterXmpp.removeAdmin("groupName", List<String> allMembersId);
- get online member count from group
await flutterXmpp.getOnlineMemberCount("groupName");
To be Added #
- MAM
- Presence
- Last Activity