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

# InputMethodService.InputMethodImpl

*** ** * ** ***


`
public


class
InputMethodService.InputMethodImpl
`


`


`

`

extends https://developer.android.com/reference/android/inputmethodservice/AbstractInputMethodService.AbstractInputMethodImpl


`

`


`

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

<br />

*** ** * ** ***

Concrete implementation of
`https://developer.android.com/reference/android/inputmethodservice/AbstractInputMethodService.AbstractInputMethodImpl` that provides
all of the standard behavior for an input method.

## Summary

### Inherited constants

From interface `https://developer.android.com/reference/android/view/inputmethod/InputMethod` `https://developer.android.com/reference/java/lang/String` `https://developer.android.com/reference/android/view/inputmethod/InputMethod#SERVICE_INTERFACE`

This is the interface name that a service implementing an input
method should say that it supports -- that is, this is the action it
uses for its intent filter.


`https://developer.android.com/reference/java/lang/String` `https://developer.android.com/reference/android/view/inputmethod/InputMethod#SERVICE_META_DATA`

Name under which an InputMethod service component publishes information
about itself.


`int` `https://developer.android.com/reference/android/view/inputmethod/InputMethod#SHOW_EXPLICIT`

*This constant was deprecated
in API level 37.
`https://developer.android.com/reference/android/view/inputmethod/InputMethodManager#SHOW_IMPLICIT` is deprecated therefore this flag
becomes the default. There is no need to pass it anymore.*


`int` `https://developer.android.com/reference/android/view/inputmethod/InputMethod#SHOW_FORCED`

*This constant was deprecated
in API level 35.
Starting in `https://developer.android.com/reference/android/os/Build.VERSION_CODES#BAKLAVA`,
`https://developer.android.com/reference/android/view/inputmethod/InputMethodManager#SHOW_IMPLICIT` is deprecated and has no effect, therefore all
requests will have this flag set. IMEs should no longer react to this flag.*


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

| ### Public methods ||
|---|---|
| ` void` | ` https://developer.android.com/reference/android/inputmethodservice/InputMethodService.InputMethodImpl#attachToken(android.os.IBinder)(https://developer.android.com/reference/android/os/IBinder token) ` <br /> This method must be called from the main thread of your app. |
| ` void` | ` https://developer.android.com/reference/android/inputmethodservice/InputMethodService.InputMethodImpl#bindInput(android.view.inputmethod.InputBinding)(https://developer.android.com/reference/android/view/inputmethod/InputBinding binding) ` Calls `https://developer.android.com/reference/android/inputmethodservice/InputMethodService#onBindInput()` when done. |
| ` void` | ` https://developer.android.com/reference/android/inputmethodservice/InputMethodService.InputMethodImpl#changeInputMethodSubtype(android.view.inputmethod.InputMethodSubtype)(https://developer.android.com/reference/android/view/inputmethod/InputMethodSubtype subtype) ` <br /> This method must be called from the main thread of your app. |
| ` void` | ` https://developer.android.com/reference/android/inputmethodservice/InputMethodService.InputMethodImpl#hideSoftInput(int,%20android.os.ResultReceiver)(int flags, https://developer.android.com/reference/android/os/ResultReceiver resultReceiver) ` <br /> This method must be called from the main thread of your app. |
| ` void` | ` https://developer.android.com/reference/android/inputmethodservice/InputMethodService.InputMethodImpl#restartInput(android.view.inputmethod.InputConnection,%20android.view.inputmethod.EditorInfo)(https://developer.android.com/reference/android/view/inputmethod/InputConnection ic, https://developer.android.com/reference/android/view/inputmethod/EditorInfo editorInfo) ` <br /> This method must be called from the main thread of your app. |
| ` void` | ` https://developer.android.com/reference/android/inputmethodservice/InputMethodService.InputMethodImpl#showSoftInput(int,%20android.os.ResultReceiver)(int flags, https://developer.android.com/reference/android/os/ResultReceiver resultReceiver) ` <br /> This method must be called from the main thread of your app. |
| ` void` | ` https://developer.android.com/reference/android/inputmethodservice/InputMethodService.InputMethodImpl#startInput(android.view.inputmethod.InputConnection,%20android.view.inputmethod.EditorInfo)(https://developer.android.com/reference/android/view/inputmethod/InputConnection ic, https://developer.android.com/reference/android/view/inputmethod/EditorInfo editorInfo) ` <br /> This method must be called from the main thread of your app. |
| ` void` | ` https://developer.android.com/reference/android/inputmethodservice/InputMethodService.InputMethodImpl#unbindInput()() ` Calls `https://developer.android.com/reference/android/inputmethodservice/InputMethodService#onUnbindInput()` when done. |

