# Print output for @column tags ?>
Developers

- Design
- Develop
- Distribute

Developer Console

## Most visited

## Recently visited

## Results for

Summary: Nested Classes | Constants | Inherited Constants | Fields | Methods | Inherited Methods

# TextClassifierEvent

`public abstract class TextClassifierEvent`
`extends Object` `implements Parcelable`

java.lang.Object
↳ | android.view.textclassifier.TextClassifierEvent

Known direct subclasses TextClassifierEvent.ConversationActionsEvent, TextClassifierEvent.LanguageDetectionEvent, TextClassifierEvent.TextLinkifyEvent, TextClassifierEvent.TextSelectionEvent
TextClassifierEvent.ConversationActionsEvent | This class represents events that are related to the conversation actions feature.
TextClassifierEvent.LanguageDetectionEvent | This class represents events that are related to the language detection feature.
TextClassifierEvent.TextLinkifyEvent | This class represents events that are related to the smart linkify feature.
TextClassifierEvent.TextSelectionEvent | This class represents events that are related to the smart text selection feature.

This class represents events that are sent by components to the `TextClassifier` to report something of note that relates to a feature powered by the TextClassifier. The TextClassifier may log these events or use them to improve future responses to queries.

Each category of events has its their own subclass. Events of each type have an associated set of related properties. You can find their specification in the subclasses.

## Summary

### Nested classes
`class` | `TextClassifierEvent.Builder<T extends Builder<T>>` Builder to build a text classifier event.
`class` | `TextClassifierEvent.ConversationActionsEvent` This class represents events that are related to the conversation actions feature.
`class` | `TextClassifierEvent.LanguageDetectionEvent` This class represents events that are related to the language detection feature.
`class` | `TextClassifierEvent.TextLinkifyEvent` This class represents events that are related to the smart linkify feature.
`class` | `TextClassifierEvent.TextSelectionEvent` This class represents events that are related to the smart text selection feature.

### Constants
`int` | `CATEGORY_CONVERSATION_ACTIONS` Conversation actions
`int` | `CATEGORY_LANGUAGE_DETECTION` Language detection
`int` | `CATEGORY_LINKIFY` Linkify
`int` | `CATEGORY_SELECTION` Smart selection
`int` | `TYPE_ACTIONS_GENERATED` TextClassifier generated some actions
`int` | `TYPE_ACTIONS_SHOWN` Smart actions shown to the user.
`int` | `TYPE_AUTO_SELECTION` Something else other than user or the default TextClassifier triggered a selection.
`int` | `TYPE_COPY_ACTION` User clicked on Copy action.
`int` | `TYPE_CUT_ACTION` User clicked on Cut action.
`int` | `TYPE_LINKS_GENERATED` Some text links were generated.
`int` | `TYPE_LINK_CLICKED` User clicked a link.
`int` | `TYPE_MANUAL_REPLY` User composed a reply.
`int` | `TYPE_OTHER_ACTION` User clicked on a custom action.
`int` | `TYPE_OVERTYPE` User typed over the selection.
`int` | `TYPE_PASTE_ACTION` User clicked on Paste action.
`int` | `TYPE_SELECTION_DESTROYED` Selection is destroyed.
`int` | `TYPE_SELECTION_DRAG` User dragged+dropped the selection.
`int` | `TYPE_SELECTION_MODIFIED` User modified an existing selection.
`int` | `TYPE_SELECTION_RESET` User reset the smart selection.
`int` | `TYPE_SELECTION_STARTED` User started a new selection.
`int` | `TYPE_SELECT_ALL` User clicked on Select All action
`int` | `TYPE_SHARE_ACTION` User clicked on Share action.
`int` | `TYPE_SMART_ACTION` User clicked on a Smart action.
`int` | `TYPE_SMART_SELECTION_MULTI` Smart selection triggered spanning multiple tokens (words).
`int` | `TYPE_SMART_SELECTION_SINGLE` Smart selection triggered for a single token (word).

