IntentFilter 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
IntentFilter() |
New empty IntentFilter. |
IntentFilter(IntentFilter) |
New IntentFilter containing a copy of an existing filter. |
IntentFilter(String) |
New IntentFilter that matches a single action with no data. |
IntentFilter(IntPtr, JniHandleOwnership) |
A constructor used when creating managed representations of JNI objects; called by the runtime. |
IntentFilter(String, String) |
New IntentFilter that matches a single action and data type. |
IntentFilter()
New empty IntentFilter.
[Android.Runtime.Register(".ctor", "()V", "")]
public IntentFilter ();
- Attributes
Remarks
New empty IntentFilter.
Java documentation for android.content.IntentFilter.IntentFilter()
.
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
IntentFilter(IntentFilter)
New IntentFilter containing a copy of an existing filter.
[Android.Runtime.Register(".ctor", "(Landroid/content/IntentFilter;)V", "")]
public IntentFilter (Android.Content.IntentFilter? o);
[<Android.Runtime.Register(".ctor", "(Landroid/content/IntentFilter;)V", "")>]
new Android.Content.IntentFilter : Android.Content.IntentFilter -> Android.Content.IntentFilter
Parameters
The original filter to copy.
- Attributes
Remarks
New IntentFilter containing a copy of an existing filter.
Java documentation for android.content.IntentFilter.IntentFilter(android.content.IntentFilter)
.
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
IntentFilter(String)
New IntentFilter that matches a single action with no data.
[Android.Runtime.Register(".ctor", "(Ljava/lang/String;)V", "")]
public IntentFilter (string? action);
[<Android.Runtime.Register(".ctor", "(Ljava/lang/String;)V", "")>]
new Android.Content.IntentFilter : string -> Android.Content.IntentFilter
Parameters
- action
- String
The action to match, such as Intent.ACTION_MAIN.
- Attributes
Remarks
New IntentFilter that matches a single action with no data. If no data characteristics are subsequently specified, then the filter will only match intents that contain no data.
Java documentation for android.content.IntentFilter.IntentFilter(java.lang.String)
.
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
IntentFilter(IntPtr, JniHandleOwnership)
A constructor used when creating managed representations of JNI objects; called by the runtime.
protected IntentFilter (IntPtr javaReference, Android.Runtime.JniHandleOwnership transfer);
new Android.Content.IntentFilter : nativeint * Android.Runtime.JniHandleOwnership -> Android.Content.IntentFilter
Parameters
- 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
IntentFilter(String, String)
New IntentFilter that matches a single action and data type.
[Android.Runtime.Register(".ctor", "(Ljava/lang/String;Ljava/lang/String;)V", "")]
public IntentFilter (string? action, string? dataType);
[<Android.Runtime.Register(".ctor", "(Ljava/lang/String;Ljava/lang/String;)V", "")>]
new Android.Content.IntentFilter : string * string -> Android.Content.IntentFilter
Parameters
- action
- String
The action to match, such as Intent.ACTION_VIEW.
- dataType
- String
The type to match, such as "vnd.android.cursor.dir/person".
- Attributes
Exceptions
Remarks
New IntentFilter that matches a single action and data type.
<em>Note: MIME type matching in the Android framework is case-sensitive, unlike formal RFC MIME types. As a result, you should always write your MIME types with lower case letters, and any MIME types you receive from outside of Android should be converted to lower case before supplying them here.</em>
Throws MalformedMimeTypeException
if the given MIME type is not syntactically correct.
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.