### Inherited methods

From class `

https://developer.android.com/reference/android/inputmethodservice/AbstractInputMethodService.AbstractInputMethodImpl

` `


void` `
https://developer.android.com/reference/android/inputmethodservice/AbstractInputMethodService.AbstractInputMethodImpl#createSession(android.view.inputmethod.InputMethod.SessionCallback)(https://developer.android.com/reference/android/view/inputmethod/InputMethod.SessionCallback callback)
`

Instantiate a new client session for the input method, by calling
back to `https://developer.android.com/reference/android/inputmethodservice/AbstractInputMethodService#onCreateInputMethodSessionInterface()`.


`


void` `
https://developer.android.com/reference/android/inputmethodservice/AbstractInputMethodService.AbstractInputMethodImpl#revokeSession(android.view.inputmethod.InputMethodSession)(https://developer.android.com/reference/android/view/inputmethod/InputMethodSession session)
`

Take care of killing an existing session by calling its
`https://developer.android.com/reference/android/inputmethodservice/AbstractInputMethodService.AbstractInputMethodSessionImpl#revokeSelf()` method.


`


void` `
https://developer.android.com/reference/android/inputmethodservice/AbstractInputMethodService.AbstractInputMethodImpl#setSessionEnabled(android.view.inputmethod.InputMethodSession,%20boolean)(https://developer.android.com/reference/android/view/inputmethod/InputMethodSession session, boolean enabled)
`

Take care of enabling or disabling an existing session by calling its
`https://developer.android.com/reference/android/inputmethodservice/AbstractInputMethodService.AbstractInputMethodSessionImpl#revokeSelf()` method.


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*.


From interface `

https://developer.android.com/reference/android/view/inputmethod/InputMethod

` `
abstract


void` `
https://developer.android.com/reference/android/view/inputmethod/InputMethod#attachToken(android.os.IBinder)(https://developer.android.com/reference/android/os/IBinder token)
`

Called first thing after an input method is created, this supplies a
unique token for the session it has with the system service.


`
abstract


void` `
https://developer.android.com/reference/android/view/inputmethod/InputMethod#bindInput(android.view.inputmethod.InputBinding)(https://developer.android.com/reference/android/view/inputmethod/InputBinding binding)
`

Bind a new application environment in to the input method, so that it
can later start and stop input processing.


`
abstract


void` `
https://developer.android.com/reference/android/view/inputmethod/InputMethod#changeInputMethodSubtype(android.view.inputmethod.InputMethodSubtype)(https://developer.android.com/reference/android/view/inputmethod/InputMethodSubtype subtype)
`

Notify that the input method subtype is being changed in the same input method.


`
abstract


void` `
https://developer.android.com/reference/android/view/inputmethod/InputMethod#createSession(android.view.inputmethod.InputMethod.SessionCallback)(https://developer.android.com/reference/android/view/inputmethod/InputMethod.SessionCallback callback)
`

Create a new `https://developer.android.com/reference/android/view/inputmethod/InputMethodSession` that can be handed to client
applications for interacting with the input method.


`
abstract


void` `
https://developer.android.com/reference/android/view/inputmethod/InputMethod#hideSoftInput(int,%20android.os.ResultReceiver)(int flags, https://developer.android.com/reference/android/os/ResultReceiver resultReceiver)
`

Request that any soft input part of the input method be hidden from the user.


`
abstract


void` `
https://developer.android.com/reference/android/view/inputmethod/InputMethod#restartInput(android.view.inputmethod.InputConnection,%20android.view.inputmethod.EditorInfo)(https://developer.android.com/reference/android/view/inputmethod/InputConnection inputConnection, https://developer.android.com/reference/android/view/inputmethod/EditorInfo editorInfo)
`

This method is called when the state of this input method needs to be
reset.