### Inherited constants
From interface `android.os.Parcelable`
`int` | `CONTENTS_FILE_DESCRIPTOR` Descriptor bit used with `describeContents()`: indicates that the Parcelable object's flattened representation includes a file descriptor.
`int` | `PARCELABLE_WRITE_RETURN_VALUE` Flag for use with `writeToParcel(Parcel, int)`: the object being written is a return value, that is the result of a function such as "`Parcelable someFunction()`", "`void someFunction(out Parcelable)`", or "`void someFunction(inout Parcelable)`".

### Fields
`public static final Creator<TextClassifierEvent>` | `CREATOR`

### Public methods
`int` | `describeContents()` Describe the kinds of special objects contained in this Parcelable instance's marshaled representation.
`int[]` | `getActionIndices()` Returns the indices of the actions relating to this event.
`String[]` | `getEntityTypes()` Returns an array of entity types.
`int` | `getEventCategory()` Returns the event category.
`TextClassificationContext` | `getEventContext()` Returns the event context.
`int` | `getEventIndex()` Returns the index of this event in the series of event it belongs to.
`int` | `getEventType()` Returns the event type.
`Bundle` | `getExtras()` Returns a bundle containing non-structured extra information about this event.
`ULocale` | `getLocale()` Returns the detected locale.
`String` | `getModelName()` Returns the model name.
`String` | `getResultId()` Returns the id of the text classifier result related to this event.
`float[]` | `getScores()` Returns the scores of the suggestions.
`String` | `toString()` Returns a string representation of the object.
`void` | `writeToParcel(Parcel dest, int flags)` Flatten this object in to a Parcel.

### Inherited methods
From class `java.lang.Object`
`Object` | `clone()` Creates and returns a copy of this object.
`boolean` | `equals(Object obj)` Indicates whether some other object is "equal to" this one.
`void` | `finalize()` Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.
`final Class<?>` | `getClass()` Returns the runtime class of this `Object`.
`int` | `hashCode()` Returns a hash code value for the object.
`final void` | `notify()` Wakes up a single thread that is waiting on this object's monitor.
`final void` | `notifyAll()` Wakes up all threads that are waiting on this object's monitor.
`String` | `toString()` Returns a string representation of the object.
`final void` | `wait(long timeout, int nanos)` Causes the current thread to wait until another thread invokes the `notify()` method or the `notifyAll()` method for this object, or some other thread interrupts the current thread, or a certain amount of real time has elapsed.
`final void` | `wait(long timeout)` Causes the current thread to wait until either another thread invokes the `notify()` method or the `notifyAll()` method for this object, or a specified amount of time has elapsed.
`final void` | `wait()` Causes the current thread to wait until another thread invokes the `notify()` method or the `notifyAll()` method for this object.
From interface `android.os.Parcelable`
`abstract int` | `describeContents()` Describe the kinds of special objects contained in this Parcelable instance's marshaled representation.
`abstract void` | `writeToParcel(Parcel dest, int flags)` Flatten this object in to a Parcel.

## Constants

### CATEGORY_CONVERSATION_ACTIONS

    public static final int CATEGORY_CONVERSATION_ACTIONS

Conversation actions

See also:

- `TextClassifierEvent.ConversationActionsEvent`

Constant Value: 3 (0x00000003)

### CATEGORY_LANGUAGE_DETECTION

    public static final int CATEGORY_LANGUAGE_DETECTION

Language detection

See also:

- `TextClassifierEvent.LanguageDetectionEvent`

Constant Value: 4 (0x00000004)

### CATEGORY_LINKIFY

    public static final int CATEGORY_LINKIFY

Linkify

See also:

- `TextClassifierEvent.TextLinkifyEvent`

Constant Value: 2 (0x00000002)

### CATEGORY_SELECTION

    public static final int CATEGORY_SELECTION

Smart selection

See also:

- `TextClassifierEvent.TextSelectionEvent`

Constant Value: 1 (0x00000001)

### TYPE_ACTIONS_GENERATED

    public static final int TYPE_ACTIONS_GENERATED

TextClassifier generated some actions

Constant Value: 20 (0x00000014)

### TYPE_ACTIONS_SHOWN

    public static final int TYPE_ACTIONS_SHOWN

