Fix ChatManager API documentation

This commit is contained in:
Florian Schmaus 2015-07-10 23:08:35 +02:00
parent 0555297a6e
commit 36d99ecab3
1 changed files with 4 additions and 3 deletions

View File

@ -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)