|
| void | sendMessage (final EMMessage msg) |
| |
| void | ackMessageRead (String to, String messageId) throws HyphenateException |
| |
| EMMessage | getMessage (String messageId) |
| |
| EMConversation | getConversation (String id) |
| |
| EMConversation | getConversation (String id, EMConversationType type) |
| |
| EMConversation | getConversation (String username, EMConversationType type, boolean createIfNotExists) |
| |
| void | markAllConversationsAsRead () |
| |
| int | getUnreadMsgsCount () |
| |
| void | saveMessage (EMMessage message) |
| |
| boolean | updateMessage (EMMessage message) |
| |
| void | downloadAttachment (final EMMessage msg) |
| |
| void | downloadThumbnail (final EMMessage msg) |
| |
| synchronized void | importMessages (List< EMMessage > msgs) |
| |
| List< EMConversation > | getConversationsByType (EMConversation.EMConversationType type) |
| |
| boolean | isSlientMessage (EMMessage message) |
| |
| void | downloadFile (final String remoteUrl, final String localFilePath, final Map< String, String > headers, final EMCallBack callback) |
| |
| Map< String, EMConversation > | getAllConversations () |
| |
| void | loadAllConversations () |
| |
| boolean | deleteConversation (String username, boolean deleteMessages) |
| |
| void | addMessageListener (EMMessageListener listener) |
| |
| void | removeMessageListener (EMMessageListener listener) |
| |
| void | addConversationListener (EMConversationListener listener) |
| |
| void | removeConversationListener (EMConversationListener listener) |
| |
| void | setMessageListened (EMMessage message) |
| |
|
|
| EMChatManager (EMClient client, EMAChatManager manager) |
| |
send a message
EMMessage msg = EMMessage;
EMClient.getInstance().chatManager().sendMessage(msg);
| void com.hyphenate.chat.EMChatManager.ackMessageRead |
( |
String |
to, |
|
|
String |
messageId |
|
) |
| throws HyphenateException |
send read ack to server
- Parameters
-
| to | the recipient id |
| messageId | message id |
- Exceptions
-
add conversation listener
- See also
- EMConversationListener
refresh the conversation list when receiving the conversation refresh event
- Parameters
-
| listener | the conversation listener |
| void com.hyphenate.chat.EMChatManager.addMessageListener |
( |
EMMessageListener |
listener | ) |
|
add message listener
- See also
- EMMessageListener
- Parameters
-
| listener | the message listener which is used to monitor the incoming messages |
| boolean com.hyphenate.chat.EMChatManager.deleteConversation |
( |
String |
username, |
|
|
boolean |
deleteMessages |
|
) |
| |
delete conversation and all history messages
- Parameters
-
| username | user id or group id |
| deleteMessages | whether delete messages |
- Returns
- return true if delete successfully
| void com.hyphenate.chat.EMChatManager.downloadAttachment |
( |
final EMMessage |
msg | ) |
|
download the attachement again if not downloaded before
- Parameters
-
| msg | msg the msg to be downloaded |
| void com.hyphenate.chat.EMChatManager.downloadFile |
( |
final String |
remoteUrl, |
|
|
final String |
localFilePath, |
|
|
final Map< String, String > |
headers, |
|
|
final EMCallBack |
callback |
|
) |
| |
download the file from server
- Parameters
-
| remoteUrl | the remote file url |
| localFilePath | the local file path |
| headers | Http Request Headers |
| callback | EMCallBack |
| void com.hyphenate.chat.EMChatManager.downloadThumbnail |
( |
final EMMessage |
msg | ) |
|
download the thumbnail if not downloaded before
- Parameters
-
| msg | the msg to be downloaded |
| Map<String, EMConversation> com.hyphenate.chat.EMChatManager.getAllConversations |
( |
| ) |
|
get all conversations in the cache
- Returns
- conversations which is a map with key->conversation id : value->EMConversation
| EMConversation com.hyphenate.chat.EMChatManager.getConversation |
( |
String |
id | ) |
|
get conversation by id
- Parameters
-
| id | user id, group id or chatroom id EMConversation the existing conversation found by conversation, null if not found |
| EMConversation com.hyphenate.chat.EMChatManager.getConversation |
( |
String |
id, |
|
|
EMConversationType |
type |
|
) |
| |
get conversation by conversation id and conversation type, create a empty conversation if not found
- Parameters
-
| id | user id, group id or chatroom id |
| type | |
- See also
- EMConversationType the conversation type EMConversation the conversation found according to the id and type, create a empty conversation if not found
| EMConversation com.hyphenate.chat.EMChatManager.getConversation |
( |
String |
username, |
|
|
EMConversationType |
type, |
|
|
boolean |
createIfNotExists |
|
) |
| |
get conversation by conversation id and conversation type
- Parameters
-
| username | user id, group id or chatroom id |
| type | |
- See also
- EMConversationType the conversation type
- Parameters
-
| createIfNotExists | create conversation if not exists |
| List<EMConversation> com.hyphenate.chat.EMChatManager.getConversationsByType |
( |
EMConversation.EMConversationType |
type | ) |
|
get list of conversations by conversation type
- Returns
- the conversation list of this type
| EMMessage com.hyphenate.chat.EMChatManager.getMessage |
( |
String |
messageId | ) |
|
get message through message id
- Parameters
-
- Returns
| int com.hyphenate.chat.EMChatManager.getUnreadMsgsCount |
( |
| ) |
|
get unread message count
- Returns
| synchronized void com.hyphenate.chat.EMChatManager.importMessages |
( |
List< EMMessage > |
msgs | ) |
|
import messages to db,ensure the meessage's sender or receiver is current user
- Parameters
-
| msgs | the message list of be imported |
| boolean com.hyphenate.chat.EMChatManager.isSlientMessage |
( |
EMMessage |
message | ) |
|
check if the message is kind of slient message, if that's it, app should not play tone or vibrate
- Parameters
-
- Returns
| void com.hyphenate.chat.EMChatManager.loadAllConversations |
( |
| ) |
|
load all conversatons from db
| void com.hyphenate.chat.EMChatManager.markAllConversationsAsRead |
( |
| ) |
|
mark all messages as read
remove the conversation listener
- Parameters
-
| listener | the conversation listener set before |
| void com.hyphenate.chat.EMChatManager.removeMessageListener |
( |
EMMessageListener |
listener | ) |
|
remove the message listener
- Parameters
-
| listener | the message listener set before |
| void com.hyphenate.chat.EMChatManager.saveMessage |
( |
EMMessage |
message | ) |
|
save the message to memory and db CMD type message to will stored in database
- Parameters
-
| void com.hyphenate.chat.EMChatManager.sendMessage |
( |
final EMMessage |
msg | ) |
|
| void com.hyphenate.chat.EMChatManager.setMessageListened |
( |
EMMessage |
message | ) |
|
set message to listened, usually use for voice message
| boolean com.hyphenate.chat.EMChatManager.updateMessage |
( |
EMMessage |
message | ) |
|
update the message
- Parameters
-
The documentation for this class was generated from the following file:
- hyphenatechatsdk/src/com/hyphenate/chat/EMChatManager.java