IntentFilter.Match Method
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
Match(ContentResolver, Intent, Boolean, String) |
Test whether this filter matches the given <var>intent</var>. |
Match(String, String, String, Uri, ICollection<String>, String) |
Test whether this filter matches the given intent data. |
Match(ContentResolver, Intent, Boolean, String)
Test whether this filter matches the given <var>intent</var>.
[Android.Runtime.Register("match", "(Landroid/content/ContentResolver;Landroid/content/Intent;ZLjava/lang/String;)I", "")]
public Android.Content.MatchResults Match (Android.Content.ContentResolver? resolver, Android.Content.Intent? intent, bool resolve, string? logTag);
[<Android.Runtime.Register("match", "(Landroid/content/ContentResolver;Landroid/content/Intent;ZLjava/lang/String;)I", "")>]
member this.Match : Android.Content.ContentResolver * Android.Content.Intent * bool * string -> Android.Content.MatchResults
Parameters
- resolver
- ContentResolver
- intent
- Intent
The Intent to compare against.
- resolve
- Boolean
If true, the intent's type will be resolved by calling Intent.resolveType(); otherwise a simple match against Intent.type will be performed.
- logTag
- String
Tag to use in debugging messages.
Returns
Returns either a valid match constant (a combination of
#MATCH_CATEGORY_MASK
and #MATCH_ADJUSTMENT_MASK
),
or one of the error codes #NO_MATCH_TYPE
if the type didn't match,
#NO_MATCH_DATA
if the scheme/path didn't match,
#NO_MATCH_ACTION
if the action didn't match, or
#NO_MATCH_CATEGORY
if one or more categories didn't match.
- Attributes
Remarks
Test whether this filter matches the given <var>intent</var>.
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
Match(String, String, String, Uri, ICollection<String>, String)
Test whether this filter matches the given intent data.
[Android.Runtime.Register("match", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Landroid/net/Uri;Ljava/util/Set;Ljava/lang/String;)I", "")]
public Android.Content.MatchResults Match (string? action, string? type, string? scheme, Android.Net.Uri? data, System.Collections.Generic.ICollection<string>? categories, string? logTag);
[<Android.Runtime.Register("match", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Landroid/net/Uri;Ljava/util/Set;Ljava/lang/String;)I", "")>]
member this.Match : string * string * string * Android.Net.Uri * System.Collections.Generic.ICollection<string> * string -> Android.Content.MatchResults
Parameters
- action
- String
The intent action to match against (Intent.getAction).
- type
- String
The intent type to match against (Intent.resolveType()).
- scheme
- String
The data scheme to match against (Intent.getScheme()).
- data
- Uri
The data URI to match against (Intent.getData()).
- categories
- ICollection<String>
The categories to match against (Intent.getCategories()).
- logTag
- String
Tag to use in debugging messages.
Returns
Returns either a valid match constant (a combination of
#MATCH_CATEGORY_MASK
and #MATCH_ADJUSTMENT_MASK
),
or one of the error codes #NO_MATCH_TYPE
if the type didn't match,
#NO_MATCH_DATA
if the scheme/path didn't match,
#NO_MATCH_ACTION
if the action didn't match, or
#NO_MATCH_CATEGORY
if one or more categories didn't match.
- Attributes
Remarks
Test whether this filter matches the given intent data. A match is only successful if the actions and categories in the Intent match against the filter, as described in IntentFilter
; in that case, the match result returned will be as per #matchData
.
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.