mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-11-22 20:12:07 +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"._
|
// 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() {
|
Chat newChat = chatmanager.createChat("jsmith@jivesoftware.com", new MessageListener() {
|
||||||
public void processMessage(Chat chat, Message message) {
|
public void processMessage(Chat chat, Message message) {
|
||||||
System.out.println("Received 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.
|
messages as part of this handler.
|
||||||
|
|
||||||
```
|
```
|
||||||
_// Assume we've created an XMPPConnection name "connection"._
|
// Assume we've created an XMPPConnection name "connection"._
|
||||||
ChatManager chatmanager = connection.getChatManager().addChatListener(
|
ChatManager chatManager = ChatManager.getInstanceFor(connection);
|
||||||
|
chatManager.addChatListener(
|
||||||
new ChatManagerListener() {
|
new ChatManagerListener() {
|
||||||
@Override
|
@Override
|
||||||
public void chatCreated(Chat chat, boolean createdLocally)
|
public void chatCreated(Chat chat, boolean createdLocally)
|
||||||
|
|
Loading…
Reference in a new issue