Added in API level 29

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 Message

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?

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

Added in API level 29
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

Added in API level 29
fun getAuthor(): Person

Returns the person that composed the message.

Return
Person This value cannot be null.

getExtras

Added in API level 29
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

Added in API level 29
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

Added in API level 29
fun getText(): CharSequence?

Returns the text of the message.

Return
CharSequence? This value may be null.

writeToParcel

Added in API level 29
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

CREATOR

Added in API level 29
static val CREATOR: Parcelable.Creator<ConversationActions.Message!>

PERSON_USER_OTHERS

Added in API level 29
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

Added in API level 29
static val PERSON_USER_SELF: Person

Represents the local user.