Stay organized with collections
Save and categorize content based on your preferences.
Builder
class Builder
Builder class to construct a Message
Summary
Public constructors |
Constructs a builder.
|
Public constructors
Builder
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
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[],null,["# ConversationActions.Message.Builder\n\nAdded in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nBuilder\n=======\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/view/textclassifier/ConversationActions.Message.Builder \"View this page in Java\") \n\n```\nclass Builder\n```\n\n|---|----------------------------------------------------------------------|\n| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) ||\n| ↳ | [android.view.textclassifier.ConversationActions.Message.Builder](#) |\n\nBuilder class to construct a [Message](/reference/kotlin/android/view/textclassifier/ConversationActions.Message)\n\nSummary\n-------\n\n| Public constructors ||\n|---------------------------------------------------------------------------------------------------------------|---|\n| [Builder](#Builder(android.app.Person))`(`author:` `[Person](../../app/Person.html#)`)` Constructs a builder. |\n\n| Public methods ||\n|----------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [ConversationActions.Message](/reference/kotlin/android/view/textclassifier/ConversationActions.Message) | [build](#build())`()` Builds the [Message](/reference/kotlin/android/view/textclassifier/ConversationActions.Message) object. |\n| [ConversationActions.Message.Builder](#) | [setExtras](#setExtras(android.os.Bundle))`(`bundle:` `[Bundle](../../os/Bundle.html#)?`)` Sets a set of extended data to the message. |\n| [ConversationActions.Message.Builder](#) | [setReferenceTime](#setReferenceTime(java.time.ZonedDateTime))`(`referenceTime:` `[ZonedDateTime](../../../java/time/ZonedDateTime.html#)?`)` Sets the reference time of this message, for example it could be the compose or send time of this message. |\n| [ConversationActions.Message.Builder](#) | [setText](#setText(kotlin.CharSequence))`(`text:` `[CharSequence](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-char-sequence/index.html)?`)` Sets the text of this message. |\n\nPublic constructors\n-------------------\n\n### Builder\n\nAdded in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nBuilder(author: Person)\n```\n\nConstructs a builder.\n\n| Parameters ||\n|----------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `author` | [Person](../../app/Person.html#): the person that composed the message, use [PERSON_USER_SELF](/reference/kotlin/android/view/textclassifier/ConversationActions.Message#PERSON_USER_SELF:android.app.Person) 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](/reference/kotlin/android/view/textclassifier/ConversationActions.Message#PERSON_USER_OTHERS:android.app.Person) to represent a remote user. This value cannot be `null`. |\n\nPublic methods\n--------------\n\n### build\n\nAdded in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nfun build(): ConversationActions.Message\n```\n\nBuilds the [Message](/reference/kotlin/android/view/textclassifier/ConversationActions.Message) object.\n\n| Return ||\n|----------------------------------------------------------------------------------------------------------|------------------------------|\n| [ConversationActions.Message](/reference/kotlin/android/view/textclassifier/ConversationActions.Message) | This value cannot be `null`. |\n\n### setExtras\n\nAdded in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nfun setExtras(bundle: Bundle?): ConversationActions.Message.Builder\n```\n\nSets a set of extended data to the message.\n\n| Parameters ||\n|----------|-------------------------------------------------------------|\n| `bundle` | [Bundle](../../os/Bundle.html#)?: This value may be `null`. |\n\n| Return ||\n|------------------------------------------|------------------------------|\n| [ConversationActions.Message.Builder](#) | This value cannot be `null`. |\n\n### setReferenceTime\n\nAdded in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nfun setReferenceTime(referenceTime: ZonedDateTime?): ConversationActions.Message.Builder\n```\n\nSets the reference time of this message, for example it could be the compose or send time of this message.\n\n| Parameters ||\n|-----------------|-------------------------------------------------------------------------------------|\n| `referenceTime` | [ZonedDateTime](../../../java/time/ZonedDateTime.html#)?: This value may be `null`. |\n\n| Return ||\n|------------------------------------------|------------------------------|\n| [ConversationActions.Message.Builder](#) | This value cannot be `null`. |\n\n### setText\n\nAdded in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nfun setText(text: CharSequence?): ConversationActions.Message.Builder\n```\n\nSets the text of this message.\n\n| Parameters ||\n|--------|---------------------------------------------------------------------------------------------------------------------------|\n| `text` | [CharSequence](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-char-sequence/index.html)?: This value may be `null`. |\n\n| Return ||\n|------------------------------------------|------------------------------|\n| [ConversationActions.Message.Builder](#) | This value cannot be `null`. |"]]