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

ConversationActions

class ConversationActions
kotlin.Any
   ↳ androidx.textclassifier.ConversationActions

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

This is an object to store the result of TextClassifier#suggestConversationActions(Request).

Summary

Nested classes

Represents a message in the conversation.

A request object for generating conversation action suggestions.

Public constructors

<init>(@NonNull conversationActions: MutableList<ConversationAction!>, @Nullable id: String?)

Constructs a ConversationActions object.

Public methods

static ConversationActions
createFromBundle(@NonNull bundle: Bundle)

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

MutableList<ConversationAction!>

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

String?

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

Bundle

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

Public constructors

<init>

ConversationActions(
    @NonNull conversationActions: MutableList<ConversationAction!>,
    @Nullable id: String?)

Constructs a ConversationActions object.

Public methods

createFromBundle

@NonNull static fun createFromBundle(@NonNull bundle: Bundle): ConversationActions

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

getConversationActions

@NonNull fun getConversationActions(): MutableList<ConversationAction!>

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

getId

@Nullable fun getId(): String?

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

toBundle

@NonNull fun toBundle(): Bundle

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