`
abstract


void` `
https://developer.android.com/reference/android/view/inputmethod/InputMethod#revokeSession(android.view.inputmethod.InputMethodSession)(https://developer.android.com/reference/android/view/inputmethod/InputMethodSession session)
`

Disable and destroy a session that was previously created with
`https://developer.android.com/reference/android/view/inputmethod/InputMethod#createSession(android.view.inputmethod.InputMethod.SessionCallback)`.


`
abstract


void` `
https://developer.android.com/reference/android/view/inputmethod/InputMethod#setSessionEnabled(android.view.inputmethod.InputMethodSession,%20boolean)(https://developer.android.com/reference/android/view/inputmethod/InputMethodSession session, boolean enabled)
`

Control whether a particular input method session is active.


`
abstract


void` `
https://developer.android.com/reference/android/view/inputmethod/InputMethod#showSoftInput(int,%20android.os.ResultReceiver)(int flags, https://developer.android.com/reference/android/os/ResultReceiver resultReceiver)
`

Request that any soft input part of the input method be shown to the user.


`
abstract


void` `
https://developer.android.com/reference/android/view/inputmethod/InputMethod#startInput(android.view.inputmethod.InputConnection,%20android.view.inputmethod.EditorInfo)(https://developer.android.com/reference/android/view/inputmethod/InputConnection inputConnection, https://developer.android.com/reference/android/view/inputmethod/EditorInfo editorInfo)
`

This method is called when the application starts to receive text and it
is ready for this input method to process received events and send result
text back to the application.


`
abstract


void` `
https://developer.android.com/reference/android/view/inputmethod/InputMethod#unbindInput()()
`

Unbind an application environment, called when the information previously
set by `https://developer.android.com/reference/android/view/inputmethod/InputMethod#bindInput(android.view.inputmethod.InputBinding)` is no longer valid for this input method.


## Public constructors

### InputMethodImpl

```
public InputMethodImpl ()
```

<br />

<br />

## Public methods

### attachToken

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

```
public void attachToken (IBinder token)
```


<br />


This method must be called from the main thread of your app.

<br />

| Parameters ||
|---|---|
| `token` | `IBinder` <br /> |

### bindInput

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

```
public void bindInput (InputBinding binding)
```


Calls `https://developer.android.com/reference/android/inputmethodservice/InputMethodService#onBindInput()` when done.
.   
This method must be called from the main thread of your app.

<br />

<br />

| Parameters ||
|---|---|
| `binding` | `InputBinding` <br /> |

### changeInputMethodSubtype

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

```
public void changeInputMethodSubtype (InputMethodSubtype subtype)
```


<br />


This method must be called from the main thread of your app.

<br />

| Parameters ||
|---|---|
| `subtype` | `InputMethodSubtype` <br /> |

### hideSoftInput

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

```
public void hideSoftInput (int flags, 
                ResultReceiver resultReceiver)
```


<br />


This method must be called from the main thread of your app.

<br />

| Parameters ||
|---|---|
| `flags` | `int` <br /> |
| `resultReceiver` | `ResultReceiver` <br /> |

### restartInput

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

```
public void restartInput (InputConnection ic, 
                EditorInfo editorInfo)
```


<br />


This method must be called from the main thread of your app.

<br />

| Parameters ||
|---|---|
| `ic` | `InputConnection` <br /> |
| `editorInfo` | `EditorInfo` <br /> |

### showSoftInput

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

```
public void showSoftInput (int flags, 
                ResultReceiver resultReceiver)
```


<br />


This method must be called from the main thread of your app.

<br />

| Parameters ||
|---|---|
| `flags` | `int` <br /> |
| `resultReceiver` | `ResultReceiver` <br /> |

### startInput

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

```
public void startInput (InputConnection ic, 
                EditorInfo editorInfo)
```


<br />


This method must be called from the main thread of your app.

<br />

| Parameters ||
|---|---|
| `ic` | `InputConnection` <br /> |
| `editorInfo` | `EditorInfo` <br /> |

### unbindInput

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

```
public void unbindInput ()
```


Calls `https://developer.android.com/reference/android/inputmethodservice/InputMethodService#onUnbindInput()` when done.
.   
This method must be called from the main thread of your app.

<br />

<br />