Suggestions

close search

Message

public class Message
extends StringeeObject



Represents a Message.



Summary


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.


Public constructors


Message

Message()

Construct a new Message.



Public methods


getId

String getId()

Return message id.



getConversationId

String getConversationId()

Return conversation id.



getSenderId

String getSenderId()

Return sender id.



getCreateAt

long getCreateAt()

Return message create time in milliseconds.



getUpdateAt

long getUpdateAt()

Return message update time in milliseconds.



getState

Message.State getState()

Return message state.



getSequence

long getSequence()

Return message sequence



getType

Message.Type getType()

Return message type.



getText

String getText()

Return message text.



getThumbnail

String getThumbnail()

Return message thumbnail.



getLatitude

double getLatitude()

Return message latitude.



setLatitude

void setLatitude(double latitude)

Set message latitude.

Parameters
latitude

The latitude of location



getLongitude

double getLongitude()

Return message longitude



setLongitude

String setLongitude(double longitude)

Set message longitude.

Parameters
longitude

The longitude of location



getAddress

String getAddress()

Return message address.



setAddress

void setAddress(String address)

Set message address.

Parameters
address

The address



getMsgType

Message.MsgType getMsgType()

Return message type.



getFilePath

String getFilePath()

Return file path.



setFilePath

void setFilePath(String filePath)

Set file path.

Parameters
filePath

The file path



getFileUrl

String getFileUrl()

Return file url.



setFileUrl

void setFileUrl(String fileUrl)

Set file url.

Parameters
fileUrl

The file url



getDuration

int getDuration()

Return file duration.



setDuration

void setDuration(int duration)

Set file duration.

Parameters
duration

The file duration



getImageRatio

float getImageRatio()

Return file ratio.



setImageRatio

void setImageRatio(float ratio)

Set file ratio.

Parameters
ratio

The image ratio



getContact

String getContact()

Return contact.



setContact

void setContact(String contact)

Set contact.

Parameters
contact

The contact



getFileName

String getFileName()

Return file name.



setFileName

void setFileName(String fileName)

Set file name.

Parameters
fileName

The file name



getFileLength

long getFileLength()

Return file length.



setFileLength

void setFileLength(long fileLength)

Set file length.

Parameters
fileLength

The file length



getPinnedMsgId

String getPinnedMsgId()

Return pinned msg id.



markAsRead

void markAsRead(StringeeClient client, StatusListener listener)

Masrk message as read.

Parameters
client

The StringeeClient instance.

listener

The StatusListener instance.



getClientId

String getClientId()

Return client id.



setStickerCategory

void setStickerCategory(String stickerCategory)

Set sticker category.

Parameters
stickerCategory

The sticker category



getStickerCategory

String getStickerCategory()

Return sticker category.



setStickerName

void setStickerName(String stickerName)

Set sticker name.

Parameters
stickerName

The sticker name



getStickerName

String getStickerName()

Return sticker name.



setThumbnailUrl

void setThumbnailUrl(String thumbnailUrl)

Set thumbnail url.

Parameters
thumbnailUrl

The thumbnail url



setCustomData

void setCustomData(JSONObject customData)

Set custom data.

Parameters
customData

The custom data



getCustomData

JSONObject getCustomData()

Return custom data.



pinOrUnpin

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.



edit

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.



isDeleted

boolean isDeleted()

Check whether the message is deleted.