# Print output for @column tags ?>
Developers

- Design
- Develop
- Distribute

Developer Console

## Most visited

## Recently visited

## Results for

Summary: XML Attrs | Inherited Constants | Fields | Ctors | Methods | Inherited Methods

# InputMethodInfo

`public final class InputMethodInfo`
`extends Object` `implements Parcelable`

java.lang.Object
↳ | android.view.inputmethod.InputMethodInfo

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.

See also:

- `InputMethodSubtype`

## Summary

### XML attributes
`android:isDefault` | Set to true in all of the configurations for which this input method should be considered an option as the default.
`android:settingsActivity` | Component name of an activity that allows the user to modify the settings for this service.
`android:supportsInlineSuggestions` | Specifies whether the IME supports showing inline suggestions.
`android:supportsSwitchingToNextInputMethod` | Set to true if this input method supports ways to switch to a next input method (for example, a globe key.).

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

### Fields
`public static final Creator<InputMethodInfo>` | `CREATOR` Used to make this class parcelable.

### Public constructors
`InputMethodInfo(Context context, ResolveInfo service)` Constructor.
`InputMethodInfo(String packageName, String className, CharSequence label, String settingsActivity)` Temporary API for creating a built-in input method for test.

### Public methods
`int` | `describeContents()` Describe the kinds of special objects contained in this Parcelable instance's marshaled representation.
`void` | `dump(Printer pw, String prefix)`
`boolean` | `equals(Object o)` Used to test whether the given parameter object is an `InputMethodInfo` and its Id is the same to this one.
`ComponentName` | `getComponent()` Return the component of the service that implements this input method.
`String` | `getId()` Return a unique ID for this input method.
`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.
`String` | `getPackageName()` Return the .apk package that implements this input method.
`ServiceInfo` | `getServiceInfo()` Return the raw information about the Service implementing this input method.
`String` | `getServiceName()` Return the class name of the service component that implements this input method.
`String` | `getSettingsActivity()` Return the class name of an activity that provides a settings UI for the input method.
`InputMethodSubtype` | `getSubtypeAt(int index)` Return the Input Method's subtype at the specified index.
`int` | `getSubtypeCount()` Return the count of the subtypes of Input Method.
`int` | `hashCode()` Returns a hash code value for the object.
`Drawable` | `loadIcon(PackageManager pm)` Load the user-displayed icon for this input method.
`CharSequence` | `loadLabel(PackageManager pm)` Load the user-displayed label for this input method.
`String` | `toString()` Returns a string representation of the object.
`void` | `writeToParcel(Parcel dest, int flags)` Used to package this object into a `Parcel`.

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

## XML attributes

### 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`".

### 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;

### android:supportsInlineSuggestions

Specifies whether the IME supports showing inline suggestions.

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

### 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`".

## Fields

### CREATOR

    public static final Creator<InputMethodInfo> CREATOR

Used to make this class parcelable.

## Public constructors

### InputMethodInfo

    public InputMethodInfo (Context context,
                    ResolveInfo service)

Constructor.

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

Throws
`IOException` |
`XmlPullParserException` |

### InputMethodInfo

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

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

Parameters
`packageName` | `String`
`className` | `String`
`label` | `CharSequence`
`settingsActivity` | `String`

## Public methods

### describeContents

    public int describeContents ()

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

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

### dump

    public void dump (Printer pw,
                    String prefix)

Parameters
`pw` | `Printer`
`prefix` | `String`

### equals

    public boolean equals (Object o)

Used to test whether the given parameter object is an `InputMethodInfo` and its Id is the same to this one.

Parameters
`o` | `Object`: the reference object with which to compare.

Returns
`boolean` | true if the given parameter object is an `InputMethodInfo` and its Id is the same to this one.

### getComponent

    public ComponentName getComponent ()

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

Returns
`ComponentName` |

### getId

    public String getId ()

Return a unique ID for this input method. The ID is generated from the package and class name implementing the method.

Returns
`String` |

### getIsDefaultResourceId

    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.

Returns
`int` |

### getPackageName

    public String getPackageName ()

Return the .apk package that implements this input method.

Returns
`String` |

### getServiceInfo

    public ServiceInfo getServiceInfo ()

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

Returns
`ServiceInfo` |

### getServiceName

    public String getServiceName ()

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

Returns
`String` |

### getSettingsActivity

    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 `Intent` whose action is MAIN and with an explicit `ComponentName` composed of `getPackageName()` and the class name returned here.

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

Returns
`String` |

### getSubtypeAt

    public InputMethodSubtype getSubtypeAt (int index)

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

Parameters
`index` | `int`: the index of the subtype to return.

Returns
`InputMethodSubtype` |

### getSubtypeCount

    public int getSubtypeCount ()

Return the count of the subtypes of Input Method.

Returns
`int` |

### hashCode

    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 `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 `equals(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 `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.

As much as is reasonably practical, the hashCode method defined by class `Object` does return distinct integers for distinct objects. (This is typically implemented by converting the internal address of the object into an integer, but this implementation technique is not required by the Java™ programming language.)

Returns
`int` | a hash code value for this object.

### loadIcon

    public Drawable loadIcon (PackageManager pm)

Load the user-displayed icon for this input method.

Parameters
`pm` | `PackageManager`: Supply a PackageManager used to load the input method's resources.

Returns
`Drawable` |

### loadLabel

    public CharSequence loadLabel (PackageManager pm)

Load the user-displayed label for this input method.

Parameters
`pm` | `PackageManager`: Supply a PackageManager used to load the input method's resources.

Returns
`CharSequence` |

### toString

    public String toString ()

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

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

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

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

### writeToParcel

    public void writeToParcel (Parcel dest,
                    int flags)

Used to package this object into a `Parcel`.

Parameters
`dest` | `Parcel`: The `Parcel` to be written.
`flags` | `int`: The flags used for parceling.

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