InputMethodService.InputMethodImpl


public class InputMethodService.InputMethodImpl
extends AbstractInputMethodService.AbstractInputMethodImpl

java.lang.Object
   ↳ android.inputmethodservice.AbstractInputMethodService.AbstractInputMethodImpl
     ↳ android.inputmethodservice.InputMethodService.InputMethodImpl


Concrete implementation of AbstractInputMethodService.AbstractInputMethodImpl that provides all of the standard behavior for an input method.

Summary

Inherited constants

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

String SERVICE_META_DATA

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

int SHOW_EXPLICIT

Flag for showSoftInput(int, ResultReceiver): this show has been explicitly requested by the user.

int SHOW_FORCED

This constant was deprecated in API level 35. InputMethodManager.SHOW_FORCED is deprecated and should no longer be used by apps. IMEs likewise should no longer react to this flag.

Public constructors

InputMethodImpl()

Public methods

void attachToken(IBinder token)


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

void bindInput(InputBinding binding)

Calls InputMethodService.onBindInput() when done.

void changeInputMethodSubtype(InputMethodSubtype subtype)


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

void hideSoftInput(int flags, ResultReceiver resultReceiver)


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

void restartInput(InputConnection ic, EditorInfo editorInfo)


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

void showSoftInput(int flags, ResultReceiver resultReceiver)


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

void startInput(InputConnection ic, EditorInfo editorInfo)


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

void unbindInput()

Calls InputMethodService.onUnbindInput() when done.

Inherited methods

void createSession(InputMethod.SessionCallback callback)

Instantiate a new client session for the input method, by calling back to AbstractInputMethodService.onCreateInputMethodSessionInterface().

void revokeSession(InputMethodSession session)

Take care of killing an existing session by calling its AbstractInputMethodSessionImpl.revokeSelf() method.

void setSessionEnabled(InputMethodSession session, boolean enabled)

Take care of enabling or disabling an existing session by calling its AbstractInputMethodSessionImpl.setEnabled() method.

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 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(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()

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

abstract void attachToken(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 bindInput(InputBinding binding)

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

abstract void changeInputMethodSubtype(InputMethodSubtype subtype)

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

abstract void createSession(InputMethod.SessionCallback callback)

Create a new InputMethodSession that can be handed to client applications for interacting with the input method.

abstract void hideSoftInput(int flags, ResultReceiver resultReceiver)

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

abstract void restartInput(InputConnection inputConnection, EditorInfo editorInfo)

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

abstract void revokeSession(InputMethodSession session)

Disable and destroy a session that was previously created with createSession(android.view.inputmethod.InputMethod.SessionCallback).

abstract void setSessionEnabled(InputMethodSession session, boolean enabled)

Control whether a particular input method session is active.

abstract void showSoftInput(int flags, ResultReceiver resultReceiver)

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

abstract void startInput(InputConnection inputConnection, 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 unbindInput()

Unbind an application environment, called when the information previously set by bindInput(InputBinding) is no longer valid for this input method.

Public constructors

InputMethodImpl

public InputMethodImpl ()

Public methods

attachToken

Added in API level 3
public void attachToken (IBinder token)


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

Parameters
token IBinder

bindInput

Added in API level 3
public void bindInput (InputBinding binding)

Calls InputMethodService.onBindInput() when done.


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

Parameters
binding InputBinding

changeInputMethodSubtype

Added in API level 11
public void changeInputMethodSubtype (InputMethodSubtype subtype)


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

Parameters
subtype InputMethodSubtype

hideSoftInput

Added in API level 3
public void hideSoftInput (int flags, 
                ResultReceiver resultReceiver)


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

Parameters
flags int

resultReceiver ResultReceiver

restartInput

Added in API level 3
public void restartInput (InputConnection ic, 
                EditorInfo editorInfo)


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

Parameters
ic InputConnection

editorInfo EditorInfo

showSoftInput

Added in API level 3
public void showSoftInput (int flags, 
                ResultReceiver resultReceiver)


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

Parameters
flags int: Value is either 0 or a combination of InputMethod.SHOW_EXPLICIT, and InputMethod.SHOW_FORCED

resultReceiver ResultReceiver

startInput

Added in API level 3
public void startInput (InputConnection ic, 
                EditorInfo editorInfo)


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

Parameters
ic InputConnection

editorInfo EditorInfo

unbindInput

Added in API level 3
public void unbindInput ()

Calls InputMethodService.onUnbindInput() when done.


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