ConversationActions.Message.Builder
public
static
final
class
ConversationActions.Message.Builder
extends Object
java.lang.Object | |
↳ | androidx.textclassifier.ConversationActions.Message.Builder |
Builder class to construct a ConversationActions.Message
Summary
Public constructors | |
---|---|
Builder(Person author)
Constructs a builder. |
Public methods | |
---|---|
ConversationActions.Message
|
build()
Builds the |
ConversationActions.Message.Builder
|
setExtras(Bundle bundle)
Sets a set of extended data to the message. |
ConversationActions.Message.Builder
|
setReferenceTime(Long referenceTime)
Sets the reference time of this message, for example it could be the compose or send time of this message. |
ConversationActions.Message.Builder
|
setText(CharSequence text)
Sets the text of this message. |
Inherited methods | |
---|---|
Public constructors
Builder
public Builder (Person author)
Constructs a builder.
Parameters | |
---|---|
author |
Person : the person that composed the message, use ConversationActions.Message.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
ConversationActions.Message.PERSON_USER_OTHERS to represent a remote user.
|
Public methods
build
public ConversationActions.Message build ()
Builds the ConversationActions.Message
object.
Returns | |
---|---|
ConversationActions.Message |
setExtras
public ConversationActions.Message.Builder setExtras (Bundle bundle)
Sets a set of extended data to the message.
Parameters | |
---|---|
bundle |
Bundle |
Returns | |
---|---|
ConversationActions.Message.Builder |
setReferenceTime
public ConversationActions.Message.Builder setReferenceTime (Long referenceTime)
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.
Parameters | |
---|---|
referenceTime |
Long |
Returns | |
---|---|
ConversationActions.Message.Builder |
setText
public ConversationActions.Message.Builder setText (CharSequence text)
Sets the text of this message.
Parameters | |
---|---|
text |
CharSequence |
Returns | |
---|---|
ConversationActions.Message.Builder |