# InputMethodService.InputMethodSessionImpl

Added in[API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Summary:[Ctors](https://developer.android.com/reference/android/inputmethodservice/InputMethodService.InputMethodSessionImpl#pubctors)\|[Methods](https://developer.android.com/reference/android/inputmethodservice/InputMethodService.InputMethodSessionImpl#pubmethods)\|[Inherited Methods](https://developer.android.com/reference/android/inputmethodservice/InputMethodService.InputMethodSessionImpl#inhmethods)  

# InputMethodService.InputMethodSessionImpl

*** ** * ** ***

[Kotlin](https://developer.android.com/reference/kotlin/android/inputmethodservice/InputMethodService.InputMethodSessionImpl "View this page in Kotlin")\|Java

`
public


class
InputMethodService.InputMethodSessionImpl
`  
`


``

extends `[AbstractInputMethodService.AbstractInputMethodSessionImpl](https://developer.android.com/reference/android/inputmethodservice/AbstractInputMethodService.AbstractInputMethodSessionImpl)`


``


`

|---|---|----------------------------------------------------------------------|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) |||
| ↳ | [android.inputmethodservice.AbstractInputMethodService.AbstractInputMethodSessionImpl](https://developer.android.com/reference/android/inputmethodservice/AbstractInputMethodService.AbstractInputMethodSessionImpl) ||
|   | ↳ | android.inputmethodservice.InputMethodService.InputMethodSessionImpl |

<br />

*** ** * ** ***

Concrete implementation of[AbstractInputMethodService.AbstractInputMethodSessionImpl](https://developer.android.com/reference/android/inputmethodservice/AbstractInputMethodService.AbstractInputMethodSessionImpl)that provides all of the standard behavior for an input method session.

## Summary

|                                                                          ### Public constructors                                                                           ||
|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| ` `[InputMethodSessionImpl](https://developer.android.com/reference/android/inputmethodservice/InputMethodService.InputMethodSessionImpl#InputMethodSessionImpl())`() ` |

|                                                                                                                                                                                                                                                                                                                                                                                                        ### Public methods                                                                                                                                                                                                                                                                                                                                                                                                         ||
|---------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` void` | ` `[appPrivateCommand](https://developer.android.com/reference/android/inputmethodservice/InputMethodService.InputMethodSessionImpl#appPrivateCommand(java.lang.String,%20android.os.Bundle))`(`[String](https://developer.android.com/reference/java/lang/String)` action, `[Bundle](https://developer.android.com/reference/android/os/Bundle)` data) ` Call[InputMethodService.onAppPrivateCommand()](https://developer.android.com/reference/android/inputmethodservice/InputMethodService#onAppPrivateCommand(java.lang.String,%20android.os.Bundle)).                                                                                                                                                                                                                                                              |
| ` void` | ` `[displayCompletions](https://developer.android.com/reference/android/inputmethodservice/InputMethodService.InputMethodSessionImpl#displayCompletions(android.view.inputmethod.CompletionInfo[]))`(`[CompletionInfo[]](https://developer.android.com/reference/android/view/inputmethod/CompletionInfo)` completions) ` Call[InputMethodService.onDisplayCompletions()](https://developer.android.com/reference/android/inputmethodservice/InputMethodService#onDisplayCompletions(android.view.inputmethod.CompletionInfo[])).                                                                                                                                                                                                                                                                                        |
| ` void` | ` `[finishInput](https://developer.android.com/reference/android/inputmethodservice/InputMethodService.InputMethodSessionImpl#finishInput())`() `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| ` void` | ` `[toggleSoftInput](https://developer.android.com/reference/android/inputmethodservice/InputMethodService.InputMethodSessionImpl#toggleSoftInput(int,%20int))`(int showFlags, int hideFlags) ` *This method is deprecated. Starting in[Build.VERSION_CODES.S](https://developer.android.com/reference/android/os/Build.VERSION_CODES#S)the system no longer invokes this method, instead it explicitly shows or hides the IME. An`InputMethodService`wishing to toggle its own visibility should instead invoke[InputMethodService.requestShowSelf(int)](https://developer.android.com/reference/android/inputmethodservice/InputMethodService#requestShowSelf(int))or[InputMethodService.requestHideSelf](https://developer.android.com/reference/android/inputmethodservice/InputMethodService#requestHideSelf(int))* |
| ` void` | ` `[updateCursor](https://developer.android.com/reference/android/inputmethodservice/InputMethodService.InputMethodSessionImpl#updateCursor(android.graphics.Rect))`(`[Rect](https://developer.android.com/reference/android/graphics/Rect)` newCursor) ` Call[InputMethodService.onUpdateCursor()](https://developer.android.com/reference/android/inputmethodservice/InputMethodService#onUpdateCursor(android.graphics.Rect)).                                                                                                                                                                                                                                                                                                                                                                                        |
| ` void` | ` `[updateCursorAnchorInfo](https://developer.android.com/reference/android/inputmethodservice/InputMethodService.InputMethodSessionImpl#updateCursorAnchorInfo(android.view.inputmethod.CursorAnchorInfo))`(`[CursorAnchorInfo](https://developer.android.com/reference/android/view/inputmethod/CursorAnchorInfo)` info) ` Call[InputMethodService.onUpdateCursorAnchorInfo()](https://developer.android.com/reference/android/inputmethodservice/InputMethodService#onUpdateCursorAnchorInfo(android.view.inputmethod.CursorAnchorInfo)).                                                                                                                                                                                                                                                                             |
| ` void` | ` `[updateExtractedText](https://developer.android.com/reference/android/inputmethodservice/InputMethodService.InputMethodSessionImpl#updateExtractedText(int,%20android.view.inputmethod.ExtractedText))`(int token, `[ExtractedText](https://developer.android.com/reference/android/view/inputmethod/ExtractedText)` text) ` Call[InputMethodService.onUpdateExtractedText()](https://developer.android.com/reference/android/inputmethodservice/InputMethodService#onUpdateExtractedText(int,%20android.view.inputmethod.ExtractedText)).                                                                                                                                                                                                                                                                            |
| ` void` | ` `[updateSelection](https://developer.android.com/reference/android/inputmethodservice/InputMethodService.InputMethodSessionImpl#updateSelection(int,%20int,%20int,%20int,%20int,%20int))`(int oldSelStart, int oldSelEnd, int newSelStart, int newSelEnd, int candidatesStart, int candidatesEnd) ` Call[InputMethodService.onUpdateSelection()](https://developer.android.com/reference/android/inputmethodservice/InputMethodService#onUpdateSelection(int,%20int,%20int,%20int,%20int,%20int)).                                                                                                                                                                                                                                                                                                                     |
| ` void` | ` `[viewClicked](https://developer.android.com/reference/android/inputmethodservice/InputMethodService.InputMethodSessionImpl#viewClicked(boolean))`(boolean focusChanged) `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |

| ### Inherited methods |
|-----------------------|---|
| From class` `[android.inputmethodservice.AbstractInputMethodService.AbstractInputMethodSessionImpl](https://developer.android.com/reference/android/inputmethodservice/AbstractInputMethodService.AbstractInputMethodSessionImpl)` ` |------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` void`    | ` `[dispatchGenericMotionEvent](https://developer.android.com/reference/android/inputmethodservice/AbstractInputMethodService.AbstractInputMethodSessionImpl#dispatchGenericMotionEvent(int,%20android.view.MotionEvent,%20android.view.inputmethod.InputMethodSession.EventCallback))`(int seq, `[MotionEvent](https://developer.android.com/reference/android/view/MotionEvent)` event, `[InputMethodSession.EventCallback](https://developer.android.com/reference/android/view/inputmethod/InputMethodSession.EventCallback)` callback) ` Take care of dispatching incoming generic motion events to the appropriate callbacks on the service, and tell the client when this is done. | | ` void`    | ` `[dispatchKeyEvent](https://developer.android.com/reference/android/inputmethodservice/AbstractInputMethodService.AbstractInputMethodSessionImpl#dispatchKeyEvent(int,%20android.view.KeyEvent,%20android.view.inputmethod.InputMethodSession.EventCallback))`(int seq, `[KeyEvent](https://developer.android.com/reference/android/view/KeyEvent)` event, `[InputMethodSession.EventCallback](https://developer.android.com/reference/android/view/inputmethod/InputMethodSession.EventCallback)` callback) ` Take care of dispatching incoming key events to the appropriate callbacks on the service, and tell the client when this is done.                                         | | ` void`    | ` `[dispatchTrackballEvent](https://developer.android.com/reference/android/inputmethodservice/AbstractInputMethodService.AbstractInputMethodSessionImpl#dispatchTrackballEvent(int,%20android.view.MotionEvent,%20android.view.inputmethod.InputMethodSession.EventCallback))`(int seq, `[MotionEvent](https://developer.android.com/reference/android/view/MotionEvent)` event, `[InputMethodSession.EventCallback](https://developer.android.com/reference/android/view/inputmethod/InputMethodSession.EventCallback)` callback) ` Take care of dispatching incoming trackball events to the appropriate callbacks on the service, and tell the client when this is done.              | | ` boolean` | ` `[isEnabled](https://developer.android.com/reference/android/inputmethodservice/AbstractInputMethodService.AbstractInputMethodSessionImpl#isEnabled())`() ` Check whether this session has been enabled by the system.                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | | ` boolean` | ` `[isRevoked](https://developer.android.com/reference/android/inputmethodservice/AbstractInputMethodService.AbstractInputMethodSessionImpl#isRevoked())`() ` Check whether this session has been revoked by the system.                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | | ` boolean` | ` `[onShouldVerifyKeyEvent](https://developer.android.com/reference/android/inputmethodservice/AbstractInputMethodService.AbstractInputMethodSessionImpl#onShouldVerifyKeyEvent(android.view.KeyEvent))`(`[KeyEvent](https://developer.android.com/reference/android/view/KeyEvent)` event) ` <br />                                                                                                                                                                                                                                                                                                                                                                                      | | ` void`    | ` `[revokeSelf](https://developer.android.com/reference/android/inputmethodservice/AbstractInputMethodService.AbstractInputMethodSessionImpl#revokeSelf())`() ` Revoke the session from the client.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       | | ` void`    | ` `[setEnabled](https://developer.android.com/reference/android/inputmethodservice/AbstractInputMethodService.AbstractInputMethodSessionImpl#setEnabled(boolean))`(boolean enabled) ` Change the enabled state of the session.                                                                                                                                                                                                                                                                                                                                                                                                                                                            | ||
| From class` `[java.lang.Object](https://developer.android.com/reference/java/lang/Object)` ` |--------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` `[Object](https://developer.android.com/reference/java/lang/Object)          | ` `[clone](https://developer.android.com/reference/java/lang/Object#clone())`() ` Creates and returns a copy of this object.                                                                                                                                                      | | ` boolean`                                                                     | ` `[equals](https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object))`(`[Object](https://developer.android.com/reference/java/lang/Object)` obj) ` Indicates whether some other object is "equal to" this one.                                           | | ` void`                                                                        | ` `[finalize](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 `[Class](https://developer.android.com/reference/java/lang/Class)`<?>` | ` `[getClass](https://developer.android.com/reference/java/lang/Object#getClass())`() ` Returns the runtime class of this`Object`.                                                                                                                                                | | ` int`                                                                         | ` `[hashCode](https://developer.android.com/reference/java/lang/Object#hashCode())`() ` Returns a hash code value for the object.                                                                                                                                                 | | ` final void`                                                                  | ` `[notify](https://developer.android.com/reference/java/lang/Object#notify())`() ` Wakes up a single thread that is waiting on this object's monitor.                                                                                                                            | | ` final void`                                                                  | ` `[notifyAll](https://developer.android.com/reference/java/lang/Object#notifyAll())`() ` Wakes up all threads that are waiting on this object's monitor.                                                                                                                         | | ` `[String](https://developer.android.com/reference/java/lang/String)          | ` `[toString](https://developer.android.com/reference/java/lang/Object#toString())`() ` Returns a string representation of the object.                                                                                                                                            | | ` final void`                                                                  | ` `[wait](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`                                                                  | ` `[wait](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`                                                                  | ` `[wait](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*.                                                                                             | ||
| From interface` `[android.view.inputmethod.InputMethodSession](https://developer.android.com/reference/android/view/inputmethod/InputMethodSession)` ` |------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` abstract void` | ` `[appPrivateCommand](https://developer.android.com/reference/android/view/inputmethod/InputMethodSession#appPrivateCommand(java.lang.String,%20android.os.Bundle))`(`[String](https://developer.android.com/reference/java/lang/String)` action, `[Bundle](https://developer.android.com/reference/android/os/Bundle)` data) ` Process a private command sent from the application to the input method.                                                                                                                                                                                                                                                                                                                                                                                                        | | ` abstract void` | ` `[dispatchGenericMotionEvent](https://developer.android.com/reference/android/view/inputmethod/InputMethodSession#dispatchGenericMotionEvent(int,%20android.view.MotionEvent,%20android.view.inputmethod.InputMethodSession.EventCallback))`(int seq, `[MotionEvent](https://developer.android.com/reference/android/view/MotionEvent)` event, `[InputMethodSession.EventCallback](https://developer.android.com/reference/android/view/inputmethod/InputMethodSession.EventCallback)` callback) ` This method is called when there is a generic motion event.                                                                                                                                                                                                                                                 | | ` abstract void` | ` `[dispatchKeyEvent](https://developer.android.com/reference/android/view/inputmethod/InputMethodSession#dispatchKeyEvent(int,%20android.view.KeyEvent,%20android.view.inputmethod.InputMethodSession.EventCallback))`(int seq, `[KeyEvent](https://developer.android.com/reference/android/view/KeyEvent)` event, `[InputMethodSession.EventCallback](https://developer.android.com/reference/android/view/inputmethod/InputMethodSession.EventCallback)` callback) ` This method is called when a key is pressed.                                                                                                                                                                                                                                                                                             | | ` abstract void` | ` `[dispatchTrackballEvent](https://developer.android.com/reference/android/view/inputmethod/InputMethodSession#dispatchTrackballEvent(int,%20android.view.MotionEvent,%20android.view.inputmethod.InputMethodSession.EventCallback))`(int seq, `[MotionEvent](https://developer.android.com/reference/android/view/MotionEvent)` event, `[InputMethodSession.EventCallback](https://developer.android.com/reference/android/view/inputmethod/InputMethodSession.EventCallback)` callback) ` This method is called when there is a track ball event.                                                                                                                                                                                                                                                             | | ` abstract void` | ` `[displayCompletions](https://developer.android.com/reference/android/view/inputmethod/InputMethodSession#displayCompletions(android.view.inputmethod.CompletionInfo[]))`(`[CompletionInfo[]](https://developer.android.com/reference/android/view/inputmethod/CompletionInfo)` completions) ` Called by a text editor that performs auto completion, to tell the input method about the completions it has available.                                                                                                                                                                                                                                                                                                                                                                                         | | ` abstract void` | ` `[finishInput](https://developer.android.com/reference/android/view/inputmethod/InputMethodSession#finishInput())`() ` This method is called when the application would like to stop receiving text input.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     | | ` abstract void` | ` `[toggleSoftInput](https://developer.android.com/reference/android/view/inputmethod/InputMethodSession#toggleSoftInput(int,%20int))`(int showFlags, int hideFlags) ` *This method was deprecated in API level 31. Starting in[Build.VERSION_CODES.S](https://developer.android.com/reference/android/os/Build.VERSION_CODES#S)the system no longer invokes this method, instead it explicitly shows or hides the IME. An`InputMethodService`wishing to toggle its own visibility should instead invoke[InputMethodService.requestShowSelf(int)](https://developer.android.com/reference/android/inputmethodservice/InputMethodService#requestShowSelf(int))or[InputMethodService.requestHideSelf](https://developer.android.com/reference/android/inputmethodservice/InputMethodService#requestHideSelf(int))* | | ` abstract void` | ` `[updateCursor](https://developer.android.com/reference/android/view/inputmethod/InputMethodSession#updateCursor(android.graphics.Rect))`(`[Rect](https://developer.android.com/reference/android/graphics/Rect)` newCursor) ` This method is called when cursor location of the target input field has changed within its window.                                                                                                                                                                                                                                                                                                                                                                                                                                                                             | | ` abstract void` | ` `[updateCursorAnchorInfo](https://developer.android.com/reference/android/view/inputmethod/InputMethodSession#updateCursorAnchorInfo(android.view.inputmethod.CursorAnchorInfo))`(`[CursorAnchorInfo](https://developer.android.com/reference/android/view/inputmethod/CursorAnchorInfo)` cursorAnchorInfo) ` This method is called when the cursor and/or the character position relevant to text input is changed on the screen.                                                                                                                                                                                                                                                                                                                                                                             | | ` abstract void` | ` `[updateExtractedText](https://developer.android.com/reference/android/view/inputmethod/InputMethodSession#updateExtractedText(int,%20android.view.inputmethod.ExtractedText))`(int token, `[ExtractedText](https://developer.android.com/reference/android/view/inputmethod/ExtractedText)` text) ` Called by a text editor to report its new extracted text when its contents change.                                                                                                                                                                                                                                                                                                                                                                                                                        | | ` abstract void` | ` `[updateSelection](https://developer.android.com/reference/android/view/inputmethod/InputMethodSession#updateSelection(int,%20int,%20int,%20int,%20int,%20int))`(int oldSelStart, int oldSelEnd, int newSelStart, int newSelEnd, int candidatesStart, int candidatesEnd) ` This method is called when the selection or cursor in the current target input field has changed.                                                                                                                                                                                                                                                                                                                                                                                                                                   | | ` abstract void` | ` `[viewClicked](https://developer.android.com/reference/android/view/inputmethod/InputMethodSession#viewClicked(boolean))`(boolean focusChanged) ` This method is called when the user tapped a text view.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | ||

## Public constructors

### InputMethodSessionImpl

```
public InputMethodSessionImpl ()
```

<br />

<br />

## Public methods

### appPrivateCommand

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

```
public void appPrivateCommand (String action, 
                Bundle data)
```

Call[InputMethodService.onAppPrivateCommand()](https://developer.android.com/reference/android/inputmethodservice/InputMethodService#onAppPrivateCommand(java.lang.String,%20android.os.Bundle)).

<br />

|        Parameters         ||
|----------|-----------------|
| `action` | `String` <br /> |
| `data`   | `Bundle` <br /> |

### displayCompletions

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

```
public void displayCompletions (CompletionInfo[] completions)
```

Call[InputMethodService.onDisplayCompletions()](https://developer.android.com/reference/android/inputmethodservice/InputMethodService#onDisplayCompletions(android.view.inputmethod.CompletionInfo[])).

<br />

|               Parameters               ||
|---------------|-------------------------|
| `completions` | `CompletionInfo` <br /> |

### finishInput

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

```
public void finishInput ()
```

<br />

<br />

### toggleSoftInput

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

```
public void toggleSoftInput (int showFlags, 
                int hideFlags)
```

<br />

**This method is deprecated.**   
Starting in[Build.VERSION_CODES.S](https://developer.android.com/reference/android/os/Build.VERSION_CODES#S)the system no longer invokes this method, instead it explicitly shows or hides the IME. An`InputMethodService`wishing to toggle its own visibility should instead invoke[InputMethodService.requestShowSelf(int)](https://developer.android.com/reference/android/inputmethodservice/InputMethodService#requestShowSelf(int))or[InputMethodService.requestHideSelf](https://developer.android.com/reference/android/inputmethodservice/InputMethodService#requestHideSelf(int))

Handles a request to toggle the IME visibility.

<br />

|                                                                                                                                                                          Parameters                                                                                                                                                                           ||
|-------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `showFlags` | `int`: Value is either`0`or a combination of[InputMethodManager.SHOW_IMPLICIT](https://developer.android.com/reference/android/view/inputmethod/InputMethodManager#SHOW_IMPLICIT), and[InputMethodManager.SHOW_FORCED](https://developer.android.com/reference/android/view/inputmethod/InputMethodManager#SHOW_FORCED) <br />                   |
| `hideFlags` | `int`: Value is either`0`or a combination of[InputMethodManager.HIDE_IMPLICIT_ONLY](https://developer.android.com/reference/android/view/inputmethod/InputMethodManager#HIDE_IMPLICIT_ONLY), and[InputMethodManager.HIDE_NOT_ALWAYS](https://developer.android.com/reference/android/view/inputmethod/InputMethodManager#HIDE_NOT_ALWAYS) <br /> |

### updateCursor

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

```
public void updateCursor (Rect newCursor)
```

Call[InputMethodService.onUpdateCursor()](https://developer.android.com/reference/android/inputmethodservice/InputMethodService#onUpdateCursor(android.graphics.Rect)).

<br />

|         Parameters         ||
|-------------|---------------|
| `newCursor` | `Rect` <br /> |

### updateCursorAnchorInfo

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

```
public void updateCursorAnchorInfo (CursorAnchorInfo info)
```

Call[InputMethodService.onUpdateCursorAnchorInfo()](https://developer.android.com/reference/android/inputmethodservice/InputMethodService#onUpdateCursorAnchorInfo(android.view.inputmethod.CursorAnchorInfo)).

<br />

|            Parameters             ||
|--------|---------------------------|
| `info` | `CursorAnchorInfo` <br /> |

### updateExtractedText

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

```
public void updateExtractedText (int token, 
                ExtractedText text)
```

Call[InputMethodService.onUpdateExtractedText()](https://developer.android.com/reference/android/inputmethodservice/InputMethodService#onUpdateExtractedText(int,%20android.view.inputmethod.ExtractedText)).

<br />

|           Parameters            ||
|---------|------------------------|
| `token` | `int` <br />           |
| `text`  | `ExtractedText` <br /> |

### updateSelection

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

```
public void updateSelection (int oldSelStart, 
                int oldSelEnd, 
                int newSelStart, 
                int newSelEnd, 
                int candidatesStart, 
                int candidatesEnd)
```

Call[InputMethodService.onUpdateSelection()](https://developer.android.com/reference/android/inputmethodservice/InputMethodService#onUpdateSelection(int,%20int,%20int,%20int,%20int,%20int)).

<br />

|           Parameters            ||
|-------------------|--------------|
| `oldSelStart`     | `int` <br /> |
| `oldSelEnd`       | `int` <br /> |
| `newSelStart`     | `int` <br /> |
| `newSelEnd`       | `int` <br /> |
| `candidatesStart` | `int` <br /> |
| `candidatesEnd`   | `int` <br /> |

### viewClicked

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

```
public void viewClicked (boolean focusChanged)
```

<br />

<br />

|            Parameters            ||
|----------------|------------------|
| `focusChanged` | `boolean` <br /> |