Smart actions shown to the user.

Constant Value: 6 (0x00000006)

### TYPE_AUTO_SELECTION

    public static final int TYPE_AUTO_SELECTION

Something else other than user or the default TextClassifier triggered a selection.

Constant Value: 5 (0x00000005)

### TYPE_COPY_ACTION

    public static final int TYPE_COPY_ACTION

User clicked on Copy action.

Constant Value: 9 (0x00000009)

### TYPE_CUT_ACTION

    public static final int TYPE_CUT_ACTION

User clicked on Cut action.

Constant Value: 11 (0x0000000b)

### TYPE_LINKS_GENERATED

    public static final int TYPE_LINKS_GENERATED

Some text links were generated.

Constant Value: 21 (0x00000015)

### TYPE_LINK_CLICKED

    public static final int TYPE_LINK_CLICKED

User clicked a link.

Constant Value: 7 (0x00000007)

### TYPE_MANUAL_REPLY

    public static final int TYPE_MANUAL_REPLY

User composed a reply.

Constant Value: 19 (0x00000013)

### TYPE_OTHER_ACTION

    public static final int TYPE_OTHER_ACTION

User clicked on a custom action.

Constant Value: 16 (0x00000010)

### TYPE_OVERTYPE

    public static final int TYPE_OVERTYPE

User typed over the selection.

Constant Value: 8 (0x00000008)

### TYPE_PASTE_ACTION

    public static final int TYPE_PASTE_ACTION

User clicked on Paste action.

Constant Value: 10 (0x0000000a)

### TYPE_SELECTION_DESTROYED

    public static final int TYPE_SELECTION_DESTROYED

Selection is destroyed.

Constant Value: 15 (0x0000000f)

### TYPE_SELECTION_DRAG

    public static final int TYPE_SELECTION_DRAG

User dragged+dropped the selection.

Constant Value: 14 (0x0000000e)

### TYPE_SELECTION_MODIFIED

    public static final int TYPE_SELECTION_MODIFIED

User modified an existing selection.

Constant Value: 2 (0x00000002)

### TYPE_SELECTION_RESET

    public static final int TYPE_SELECTION_RESET

User reset the smart selection.

Constant Value: 18 (0x00000012)

### TYPE_SELECTION_STARTED

    public static final int TYPE_SELECTION_STARTED

User started a new selection.

Constant Value: 1 (0x00000001)

### TYPE_SELECT_ALL

    public static final int TYPE_SELECT_ALL

User clicked on Select All action

Constant Value: 17 (0x00000011)

### TYPE_SHARE_ACTION

    public static final int TYPE_SHARE_ACTION

User clicked on Share action.

Constant Value: 12 (0x0000000c)

### TYPE_SMART_ACTION

    public static final int TYPE_SMART_ACTION

User clicked on a Smart action.

Constant Value: 13 (0x0000000d)

### TYPE_SMART_SELECTION_MULTI

    public static final int TYPE_SMART_SELECTION_MULTI

Smart selection triggered spanning multiple tokens (words).

Constant Value: 4 (0x00000004)

### TYPE_SMART_SELECTION_SINGLE

    public static final int TYPE_SMART_SELECTION_SINGLE

Smart selection triggered for a single token (word).

Constant Value: 3 (0x00000003)

## Fields

### CREATOR

    public static final Creator<TextClassifierEvent> CREATOR

## Public methods

### describeContents

    public int describeContents ()

Describe the kinds of special objects contained in this Parcelable instance's marshaled representation. For example, if the object will include a file descriptor in the output of `writeToParcel(android.os.Parcel, int)`, the return value of this method must include the `CONTENTS_FILE_DESCRIPTOR` bit.

Returns
`int` | a bitmask indicating the set of special object types marshaled by this Parcelable object instance. Value is either `0` or `CONTENTS_FILE_DESCRIPTOR`

### getActionIndices

    public int[] getActionIndices ()

Returns the indices of the actions relating to this event. Actions are usually returned by the text classifier in priority order with the most preferred action at index 0. This list gives an indication of the position of the actions that are being reported.

