Added in API level 29

Builder


class Builder
kotlin.Any
   ↳ android.view.textclassifier.ConversationActions.Message.Builder

Builder class to construct a Message

Summary

Public constructors
Builder(author: Person)

Constructs a builder.

Public methods
ConversationActions.Message

Builds the Message object.

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

Sets a set of extended data to the message.

ConversationActions.Message.Builder

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

ConversationActions.Message.Builder

Sets the text of this message.

Public constructors

Builder

Added in API level 29
Builder(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. This value cannot be null.

Public methods

build

Added in API level 29
fun build(): ConversationActions.Message

Builds the Message object.

Return
ConversationActions.Message This value cannot be null.

setExtras

Added in API level 29
fun setExtras(bundle: Bundle?): ConversationActions.Message.Builder

Sets a set of extended data to the message.

Parameters
bundle Bundle?: This value may be null.
Return
ConversationActions.Message.Builder This value cannot be null.

setReferenceTime

Added in API level 29
fun setReferenceTime(referenceTime: ZonedDateTime?): ConversationActions.Message.Builder

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

Parameters
referenceTime ZonedDateTime?: This value may be null.
Return
ConversationActions.Message.Builder This value cannot be null.

setText

Added in API level 29
fun setText(text: CharSequence?): ConversationActions.Message.Builder

Sets the text of this message.

Parameters
text CharSequence?: This value may be null.
Return
ConversationActions.Message.Builder This value cannot be null.