Message
class Message : Parcelable
| kotlin.Any | |
| ↳ | android.view.textclassifier.ConversationActions.Message |
Represents a message in the conversation.
Summary
| Nested classes | |
|---|---|
|
Builder class to construct a |
|
| Inherited constants | |
|---|---|
| Public methods | |
|---|---|
| Int |
Describe the kinds of special objects contained in this Parcelable instance's marshaled representation. |
| Person |
Returns the person that composed the message. |
| Bundle |
Returns the extended data related to this conversation action. |
| ZonedDateTime? |
Returns the reference time of the message, for example it could be the compose or send time of this message. |
| CharSequence? |
getText()Returns the text of the message. |
| Unit |
writeToParcel(parcel: Parcel, flags: Int)Flatten this object in to a Parcel. |
| Properties | |
|---|---|
| static Parcelable.Creator<ConversationActions.Message!> | |
| static Person |
Represents the remote user. |
| static Person |
Represents the local user. |
Public methods
describeContents
fun describeContents(): Int
Describe the kinds of special objects contained in this Parcelable instance's marshaled representation. For example, if the object will include a file descriptor in the output of writeToParcel(android.os.Parcel,int), the return value of this method must include the CONTENTS_FILE_DESCRIPTOR bit.
| Return | |
|---|---|
Int |
a bitmask indicating the set of special object types marshaled by this Parcelable object instance. Value is either 0 or
|
getAuthor
fun getAuthor(): Person
Returns the person that composed the message.
| Return | |
|---|---|
Person |
This value cannot be null. |
getExtras
fun getExtras(): Bundle
Returns the extended data related to this conversation action.
NOTE: Do not modify this bundle.
| Return | |
|---|---|
Bundle |
This value cannot be null. |
getReferenceTime
fun getReferenceTime(): ZonedDateTime?
Returns the reference time of the message, for example it could be the compose or send time of this message.
| Return | |
|---|---|
ZonedDateTime? |
This value may be null. |
getText
fun getText(): CharSequence?
Returns the text of the message.
| Return | |
|---|---|
CharSequence? |
This value may be null. |
writeToParcel
fun writeToParcel(
parcel: Parcel,
flags: Int
): Unit
Flatten this object in to a Parcel.
| Parameters | |
|---|---|
dest |
The Parcel in which the object should be written. This value cannot be null. |
flags |
Int: Additional flags about how the object should be written. May be 0 or PARCELABLE_WRITE_RETURN_VALUE. Value is either 0 or a combination of the following:
|
Properties
PERSON_USER_OTHERS
static val PERSON_USER_OTHERS: Person
Represents the remote user.
If possible, you are suggested to create a Person object that can identify the remote user better, so that the underlying model could differentiate between different remote users.
PERSON_USER_SELF
static val PERSON_USER_SELF: Person
Represents the local user.