The Developer Preview for Android 11 is now available; test it out and share your feedback.

Builder

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

Builder object to construct the Request object.

Summary

Public constructors

Constructs a builder.

Public methods

ConversationActions.Request

Builds the Request object.

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

Sets a set of extended data to the request.

ConversationActions.Request.Builder
setHints(@Nullable hints: MutableList<String!>?)

Sets the hints to help text classifier to generate actions.

ConversationActions.Request.Builder
setMaxSuggestions(maxSuggestions: Int)

Sets the maximum number of suggestions you want.

ConversationActions.Request.Builder

Sets the type config.

Public constructors

<init>

Builder(@NonNull conversation: MutableList<ConversationActions.Message!>)

Constructs a builder.

Parameters
conversation MutableList<ConversationActions.Message!>: the conversation that the text classifier is going to generate actions for.

Public methods

build

@NonNull fun build(): ConversationActions.Request

Builds the Request object.

setExtras

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

Sets a set of extended data to the request.

setHints

@NonNull fun setHints(@Nullable hints: MutableList<String!>?): ConversationActions.Request.Builder

Sets the hints to help text classifier to generate actions. It could be used to help text classifier to infer what types of actions the caller may be interested in.

setMaxSuggestions

@NonNull fun setMaxSuggestions(maxSuggestions: Int): ConversationActions.Request.Builder

Sets the maximum number of suggestions you want. Value -1 means no restriction and this is the default.

setTypeConfig

@NonNull fun setTypeConfig(@Nullable typeConfig: TextClassifier.EntityConfig?): ConversationActions.Request.Builder

Sets the type config.