A Visualização do desenvolvedor para Android 11 já está disponível. Teste e compartilhe seu feedback.

ConversationActions

public final class ConversationActions
extends Object

java.lang.Object
   ↳ 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

class ConversationActions.Message

Represents a message in the conversation. 

class ConversationActions.Request

A request object for generating conversation action suggestions. 

Public constructors

ConversationActions(List<ConversationAction> conversationActions, String id)

Constructs a ConversationActions object.

Public methods

static ConversationActions createFromBundle(Bundle bundle)

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

List<ConversationAction> getConversationActions()

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

String getId()

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

Bundle toBundle()

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

Inherited methods

Public constructors

ConversationActions

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

Constructs a ConversationActions object.

Parameters
conversationActions List

id String

Public methods

createFromBundle

public static ConversationActions createFromBundle (Bundle bundle)

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

Parameters
bundle Bundle

Returns
ConversationActions

getConversationActions

public List<ConversationAction> getConversationActions ()

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

Returns
List<ConversationAction>

getId

public String getId ()

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

Returns
String

toBundle

public Bundle toBundle ()

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

Returns
Bundle