Instrumentation.SendPointerSync(MotionEvent) Method

Definition

Dispatches a pointer event into a window owned by the instrumented application, and waits for it to be processed.

[Android.Runtime.Register("sendPointerSync", "(Landroid/view/MotionEvent;)V", "GetSendPointerSync_Landroid_view_MotionEvent_Handler")]
public virtual void SendPointerSync(Android.Views.MotionEvent? e);
[<Android.Runtime.Register("sendPointerSync", "(Landroid/view/MotionEvent;)V", "GetSendPointerSync_Landroid_view_MotionEvent_Handler")>]
abstract member SendPointerSync : Android.Views.MotionEvent -> unit
override this.SendPointerSync : Android.Views.MotionEvent -> unit

Parameters

Attributes

Remarks

Dispatches a pointer event into a window owned by the instrumented application, and waits for it to be processed. If the motion event being injected is targeted at a window that is not owned by the instrumented application, the input injection will fail. See getUiAutomation() for injecting events into all windows. This method blocks until the recipient has finished handling the event. Note that the recipient may not have completely finished reacting from the event when this method returns. For example, it may still be in the process of updating its display or UI contents upon reacting to the injected event.

Android reference for android.app.Instrumentation.sendPointerSync.

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