TextClassificationContext


public final class TextClassificationContext


A representation of the context in which text classification would be performed.

Summary

Nested types

This class is deprecated.

Use android.view.textclassifier.TextClassificationContext.Builder instead.

Public methods

static @NonNull TextClassificationContext

Extracts a TextClassificationContext from a bundle that was added using toBundle.

@NonNull String

Returns the package name for the calling package.

@NonNull String

Returns the widget type for this classification context.

@Nullable String

Returns a custom version string for the widget type.

@NonNull Bundle

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

String

Public methods

createFromBundle

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

Extracts a TextClassificationContext from a bundle that was added using toBundle.

getPackageName

public @NonNull String getPackageName()

Returns the package name for the calling package.

getWidgetType

public @NonNull String getWidgetType()

Returns the widget type for this classification context.

getWidgetVersion

public @Nullable String getWidgetVersion()

Returns a custom version string for the widget type.

See also
getWidgetType

toBundle

public @NonNull Bundle toBundle()

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

toString

public String toString()