Language

Instrumentation.WaitForMonitorWithTimeout Method

Definition

Wait for an existing ActivityMonitor to be hit, with a timeout.

[Android.Runtime.Register("waitForMonitorWithTimeout", "(Landroid/app/Instrumentation$ActivityMonitor;J)Landroid/app/Activity;", "GetWaitForMonitorWithTimeout_Landroid_app_Instrumentation_ActivityMonitor_JHandler")]
public virtual Android.App.Activity? WaitForMonitorWithTimeout(Android.App.Instrumentation.ActivityMonitor? monitor, long timeOut);
[<Android.Runtime.Register("waitForMonitorWithTimeout", "(Landroid/app/Instrumentation$ActivityMonitor;J)Landroid/app/Activity;", "GetWaitForMonitorWithTimeout_Landroid_app_Instrumentation_ActivityMonitor_JHandler")>]
abstract member WaitForMonitorWithTimeout : Android.App.Instrumentation.ActivityMonitor * int64 -> Android.App.Activity
override this.WaitForMonitorWithTimeout : Android.App.Instrumentation.ActivityMonitor * int64 -> Android.App.Activity

Parameters

monitor
Instrumentation.ActivityMonitor

Instrumentation.ActivityMonitor: The ActivityMonitor to wait for.

timeOut
Int64

long: The timeout in milliseconds. Zero imposes no time limit.

Returns

The recorded matching activity, or null if the wait ends without a match.

Attributes

Remarks

Wait for an existing ActivityMonitor to be hit. A matching Activity object is returned, or null if the wait ends without a match, such as on timeout or interruption. The monitor is removed from the activity monitor list after the wait, including when the timeout expires.

Android reference for android.app.Instrumentation.waitForMonitorWithTimeout.

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