1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-12-24 11:38:00 +01:00

Fix ChatManager API documentation

This commit is contained in:
Florian Schmaus 2015-07-10 23:08:35 +02:00
parent 0555297a6e
commit 36d99ecab3

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)