1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2025-12-08 14:11:07 +01:00

Merge branch '4.2'

This commit is contained in:
Florian Schmaus 2018-03-21 15:22:22 +01:00
commit f42d9137b5
17 changed files with 537 additions and 69 deletions

View file

@ -43,13 +43,15 @@ import org.jxmpp.jid.EntityFullJid;
* // Most servers require you to login before performing other tasks.
* con.login("jsmith", "mypass");
* // Start a new conversation with John Doe and send him a message.
* Chat chat = ChatManager.getInstanceFor(con).createChat("jdoe@igniterealtime.org", new MessageListener() {
* public void processMessage(Chat chat, Message message) {
* ChatManager chatManager = ChatManager.getInstanceFor(con);
* chatManager.addIncomingListener(new IncomingChatMessageListener() {
* public void newIncomingMessage(EntityBareJid from, Message message, Chat chat) {
* // Print out any messages we get back to standard out.
* System.out.println("Received message: " + message);
* }
* });
* chat.sendMessage("Howdy!");
* Chat chat = chatManager.chatWith("jdoe@igniterealtime.org");
* chat.send("Howdy!");
* // Disconnect from the server
* con.disconnect();
* </pre>