Udostępnij za pośrednictwem


IntentFilter.Create(String, String) Method

Definition

Create a new IntentFilter instance with a specified action and MIME type, where you know the MIME type is correctly formatted.

[Android.Runtime.Register("create", "(Ljava/lang/String;Ljava/lang/String;)Landroid/content/IntentFilter;", "")]
public static Android.Content.IntentFilter? Create (string? action, string? dataType);
[<Android.Runtime.Register("create", "(Ljava/lang/String;Ljava/lang/String;)Landroid/content/IntentFilter;", "")>]
static member Create : 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".

Returns

A new IntentFilter for the given action and type.

Attributes

Remarks

Create a new IntentFilter instance with a specified action and MIME type, where you know the MIME type is correctly formatted. This catches the MalformedMimeTypeException exception that the constructor can call and turns it into a runtime exception.

Java documentation for android.content.IntentFilter.create(java.lang.String, 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

See also

  • <xref:Android.Content.IntentFilter(System.String%2c+System.String)>