Udostępnij za pośrednictwem


UiAutomation.InjectInputEvent(InputEvent, Boolean) Method

Definition

A method for injecting an arbitrary input event.

[Android.Runtime.Register("injectInputEvent", "(Landroid/view/InputEvent;Z)Z", "")]
public bool InjectInputEvent (Android.Views.InputEvent? e, bool sync);
[<Android.Runtime.Register("injectInputEvent", "(Landroid/view/InputEvent;Z)Z", "")>]
member this.InjectInputEvent : Android.Views.InputEvent * bool -> bool

Parameters

e
InputEvent

The event to inject.

sync
Boolean

Whether to inject the event synchronously.

Returns

Whether event injection succeeded.

Attributes

Remarks

A method for injecting an arbitrary input event.

This method waits for all window container animations and surface operations to complete.

<strong>Note:</strong> It is caller's responsibility to recycle the event.

Java documentation for android.app.UiAutomation.injectInputEvent(android.view.InputEvent, 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