Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [Ctors](https://developer.android.com/reference/android/view/textclassifier/TextClassifierEvent.LanguageDetectionEvent.Builder#pubctors) \| [Methods](https://developer.android.com/reference/android/view/textclassifier/TextClassifierEvent.LanguageDetectionEvent.Builder#pubmethods) \| [Inherited Methods](https://developer.android.com/reference/android/view/textclassifier/TextClassifierEvent.LanguageDetectionEvent.Builder#inhmethods)

# TextClassifierEvent.LanguageDetectionEvent.Builder

*** ** * ** ***

` public static final class TextClassifierEvent.LanguageDetectionEvent.Builder `   
` ` ` extends https://developer.android.com/reference/android/view/textclassifier/TextClassifierEvent.Builder<https://developer.android.com/reference/android/view/textclassifier/TextClassifierEvent.LanguageDetectionEvent.Builder> ` ` `

|---|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) |||
| ↳ | [android.view.textclassifier.TextClassifierEvent.Builder](https://developer.android.com/reference/android/view/textclassifier/TextClassifierEvent.Builder)\<[android.view.textclassifier.TextClassifierEvent.LanguageDetectionEvent.Builder](https://developer.android.com/reference/android/view/textclassifier/TextClassifierEvent.LanguageDetectionEvent.Builder)\> ||
|   | ↳ | android.view.textclassifier.TextClassifierEvent.LanguageDetectionEvent.Builder |

<br />

*** ** * ** ***

Builder class for `https://developer.android.com/reference/android/view/textclassifier/TextClassifierEvent.LanguageDetectionEvent`.

## Summary

| ### Public constructors ||
|---|---|
| ` https://developer.android.com/reference/android/view/textclassifier/TextClassifierEvent.LanguageDetectionEvent.Builder#Builder(int)(int eventType) ` Creates a builder for building `https://developer.android.com/reference/android/view/textclassifier/TextClassifierEvent.TextSelectionEvent`s. |

| ### Public methods ||
|---|---|
| ` https://developer.android.com/reference/android/view/textclassifier/TextClassifierEvent.LanguageDetectionEvent` | ` https://developer.android.com/reference/android/view/textclassifier/TextClassifierEvent.LanguageDetectionEvent.Builder#build()() ` Builds and returns a `https://developer.android.com/reference/android/view/textclassifier/TextClassifierEvent.LanguageDetectionEvent`. |

### Inherited methods

From class ` https://developer.android.com/reference/android/view/textclassifier/TextClassifierEvent.Builder ` ` T` ` https://developer.android.com/reference/android/view/textclassifier/TextClassifierEvent.Builder#setActionIndices(int[])(int... actionIndices) `

Sets the indices of the actions involved in this event.
` T` ` https://developer.android.com/reference/android/view/textclassifier/TextClassifierEvent.Builder#setEntityTypes(java.lang.String[])(https://developer.android.com/reference/java/lang/String entityTypes) `

Sets the entity types.
` T` ` https://developer.android.com/reference/android/view/textclassifier/TextClassifierEvent.Builder#setEventContext(android.view.textclassifier.TextClassificationContext)(https://developer.android.com/reference/android/view/textclassifier/TextClassificationContext eventContext) `

Sets the event context.
` T` ` https://developer.android.com/reference/android/view/textclassifier/TextClassifierEvent.Builder#setEventIndex(int)(int eventIndex) `

Sets the index of this event in the series of events it belongs to.
` T` ` https://developer.android.com/reference/android/view/textclassifier/TextClassifierEvent.Builder#setExtras(android.os.Bundle)(https://developer.android.com/reference/android/os/Bundle extras) `

Sets a bundle containing non-structured extra information about the event.
` T` ` https://developer.android.com/reference/android/view/textclassifier/TextClassifierEvent.Builder#setLocale(android.icu.util.ULocale)(https://developer.android.com/reference/android/icu/util/ULocale locale) `

Sets the detected locale.
` T` ` https://developer.android.com/reference/android/view/textclassifier/TextClassifierEvent.Builder#setModelName(java.lang.String)(https://developer.android.com/reference/java/lang/String modelVersion) `

Sets the model name string.
` T` ` https://developer.android.com/reference/android/view/textclassifier/TextClassifierEvent.Builder#setResultId(java.lang.String)(https://developer.android.com/reference/java/lang/String resultId) `

Sets the id of the text classifier result related to this event.
` T` ` https://developer.android.com/reference/android/view/textclassifier/TextClassifierEvent.Builder#setScores(float[])(float... scores) `

Sets the scores of the suggestions.
From class ` https://developer.android.com/reference/java/lang/Object ` ` https://developer.android.com/reference/java/lang/Object` ` https://developer.android.com/reference/java/lang/Object#clone()() `

Creates and returns a copy of this object.
` boolean` ` https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object obj) `

Indicates whether some other object is "equal to" this one.
` void` ` https://developer.android.com/reference/java/lang/Object#finalize()() `

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.
` final https://developer.android.com/reference/java/lang/Class<?>` ` https://developer.android.com/reference/java/lang/Object#getClass()() `

Returns the runtime class of this `Object`.
` int` ` https://developer.android.com/reference/java/lang/Object#hashCode()() `

Returns a hash code value for the object.
` final void` ` https://developer.android.com/reference/java/lang/Object#notify()() `

Wakes up a single thread that is waiting on this object's monitor.
` final void` ` https://developer.android.com/reference/java/lang/Object#notifyAll()() `

Wakes up all threads that are waiting on this object's monitor.
` https://developer.android.com/reference/java/lang/String` ` https://developer.android.com/reference/java/lang/Object#toString()() `

Returns a string representation of the object.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait(long,%20int)(long timeoutMillis, int nanos) `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait(long)(long timeoutMillis) `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait()() `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*.

## Public constructors

### Builder

Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public Builder (int eventType)
```

Creates a builder for building `https://developer.android.com/reference/android/view/textclassifier/TextClassifierEvent.TextSelectionEvent`s.

<br />

| Parameters ||
|---|---|
| `eventType` | `int`: The event type. e.g. `https://developer.android.com/reference/android/view/textclassifier/TextClassifierEvent#TYPE_SMART_ACTION` Value is one of the following: - `https://developer.android.com/reference/android/view/textclassifier/TextClassifierEvent#TYPE_SELECTION_STARTED` - `https://developer.android.com/reference/android/view/textclassifier/TextClassifierEvent#TYPE_SELECTION_MODIFIED` - `https://developer.android.com/reference/android/view/textclassifier/TextClassifierEvent#TYPE_SMART_SELECTION_SINGLE` - `https://developer.android.com/reference/android/view/textclassifier/TextClassifierEvent#TYPE_SMART_SELECTION_MULTI` - `https://developer.android.com/reference/android/view/textclassifier/TextClassifierEvent#TYPE_AUTO_SELECTION` - `https://developer.android.com/reference/android/view/textclassifier/TextClassifierEvent#TYPE_ACTIONS_SHOWN` - `https://developer.android.com/reference/android/view/textclassifier/TextClassifierEvent#TYPE_LINK_CLICKED` - `https://developer.android.com/reference/android/view/textclassifier/TextClassifierEvent#TYPE_OVERTYPE` - `https://developer.android.com/reference/android/view/textclassifier/TextClassifierEvent#TYPE_COPY_ACTION` - `https://developer.android.com/reference/android/view/textclassifier/TextClassifierEvent#TYPE_PASTE_ACTION` - `https://developer.android.com/reference/android/view/textclassifier/TextClassifierEvent#TYPE_CUT_ACTION` - `https://developer.android.com/reference/android/view/textclassifier/TextClassifierEvent#TYPE_SHARE_ACTION` - `https://developer.android.com/reference/android/view/textclassifier/TextClassifierEvent#TYPE_SMART_ACTION` - `https://developer.android.com/reference/android/view/textclassifier/TextClassifierEvent#TYPE_SELECTION_DRAG` - `https://developer.android.com/reference/android/view/textclassifier/TextClassifierEvent#TYPE_SELECTION_DESTROYED` - `https://developer.android.com/reference/android/view/textclassifier/TextClassifierEvent#TYPE_OTHER_ACTION` - `https://developer.android.com/reference/android/view/textclassifier/TextClassifierEvent#TYPE_SELECT_ALL` - `https://developer.android.com/reference/android/view/textclassifier/TextClassifierEvent#TYPE_SELECTION_RESET` - `https://developer.android.com/reference/android/view/textclassifier/TextClassifierEvent#TYPE_MANUAL_REPLY` - `https://developer.android.com/reference/android/view/textclassifier/TextClassifierEvent#TYPE_ACTIONS_GENERATED` - `https://developer.android.com/reference/android/view/textclassifier/TextClassifierEvent#TYPE_LINKS_GENERATED` |

## Public methods

### build

Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public TextClassifierEvent.LanguageDetectionEvent build ()
```

Builds and returns a `https://developer.android.com/reference/android/view/textclassifier/TextClassifierEvent.LanguageDetectionEvent`.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/view/textclassifier/TextClassifierEvent.LanguageDetectionEvent` | This value cannot be `null`. <br /> |