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 | |
| 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) |
| Properties | |
|---|---|
| static Parcelable.Creator<ConversationActions.Message!> | |
| static Person |
Represents the remote user. |
| static Person |
Represents the local user. |
Public methods
describeContents
fun describeContents(): Int
| Return | |
|---|---|
Int |
a bitmask indicating the set of special object types marshaled by this Parcelable object instance. Value is either 0 or android.os.Parcelable#CONTENTS_FILE_DESCRIPTOR |
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
| 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 android.os.Parcelable#PARCELABLE_WRITE_RETURN_VALUE, and android.os.Parcelable.PARCELABLE_ELIDE_DUPLICATES |
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.