public class MessageManager extends Object
Modifier and Type | Class and Description |
---|---|
class |
MessageManager.ContactMessage |
class |
MessageManager.CustomMessage |
class |
MessageManager.LocationMessage |
class |
MessageManager.PictureMessage |
class |
MessageManager.TextMessage |
class |
MessageManager.VideoMessage |
Modifier and Type | Method and Description |
---|---|
void |
getHistoricMessages(String chatJid,
boolean isGroupChat,
HistoricCallback callback)
This method uses to get a historical messages in specific chat.
|
void |
getHistoricMessages(String chatJid,
boolean isGroupChat,
int numOfMessages,
HistoricCallback callback)
This method user to get a historical messages in specific chat.
|
Cursor |
getMessagesFromChat(String chatJid)
This function returns a cursor with the all messages from specific chat
|
void |
markAllMessageRead(String chatJid)
This method marks all messages to read in specific chat.
|
MessageManager.ContactMessage |
newContactMessage(String jid)
This function creates a contact message
|
MessageManager.LocationMessage |
newLocationMessage(String jid)
This function creates a location message
|
MessageManager.PictureMessage |
newPictureMessage(String jid)
This function creates a picture message
|
MessageManager.TextMessage |
newTextMessage(String jid)
This function creates a text message
|
MessageManager.VideoMessage |
newVideoMessage(String jid)
This function creates a video message
|
public void getHistoricMessages(String chatJid, boolean isGroupChat, int numOfMessages, HistoricCallback callback)
chatJid
- jid of chatisGroupChat
- true if is group chat or false if is single chatnumOfMessages
- number of messages retrievescallback
- use to notify when messages are available.public void getHistoricMessages(String chatJid, boolean isGroupChat, HistoricCallback callback)
chatJid
- jid of chatisGroupChat
- true if is group chat or false if is single chatcallback
- use to notify when messages are available.public Cursor getMessagesFromChat(String chatJid)
chatJid
- id of chat.public void markAllMessageRead(String chatJid)
chatJid
- id of chat.public MessageManager.TextMessage newTextMessage(String jid)
jid
- id of chat send message.public MessageManager.LocationMessage newLocationMessage(String jid)
jid
- id of chat send message.public MessageManager.PictureMessage newPictureMessage(String jid)
jid
- id of chat send message.public MessageManager.VideoMessage newVideoMessage(String jid)
jid
- id of chat send message.public MessageManager.ContactMessage newContactMessage(String jid)
jid
- id of chat send message.