Google is committed to advancing racial equity for Black communities. See how.

Builder

class Builder
kotlin.Any
   ↳ androidx.textclassifier.ConversationActions.Message.Builder

Builder class to construct a Message

Summary

Public constructors
<init>(@NonNull author: Person)

Constructs a builder.

Public methods
ConversationActions.Message

Builds the Message object.

ConversationActions.Message.Builder
setExtras(@Nullable bundle: Bundle?)

Sets a set of extended data to the message.

ConversationActions.Message.Builder
setReferenceTime(@Nullable referenceTime: Long?)

Sets the reference time of this message, for example it could be the compose or send time of this message.

ConversationActions.Message.Builder
setText(@Nullable text: CharSequence?)

Sets the text of this message.

Public constructors

<init>

Builder(@NonNull author: Person)

Constructs a builder.

Parameters
author Person: the person that composed the message, use PERSON_USER_SELF to represent the local user. If it is not possible to identify the remote user that the local user is conversing with, use PERSON_USER_OTHERS to represent a remote user.

Public methods

build

@NonNull fun build(): ConversationActions.Message

Builds the Message object.

setExtras

@NonNull fun setExtras(@Nullable bundle: Bundle?): ConversationActions.Message.Builder

Sets a set of extended data to the message.

setReferenceTime

@NonNull fun setReferenceTime(@Nullable referenceTime: Long?): ConversationActions.Message.Builder

Sets the reference time of this message, for example it could be the compose or send time of this message. This should be milliseconds from the epoch of 1970-01-01T00:00:00Z(UTC timezone). If no reference time or null is set, now is used.

setText

@NonNull fun setText(@Nullable text: CharSequence?): ConversationActions.Message.Builder

Sets the text of this message.