IInputConnection.TakeSnapshot Method

Definition

Called by the system when it needs to take a snapshot of multiple text-related data in an atomic manner.

[Android.Runtime.Register("takeSnapshot", "()Landroid/view/inputmethod/TextSnapshot;", "GetTakeSnapshotHandler:Android.Views.InputMethods.IInputConnection, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=33)]
public virtual Android.Views.InputMethods.TextSnapshot? TakeSnapshot ();
[<Android.Runtime.Register("takeSnapshot", "()Landroid/view/inputmethod/TextSnapshot;", "GetTakeSnapshotHandler:Android.Views.InputMethods.IInputConnection, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=33)>]
abstract member TakeSnapshot : unit -> Android.Views.InputMethods.TextSnapshot
override this.TakeSnapshot : unit -> Android.Views.InputMethods.TextSnapshot

Returns

null if TextSnapshot is unavailable and/or this API is called from IMEs.

Attributes

Remarks

Called by the system when it needs to take a snapshot of multiple text-related data in an atomic manner.

<strong>Editor authors</strong>: Supporting this method is strongly encouraged. Atomically taken TextSnapshot is going to be really helpful for the system when optimizing IPCs in a safe and deterministic manner. Return null if an atomically taken TextSnapshot is unavailable. The system continues supporting such a scenario gracefully.

<strong>IME authors</strong>: Currently IMEs cannot call this method directly and always receive null as the result.

Java documentation for android.view.inputmethod.InputConnection.takeSnapshot().

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