共用方式為


Instrumentation.ActivityMonitor Constructors

Definition

Overloads

Instrumentation.ActivityMonitor()

Create a new ActivityMonitor that can be used for intercepting any activity to be started.

Instrumentation.ActivityMonitor(IntPtr, JniHandleOwnership)

A constructor used when creating managed representations of JNI objects; called by the runtime.

Instrumentation.ActivityMonitor(IntentFilter, Instrumentation+ActivityResult, Boolean)

Create a new ActivityMonitor that looks for a particular kind of intent to be started.

Instrumentation.ActivityMonitor(String, Instrumentation+ActivityResult, Boolean)

Create a new ActivityMonitor that looks for a specific activity class to be started.

Instrumentation.ActivityMonitor()

Create a new ActivityMonitor that can be used for intercepting any activity to be started.

[Android.Runtime.Register(".ctor", "()V", "", ApiSince=26)]
public ActivityMonitor ();
Attributes

Remarks

Create a new ActivityMonitor that can be used for intercepting any activity to be started.

When an activity is started, #onStartActivity(Intent) will be called on instances created using this constructor to see if it is a hit.

Java documentation for android.app.Instrumentation.ActivityMonitor.Instrumentation$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.

Applies to

Instrumentation.ActivityMonitor(IntPtr, JniHandleOwnership)

A constructor used when creating managed representations of JNI objects; called by the runtime.

protected ActivityMonitor (IntPtr javaReference, Android.Runtime.JniHandleOwnership transfer);
new Android.App.Instrumentation.ActivityMonitor : nativeint * Android.Runtime.JniHandleOwnership -> Android.App.Instrumentation.ActivityMonitor

Parameters

javaReference
IntPtr

nativeint

A IntPtrcontaining a Java Native Interface (JNI) object reference.

transfer
JniHandleOwnership

A JniHandleOwnershipindicating how to handle javaReference

Remarks

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

Instrumentation.ActivityMonitor(IntentFilter, Instrumentation+ActivityResult, Boolean)

Create a new ActivityMonitor that looks for a particular kind of intent to be started.

[Android.Runtime.Register(".ctor", "(Landroid/content/IntentFilter;Landroid/app/Instrumentation$ActivityResult;Z)V", "")]
public ActivityMonitor (Android.Content.IntentFilter which, Android.App.Instrumentation.ActivityResult result, bool block);
[<Android.Runtime.Register(".ctor", "(Landroid/content/IntentFilter;Landroid/app/Instrumentation$ActivityResult;Z)V", "")>]
new Android.App.Instrumentation.ActivityMonitor : Android.Content.IntentFilter * Android.App.Instrumentation.ActivityResult * bool -> Android.App.Instrumentation.ActivityMonitor

Parameters

which
IntentFilter
block
Boolean
Attributes

Remarks

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

Applies to

Instrumentation.ActivityMonitor(String, Instrumentation+ActivityResult, Boolean)

Create a new ActivityMonitor that looks for a specific activity class to be started.

[Android.Runtime.Register(".ctor", "(Ljava/lang/String;Landroid/app/Instrumentation$ActivityResult;Z)V", "")]
public ActivityMonitor (string cls, Android.App.Instrumentation.ActivityResult result, bool block);
[<Android.Runtime.Register(".ctor", "(Ljava/lang/String;Landroid/app/Instrumentation$ActivityResult;Z)V", "")>]
new Android.App.Instrumentation.ActivityMonitor : string * Android.App.Instrumentation.ActivityResult * bool -> Android.App.Instrumentation.ActivityMonitor

Parameters

cls
String
block
Boolean
Attributes

Remarks

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

Applies to