Instrumentation.WaitForMonitor(Instrumentation+ActivityMonitor) Method

Definition

Wait for an existing ActivityMonitor to be hit.

[Android.Runtime.Register("waitForMonitor", "(Landroid/app/Instrumentation$ActivityMonitor;)Landroid/app/Activity;", "GetWaitForMonitor_Landroid_app_Instrumentation_ActivityMonitor_Handler")]
public virtual Android.App.Activity? WaitForMonitor(Android.App.Instrumentation.ActivityMonitor? monitor);
[<Android.Runtime.Register("waitForMonitor", "(Landroid/app/Instrumentation$ActivityMonitor;)Landroid/app/Activity;", "GetWaitForMonitor_Landroid_app_Instrumentation_ActivityMonitor_Handler")>]
abstract member WaitForMonitor : Android.App.Instrumentation.ActivityMonitor -> Android.App.Activity
override this.WaitForMonitor : Android.App.Instrumentation.ActivityMonitor -> Android.App.Activity

Parameters

monitor
Instrumentation.ActivityMonitor

Instrumentation.ActivityMonitor: The ActivityMonitor to wait for.

Returns

The Activity object that matched the monitor.

Attributes

Remarks

Wait for an existing ActivityMonitor to be hit. Once the monitor has been hit, it is removed from the activity monitor list and the first created Activity object that matched it is returned.

Android reference for android.app.Instrumentation.waitForMonitor.

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