Sdílet prostřednictvím


Instrumentation.AddMonitor Method

Definition

Overloads

AddMonitor(Instrumentation+ActivityMonitor)

Add a new ActivityMonitor that will be checked whenever an activity is started.

AddMonitor(IntentFilter, Instrumentation+ActivityResult, Boolean)

Add a new ActivityMonitor that will be checked whenever an activity is started.

AddMonitor(String, Instrumentation+ActivityResult, Boolean)

Add a new ActivityMonitor that will be checked whenever an activity is started.

AddMonitor(Instrumentation+ActivityMonitor)

Add a new ActivityMonitor that will be checked whenever an activity is started.

[Android.Runtime.Register("addMonitor", "(Landroid/app/Instrumentation$ActivityMonitor;)V", "GetAddMonitor_Landroid_app_Instrumentation_ActivityMonitor_Handler")]
public virtual void AddMonitor (Android.App.Instrumentation.ActivityMonitor? monitor);
[<Android.Runtime.Register("addMonitor", "(Landroid/app/Instrumentation$ActivityMonitor;)V", "GetAddMonitor_Landroid_app_Instrumentation_ActivityMonitor_Handler")>]
abstract member AddMonitor : Android.App.Instrumentation.ActivityMonitor -> unit
override this.AddMonitor : Android.App.Instrumentation.ActivityMonitor -> unit

Parameters

monitor
Instrumentation.ActivityMonitor

The new ActivityMonitor to see.

Attributes

Remarks

Java documentation for android.app.Instrumentation.addMonitor(android.app.ActivityMonitor).

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.

See also

  • <xref:Android.App.Instrumentation.AddMonitor(Android.Content.IntentFilter%2c+.ActivityResult%2c+.ActivityResult)>
  • <xref:Android.App.Instrumentation.CheckMonitorHit(.ActivityMonitor%2c+System.Int32)>

Applies to

AddMonitor(IntentFilter, Instrumentation+ActivityResult, Boolean)

Add a new ActivityMonitor that will be checked whenever an activity is started.

[Android.Runtime.Register("addMonitor", "(Landroid/content/IntentFilter;Landroid/app/Instrumentation$ActivityResult;Z)Landroid/app/Instrumentation$ActivityMonitor;", "GetAddMonitor_Landroid_content_IntentFilter_Landroid_app_Instrumentation_ActivityResult_ZHandler")]
public virtual Android.App.Instrumentation.ActivityMonitor? AddMonitor (Android.Content.IntentFilter? filter, Android.App.Instrumentation.ActivityResult? result, bool block);
[<Android.Runtime.Register("addMonitor", "(Landroid/content/IntentFilter;Landroid/app/Instrumentation$ActivityResult;Z)Landroid/app/Instrumentation$ActivityMonitor;", "GetAddMonitor_Landroid_content_IntentFilter_Landroid_app_Instrumentation_ActivityResult_ZHandler")>]
abstract member AddMonitor : Android.Content.IntentFilter * Android.App.Instrumentation.ActivityResult * bool -> Android.App.Instrumentation.ActivityMonitor
override this.AddMonitor : Android.Content.IntentFilter * Android.App.Instrumentation.ActivityResult * bool -> Android.App.Instrumentation.ActivityMonitor

Parameters

filter
IntentFilter

The set of intents this monitor is responsible for.

result
Instrumentation.ActivityResult

A canned result to return if the monitor is hit; can be null.

block
Boolean

Controls whether the monitor should block the activity start (returning its canned result) or let the call proceed.

Returns

Attributes

Remarks

Java documentation for android.app.Instrumentation.addMonitor(android.app.ActivityMonitor).

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.

See also

  • <xref:Android.App.Instrumentation.AddMonitor(.ActivityMonitor)>
  • <xref:Android.App.Instrumentation.CheckMonitorHit(.ActivityMonitor%2c+System.Int32)>

Applies to

AddMonitor(String, Instrumentation+ActivityResult, Boolean)

Add a new ActivityMonitor that will be checked whenever an activity is started.

[Android.Runtime.Register("addMonitor", "(Ljava/lang/String;Landroid/app/Instrumentation$ActivityResult;Z)Landroid/app/Instrumentation$ActivityMonitor;", "GetAddMonitor_Ljava_lang_String_Landroid_app_Instrumentation_ActivityResult_ZHandler")]
public virtual Android.App.Instrumentation.ActivityMonitor? AddMonitor (string? cls, Android.App.Instrumentation.ActivityResult? result, bool block);
[<Android.Runtime.Register("addMonitor", "(Ljava/lang/String;Landroid/app/Instrumentation$ActivityResult;Z)Landroid/app/Instrumentation$ActivityMonitor;", "GetAddMonitor_Ljava_lang_String_Landroid_app_Instrumentation_ActivityResult_ZHandler")>]
abstract member AddMonitor : string * Android.App.Instrumentation.ActivityResult * bool -> Android.App.Instrumentation.ActivityMonitor
override this.AddMonitor : string * Android.App.Instrumentation.ActivityResult * bool -> Android.App.Instrumentation.ActivityMonitor

Parameters

cls
String

The activity class this monitor is responsible for.

result
Instrumentation.ActivityResult

A canned result to return if the monitor is hit; can be null.

block
Boolean

Controls whether the monitor should block the activity start (returning its canned result) or let the call proceed.

Returns

Attributes

Remarks

Java documentation for android.app.Instrumentation.addMonitor(android.app.ActivityMonitor).

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.

See also

  • <xref:Android.App.Instrumentation.AddMonitor(.ActivityMonitor)>
  • <xref:Android.App.Instrumentation.CheckMonitorHit(.ActivityMonitor%2c+System.Int32)>

Applies to