Android Guides | Samples

Android.App.UiAutomation.InjectInputEvent Method

A method for injecting an arbitrary input event.

Syntax

[Android.Runtime.Register("injectInputEvent", "(Landroid/view/InputEvent;Z)Z", "")]
public Boolean InjectInputEvent (InputEvent e, Boolean sync)

Parameters

e
The event to inject.
sync
Whether to inject the event synchronously.

Remarks

A method for injecting an arbitrary input event.

Note: It is caller's responsibility to recycle the event.

[Android Documentation]

Requirements

Namespace: Android.App
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 18