public class

ChatMessage

extends Object
java.lang.Object
   ↳ com.gsma.services.rcs.chat.ChatMessage

Class Overview

Chat message

Summary

Public Methods
String getChatId()
Returns the chat ID of this chat message.
String getContent()
Returns the message content
RcsService.Direction getDirection()
Returns the direction of message
String getId()
Returns the message ID
String getMimeType()
Returns the mime type of the chat message.
ChatLog.Message.Content.ReasonCode getReasonCode()
Returns the reason code of the chat message.
ContactId getRemoteContact()
Returns the contact
ChatLog.Message.Content.Status getStatus()
Returns the status of the chat message.
long getTimestamp()
Returns the local time-stamp of when the chat message was sent and/or queued for outgoing messages or the local time-stamp of when the chat message was received for incoming messages.
long getTimestampDelivered()
Returns the local timestamp of when the chat message was delivered for outgoing messages or 0 for incoming messages or it was not yet delivered.
long getTimestampDisplayed()
Returns the local timestamp of when the chat message was displayed for outgoing messages or 0 for incoming messages or it was not yes displayed.
long getTimestampSent()
Returns the local time-stamp of when the chat message was sent and/or queued for outgoing messages or the remote time-stamp of when the chat message was sent for incoming messages.
boolean isExpiredDelivery()
Returns true if delivery for this chat message has expired or false otherwise.
boolean isRead()
Returns true is this chat message has been marked as read.
[Expand]
Inherited Methods
From class java.lang.Object

Public Methods

public String getChatId ()

Since: API Level 1.5

Returns the chat ID of this chat message.

Returns
  • String
Throws
RcsPersistentStorageException
RcsGenericException
RcsPersistentStorageException

public String getContent ()

Since: API Level 1.5

Returns the message content

Returns
  • String

public RcsService.Direction getDirection ()

Since: API Level 1.5

Returns the direction of message

Returns
  • Direction
Throws
RcsPersistentStorageException
RcsGenericException
RcsPersistentStorageException

public String getId ()

Since: API Level 1.5

Returns the message ID

Returns
  • String

public String getMimeType ()

Since: API Level 1.5

Returns the mime type of the chat message.

Returns
  • String
Throws
RcsPersistentStorageException
RcsGenericException
RcsPersistentStorageException

public ChatLog.Message.Content.ReasonCode getReasonCode ()

Since: API Level 1.5

Returns the reason code of the chat message.

Returns
  • ReasonCode
Throws
RcsPersistentStorageException
RcsGenericException
RcsPersistentStorageException

public ContactId getRemoteContact ()

Since: API Level 1.5

Returns the contact

Returns
  • ContactId
Throws
RcsPersistentStorageException
RcsGenericException
RcsPersistentStorageException

public ChatLog.Message.Content.Status getStatus ()

Since: API Level 1.5

Returns the status of the chat message.

Returns
  • Status
Throws
RcsPersistentStorageException
RcsGenericException
RcsPersistentStorageException

public long getTimestamp ()

Since: API Level 1.5

Returns the local time-stamp of when the chat message was sent and/or queued for outgoing messages or the local time-stamp of when the chat message was received for incoming messages.

Returns
  • long
Throws
RcsPersistentStorageException
RcsGenericException
RcsPersistentStorageException

public long getTimestampDelivered ()

Since: API Level 1.5

Returns the local timestamp of when the chat message was delivered for outgoing messages or 0 for incoming messages or it was not yet delivered.

Returns
  • long
Throws
RcsPersistentStorageException
RcsGenericException
RcsPersistentStorageException

public long getTimestampDisplayed ()

Since: API Level 1.5

Returns the local timestamp of when the chat message was displayed for outgoing messages or 0 for incoming messages or it was not yes displayed.

Returns
  • long
Throws
RcsPersistentStorageException
RcsGenericException
RcsPersistentStorageException

public long getTimestampSent ()

Since: API Level 1.5

Returns the local time-stamp of when the chat message was sent and/or queued for outgoing messages or the remote time-stamp of when the chat message was sent for incoming messages.

Returns
  • long
Throws
RcsPersistentStorageException
RcsGenericException
RcsPersistentStorageException

public boolean isExpiredDelivery ()

Since: API Level 1.5

Returns true if delivery for this chat message has expired or false otherwise. Note: false means either that delivery for this chat message has not yet expired, delivery has been successful, delivery expiration has been cleared (see clearMessageDeliveryExpiration) or that this particular chat message is not eligible for delivery expiration in the first place.

Returns
  • boolean
Throws
RcsPersistentStorageException
RcsGenericException
RcsPersistentStorageException

public boolean isRead ()

Since: API Level 1.5

Returns true is this chat message has been marked as read.

Returns
  • boolean
Throws
RcsPersistentStorageException
RcsGenericException
RcsPersistentStorageException