public class Message
extends StringeeObject
Represents a Message.
Nested classes | |
---|---|
public enum Message.State
|
State of message. |
public enum Message.Type
|
Type of message. |
public enum Message.MsgType
|
Type of message. |
Public Constructors | |
---|---|
Message()
Construct a new Message |
Public methods | |
---|---|
String |
getId()
Return message id. |
String |
getConversationId()
Return conversation id. |
String |
getSenderId()
Return sender id. |
long |
getCreateAt()
Return message create time in milliseconds. |
long |
getUpdateAt()
Return message update time in milliseconds. |
Message.State |
getState()
Return message state. |
long |
getSequence()
Return message sequence. |
Message.Type |
getType()
Return message type. |
String |
getText()
Return message text. |
String |
getThumbnail()
Return message thumbnail. |
double |
getLatitude()
Return message latitude. |
void |
setLatitude(double latitude)
Set message latitude. |
double |
getLongitude()
Return message longitude. |
void |
setLongitude(double longitude)
Set message longitude. |
String |
getAddress()
Return message address. |
void |
setAddress(String address)
Set message address. |
Message.MsgType |
getMsgType()
Return message type. |
String |
getFilePath()
Return file path. |
void |
setFilePath(String filePath)
Set file path. |
String |
getFileUrl()
Return file url. |
void |
setFileUrl(String fileUrl)
Set file url. |
int |
getDuration()
Return file duration. |
void |
setDuration(int duration)
Set file duration. |
float |
getImageRatio()
Return image ratio. |
void |
setImageRatio(float ratio)
Set image ratio. |
String |
getContact()
Return contact. |
void |
setContact(String contact)
Set contact. |
String |
getFileName()
Return file name. |
void |
setFileName(String fileName)
Set file name. |
long |
getFileLength()
Return file length. |
void |
setFileLength(long fileLength)
Set file length. |
void |
markAsRead(StringeeClient client, StatusListener listener)
Masrk message as read. |
String |
getClientId()
Return client id. |
void |
setStickerCategory(String stickerCategory)
Set sticker category. |
String |
getStickerCategory()
Return sticker category. |
void |
setStickerName(String stickerName)
Set sticker name. |
String |
getStickerName()
Return sticker name. |
void |
setThumbnailUrl(String thumbnailUrl)
Set thumbnail url. |
void |
setCustomData(JSONObject customData)
Set custom data. |
JSONObject |
getCustomData()
Return custom data. |
void |
pinOrUnpin(StringeeClient client, boolean pinOrUnpin, StatusListener
listener)
Pin or unpin message. |
void |
edit(StringeeClient client, String content, StatusListener listener)
Edit message. |
boolean |
isDeleted()
Check whether the message is deleted. |
Message()
Construct a new Message.
String getId()
Return message id.
String getConversationId()
Return conversation id.
String getSenderId()
Return sender id.
long getCreateAt()
Return message create time in milliseconds.
long getUpdateAt()
Return message update time in milliseconds.
Message.State getState()
Return message state.
long getSequence()
Return message sequence
Message.Type getType()
Return message type.
String getText()
Return message text.
String getThumbnail()
Return message thumbnail.
double getLatitude()
Return message latitude.
void setLatitude(double latitude)
Set message latitude.
Parameters | |
---|---|
latitude |
The latitude of location |
double getLongitude()
Return message longitude
String setLongitude(double longitude)
Set message longitude.
Parameters | |
---|---|
longitude |
The longitude of location |
String getAddress()
Return message address.
void setAddress(String address)
Set message address.
Parameters | |
---|---|
address |
The address |
Message.MsgType getMsgType()
Return message type.
String getFilePath()
Return file path.
void setFilePath(String filePath)
Set file path.
Parameters | |
---|---|
filePath |
The file path |
String getFileUrl()
Return file url.
void setFileUrl(String fileUrl)
Set file url.
Parameters | |
---|---|
fileUrl |
The file url |
int getDuration()
Return file duration.
void setDuration(int duration)
Set file duration.
Parameters | |
---|---|
duration |
The file duration |
float getImageRatio()
Return file ratio.
void setImageRatio(float ratio)
Set file ratio.
Parameters | |
---|---|
ratio |
The image ratio |
String getContact()
Return contact.
void setContact(String contact)
Set contact.
Parameters | |
---|---|
contact |
The contact |
String getFileName()
Return file name.
void setFileName(String fileName)
Set file name.
Parameters | |
---|---|
fileName |
The file name |
long getFileLength()
Return file length.
void setFileLength(long fileLength)
Set file length.
Parameters | |
---|---|
fileLength |
The file length |
String getPinnedMsgId()
Return pinned msg id.
void markAsRead(StringeeClient client, StatusListener listener)
Masrk message as read.
Parameters | |
---|---|
client |
The StringeeClient instance. |
listener |
The StatusListener instance. |
String getClientId()
Return client id.
void setStickerCategory(String stickerCategory)
Set sticker category.
Parameters | |
---|---|
stickerCategory |
The sticker category |
String getStickerCategory()
Return sticker category.
void setStickerName(String stickerName)
Set sticker name.
Parameters | |
---|---|
stickerName |
The sticker name |
String getStickerName()
Return sticker name.
void setThumbnailUrl(String thumbnailUrl)
Set thumbnail url.
Parameters | |
---|---|
thumbnailUrl |
The thumbnail url |
void setCustomData(JSONObject customData)
Set custom data.
Parameters | |
---|---|
customData |
The custom data |
JSONObject getCustomData()
Return custom data.
void pinOrUnpin(StringeeClient client, boolean pinOrUnpin, StatusListener listener)
Pin or unpin message.
Parameters | |
---|---|
client |
The StringeeClient instance |
pinOrUnpin |
Pin or unpin message |
listener |
The CallbackListener instance. |
void edit(StringeeClient client, String content, StatusListener listener)
Get lastest messages from Stringee server.
Parameters | |
---|---|
client |
The StringeeClient instance |
content |
New content of message |
listener |
The CallbackListener instance. |
boolean isDeleted()
Check whether the message is deleted.