IInputConnection.PerformPrivateCommand(String, Bundle) Method

Definition

API to send private commands from an input method to its connected editor.

[Android.Runtime.Register("performPrivateCommand", "(Ljava/lang/String;Landroid/os/Bundle;)Z", "GetPerformPrivateCommand_Ljava_lang_String_Landroid_os_Bundle_Handler:Android.Views.InputMethods.IInputConnectionInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public bool PerformPrivateCommand (string? action, Android.OS.Bundle? data);
[<Android.Runtime.Register("performPrivateCommand", "(Ljava/lang/String;Landroid/os/Bundle;)Z", "GetPerformPrivateCommand_Ljava_lang_String_Landroid_os_Bundle_Handler:Android.Views.InputMethods.IInputConnectionInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member PerformPrivateCommand : string * Android.OS.Bundle -> bool

Parameters

action
String

Name of the command to be performed. This <em>must</em> be a scoped name, i.e. prefixed with a package name you own, so that different developers will not create conflicting commands.

data
Bundle

Any data to include with the command.

Returns

true if the command was sent (whether or not the associated editor understood it), false if the input connection is no longer valid.

Attributes

Remarks

API to send private commands from an input method to its connected editor. This can be used to provide domain-specific features that are only known between certain input methods and their clients. Note that because the InputConnection protocol is asynchronous, you have no way to get a result back or know if the client understood the command; you can use the information in EditorInfo to determine if a client supports a particular command.

Java documentation for android.view.inputmethod.InputConnection.performPrivateCommand(java.lang.String, android.os.Bundle).

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