public class Message
extends java.lang.Object
implements android.os.Parcelable
Modifier and Type | Field and Description |
---|---|
static android.os.Parcelable.Creator<Message> |
CREATOR |
Constructor and Description |
---|
Message(java.lang.String sid,
java.lang.String author,
java.lang.String body,
java.lang.String date,
long messageIndex,
long handle) |
Modifier and Type | Method and Description |
---|---|
int |
describeContents() |
org.json.JSONObject |
getAttributes()
Retrieve attributes associated with this message.
|
java.lang.String |
getAuthor()
The global identity of the author of this message.
|
java.lang.String |
getChannelSid()
Returns the Channel Sid of the channel this message belongs to.
|
java.lang.String |
getMessageBody()
The body for this message.
|
long |
getMessageIndex()
Returns the index number for this message.
|
java.lang.String |
getSid()
Returns the identifier for this message.
|
java.lang.String |
getTimeStamp()
The last updated timestamp for this message.
|
void |
setAttributes(org.json.JSONObject updatedAttributes,
Constants.StatusListener listener)
Change attributes associated with this message.
|
void |
updateMessageBody(java.lang.String body,
Constants.StatusListener listener)
Updates the body for a message.
|
void |
writeToParcel(android.os.Parcel dest,
int flags) |
public static final android.os.Parcelable.Creator<Message> CREATOR
public Message(java.lang.String sid, java.lang.String author, java.lang.String body, java.lang.String date, long messageIndex, long handle)
public java.lang.String getSid()
public java.lang.String getAuthor()
public java.lang.String getTimeStamp()
public java.lang.String getMessageBody()
public void updateMessageBody(java.lang.String body, Constants.StatusListener listener)
body
- The body for the message.listener
- Listener that will receive callback of the result.public java.lang.String getChannelSid()
public long getMessageIndex()
public org.json.JSONObject getAttributes()
public void setAttributes(org.json.JSONObject updatedAttributes, Constants.StatusListener listener)
updatedAttributes
- Message attributes map to fully replace old attributes.listener
- Listener that will receive callback with the result.public int describeContents()
describeContents
in interface android.os.Parcelable
public void writeToParcel(android.os.Parcel dest, int flags)
writeToParcel
in interface android.os.Parcelable