ConversationActions.Request

public final class ConversationActions.Request


A request object for generating conversation action suggestions.

Summary

Nested types

This class is deprecated.

Use android.view.textclassifier.ConversationActions.Request.Builder instead.

Constants

static final String
HINT_FOR_IN_APP = "in_app"

To indicate the generated actions will be used within the app.

static final String
HINT_FOR_NOTIFICATION = "notification"

To indicate the generated actions will be used for notification.

Public methods

static @NonNull ConversationActions.Request

Converts a bundle that was created using toBundle to a ConversationActions.Request.

@NonNull List<ConversationActions.Message>

Returns an immutable list of messages that make up the conversation.

@NonNull Bundle

Returns the extended data related to this request.

@NonNull List<String>

Returns an immutable list of hints

@IntRange(from = "-1") int

Return the maximal number of suggestions the caller wants, value -1 means no restriction and this is the default.

@NonNull TextClassifier.EntityConfig

Returns the type config.

@NonNull Bundle

Adds this object to a Bundle that can be read back with the same parameters to createFromBundle.

Constants

HINT_FOR_IN_APP

public static final String HINT_FOR_IN_APP = "in_app"

To indicate the generated actions will be used within the app.

HINT_FOR_NOTIFICATION

public static final String HINT_FOR_NOTIFICATION = "notification"

To indicate the generated actions will be used for notification.

Public methods

createFromBundle

public static @NonNull ConversationActions.Request createFromBundle(@NonNull Bundle bundle)

Converts a bundle that was created using toBundle to a ConversationActions.Request.

getConversation

public @NonNull List<ConversationActions.MessagegetConversation()

Returns an immutable list of messages that make up the conversation.

getExtras

public @NonNull Bundle getExtras()

Returns the extended data related to this request.

NOTE: Do not modify this bundle.

getHints

public @NonNull List<StringgetHints()

Returns an immutable list of hints

getMaxSuggestions

public @IntRange(from = "-1") int getMaxSuggestions()

Return the maximal number of suggestions the caller wants, value -1 means no restriction and this is the default.

getTypeConfig

public @NonNull TextClassifier.EntityConfig getTypeConfig()

Returns the type config.

toBundle

public @NonNull Bundle toBundle()

Adds this object to a Bundle that can be read back with the same parameters to createFromBundle.