InputMethodService Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
InputMethodService provides a standard implementation of an InputMethod, which final implementations can derive from and customize.
[Android.Runtime.Register("android/inputmethodservice/InputMethodService", DoNotGenerateAcw=true)]
public class InputMethodService : Android.InputMethodServices.AbstractInputMethodService
[<Android.Runtime.Register("android/inputmethodservice/InputMethodService", DoNotGenerateAcw=true)>]
type InputMethodService = class
inherit AbstractInputMethodService
- Inheritance
- Attributes
Remarks
InputMethodService provides a standard implementation of an InputMethod, which final implementations can derive from and customize. See the base class AbstractInputMethodService
and the InputMethod
interface for more information on the basics of writing input methods.
In addition to the normal Service lifecycle methods, this class introduces some new specific callbacks that most subclasses will want to make use of:
<ul> <li> #onInitializeInterface()
for user-interface initialization, in particular to deal with configuration changes while the service is running. <li> #onBindInput
to find out about switching to a new client. <li> #onStartInput
to deal with an input session starting with the client. <li> #onCreateInputView()
, #onCreateCandidatesView()
, and #onCreateExtractTextView()
for non-demand generation of the UI. <li> #onStartInputView(EditorInfo, boolean)
to deal with input starting within the input area of the IME. </ul>
An input method has significant discretion in how it goes about its work: the android.inputmethodservice.InputMethodService
provides a basic framework for standard UI elements (input view, candidates view, and running in fullscreen mode), but it is up to a particular implementor to decide how to use them. For example, one input method could implement an input area with a keyboard, another could allow the user to draw text, while a third could have no input area (and thus not be visible to the user) but instead listen to audio and perform text to speech conversion.
In the implementation provided here, all of these elements are placed together in a single window managed by the InputMethodService. It will execute callbacks as it needs information about them, and provides APIs for programmatic control over them. They layout of these elements is explicitly defined:
<ul> <li>The soft input view, if available, is placed at the bottom of the screen. <li>The candidates view, if currently shown, is placed above the soft input view. <li>If not running fullscreen, the application is moved or resized to be above these views; if running fullscreen, the window will completely cover the application and its top part will contain the extract text of what is currently being edited by the application. </ul>
"SoftInputView"><h3>Soft Input View</h3>
Central to most input methods is the soft input view. This is where most user interaction occurs: pressing on soft keys, drawing characters, or however else your input method wants to generate text. Most implementations will simply have their own view doing all of this work, and return a new instance of it when #onCreateInputView()
is called. At that point, as long as the input view is visible, you will see user interaction in that view and can call back on the InputMethodService to interact with the application as appropriate.
There are some situations where you want to decide whether or not your soft input view should be shown to the user. This is done by implementing the #onEvaluateInputViewShown()
to return true or false based on whether it should be shown in the current environment. If any of your state has changed that may impact this, call #updateInputViewShown()
to have it re-evaluated. The default implementation always shows the input view unless there is a hard keyboard available, which is the appropriate behavior for most input methods.
"CandidatesView"><h3>Candidates View</h3>
Often while the user is generating raw text, an input method wants to provide them with a list of possible interpretations of that text that can be selected for use. This is accomplished with the candidates view, and like the soft input view you implement #onCreateCandidatesView()
to instantiate your own view implementing your candidates UI.
Management of the candidates view is a little different than the input view, because the candidates view tends to be more transient, being shown only when there are possible candidates for the current text being entered by the user. To control whether the candidates view is shown, you use #setCandidatesViewShown(boolean)
. Note that because the candidate view tends to be shown and hidden a lot, it does not impact the application UI in the same way as the soft input view: it will never cause application windows to resize, only cause them to be panned if needed for the user to see the current focus.
"FullscreenMode"><h3>Fullscreen Mode</h3>
Sometimes your input method UI is too large to integrate with the application UI, so you just want to take over the screen. This is accomplished by switching to full-screen mode, causing the input method window to fill the entire screen and add its own "extracted text" editor showing the user the text that is being typed. Unlike the other UI elements, there is a standard implementation for the extract editor that you should not need to change. The editor is placed at the top of the IME, above the input and candidates views.
Similar to the input view, you control whether the IME is running in fullscreen mode by implementing #onEvaluateFullscreenMode()
to return true or false based on whether it should be fullscreen in the current environment. If any of your state has changed that may impact this, call #updateFullscreenMode()
to have it re-evaluated. The default implementation selects fullscreen mode when the screen is in a landscape orientation, which is appropriate behavior for most input methods that have a significant input area.
When in fullscreen mode, you have some special requirements because the user can not see the application UI. In particular, you should implement #onDisplayCompletions(CompletionInfo[])
to show completions generated by your application, typically in your candidates view like you would normally show candidates.
"GeneratingText"><h3>Generating Text</h3>
The key part of an IME is of course generating text for the application. This is done through calls to the android.view.inputmethod.InputConnection
interface to the application, which can be retrieved from #getCurrentInputConnection()
. This interface allows you to generate raw key events or, if the target supports it, directly edit in strings of candidates and committed text.
Information about what the target is expected and supports can be found through the android.view.inputmethod.EditorInfo
class, which is retrieved with #getCurrentInputEditorInfo()
method. The most important part of this is android.view.inputmethod.EditorInfo#inputType EditorInfo.inputType
; in particular, if this is android.view.inputmethod.EditorInfo#TYPE_NULL EditorInfo.TYPE_NULL
, then the target does not support complex edits and you need to only deliver raw key events to it. An input method will also want to look at other values here, to for example detect password mode, auto complete text views, phone number entry, etc.
When the user switches between input targets, you will receive calls to #onFinishInput()
and #onStartInput(EditorInfo, boolean)
. You can use these to reset and initialize your input state for the current target. For example, you will often want to clear any input state, and update a soft keyboard to be appropriate for the new inputType.
Java documentation for android.inputmethodservice.InputMethodService
.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
Constructors
InputMethodService() | |
InputMethodService(IntPtr, JniHandleOwnership) |
A constructor used when creating managed representations of JNI objects; called by the runtime. |
Fields
AccessibilityService |
Use with |
AccountService |
Use with |
ActivityService |
Use with |
AlarmService |
Use with |
AppOpsService |
Use with |
AppSearchService |
Use with |
AppwidgetService |
Use with |
AudioService |
Use with |
BatteryService |
Use with |
BindAllowActivityStarts |
Obsolete.
Flag for |
BindExternalServiceLong |
Works in the same way as |
BindNotPerceptible |
Obsolete.
Flag for |
BindSharedIsolatedProcess |
Obsolete.
Flag for |
BiometricService |
Use with |
BlobStoreService |
Use with |
BluetoothService |
Use with |
BugreportService |
Service to capture a bugreport. (Inherited from Context) |
CameraService |
Use with |
CaptioningService |
Use with |
CarrierConfigService |
Use with |
ClipboardService |
Use with |
CompanionDeviceService |
Use with |
ConnectivityDiagnosticsService |
Use with |
ConnectivityService |
Use with |
ConsumerIrService |
Use with |
CredentialService |
Use with |
CrossProfileAppsService |
Use with |
DeviceIdDefault |
The default device ID, which is the ID of the primary (non-virtual) device. (Inherited from Context) |
DeviceIdInvalid |
Invalid device ID. (Inherited from Context) |
DeviceLockService |
Use with |
DevicePolicyService |
Use with |
DisplayHashService |
Use with |
DisplayService |
Use with |
DomainVerificationService |
Use with |
DownloadService |
Use with |
DropboxService |
Use with |
EuiccService |
Use with |
FileIntegrityService |
Use with |
FingerprintService |
Use with |
GameService |
Use with |
GrammaticalInflectionService |
Use with |
HardwarePropertiesService |
Use with |
HealthconnectService |
Use with |
InputMethodService |
Use with |
InputService |
Use with |
IpsecService |
Use with |
JobSchedulerService |
Use with |
KeyguardService |
Use with |
LauncherAppsService |
Use with |
LayoutInflaterService |
Use with |
LocaleService |
Use with |
LocationService |
Use with |
MediaCommunicationService |
Use with |
MediaMetricsService |
Use with |
MediaProjectionService |
Use with |
MediaRouterService |
Use with |
MediaSessionService |
Use with |
MidiService |
Use with |
NetworkStatsService |
Use with |
NfcService |
Use with |
NotificationService |
Use with |
NsdService |
Use with |
OverlayService |
Use with |
PeopleService |
Use with |
PerformanceHintService |
Use with |
PowerService |
Use with |
PrintService |
|
ReceiverExported |
Obsolete.
Flag for |
ReceiverNotExported |
Obsolete.
Flag for |
ReceiverVisibleToInstantApps |
Obsolete.
Flag for |
RestrictionsService |
Use with |
RoleService |
Use with |
SearchService |
Use with |
SensorService |
Use with |
ShortcutService |
Use with |
StatusBarService |
Use with |
StopForegroundDetach |
Obsolete.
Selector for |
StopForegroundLegacy |
Selector for |
StopForegroundRemove |
Obsolete.
Selector for |
StorageService |
Use with |
StorageStatsService |
Use with |
SystemHealthService |
Use with |
TelecomService |
Use with |
TelephonyImsService |
Use with |
TelephonyService |
Use with |
TelephonySubscriptionService |
Use with |
TextClassificationService |
Use with |
TextServicesManagerService |
Use with |
TvInputService |
Use with |
TvInteractiveAppService |
Use with |
UiModeService |
Use with |
UsageStatsService |
Use with |
UsbService |
Use with |
UserService |
Use with |
VibratorManagerService |
Use with |
VibratorService |
Use with |
VirtualDeviceService |
Use with |
VpnManagementService |
Use with |
WallpaperService |
Use with |
WifiAwareService |
Use with |
WifiP2pService |
Use with |
WifiRttRangingService |
Use with |
WifiService |
Use with |
WindowService |
Use with |
Properties
Application |
Return the application that owns this service. (Inherited from Service) |
ApplicationContext |
Return the context of the single, global Application object of the current process. (Inherited from ContextWrapper) |
ApplicationInfo |
Return the full application info for this context's package. (Inherited from ContextWrapper) |
Assets |
Return an AssetManager instance for your application's package. (Inherited from ContextWrapper) |
AttributionSource | (Inherited from Context) |
AttributionTag |
Attribution can be used in complex apps to logically separate parts of the app. (Inherited from Context) |
BackDisposition |
Retrieves the current disposition mode that indicates the expected back button affordance. -or- Sets the disposition mode that indicates the expected affordance for the back button. |
BaseContext | (Inherited from ContextWrapper) |
CacheDir |
Returns the absolute path to the application specific cache directory on the filesystem. (Inherited from ContextWrapper) |
CandidatesHiddenVisibility |
Returns the visibility mode (either |
Class |
Returns the runtime class of this |
ClassLoader |
Return a class loader you can use to retrieve classes in this package. (Inherited from ContextWrapper) |
CodeCacheDir |
Returns the absolute path to the application specific cache directory on the filesystem designed for storing cached code. (Inherited from ContextWrapper) |
ContentResolver |
Return a ContentResolver instance for your application's package. (Inherited from ContextWrapper) |
CurrentInputBinding |
Return the currently active InputBinding for the input method, or null if there is none. |
CurrentInputConnection |
Retrieve the currently active InputConnection that is bound to the input method, or null if there is none. |
CurrentInputEditorInfo | |
CurrentInputStarted | |
DataDir | (Inherited from ContextWrapper) |
DeviceId |
Gets the device ID this context is associated with. (Inherited from Context) |
Display |
Get the display this context is associated with. (Inherited from Context) |
ExternalCacheDir |
Returns the absolute path to the directory on the primary external filesystem (that is somewhere on ExternalStorageDirectory where the application can place cache files it owns. (Inherited from ContextWrapper) |
ExtractViewShown |
Return whether the fullscreen extract view is shown. -or- Controls the visibility of the extracted text area. |
FilesDir |
Returns the absolute path to the directory on the filesystem where files created with OpenFileOutput(String, FileCreationMode) are stored. (Inherited from ContextWrapper) |
ForegroundServiceType |
If the service has become a foreground service by calling
|
Handle |
The handle to the underlying Android instance. (Inherited from Object) |
InputMethodWindowRecommendedHeight |
Aimed to return the previous input method's |
IsDeviceProtectedStorage | (Inherited from ContextWrapper) |
IsFullscreenMode |
Return whether the input method is <em>currently</em> running in fullscreen mode. |
IsInputViewShown |
Return whether the soft input view is <em>currently</em> shown to the user. |
IsRestricted |
Indicates whether this Context is restricted. (Inherited from Context) |
IsShowInputRequested |
Returns true if we have been asked to show our input view. |
IsUiContext | (Inherited from AbstractInputMethodService) |
JniIdentityHashCode | (Inherited from Object) |
JniPeerMembers | |
KeyDispatcherState |
Return the global |
LayoutInflater | |
MainExecutor |
Return an |
MainLooper |
Return the Looper for the main thread of the current process. (Inherited from ContextWrapper) |
MaxWidth |
Return the maximum width, in pixels, available the input method. |
NoBackupFilesDir |
Returns the absolute path to the directory on the filesystem similar to FilesDir. (Inherited from ContextWrapper) |
ObbDir |
Return the primary external storage directory where this application's OBB files (if there are any) can be found. (Inherited from ContextWrapper) |
OpPackageName |
Return the package name that should be used for |
PackageCodePath |
Return the full path to this context's primary Android package. (Inherited from ContextWrapper) |
PackageManager |
Return PackageManager instance to find global package information. (Inherited from ContextWrapper) |
PackageName |
Return the name of this application's package. (Inherited from ContextWrapper) |
PackageResourcePath |
Return the full path to this context's primary Android package. (Inherited from ContextWrapper) |
Params |
Return the set of parameters which this Context was created with, if it
was created via |
PeerReference | (Inherited from Object) |
Resources |
Return a Resources instance for your application's package. (Inherited from ContextWrapper) |
StylusHandwritingIdleTimeoutMax |
Returns the maximum stylus handwriting session idle-timeout for use with
|
StylusHandwritingSessionTimeout |
Returns the duration after which an ongoing stylus handwriting session that hasn't received
new |
StylusHandwritingWindow |
Returns the stylus handwriting inking window. |
Theme |
Return the Theme object associated with this Context. (Inherited from ContextWrapper) |
ThresholdClass |
This API supports the Mono for Android infrastructure and is not intended to be used directly from your code. |
ThresholdType |
This API supports the Mono for Android infrastructure and is not intended to be used directly from your code. |
Wallpaper | (Inherited from ContextWrapper) |
WallpaperDesiredMinimumHeight | (Inherited from ContextWrapper) |
WallpaperDesiredMinimumWidth | (Inherited from ContextWrapper) |
Window |
Methods
AttachBaseContext(Context) |
Set the base context for this ContextWrapper. (Inherited from ContextWrapper) |
BindService(Intent, Bind, IExecutor, IServiceConnection) |
Same as |
BindService(Intent, Context+BindServiceFlags, IExecutor, IServiceConnection) | (Inherited from Context) |
BindService(Intent, IServiceConnection, Bind) |
Connect to an application service, creating it if needed. (Inherited from ContextWrapper) |
BindService(Intent, IServiceConnection, Context+BindServiceFlags) | (Inherited from Context) |
BindServiceAsUser(Intent, IServiceConnection, Context+BindServiceFlags, UserHandle) | (Inherited from Context) |
BindServiceAsUser(Intent, IServiceConnection, Int32, UserHandle) |
Binds to a service in the given |
CheckCallingOrSelfPermission(String) |
Determine whether the calling process of an IPC or you have been granted a particular permission. (Inherited from ContextWrapper) |
CheckCallingOrSelfUriPermission(Uri, ActivityFlags) |
Determine whether the calling process of an IPC or you has been granted permission to access a specific URI. (Inherited from ContextWrapper) |
CheckCallingOrSelfUriPermissions(IList<Uri>, Int32) |
Determine whether the calling process of an IPC <em>or you</em> has been granted permission to access a list of URIs. (Inherited from Context) |
CheckCallingPermission(String) |
Determine whether the calling process of an IPC you are handling has been granted a particular permission. (Inherited from ContextWrapper) |
CheckCallingUriPermission(Uri, ActivityFlags) |
Determine whether the calling process and user ID has been granted permission to access a specific URI. (Inherited from ContextWrapper) |
CheckCallingUriPermissions(IList<Uri>, Int32) |
Determine whether the calling process and user ID has been granted permission to access a list of URIs. (Inherited from Context) |
CheckPermission(String, Int32, Int32) |
Determine whether the given permission is allowed for a particular process and user ID running in the system. (Inherited from ContextWrapper) |
CheckSelfPermission(String) | (Inherited from ContextWrapper) |
CheckUriPermission(Uri, Int32, Int32, ActivityFlags) |
Determine whether a particular process and user ID has been granted permission to access a specific URI. (Inherited from ContextWrapper) |
CheckUriPermission(Uri, String, String, Int32, Int32, ActivityFlags) |
Check both a Uri and normal permission. (Inherited from ContextWrapper) |
CheckUriPermissions(IList<Uri>, Int32, Int32, Int32) |
Determine whether a particular process and user ID has been granted permission to access a list of URIs. (Inherited from Context) |
ClearWallpaper() |
Obsolete.
(Inherited from ContextWrapper)
|
Clone() |
Creates and returns a copy of this object. (Inherited from Object) |
CreateAttributionContext(String) |
Return a new Context object for the current Context but attribute to a different tag. (Inherited from Context) |
CreateConfigurationContext(Configuration) |
Return a new Context object for the current Context but whose resources are adjusted to match the given Configuration. (Inherited from ContextWrapper) |
CreateContext(ContextParams) |
Creates a context with specific properties and behaviors. (Inherited from Context) |
CreateContextForSplit(String) | (Inherited from ContextWrapper) |
CreateDeviceContext(Int32) |
Returns a new |
CreateDeviceProtectedStorageContext() | (Inherited from ContextWrapper) |
CreateDisplayContext(Display) |
Return a new Context object for the current Context but whose resources are adjusted to match the metrics of the given Display. (Inherited from ContextWrapper) |
CreatePackageContext(String, PackageContextFlags) |
Return a new Context object for the given application name. (Inherited from ContextWrapper) |
CreateWindowContext(Display, Int32, Bundle) |
Creates a |
CreateWindowContext(Int32, Bundle) |
Creates a Context for a non-activity window. (Inherited from Context) |
DatabaseList() |
Returns an array of strings naming the private databases associated with this Context's application package. (Inherited from ContextWrapper) |
DeleteDatabase(String) |
Delete an existing private SQLiteDatabase associated with this Context's application package. (Inherited from ContextWrapper) |
DeleteFile(String) |
Delete the given private file associated with this Context's application package. (Inherited from ContextWrapper) |
DeleteSharedPreferences(String) | (Inherited from ContextWrapper) |
Dispose() | (Inherited from Object) |
Dispose(Boolean) | (Inherited from Object) |
Dump(FileDescriptor, PrintWriter, String[]) |
Print the Service's state into the given stream. (Inherited from Service) |
EnableHardwareAcceleration() |
Obsolete.
You can call this to try to enable accelerated drawing for your IME. |
EnforceCallingOrSelfPermission(String, String) |
If neither you nor the calling process of an IPC you are handling has been granted a particular permission, throw a SecurityException. (Inherited from ContextWrapper) |
EnforceCallingOrSelfUriPermission(Uri, ActivityFlags, String) |
If the calling process of an IPC or you has not been granted permission to access a specific URI, throw SecurityException. (Inherited from ContextWrapper) |
EnforceCallingPermission(String, String) |
If the calling process of an IPC you are handling has not been granted a particular permission, throw a SecurityException. (Inherited from ContextWrapper) |
EnforceCallingUriPermission(Uri, ActivityFlags, String) |
If the calling process and user ID has not been granted permission to access a specific URI, throw SecurityException. (Inherited from ContextWrapper) |
EnforcePermission(String, Int32, Int32, String) |
If the given permission is not allowed for a particular process and user ID running in the system, throw a SecurityException. (Inherited from ContextWrapper) |
EnforceUriPermission(Uri, Int32, Int32, ActivityFlags, String) |
If a particular process and user ID has not been granted permission to access a specific URI, throw SecurityException. (Inherited from ContextWrapper) |
EnforceUriPermission(Uri, String, String, Int32, Int32, ActivityFlags, String) |
Enforce both a Uri and normal permission. (Inherited from ContextWrapper) |
Equals(Object) |
Indicates whether some other object is "equal to" this one. (Inherited from Object) |
FileList() |
Returns an array of strings naming the private files associated with this Context's application package. (Inherited from ContextWrapper) |
FinishStylusHandwriting() |
Finish the current stylus handwriting session. |
GetColor(Int32) |
Returns a color associated with a particular resource ID and styled for the current theme. (Inherited from Context) |
GetColorStateList(Int32) |
Returns a color state list associated with a particular resource ID and styled for the current theme. (Inherited from Context) |
GetDatabasePath(String) | (Inherited from ContextWrapper) |
GetDir(String, FileCreationMode) |
Retrieve, creating if needed, a new directory in which the application can place its own custom data files. (Inherited from ContextWrapper) |
GetDrawable(Int32) |
Returns a drawable object associated with a particular resource ID and styled for the current theme. (Inherited from Context) |
GetExternalCacheDirs() |
Returns absolute paths to application-specific directories on all external storage devices where the application can place cache files it owns. (Inherited from ContextWrapper) |
GetExternalFilesDir(String) |
Returns the absolute path to the directory on the primary external filesystem (that is somewhere on ExternalStorageDirectory) where the application can place persistent files it owns. (Inherited from ContextWrapper) |
GetExternalFilesDirs(String) |
Returns absolute paths to application-specific directories on all external storage devices where the application can place persistent files it owns. (Inherited from ContextWrapper) |
GetExternalMediaDirs() |
Obsolete.
Returns absolute paths to application-specific directories on all external storage devices where the application can place media files. (Inherited from ContextWrapper) |
GetFileStreamPath(String) |
Returns the absolute path on the filesystem where a file created with OpenFileOutput(String, FileCreationMode) is stored. (Inherited from ContextWrapper) |
GetHashCode() |
Returns a hash code value for the object. (Inherited from Object) |
GetObbDirs() |
Returns absolute paths to application-specific directories on all external storage devices where the application's OBB files (if there are any) can be found. (Inherited from ContextWrapper) |
GetSharedPreferences(String, FileCreationMode) |
Retrieve and hold the contents of the preferences file 'name', returning a SharedPreferences through which you can retrieve and modify its values. (Inherited from ContextWrapper) |
GetString(Int32, Object[]) |
Returns a localized string from the application's package's default string table. (Inherited from Context) |
GetString(Int32) |
Returns a localized string from the application's package's default string table. (Inherited from Context) |
GetSystemService(Class) |
Return the handle to a system-level service by class. (Inherited from Context) |
GetSystemService(String) |
Return the handle to a system-level service by name. (Inherited from ContextWrapper) |
GetSystemServiceName(Class) | (Inherited from ContextWrapper) |
GetText(Int32) |
Return a localized, styled CharSequence from the application's package's default string table. (Inherited from Context) |
GetTextForImeAction(ImeAction) |
Return text that can be used as a button label for the given
|
GetTextForImeActionFormatted(ImeAction) |
Return text that can be used as a button label for the given
|
GetTextFormatted(Int32) |
Return a localized, styled CharSequence from the application's package's default string table. (Inherited from Context) |
GrantUriPermission(String, Uri, ActivityFlags) |
Grant permission to access a specific Uri to another package, regardless of whether that package has general permission to access the Uri's content provider. (Inherited from ContextWrapper) |
HideStatusIcon() | |
HideWindow() | |
JavaFinalize() |
Called by the garbage collector on an object when garbage collection determines that there are no more references to the object. (Inherited from Object) |
MoveDatabaseFrom(Context, String) | (Inherited from ContextWrapper) |
MoveSharedPreferencesFrom(Context, String) | (Inherited from ContextWrapper) |
Notify() |
Wakes up a single thread that is waiting on this object's monitor. (Inherited from Object) |
NotifyAll() |
Wakes up all threads that are waiting on this object's monitor. (Inherited from Object) |
ObtainStyledAttributes(IAttributeSet, Int32[], Int32, Int32) |
Retrieve styled attribute information in this Context's theme. (Inherited from Context) |
ObtainStyledAttributes(IAttributeSet, Int32[]) |
Retrieve styled attribute information in this Context's theme. (Inherited from Context) |
ObtainStyledAttributes(Int32, Int32[]) |
Retrieve styled attribute information in this Context's theme. (Inherited from Context) |
ObtainStyledAttributes(Int32[]) |
Retrieve styled attribute information in this Context's theme. (Inherited from Context) |
OnAppPrivateCommand(String, Bundle) | |
OnBind(Intent) |
Return the communication channel to the service. (Inherited from AbstractInputMethodService) |
OnBindInput() |
Called when a new client has bound to the input method. |
OnComputeInsets(InputMethodService+Insets) |
Compute the interesting insets into your UI. |
OnConfigurationChanged(Configuration) |
Called by the system when the device configuration changes while your component is running. (Inherited from Service) |
OnConfigureWindow(Window, Boolean, Boolean) |
Update the given window's parameters for the given mode. |
OnCreate() |
Called by the system when the service is first created. (Inherited from Service) |
OnCreateCandidatesView() |
Create and return the view hierarchy used to show candidates. |
OnCreateExtractTextView() |
Called by the framework to create the layout for showing extracted text. |
OnCreateInlineSuggestionsRequest(Bundle) |
Called when Autofill is requesting an |
OnCreateInputMethodInterface() |
Obsolete.
Implement to return our standard |
OnCreateInputMethodSessionInterface() |
Obsolete.
Implement to return our standard |
OnCreateInputView() |
Create and return the view hierarchy used for the input area (such as a soft keyboard). |
OnCurrentInputMethodSubtypeChanged(InputMethodSubtype) |
Called when the subtype was changed. |
OnDestroy() |
Called by the system to notify a Service that it is no longer used and is being removed. (Inherited from Service) |
OnDisplayCompletions(CompletionInfo[]) |
Called when the application has reported auto-completion candidates that it would like to have the input method displayed. |
OnEvaluateFullscreenMode() |
Override this to control when the input method should run in fullscreen mode. |
OnEvaluateInputViewShown() |
Override this to control when the soft input area should be shown to the user. |
OnExtractedCursorMovement(Int32, Int32) |
This is called when the user has performed a cursor movement in the extracted text view, when it is running in fullscreen mode. |
OnExtractedSelectionChanged(Int32, Int32) |
This is called when the user has moved the cursor in the extracted text view, when running in fullsreen mode. |
OnExtractedTextClicked() |
This is called when the user has clicked on the extracted text view, when running in fullscreen mode. |
OnExtractingInputChanged(EditorInfo) |
This is called when, while currently displayed in extract mode, the current input target changes. |
OnExtractTextContextMenuItem(Int32) |
This is called when the user has selected a context menu item from the extracted text view, when running in fullscreen mode. |
OnFinishCandidatesView(Boolean) |
Called when the candidates view is being hidden from the user. |
OnFinishInput() |
Called to inform the input method that text input has finished in the last editor. |
OnFinishInputView(Boolean) |
Called when the input view is being hidden from the user. |
OnFinishStylusHandwriting() |
Called when the current stylus handwriting session was finished (either by the system or
via |
OnGenericMotionEvent(MotionEvent) |
Implement this to handle generic motion events on your input method. (Inherited from AbstractInputMethodService) |
OnInitializeInterface() |
This is a hook that subclasses can use to perform initialization of their interface. |
OnInlineSuggestionsResponse(InlineSuggestionsResponse) |
Called when Autofill responds back with |
OnKeyDown(Keycode, KeyEvent) |
Called back when a |
OnKeyLongPress(Keycode, KeyEvent) |
Default implementation of |
OnKeyMultiple(Keycode, Int32, KeyEvent) |
Override this to intercept special key multiple events before they are processed by the application. |
OnKeyUp(Keycode, KeyEvent) |
Override this to intercept key up events before they are processed by the application. |
OnLowMemory() |
This is called when the overall system is running low on memory, and actively running processes should trim their memory usage. (Inherited from Service) |
OnPrepareStylusHandwriting() |
Called to prepare stylus handwriting. |
OnRebind(Intent) |
Called when new clients have connected to the service, after it had
previously been notified that all had disconnected in its
|
OnShowInputRequested(ShowFlags, Boolean) |
The system has decided that it may be time to show your input method. |
OnStart(Intent, Int32) |
Obsolete.
This member is deprecated. (Inherited from Service) |
OnStartCandidatesView(EditorInfo, Boolean) |
Called when only the candidates view has been shown for showing processing as the user enters text through a hard keyboard. |
OnStartCommand(Intent, StartCommandFlags, Int32) |
Called by the system every time a client explicitly starts the service by calling
|
OnStartInput(EditorInfo, Boolean) |
Called to inform the input method that text input has started in an editor. |
OnStartInputView(EditorInfo, Boolean) |
Called when the input view is being shown and input has started on a new editor. |
OnStartStylusHandwriting() |
Called when an app requests stylus handwriting
|
OnStylusHandwritingMotionEvent(MotionEvent) |
Called after |
OnTaskRemoved(Intent) |
This is called if the service is currently running and the user has removed a task that comes from the service's application. (Inherited from Service) |
OnTimeout(Int32) |
Callback called on timeout for |
OnTrackballEvent(MotionEvent) |
Implement this to handle trackball events on your input method. (Inherited from AbstractInputMethodService) |
OnTrimMemory(TrimMemory) |
Called when the operating system has determined that it is a good time for a process to trim unneeded memory from its process. (Inherited from Service) |
OnUnbind(Intent) |
Called when all clients have disconnected from a particular interface published by the service. (Inherited from Service) |
OnUnbindInput() |
Called when the previous bound client is no longer associated with the input method. |
OnUpdateCursor(Rect) |
Obsolete.
Called when the application has reported a new location of its text cursor. |
OnUpdateCursorAnchorInfo(CursorAnchorInfo) |
Called when the application has reported a new location of its text insertion point and characters in the composition string. |
OnUpdateEditorToolType(MotionEventToolType) |
Called when the user tapped or clicked an |
OnUpdateExtractedText(Int32, ExtractedText) |
Called when the application has reported new extracted text to be shown due to changes in its current text state. |
OnUpdateExtractingViews(EditorInfo) |
Called when the fullscreen-mode extracting editor info has changed, to update the state of its UI such as the action buttons shown. |
OnUpdateExtractingVisibility(EditorInfo) |
Called when the fullscreen-mode extracting editor info has changed, to determine whether the extracting (extract text and candidates) portion of the UI should be shown. |
OnUpdateSelection(Int32, Int32, Int32, Int32, Int32, Int32) |
Called when the application has reported a new selection region of the text. |
OnViewClicked(Boolean) |
Called when the user tapped or clicked a text view. |
OnWindowHidden() |
Called when the input method window has been hidden from the user, after previously being visible. |
OnWindowShown() |
Called immediately before the input method window is shown to the user. |
OpenFileInput(String) |
Open a private file associated with this Context's application package for reading. (Inherited from ContextWrapper) |
OpenFileOutput(String, FileCreationMode) |
Open a private file associated with this Context's application package for writing. (Inherited from ContextWrapper) |
OpenOrCreateDatabase(String, FileCreationMode, SQLiteDatabase+ICursorFactory, IDatabaseErrorHandler) |
Open a new private SQLiteDatabase associated with this Context's application package. (Inherited from ContextWrapper) |
OpenOrCreateDatabase(String, FileCreationMode, SQLiteDatabase+ICursorFactory) |
Open a new private SQLiteDatabase associated with this Context's application package. (Inherited from ContextWrapper) |
PeekWallpaper() |
Obsolete.
(Inherited from ContextWrapper)
|
RegisterComponentCallbacks(IComponentCallbacks) |
Add a new |
RegisterDeviceIdChangeListener(IExecutor, IIntConsumer) |
Adds a new device ID changed listener to the |
RegisterReceiver(BroadcastReceiver, IntentFilter, ActivityFlags) |
Obsolete.
(Inherited from ContextWrapper)
|
RegisterReceiver(BroadcastReceiver, IntentFilter, ReceiverFlags) | (Inherited from Context) |
RegisterReceiver(BroadcastReceiver, IntentFilter, String, Handler, ActivityFlags) |
Obsolete.
(Inherited from ContextWrapper)
|
RegisterReceiver(BroadcastReceiver, IntentFilter, String, Handler, ReceiverFlags) | (Inherited from Context) |
RegisterReceiver(BroadcastReceiver, IntentFilter, String, Handler) |
Register to receive intent broadcasts, to run in the context of scheduler. (Inherited from ContextWrapper) |
RegisterReceiver(BroadcastReceiver, IntentFilter) |
Register a BroadcastReceiver to be run in the main activity thread. (Inherited from ContextWrapper) |
RemoveStickyBroadcast(Intent) |
Obsolete.
(Inherited from ContextWrapper)
|
RemoveStickyBroadcastAsUser(Intent, UserHandle) |
Obsolete.
(Inherited from ContextWrapper)
|
RequestHideSelf(HideSoftInputFlags) |
Close this input method's soft input area, removing it from the display. |
RequestShowSelf(ShowFlags) |
Show the input method's soft input area, so the user sees the input method window and can interact with it. |
RevokeSelfPermissionOnKill(String) |
Triggers the asynchronous revocation of a runtime permission. (Inherited from Context) |
RevokeSelfPermissionsOnKill(ICollection<String>) |
Triggers the revocation of one or more permissions for the calling package. (Inherited from Context) |
RevokeUriPermission(String, Uri, ActivityFlags) | (Inherited from ContextWrapper) |
RevokeUriPermission(Uri, ActivityFlags) |
Remove all permissions to access a particular content provider Uri that were previously added with M:Android.Content.Context.GrantUriPermission(System.String,Android.Net.Uri,Android.Net.Uri). (Inherited from ContextWrapper) |
SendBroadcast(Intent, String, Bundle) |
Broadcast the given intent to all interested BroadcastReceivers, allowing an optional required permission to be enforced. (Inherited from Context) |
SendBroadcast(Intent, String) |
Broadcast the given intent to all interested BroadcastReceivers, allowing an optional required permission to be enforced. (Inherited from ContextWrapper) |
SendBroadcast(Intent) |
Broadcast the given intent to all interested BroadcastReceivers. (Inherited from ContextWrapper) |
SendBroadcastAsUser(Intent, UserHandle, String) |
Version of SendBroadcast(Intent, String) that allows you to specify the user the broadcast will be sent to. (Inherited from ContextWrapper) |
SendBroadcastAsUser(Intent, UserHandle) |
Version of SendBroadcast(Intent) that allows you to specify the user the broadcast will be sent to. (Inherited from ContextWrapper) |
SendBroadcastWithMultiplePermissions(Intent, String[]) |
Broadcast the given intent to all interested BroadcastReceivers, allowing an array of required permissions to be enforced. (Inherited from Context) |
SendDefaultEditorAction(Boolean) |
Ask the input target to execute its default action via
|
SendDownUpKeyEvents(Keycode) |
Send the given key event code (as defined by |
SendKeyChar(Char) |
Send the given UTF-16 character to the current input connection. |
SendOrderedBroadcast(Intent, Int32, String, String, BroadcastReceiver, Handler, String, Bundle, Bundle) | (Inherited from ContextWrapper) |
SendOrderedBroadcast(Intent, String, BroadcastReceiver, Handler, Result, String, Bundle) |
Version of SendBroadcast(Intent) that allows you to receive data back from the broadcast. (Inherited from ContextWrapper) |
SendOrderedBroadcast(Intent, String, Bundle, BroadcastReceiver, Handler, Result, String, Bundle) |
Version of |
SendOrderedBroadcast(Intent, String, Bundle) |
Broadcast the given intent to all interested BroadcastReceivers, delivering them one at a time to allow more preferred receivers to consume the broadcast before it is delivered to less preferred receivers. (Inherited from Context) |
SendOrderedBroadcast(Intent, String, String, BroadcastReceiver, Handler, Result, String, Bundle) |
Version of
|
SendOrderedBroadcast(Intent, String) | (Inherited from ContextWrapper) |
SendOrderedBroadcastAsUser(Intent, UserHandle, String, BroadcastReceiver, Handler, Result, String, Bundle) | (Inherited from ContextWrapper) |
SendStickyBroadcast(Intent, Bundle) |
Perform a |
SendStickyBroadcast(Intent) |
Obsolete.
Perform a |
SendStickyBroadcastAsUser(Intent, UserHandle) |
Obsolete.
(Inherited from ContextWrapper)
|
SendStickyOrderedBroadcast(Intent, BroadcastReceiver, Handler, Result, String, Bundle) |
Obsolete.
(Inherited from ContextWrapper)
|
SendStickyOrderedBroadcastAsUser(Intent, UserHandle, BroadcastReceiver, Handler, Result, String, Bundle) |
Obsolete.
(Inherited from ContextWrapper)
|
SetCandidatesView(View) |
Replaces the current candidates view with a new one. |
SetCandidatesViewShown(Boolean) |
Controls the visibility of the candidates display area. |
SetExtractView(View) | |
SetForeground(Boolean) |
This member is deprecated. (Inherited from Service) |
SetHandle(IntPtr, JniHandleOwnership) |
Sets the Handle property. (Inherited from Object) |
SetInputView(View) |
Replaces the current input view with a new one. |
SetTheme(Int32) |
Set the base theme for this context. (Inherited from ContextWrapper) |
SetWallpaper(Bitmap) |
Obsolete.
(Inherited from ContextWrapper)
|
SetWallpaper(Stream) |
Obsolete.
(Inherited from ContextWrapper)
|
ShouldOfferSwitchingToNextInputMethod() |
Returns true if the current IME needs to offer the users ways to switch to a next input method (e. |
ShowStatusIcon(Int32) | |
ShowWindow(Boolean) | |
StartActivities(Intent[], Bundle) |
Launch multiple new activities. (Inherited from ContextWrapper) |
StartActivities(Intent[]) |
Same as StartActivities(Intent[], Bundle) with no options specified. (Inherited from ContextWrapper) |
StartActivity(Intent, Bundle) |
Launch a new activity. (Inherited from ContextWrapper) |
StartActivity(Intent) |
Same as StartActivity(Intent, Bundle) with no options specified. (Inherited from ContextWrapper) |
StartActivity(Type) | (Inherited from Context) |
StartForeground(Int32, Notification, ForegroundService) |
An overloaded version of |
StartForeground(Int32, Notification) |
If your service is started (running through |
StartForegroundService(Intent) | (Inherited from ContextWrapper) |
StartInstrumentation(ComponentName, String, Bundle) |
Start executing an Instrumentation class. (Inherited from ContextWrapper) |
StartIntentSender(IntentSender, Intent, ActivityFlags, ActivityFlags, Int32, Bundle) |
Like StartActivity(Intent, Bundle), but taking a IntentSender to start. (Inherited from ContextWrapper) |
StartIntentSender(IntentSender, Intent, ActivityFlags, ActivityFlags, Int32) | (Inherited from ContextWrapper) |
StartService(Intent) |
Request that a given application service be started. (Inherited from ContextWrapper) |
StopForeground(Boolean) |
Legacy version of |
StopForeground(StopForegroundFlags) |
Remove this service from foreground state, allowing it to be killed if more memory is needed. (Inherited from Service) |
StopSelf() |
Stop the service, if it was previously started. (Inherited from Service) |
StopSelf(Int32) |
Old version of |
StopSelfResult(Int32) |
Stop the service if the most recent time it was started was <var>startId</var>. (Inherited from Service) |
StopService(Intent) |
Request that a given application service be stopped. (Inherited from ContextWrapper) |
SwitchInputMethod(String, InputMethodSubtype) |
Force switch to a new input method, as identified by |
SwitchInputMethod(String) |
Force switch to a new input method, as identified by <var>id</var>. |
SwitchToNextInputMethod(Boolean) |
Force switch to the next input method and subtype. |
SwitchToPreviousInputMethod() |
Force switch to the last used input method and subtype. |
ToArray<T>() | (Inherited from Object) |
ToString() |
Returns a string representation of the object. (Inherited from Object) |
UnbindService(IServiceConnection) |
Disconnect from an application service. (Inherited from ContextWrapper) |
UnregisterComponentCallbacks(IComponentCallbacks) |
Remove a |
UnregisterDeviceIdChangeListener(IIntConsumer) |
Removes a device ID changed listener from the Context. (Inherited from Context) |
UnregisterFromRuntime() | (Inherited from Object) |
UnregisterReceiver(BroadcastReceiver) |
Unregister a previously registered BroadcastReceiver. (Inherited from ContextWrapper) |
UpdateFullscreenMode() |
Re-evaluate whether the input method should be running in fullscreen mode, and update its UI if this has changed since the last time it was evaluated. |
UpdateInputViewShown() |
Re-evaluate whether the soft input area should currently be shown, and update its UI if this has changed since the last time it was evaluated. |
UpdateServiceGroup(IServiceConnection, Int32, Int32) |
For a service previously bound with |
Wait() |
Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>. (Inherited from Object) |
Wait(Int64, Int32) |
Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed. (Inherited from Object) |
Wait(Int64) |
Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed. (Inherited from Object) |
Explicit Interface Implementations
IJavaPeerable.Disposed() | (Inherited from Object) |
IJavaPeerable.DisposeUnlessReferenced() | (Inherited from Object) |
IJavaPeerable.Finalized() | (Inherited from Object) |
IJavaPeerable.JniManagedPeerState | (Inherited from Object) |
IJavaPeerable.SetJniIdentityHashCode(Int32) | (Inherited from Object) |
IJavaPeerable.SetJniManagedPeerState(JniManagedPeerStates) | (Inherited from Object) |
IJavaPeerable.SetPeerReference(JniObjectReference) | (Inherited from Object) |
Extension Methods
JavaCast<TResult>(IJavaObject) |
Performs an Android runtime-checked type conversion. |
JavaCast<TResult>(IJavaObject) | |
GetJniTypeName(IJavaPeerable) |