Returns
`int[]` | This value cannot be `null`.

See also:

- `TextClassifierEvent.Builder.setActionIndices(int)`

### getEntityTypes

    public String[] getEntityTypes ()

Returns an array of entity types. e.g. `TextClassifier#TYPE_ADDRESS`.

Returns
`String[]` | This value cannot be `null`.

See also:

- `for supported types.`

### getEventCategory

    public int getEventCategory ()

Returns the event category. e.g. `CATEGORY_SELECTION`.

Returns
`int` | Value is `CATEGORY_SELECTION`, `CATEGORY_LINKIFY`, `CATEGORY_CONVERSATION_ACTIONS`, or `CATEGORY_LANGUAGE_DETECTION`

### getEventContext

    public TextClassificationContext getEventContext ()

Returns the event context.

Returns
`TextClassificationContext` | This value may be `null`.

### getEventIndex

    public int getEventIndex ()

Returns the index of this event in the series of event it belongs to.

Returns
`int` |

### getEventType

    public int getEventType ()

Returns the event type. e.g. `TYPE_SELECTION_STARTED`.

Returns
`int` | Value is `TYPE_SELECTION_STARTED`, `TYPE_SELECTION_MODIFIED`, `TYPE_SMART_SELECTION_SINGLE`, `TYPE_SMART_SELECTION_MULTI`, `TYPE_AUTO_SELECTION`, `TYPE_ACTIONS_SHOWN`, `TYPE_LINK_CLICKED`, `TYPE_OVERTYPE`, `TYPE_COPY_ACTION`, `TYPE_PASTE_ACTION`, `TYPE_CUT_ACTION`, `TYPE_SHARE_ACTION`, `TYPE_SMART_ACTION`, `TYPE_SELECTION_DRAG`, `TYPE_SELECTION_DESTROYED`, `TYPE_OTHER_ACTION`, `TYPE_SELECT_ALL`, `TYPE_SELECTION_RESET`, `TYPE_MANUAL_REPLY`, `TYPE_ACTIONS_GENERATED`, `TYPE_LINKS_GENERATED`, or android.view.textclassifier.TextClassifierEvent.TYPE_READ_CLIPBOARD

### getExtras

    public Bundle getExtras ()

Returns a bundle containing non-structured extra information about this event.

NOTE: Do not modify this bundle.

Returns
`Bundle` | This value cannot be `null`.

### getLocale

    public ULocale getLocale ()

Returns the detected locale.

Returns
`ULocale` | This value may be `null`.

### getModelName

    public String getModelName ()

Returns the model name.

Returns
`String` | This value may be `null`.

### getResultId

    public String getResultId ()

Returns the id of the text classifier result related to this event.

Returns
`String` | This value may be `null`.

### getScores

    public float[] getScores ()

Returns the scores of the suggestions.

Returns
`float[]` | This value cannot be `null`.

### toString

    public String toString ()

Returns a string representation of the object. In general, the `toString` method returns a string that "textually represents" this object. The result should be a concise but informative representation that is easy for a person to read. It is recommended that all subclasses override this method.

The `toString` method for class `Object` returns a string consisting of the name of the class of which the object is an instance, the at-sign character ``@`', and the unsigned hexadecimal representation of the hash code of the object. In other words, this method returns a string equal to the value of:

>      getClass().getName() + '@' + Integer.toHexString(hashCode())

Returns
`String` | a string representation of the object.

### writeToParcel

    public void writeToParcel (Parcel dest,
                    int flags)

Flatten this object in to a Parcel.

Parameters
`dest` | `Parcel`: The Parcel in which the object should be written.
`flags` | `int`: Additional flags about how the object should be written. May be 0 or `Parcelable.PARCELABLE_WRITE_RETURN_VALUE`. Value is either `0` or a combination of `Parcelable.PARCELABLE_WRITE_RETURN_VALUE`, and android.os.Parcelable.PARCELABLE_ELIDE_DUPLICATES

Full name *
Email address *
Company / developer name
One of your Play Store app URLs *
Which best describes your business:*
Apps
Games
Apps & Games
*
*