IntentFilter.Create(String, String) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
使用指定的操作和 MIME 类型创建新的 IntentFilter 实例,其中你知道 MIME 类型的格式正确。
[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
参数
- action
- String
要匹配的操作,例如Intent.ACTION_VIEW。
- dataType
- String
要匹配的类型,例如“vnd.android.cursor.dir/person”。
返回
给定操作和类型的新 IntentFilter。
- 属性
注解
使用指定的操作和 MIME 类型创建新的 IntentFilter 实例,其中你知道 MIME 类型的格式正确。 这会捕获 MalformedMimeTypeException 构造函数可以调用的异常,并将其转换为运行时异常。
Java文档android.content.IntentFilter.create(java.lang.String, java.lang.String)。
本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。
适用于
另请参阅
- <xref:Android.Content.IntentFilter(System.String%2c+System.String)>