mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2024-11-22 14:22:05 +01:00
Fix ChatManager API documentation
This commit is contained in:
parent
0555297a6e
commit
36d99ecab3
1 changed files with 4 additions and 3 deletions
|
@ -17,7 +17,7 @@ and then send them a text message:
|
|||
|
||||
```
|
||||
// Assume we've created an XMPPConnection name "connection"._
|
||||
ChatManager chatmanager = connection.getChatManager();
|
||||
ChatManager chatmanager = ChatManager.getInstanceFor(connection);
|
||||
Chat newChat = chatmanager.createChat("jsmith@jivesoftware.com", new MessageListener() {
|
||||
public void processMessage(Chat chat, Message message) {
|
||||
System.out.println("Received message: " + message);
|
||||
|
@ -72,8 +72,9 @@ when it happens. You can register a message listener to receive all future
|
|||
messages as part of this handler.
|
||||
|
||||
```
|
||||
_// Assume we've created an XMPPConnection name "connection"._
|
||||
ChatManager chatmanager = connection.getChatManager().addChatListener(
|
||||
// Assume we've created an XMPPConnection name "connection"._
|
||||
ChatManager chatManager = ChatManager.getInstanceFor(connection);
|
||||
chatManager.addChatListener(
|
||||
new ChatManagerListener() {
|
||||
@Override
|
||||
public void chatCreated(Chat chat, boolean createdLocally)
|
||||
|
|
Loading…
Reference in a new issue