Freigeben über


AccessibilityService.SoftKeyboardController.SetInputMethodEnabled Method

Definition

Enable or disable the specified IME for the user for whom the service is activated.

[Android.Runtime.Register("setInputMethodEnabled", "(Ljava/lang/String;Z)I", "", ApiSince=33)]
public int SetInputMethodEnabled (string imeId, bool enabled);
[<Android.Runtime.Register("setInputMethodEnabled", "(Ljava/lang/String;Z)I", "", ApiSince=33)>]
member this.SetInputMethodEnabled : string * bool -> int

Parameters

imeId
String

The ID of the input method to enable or disable. This IME must be installed.

enabled
Boolean

true if the input method associated with imeId should be enabled.

Returns

status code for the result of enabling/disabling the input method associated with imeId.

Attributes

Remarks

Enable or disable the specified IME for the user for whom the service is activated. The IME needs to be in the same package as the service and needs to be allowed by device policy, if there is one. The change will persist until the specified IME is next explicitly enabled or disabled by whatever means, such as user choice, and may persist beyond the life cycle of the requesting service.

Java documentation for android.accessibilityservice.AccessibilityService.SoftKeyboardController.setInputMethodEnabled(java.lang.String, boolean).

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.

Applies to