Added in [API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [XML Attrs](https://developer.android.com/reference/android/view/inputmethod/InputMethodInfo#lattrs) \| [Constants](https://developer.android.com/reference/android/view/inputmethod/InputMethodInfo#constants) \| [Inherited Constants](https://developer.android.com/reference/android/view/inputmethod/InputMethodInfo#inhconstants) \| [Fields](https://developer.android.com/reference/android/view/inputmethod/InputMethodInfo#lfields) \| [Ctors](https://developer.android.com/reference/android/view/inputmethod/InputMethodInfo#pubctors) \| [Methods](https://developer.android.com/reference/android/view/inputmethod/InputMethodInfo#pubmethods) \| [Inherited Methods](https://developer.android.com/reference/android/view/inputmethod/InputMethodInfo#inhmethods)

# InputMethodInfo

*** ** * ** ***

` public final class InputMethodInfo `   
` extends https://developer.android.com/reference/java/lang/Object ` ` implements https://developer.android.com/reference/android/os/Parcelable `

|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||
| ↳ | android.view.inputmethod.InputMethodInfo |

<br />

*** ** * ** ***

This class is used to specify meta information of an input method.

It should be defined in an XML resource file with an `<input-method>` element. For more information, see the guide to [Creating an Input Method](https://developer.android.com/guide/topics/text/creating-input-method).

<br />

**See also:**

- `https://developer.android.com/reference/android/view/inputmethod/InputMethodSubtype`

## Summary

| ### XML attributes ||
|---|---|
| [`android:configChanges`](https://developer.android.com/reference/android/view/inputmethod/InputMethodInfo#attr_android:configChanges) | Specify one or more configuration changes that the IME will handle itself. |
| [`android:isDefault`](https://developer.android.com/reference/android/view/inputmethod/InputMethodInfo#attr_android:isDefault) | Set to true in all of the configurations for which this input method should be considered an option as the default. |
| [`android:languageSettingsActivity`](https://developer.android.com/reference/android/view/inputmethod/InputMethodInfo#attr_android:languageSettingsActivity) | Component name of an activity that allows the user to modify on-screen keyboards variants (e.g. |
| [`android:settingsActivity`](https://developer.android.com/reference/android/view/inputmethod/InputMethodInfo#attr_android:settingsActivity) | Component name of an activity that allows the user to modify the settings for this service. |
| [`android:showInInputMethodPicker`](https://developer.android.com/reference/android/view/inputmethod/InputMethodInfo#attr_android:showInInputMethodPicker) | Specifies whether the IME wants to be shown in the Input Method picker. |
| [`android:stylusHandwritingSettingsActivity`](https://developer.android.com/reference/android/view/inputmethod/InputMethodInfo#attr_android:stylusHandwritingSettingsActivity) | Class name of an activity that allows the user to modify the stylus handwriting settings for this service May be a string value, using '\\\\;' to escape characters such as '\\\\n' or '\\\\uxxxx' for a unicode character; |
| [`android:supportsConnectionlessStylusHandwriting`](https://developer.android.com/reference/android/view/inputmethod/InputMethodInfo#attr_android:supportsConnectionlessStylusHandwriting) | Specifies whether the IME supports connectionless stylus handwriting sessions. |
| [`android:supportsInlineSuggestions`](https://developer.android.com/reference/android/view/inputmethod/InputMethodInfo#attr_android:supportsInlineSuggestions) | Specifies whether the IME supports showing inline suggestions. |
| [`android:supportsInlineSuggestionsWithTouchExploration`](https://developer.android.com/reference/android/view/inputmethod/InputMethodInfo#attr_android:supportsInlineSuggestionsWithTouchExploration) | Specifies whether the IME supports showing inline suggestions when touch exploration is enabled. |
| [`android:supportsStylusHandwriting`](https://developer.android.com/reference/android/view/inputmethod/InputMethodInfo#attr_android:supportsStylusHandwriting) | Specifies whether the IME supports Handwriting using stylus. |
| [`android:supportsSwitchingToNextInputMethod`](https://developer.android.com/reference/android/view/inputmethod/InputMethodInfo#attr_android:supportsSwitchingToNextInputMethod) | Set to true if this input method supports ways to switch to a next input method (for example, a globe key.). |
| [`android:suppressesSpellChecker`](https://developer.android.com/reference/android/view/inputmethod/InputMethodInfo#attr_android:suppressesSpellChecker) | Specifies whether the IME suppresses system spell checker. |

| ### Constants ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/view/inputmethod/InputMethodInfo#ACTION_IME_LANGUAGE_SETTINGS` `https://developer.android.com/reference/android/content/Intent#getAction()` for the IME language settings. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/view/inputmethod/InputMethodInfo#ACTION_STYLUS_HANDWRITING_SETTINGS` `https://developer.android.com/reference/android/content/Intent#getAction()` for IME that `https://developer.android.com/reference/android/view/inputmethod/InputMethodInfo#supportsStylusHandwriting()`. |

### Inherited constants

From interface `https://developer.android.com/reference/android/os/Parcelable` `int` `https://developer.android.com/reference/android/os/Parcelable#CONTENTS_FILE_DESCRIPTOR`

Descriptor bit used with `https://developer.android.com/reference/android/os/Parcelable#describeContents()`: indicates that the Parcelable object's flattened representation includes a file descriptor.
`int` `https://developer.android.com/reference/android/os/Parcelable#PARCELABLE_WRITE_RETURN_VALUE`

Flag for use with `https://developer.android.com/reference/android/os/Parcelable#writeToParcel(android.os.Parcel,%20int)`: 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 https://developer.android.com/reference/android/os/Parcelable.Creator<https://developer.android.com/reference/android/view/inputmethod/InputMethodInfo>` | `https://developer.android.com/reference/android/view/inputmethod/InputMethodInfo#CREATOR` Used to make this class parcelable. |

| ### Public constructors ||
|---|---|
| ` https://developer.android.com/reference/android/view/inputmethod/InputMethodInfo#InputMethodInfo(android.content.Context,%20android.content.pm.ResolveInfo)(https://developer.android.com/reference/android/content/Context context, https://developer.android.com/reference/android/content/pm/ResolveInfo service) ` Constructor. |
| ` https://developer.android.com/reference/android/view/inputmethod/InputMethodInfo#InputMethodInfo(java.lang.String,%20java.lang.String,%20java.lang.CharSequence,%20java.lang.String)(https://developer.android.com/reference/java/lang/String packageName, https://developer.android.com/reference/java/lang/String className, https://developer.android.com/reference/java/lang/CharSequence label, https://developer.android.com/reference/java/lang/String settingsActivity) ` Temporary API for creating a built-in input method for test. |

| ### Public methods ||
|---|---|
| ` https://developer.android.com/reference/android/content/Intent` | ` https://developer.android.com/reference/android/view/inputmethod/InputMethodInfo#createImeLanguageSettingsActivityIntent()() ` Returns `https://developer.android.com/reference/android/content/Intent` for IME language settings activity with `https://developer.android.com/reference/android/content/Intent#getAction()` `https://developer.android.com/reference/android/view/inputmethod/InputMethodInfo#ACTION_IME_LANGUAGE_SETTINGS`. |
| ` https://developer.android.com/reference/android/content/Intent` | ` https://developer.android.com/reference/android/view/inputmethod/InputMethodInfo#createStylusHandwritingSettingsActivityIntent()() ` Returns `https://developer.android.com/reference/android/content/Intent` for stylus handwriting settings activity with `https://developer.android.com/reference/android/content/Intent#getAction()` `https://developer.android.com/reference/android/view/inputmethod/InputMethodInfo#ACTION_STYLUS_HANDWRITING_SETTINGS` if IME `https://developer.android.com/reference/android/view/inputmethod/InputMethodInfo#supportsStylusHandwriting()`, else `null` if there are no associated settings for stylus handwriting / handwriting is not supported or if `https://developer.android.com/reference/android/R.styleable#InputMethod_stylusHandwritingSettingsActivity` is not defined. |
| ` int` | ` https://developer.android.com/reference/android/view/inputmethod/InputMethodInfo#describeContents()() ` Describe the kinds of special objects contained in this Parcelable instance's marshaled representation. |
| ` void` | ` https://developer.android.com/reference/android/view/inputmethod/InputMethodInfo#dump(android.util.Printer,%20java.lang.String)(https://developer.android.com/reference/android/util/Printer pw, https://developer.android.com/reference/java/lang/String prefix) ` |
| ` boolean` | ` https://developer.android.com/reference/android/view/inputmethod/InputMethodInfo#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object o) ` Used to test whether the given parameter object is an `https://developer.android.com/reference/android/view/inputmethod/InputMethodInfo` and its Id is the same to this one. |
| ` https://developer.android.com/reference/android/content/ComponentName` | ` https://developer.android.com/reference/android/view/inputmethod/InputMethodInfo#getComponent()() ` Return the component of the service that implements this input method. |
| ` int` | ` https://developer.android.com/reference/android/view/inputmethod/InputMethodInfo#getConfigChanges()() ` Returns the bit mask of kinds of configuration changes that this IME can handle itself (without being restarted by the system). |
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/view/inputmethod/InputMethodInfo#getId()() ` |
| ` int` | ` https://developer.android.com/reference/android/view/inputmethod/InputMethodInfo#getIsDefaultResourceId()() ` Return the resource identifier of a resource inside of this input method's .apk that determines whether it should be considered a default input method for the system. |
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/view/inputmethod/InputMethodInfo#getPackageName()() ` Return the .apk package that implements this input method. |
| ` https://developer.android.com/reference/android/content/pm/ServiceInfo` | ` https://developer.android.com/reference/android/view/inputmethod/InputMethodInfo#getServiceInfo()() ` Return the raw information about the Service implementing this input method. |
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/view/inputmethod/InputMethodInfo#getServiceName()() ` Return the class name of the service component that implements this input method. |
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/view/inputmethod/InputMethodInfo#getSettingsActivity()() ` Return the class name of an activity that provides a settings UI for the input method. |
| ` https://developer.android.com/reference/android/view/inputmethod/InputMethodSubtype` | ` https://developer.android.com/reference/android/view/inputmethod/InputMethodInfo#getSubtypeAt(int)(int index) ` Return the Input Method's subtype at the specified index. |
| ` int` | ` https://developer.android.com/reference/android/view/inputmethod/InputMethodInfo#getSubtypeCount()() ` Return the count of the subtypes of Input Method. |
| ` int` | ` https://developer.android.com/reference/android/view/inputmethod/InputMethodInfo#hashCode()() ` Returns a hash code value for the object. |
| ` https://developer.android.com/reference/android/graphics/drawable/Drawable` | ` https://developer.android.com/reference/android/view/inputmethod/InputMethodInfo#loadIcon(android.content.pm.PackageManager)(https://developer.android.com/reference/android/content/pm/PackageManager pm) ` Load the user-displayed icon for this input method. |
| ` https://developer.android.com/reference/java/lang/CharSequence` | ` https://developer.android.com/reference/android/view/inputmethod/InputMethodInfo#loadLabel(android.content.pm.PackageManager)(https://developer.android.com/reference/android/content/pm/PackageManager pm) ` Load the user-displayed label for this input method. |
| ` boolean` | ` https://developer.android.com/reference/android/view/inputmethod/InputMethodInfo#shouldShowInInputMethodPicker()() ` Returns `true` if this input method should be shown in menus for selecting an Input Method, such as the system Input Method Picker. |
| ` boolean` | ` https://developer.android.com/reference/android/view/inputmethod/InputMethodInfo#supportsConnectionlessStylusHandwriting()() ` Returns whether the IME supports connectionless stylus handwriting sessions. |
| ` boolean` | ` https://developer.android.com/reference/android/view/inputmethod/InputMethodInfo#supportsStylusHandwriting()() ` Returns if IME supports handwriting using stylus input. |
| ` boolean` | ` https://developer.android.com/reference/android/view/inputmethod/InputMethodInfo#suppressesSpellChecker()() ` Return `true` if this input method suppresses spell checker. |
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/view/inputmethod/InputMethodInfo#toString()() ` Returns a string representation of the object. |
| ` void` | ` https://developer.android.com/reference/android/view/inputmethod/InputMethodInfo#writeToParcel(android.os.Parcel,%20int)(https://developer.android.com/reference/android/os/Parcel dest, int flags) ` Used to package this object into a `https://developer.android.com/reference/android/os/Parcel`. |

### Inherited methods

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/os/Parcelable ` ` abstract int` ` https://developer.android.com/reference/android/os/Parcelable#describeContents()() `

Describe the kinds of special objects contained in this Parcelable instance's marshaled representation.
` abstract void` ` https://developer.android.com/reference/android/os/Parcelable#writeToParcel(android.os.Parcel,%20int)(https://developer.android.com/reference/android/os/Parcel dest, int flags) `

Flatten this object in to a Parcel.

## XML attributes

### android:configChanges

Specify one or more configuration changes that the IME will handle itself. If not specified, the IME will be restarted if any of these configuration changes happen in the system. Otherwise, the IME will remain running and its `https://developer.android.com/reference/android/inputmethodservice/InputMethodService#onConfigurationChanged(android.content.res.Configuration)` method is called with the new configuration.

Note that all of these configuration changes can impact the resource values seen by the application, so you will generally need to re-retrieve all resources (including view layouts, drawables, etc) to correctly handle any configuration change.

Must be one or more (separated by '\|') of the following constant values.

| Constant | Value | Description |
|---|---|---|
| assetsPaths | 80000000 | The assets paths have changed. For example a runtime overlay is installed and enabled. Corresponds to `https://developer.android.com/reference/android/content/pm/ActivityInfo#CONFIG_ASSETS_PATHS`. |
| colorMode | 4000 | The color mode of the screen has changed (color gamut or dynamic range). By default from Android 17, we don't recreate the activity even the app doesn't specify colorMode in configChanges. If the app wants to recreate the activity, specify colorMode in recreateOnConfigChanges. |
| density | 1000 | The display density has changed. This might be caused by the user specifying a different display scale, or it might be caused by a different display being activated. |
| fontScale | 40000000 | The font scaling factor has changed, that is the user has selected a new global font size. |
| fontWeightAdjustment | 10000000 | The font weight adjustment value has changed. Used to reflect the user increasing font weight. |
| grammaticalGender | 8000 | The grammatical gender has changed, for example the user set the grammatical gender from the UI. |
| keyboard | 10 | The keyboard type has changed, for example the user has plugged in an external keyboard. By default from Android 17, we don't recreate the activity even the app doesn't specify keyboard in configChanges. If the app wants to recreate the activity, specify keyboard in recreateOnConfigChanges. |
| keyboardHidden | 20 | The keyboard or navigation accessibility has changed, for example the user has slid the keyboard out to expose it. Note that despite its name, this applied to any accessibility: keyboard or navigation. By default from Android 17, we don't recreate the activity even the app doesn't specify keyboardHidden in configChanges. If the app wants to recreate the activity, specify keyboardHidden in recreateOnConfigChanges. |
| layoutDirection | 2000 | The layout direction has changed. For example going from LTR to RTL. |
| locale | 4 | The locale has changed, that is the user has selected a new language that text should be displayed in. |
| mcc | 1 | The IMSI MCC has changed, that is a SIM has been detected and updated the Mobile Country Code. By default from Android O, we don't recreate the activity even the app doesn't specify mcc in configChanges. If the app wants to recreate the activity, specify mcc in recreateOnConfigChanges. |
| mnc | 2 | The IMSI MNC has changed, that is a SIM has been detected and updated the Mobile Network Code. By default from Android O, we don't recreate the activity even the app doesn't specify mnc in configChanges. If the app wants to recreate the acvitity, specify mnc in recreateOnConfigChanges. |
| navigation | 40 | The navigation type has changed. Should never normally happen. By default from Android 17, we don't recreate the activity even the app doesn't specify navigation in configChanges. If the app wants to recreate the activity, specify navigation in recreateOnConfigChanges. |
| orientation | 80 | The screen orientation has changed, that is the user has rotated the device. |
| resourcesUnused | 8000000 | This is probably not the flag you want, the resources compiler supports a less dangerous version of it, 'allKnown', that only suppresses all currently existing configuration change restarts depending on your target SDK rather than whatever the latest SDK supports, allowing the application to work with resources on future Platform versions. Activity doesn't use Android Resources at all and doesn't need to be restarted on any configuration changes. This overrides all other flags, and this is recommended to be used individually. Corresponds to `https://developer.android.com/reference/android/content/pm/ActivityInfo#CONFIG_RESOURCES_UNUSED`. |
| screenLayout | 100 | The screen layout has changed. This might be caused by a different display being activated. |
| screenSize | 400 | The current available screen size has changed. If applications don't target at least `https://developer.android.com/reference/android/os/Build.VERSION_CODES#HONEYCOMB_MR2` then the activity will always handle this itself (the change will not result in a restart). This represents a change in the currently available size, so will change when the user switches between landscape and portrait. |
| smallestScreenSize | 800 | The physical screen size has changed. If applications don't target at least `https://developer.android.com/reference/android/os/Build.VERSION_CODES#HONEYCOMB_MR2` then the activity will always handle this itself (the change will not result in a restart). This represents a change in size regardless of orientation, so will only change when the actual physical screen size has changed such as switching to an external display. |
| touchscreen | 8 | The touchscreen has changed, for example the user has moved the app across displays with different touchscreen abilities. By default from Android 17, we don't recreate the activity even the app doesn't specify touchscreen in configChanges. If the app wants to recreate the activity, specify touchscreen in recreateOnConfigChanges. |
| uiMode | 200 | The global user interface mode has changed. For example, going in or out of car mode, night mode changing, etc. |

<br />

<br />

**Related methods:**

- `https://developer.android.com/reference/android/view/inputmethod/InputMethodInfo#getConfigChanges()`

### android:isDefault

Set to true in all of the configurations for which this input method should be considered an option as the default.

May be a boolean value, such as "`true`" or "`false`".

<br />

### android:languageSettingsActivity

Component name of an activity that allows the user to modify on-screen keyboards variants (e.g. different language or layout) for this service.

May be a string value, using '\\\\;' to escape characters such as '\\\\n' or '\\\\uxxxx' for a unicode character;

<br />

**Related methods:**

- `https://developer.android.com/reference/android/view/inputmethod/InputMethodInfo#createImeLanguageSettingsActivityIntent()`

### android:settingsActivity

Component name of an activity that allows the user to modify the settings for this service.

May be a string value, using '\\\\;' to escape characters such as '\\\\n' or '\\\\uxxxx' for a unicode character;

<br />

**Related methods:**

- `https://developer.android.com/reference/android/view/inputmethod/InputMethodInfo#createImeLanguageSettingsActivityIntent()`

### android:showInInputMethodPicker

Specifies whether the IME wants to be shown in the Input Method picker. Defaults to true. Set this to false if the IME is intended to be accessed programmatically.

Note: This functions as a hint to the system, which may choose to ignore this preference in certain situations or in future releases.

May be a boolean value, such as "`true`" or "`false`".

<br />

### android:stylusHandwritingSettingsActivity

Class name of an activity that allows the user to modify the stylus handwriting settings for this service

May be a string value, using '\\\\;' to escape characters such as '\\\\n' or '\\\\uxxxx' for a unicode character;

<br />

**Related methods:**

- `https://developer.android.com/reference/android/view/inputmethod/InputMethodInfo#createStylusHandwritingSettingsActivityIntent()`

### android:supportsConnectionlessStylusHandwriting

Specifies whether the IME supports connectionless stylus handwriting sessions. A connectionless session differs from a regular session in that the IME does not use an input connection to communicate with a text editor. Instead, the IME directly returns recognised handwritten text via an `https://developer.android.com/reference/android/inputmethodservice/InputMethodService` handwriting lifecycle API.

If the IME supports connectionless sessions, apps or framework may start a connectionless session when a stylus motion event sequence begins. `https://developer.android.com/reference/android/inputmethodservice/InputMethodService#onStartConnectionlessStylusHandwriting(int,%20android.view.inputmethod.CursorAnchorInfo)` is called. If the IME is ready for stylus input, it should return {code true} to start the basic mode session. As in the regular session, the IME will receive stylus motion events to the stylus handwriting window and should render ink to a view in this window. When the user has stopped handwriting, the IME should end the session and deliver the result by calling `https://developer.android.com/reference/android/inputmethodservice/InputMethodService#finishConnectionlessStylusHandwriting(java.lang.CharSequence)`. The default value is {code false}. If {code true}, `https://developer.android.com/reference/android/R.attr#supportsStylusHandwriting` should also be {code true}.

May be a boolean value, such as "`true`" or "`false`".

<br />

**Related methods:**

- `https://developer.android.com/reference/android/view/inputmethod/InputMethodInfo#supportsConnectionlessStylusHandwriting()`

### android:supportsInlineSuggestions

Specifies whether the IME supports showing inline suggestions.

May be a boolean value, such as "`true`" or "`false`".

<br />

### android:supportsInlineSuggestionsWithTouchExploration

Specifies whether the IME supports showing inline suggestions when touch exploration is enabled. This does nothing if supportsInlineSuggestions is false. The default value is false and most IMEs should not set this to true since the older menu-style Autofill works better with touch exploration. This attribute should be set to true in special situations, such as if this is an accessibility-focused IME which blocks user interaction with the app window while the IME is displayed.

May be a boolean value, such as "`true`" or "`false`".

<br />

### android:supportsStylusHandwriting

Specifies whether the IME supports Handwriting using stylus. Defaults to false. When IME implements support for stylus handwriting, on every ACTION_DOWN with stylus on an editor, `https://developer.android.com/reference/android/inputmethodservice/InputMethodService#onStartStylusHandwriting()` is called. If IME is ready for stylus input, it must return `true` for Handwriting sessions to start. IME should attach it's View that renders Ink on screen to stylus handwriting inking window `https://developer.android.com/reference/android/inputmethodservice/InputMethodService#getStylusHandwritingWindow()`. IME will then receive Stylus MotionEvent(s) on DecorView i.e. the Inking view `https://developer.android.com/reference/android/view/View#onTouchEvent(android.view.MotionEvent)` attached by IME to Ink window. Handwriting mode can be finished by calling `https://developer.android.com/reference/android/inputmethodservice/InputMethodService#finishStylusHandwriting()` or will be finished by framework on next `https://developer.android.com/reference/android/inputmethodservice/InputMethodService#onFinishInput()`.

May be a boolean value, such as "`true`" or "`false`".

<br />

**Related methods:**

- `https://developer.android.com/reference/android/view/inputmethod/InputMethodInfo#supportsStylusHandwriting()`

### android:supportsSwitchingToNextInputMethod

Set to true if this input method supports ways to switch to a next input method (for example, a globe key.). When this is true and InputMethodManager#shouldOfferSwitchingToNextInputMethod() returns true, the IME has to offer ways to invoke InputMethodManager#switchToNextInputMethod() accordingly.

Note that the system determines the most appropriate next input method and subtype in order to provide the consistent user experience in switching between IMEs and subtypes.

May be a boolean value, such as "`true`" or "`false`".

<br />

### android:suppressesSpellChecker

Specifies whether the IME suppresses system spell checker. The default value is false. If an IME sets this attribute to true, the system spell checker will be disabled while the IME has an active input session.

May be a boolean value, such as "`true`" or "`false`".

<br />

## Constants

### ACTION_IME_LANGUAGE_SETTINGS

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

```
public static final String ACTION_IME_LANGUAGE_SETTINGS
```

`https://developer.android.com/reference/android/content/Intent#getAction()` for the IME language settings.

<br />

**See also:**

- `https://developer.android.com/reference/android/view/inputmethod/InputMethodInfo#createImeLanguageSettingsActivityIntent()`

Constant Value: "android.view.inputmethod.action.IME_LANGUAGE_SETTINGS"

### ACTION_STYLUS_HANDWRITING_SETTINGS

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

```
public static final String ACTION_STYLUS_HANDWRITING_SETTINGS
```

`https://developer.android.com/reference/android/content/Intent#getAction()` for IME that `https://developer.android.com/reference/android/view/inputmethod/InputMethodInfo#supportsStylusHandwriting()`.

<br />

**See also:**

- `https://developer.android.com/reference/android/view/inputmethod/InputMethodInfo#createStylusHandwritingSettingsActivityIntent()`

Constant Value: "android.view.inputmethod.action.STYLUS_HANDWRITING_SETTINGS"

## Fields

### CREATOR

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

```
public static final Creator<InputMethodInfo> CREATOR
```

Used to make this class parcelable.

<br />

## Public constructors

### InputMethodInfo

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

```
public InputMethodInfo (Context context, 
                ResolveInfo service)
```

Constructor.

<br />

| Parameters ||
|---|---|
| `context` | `Context`: The Context in which we are parsing the input method. <br /> |
| `service` | `ResolveInfo`: The ResolveInfo returned from the package manager about this input method's component. <br /> |

| Throws ||
|---|---|
| `https://developer.android.com/reference/java/io/IOException` |   |
| `https://developer.android.com/reference/org/xmlpull/v1/XmlPullParserException` |   |

### InputMethodInfo

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

```
public InputMethodInfo (String packageName, 
                String className, 
                CharSequence label, 
                String settingsActivity)
```

Temporary API for creating a built-in input method for test.

<br />

| Parameters ||
|---|---|
| `packageName` | `String` <br /> |
| `className` | `String` <br /> |
| `label` | `CharSequence` <br /> |
| `settingsActivity` | `String` <br /> |

## Public methods

### createImeLanguageSettingsActivityIntent

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

```
public Intent createImeLanguageSettingsActivityIntent ()
```

Returns `https://developer.android.com/reference/android/content/Intent` for IME language settings activity with `https://developer.android.com/reference/android/content/Intent#getAction()` `https://developer.android.com/reference/android/view/inputmethod/InputMethodInfo#ACTION_IME_LANGUAGE_SETTINGS`. If `https://developer.android.com/reference/android/R.styleable#InputMethod_languageSettingsActivity` is not defined, tries to fall back to the IME general settings activity. If `https://developer.android.com/reference/android/R.styleable#InputMethod_settingsActivity` is also not defined, returns `null`.

To launch IME language settings, use this method to get the `https://developer.android.com/reference/android/content/Intent` to launch the IME language settings activity.

e.g.

    startActivity(createImeLanguageSettingsActivityIntent());

<br />

<br />

<br />

**Related XML Attributes:**

- [android:languageSettingsActivity](https://developer.android.com/reference/android/view/inputmethod/InputMethodInfo#attr_android:languageSettingsActivity)
- [android:settingsActivity](https://developer.android.com/reference/android/view/inputmethod/InputMethodInfo#attr_android:settingsActivity)

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/content/Intent` | <br /> |

### createStylusHandwritingSettingsActivityIntent

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

```
public Intent createStylusHandwritingSettingsActivityIntent ()
```

Returns `https://developer.android.com/reference/android/content/Intent` for stylus handwriting settings activity with `https://developer.android.com/reference/android/content/Intent#getAction()` `https://developer.android.com/reference/android/view/inputmethod/InputMethodInfo#ACTION_STYLUS_HANDWRITING_SETTINGS` if IME `https://developer.android.com/reference/android/view/inputmethod/InputMethodInfo#supportsStylusHandwriting()`, else `null` if there are no associated settings for stylus handwriting / handwriting is not supported or if `https://developer.android.com/reference/android/R.styleable#InputMethod_stylusHandwritingSettingsActivity` is not defined.

To launch stylus settings, use this method to get the `https://developer.android.com/reference/android/content/Intent` to launch the stylus handwriting settings activity.

e.g.

    startActivity(createStylusHandwritingSettingsActivityIntent());

<br />

<br />

<br />

**Related XML Attributes:**

- [android:stylusHandwritingSettingsActivity](https://developer.android.com/reference/android/view/inputmethod/InputMethodInfo#attr_android:stylusHandwritingSettingsActivity)

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/content/Intent` | <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/inputmethod/InputMethodInfo#getSettingsActivity()`
- `https://developer.android.com/reference/android/view/inputmethod/InputMethodInfo#supportsStylusHandwriting()`

### describeContents

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

```
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 `https://developer.android.com/reference/android/os/Parcelable#writeToParcel(android.os.Parcel,%20int)`, the return value of this method must include the `https://developer.android.com/reference/android/os/Parcelable#CONTENTS_FILE_DESCRIPTOR` bit.

<br />

| Returns ||
|---|---|
| `int` | a bitmask indicating the set of special object types marshaled by this Parcelable object instance. Value is either `0` or - `https://developer.android.com/reference/android/os/Parcelable#CONTENTS_FILE_DESCRIPTOR` |

### dump

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

```
public void dump (Printer pw, 
                String prefix)
```

<br />

<br />

| Parameters ||
|---|---|
| `pw` | `Printer` <br /> |
| `prefix` | `String` <br /> |

### equals

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

```
public boolean equals (Object o)
```

Used to test whether the given parameter object is an `https://developer.android.com/reference/android/view/inputmethod/InputMethodInfo` and its Id is the same to this one.

<br />

| Parameters ||
|---|---|
| `o` | `Object`: This value may be `null`. <br /> |

| Returns ||
|---|---|
| `boolean` | true if the given parameter object is an `https://developer.android.com/reference/android/view/inputmethod/InputMethodInfo` and its Id is the same to this one. <br /> |

### getComponent

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

```
public ComponentName getComponent ()
```

Return the component of the service that implements this input method.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/content/ComponentName` | <br /> |

### getConfigChanges

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

```
public int getConfigChanges ()
```

Returns the bit mask of kinds of configuration changes that this IME can handle itself (without being restarted by the system).

<br />

**Related XML Attributes:**

- [android:configChanges](https://developer.android.com/reference/android/view/inputmethod/InputMethodInfo#attr_android:configChanges)

| Returns ||
|---|---|
| `int` | Value is either `0` or a combination of the following: - `https://developer.android.com/reference/android/content/pm/ActivityInfo#CONFIG_MCC` - `https://developer.android.com/reference/android/content/pm/ActivityInfo#CONFIG_MNC` - `https://developer.android.com/reference/android/content/pm/ActivityInfo#CONFIG_LOCALE` - `https://developer.android.com/reference/android/content/pm/ActivityInfo#CONFIG_TOUCHSCREEN` - `https://developer.android.com/reference/android/content/pm/ActivityInfo#CONFIG_KEYBOARD` - `https://developer.android.com/reference/android/content/pm/ActivityInfo#CONFIG_KEYBOARD_HIDDEN` - `https://developer.android.com/reference/android/content/pm/ActivityInfo#CONFIG_NAVIGATION` - `https://developer.android.com/reference/android/content/pm/ActivityInfo#CONFIG_ORIENTATION` - `https://developer.android.com/reference/android/content/pm/ActivityInfo#CONFIG_SCREEN_LAYOUT` - `https://developer.android.com/reference/android/content/pm/ActivityInfo#CONFIG_UI_MODE` - `https://developer.android.com/reference/android/content/pm/ActivityInfo#CONFIG_SCREEN_SIZE` - `https://developer.android.com/reference/android/content/pm/ActivityInfo#CONFIG_SMALLEST_SCREEN_SIZE` - `https://developer.android.com/reference/android/content/pm/ActivityInfo#CONFIG_DENSITY` - `https://developer.android.com/reference/android/content/pm/ActivityInfo#CONFIG_LAYOUT_DIRECTION` - `https://developer.android.com/reference/android/content/pm/ActivityInfo#CONFIG_COLOR_MODE` - `https://developer.android.com/reference/android/content/pm/ActivityInfo#CONFIG_FONT_SCALE` - `https://developer.android.com/reference/android/content/pm/ActivityInfo#CONFIG_GRAMMATICAL_GENDER` - `https://developer.android.com/reference/android/content/pm/ActivityInfo#CONFIG_FONT_WEIGHT_ADJUSTMENT` - `https://developer.android.com/reference/android/content/pm/ActivityInfo#CONFIG_ASSETS_PATHS` - `https://developer.android.com/reference/android/content/pm/ActivityInfo#CONFIG_RESOURCES_UNUSED` |

### getId

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

```
public String getId ()
```

<br />

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | a unique ID for this input method, which is guaranteed to be the same as the result of `getComponent().flattenToShortString()`. <br /> |

**See also:**

- `https://developer.android.com/reference/android/content/ComponentName#unflattenFromString(java.lang.String)`

### getIsDefaultResourceId

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

```
public int getIsDefaultResourceId ()
```

Return the resource identifier of a resource inside of this input method's .apk that determines whether it should be considered a default input method for the system.

<br />

| Returns ||
|---|---|
| `int` | <br /> |

### getPackageName

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

```
public String getPackageName ()
```

Return the .apk package that implements this input method.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | <br /> |

### getServiceInfo

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

```
public ServiceInfo getServiceInfo ()
```

Return the raw information about the Service implementing this input method. Do not modify the returned object.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/content/pm/ServiceInfo` | <br /> |

### getServiceName

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

```
public String getServiceName ()
```

Return the class name of the service component that implements this input method.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | <br /> |

### getSettingsActivity

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

```
public String getSettingsActivity ()
```

Return the class name of an activity that provides a settings UI for the input method. You can launch this activity be starting it with an `https://developer.android.com/reference/android/content/Intent` whose action is MAIN and with an explicit `https://developer.android.com/reference/android/content/ComponentName` composed of `https://developer.android.com/reference/android/view/inputmethod/InputMethodInfo#getPackageName()` and the class name returned here.

A null will be returned if there is no settings activity associated with the input method.

<br />

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/inputmethod/InputMethodInfo#createStylusHandwritingSettingsActivityIntent()`

### getSubtypeAt

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

```
public InputMethodSubtype getSubtypeAt (int index)
```

Return the Input Method's subtype at the specified index.

<br />

| Parameters ||
|---|---|
| `index` | `int`: the index of the subtype to return. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/view/inputmethod/InputMethodSubtype` | <br /> |

### getSubtypeCount

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

```
public int getSubtypeCount ()
```

Return the count of the subtypes of Input Method.

<br />

| Returns ||
|---|---|
| `int` | <br /> |

### hashCode

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

```
public int hashCode ()
```

Returns a hash code value for the object. This method is supported for the benefit of hash tables such as those provided by `https://developer.android.com/reference/java/util/HashMap`.

The general contract of `hashCode` is:

- Whenever it is invoked on the same object more than once during an execution of a Java application, the `hashCode` method must consistently return the same integer, provided no information used in `equals` comparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application.
- If two objects are equal according to the `https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)` method, then calling the `hashCode` method on each of the two objects must produce the same integer result.
- It is *not* required that if two objects are unequal according to the `https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)` method, then calling the `hashCode` method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hash tables.

<br />

<br />

| Returns ||
|---|---|
| `int` | a hash code value for this object. <br /> |

### loadIcon

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

```
public Drawable loadIcon (PackageManager pm)
```

Load the user-displayed icon for this input method.

<br />

| Parameters ||
|---|---|
| `pm` | `PackageManager`: Supply a PackageManager used to load the input method's resources. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/graphics/drawable/Drawable` | <br /> |

### loadLabel

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

```
public CharSequence loadLabel (PackageManager pm)
```

Load the user-displayed label for this input method.

<br />

| Parameters ||
|---|---|
| `pm` | `PackageManager`: Supply a PackageManager used to load the input method's resources. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/CharSequence` | <br /> |

### shouldShowInInputMethodPicker

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

```
public boolean shouldShowInInputMethodPicker ()
```

Returns `true` if this input method should be shown in menus for selecting an Input Method, such as the system Input Method Picker. This is `false` if the IME is intended to be accessed programmatically.

<br />

| Returns ||
|---|---|
| `boolean` | <br /> |

### supportsConnectionlessStylusHandwriting

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

```
public boolean supportsConnectionlessStylusHandwriting ()
```

Returns whether the IME supports connectionless stylus handwriting sessions.

<br />

**Related XML Attributes:**

- [android:supportsConnectionlessStylusHandwriting](https://developer.android.com/reference/android/view/inputmethod/InputMethodInfo#attr_android:supportsConnectionlessStylusHandwriting)

| Returns ||
|---|---|
| `boolean` | <br /> |

### supportsStylusHandwriting

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

```
public boolean supportsStylusHandwriting ()
```

Returns if IME supports handwriting using stylus input.

<br />

**Related XML Attributes:**

- [android:supportsStylusHandwriting](https://developer.android.com/reference/android/view/inputmethod/InputMethodInfo#attr_android:supportsStylusHandwriting)

| Returns ||
|---|---|
| `boolean` | <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/inputmethod/InputMethodInfo#createStylusHandwritingSettingsActivityIntent()`

### suppressesSpellChecker

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

```
public boolean suppressesSpellChecker ()
```

Return `true` if this input method suppresses spell checker.

<br />

| Returns ||
|---|---|
| `boolean` | <br /> |

### toString

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

```
public String toString ()
```

Returns a string representation of the object.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | a string representation of the object. <br /> |

### writeToParcel

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

```
public void writeToParcel (Parcel dest, 
                int flags)
```

Used to package this object into a `https://developer.android.com/reference/android/os/Parcel`.

<br />

| Parameters ||
|---|---|
| `dest` | `Parcel`: The `https://developer.android.com/reference/android/os/Parcel` to be written. <br /> |
| `flags` | `int`: The flags used for parceling. <br /> |