ConversationActions


public final class ConversationActions


Represents a list of actions suggested by a TextClassifier on a given conversation.

This is an object to store the result of suggestConversationActions.

Summary

Nested types

public final class ConversationActions.Message

Represents a message in the conversation.

This class is deprecated.

Use android.view.textclassifier.ConversationAction.Builder instead.

public final class ConversationActions.Request

This class is deprecated.

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

This class is deprecated.

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

Public constructors

ConversationActions(
    @NonNull List<ConversationAction> conversationActions,
    @Nullable String id
)

Constructs a ConversationActions object.

Public methods

static @NonNull ConversationActions

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

@NonNull List<ConversationAction>

Returns an immutable list of ConversationAction objects, which are ordered from high confidence to low confidence.

@Nullable String

Returns the id, if one exists, for this object.

@NonNull Bundle

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

Public constructors

ConversationActions

public ConversationActions(
    @NonNull List<ConversationAction> conversationActions,
    @Nullable String id
)

Constructs a ConversationActions object.

Public methods

createFromBundle

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

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

getConversationActions

public @NonNull List<ConversationActiongetConversationActions()

Returns an immutable list of ConversationAction objects, which are ordered from high confidence to low confidence.

getId

public @Nullable String getId()

Returns the id, if one exists, for this object.

toBundle

public @NonNull Bundle toBundle()

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