Instrumentation.ActivityMonitor Constructors
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
| Name | Description |
|---|---|
| Instrumentation.ActivityMonitor() |
Create a new ActivityMonitor that can be used for intercepting any activity to be started. |
| Instrumentation.ActivityMonitor(IntPtr, JniHandleOwnership) |
Initializes a managed representation of an existing Java Native Interface object. |
| 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.
See also:
Android reference for android.app.Instrumentation.ActivityMonitor.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)
Initializes a managed representation of an existing Java Native Interface object.
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
The Java Native Interface object reference.
- transfer
- JniHandleOwnership
The ownership transfer to apply to the Java Native Interface object reference.
Remarks
This constructor is called by the .NET for Android binding runtime when it creates a managed peer for an existing Java object.
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
IntentFilter: The set of intents this monitor is responsible for.
Instrumentation.ActivityResult: A canned result to return if the monitor is hit; can be null.
- block
- Boolean
boolean: Controls whether the monitor should block the activity start (returning its canned result) or let the call proceed.
- Attributes
Remarks
Create a new ActivityMonitor that looks for a particular kind of intent to be started.
See also:
Android reference for android.app.Instrumentation.ActivityMonitor.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(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
String: The activity class this monitor is responsible for.
Instrumentation.ActivityResult: A canned result to return if the monitor is hit; can be null.
- block
- Boolean
boolean: Controls whether the monitor should block the activity start (returning its canned result) or let the call proceed.
- Attributes
Remarks
Create a new ActivityMonitor that looks for a specific activity class to be started.
See also:
Android reference for android.app.Instrumentation.ActivityMonitor.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.