Share via


AbstractInputMethodService.AbstractInputMethodImpl.AttachToken Method

Definition

Called first thing after an input method is created, this supplies a unique token for the session it has with the system service.

[Android.Runtime.Register("attachToken", "(Landroid/os/IBinder;)V", "GetAttachToken_Landroid_os_IBinder_Handler")]
public abstract void AttachToken (Android.OS.IBinder token);
[<Android.Runtime.Register("attachToken", "(Landroid/os/IBinder;)V", "GetAttachToken_Landroid_os_IBinder_Handler")>]
abstract member AttachToken : Android.OS.IBinder -> unit

Parameters

token
IBinder

Implements

Attributes

Remarks

Called first thing after an input method is created, this supplies a unique token for the session it has with the system service. It is needed to identify itself with the service to validate its operations. This token <strong>must not</strong> be passed to applications, since it grants special priviledges that should not be given to applications.

The system guarantees that this method is called back between InputMethodService#onCreate() and InputMethodService#onDestroy() at most once.

Java documentation for android.view.inputmethod.InputMethod.attachToken(android.os.IBinder).

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