IntentFilter.AddDataPath(String, Pattern) Method

Definition

Add a new Intent data path to match against.

[Android.Runtime.Register("addDataPath", "(Ljava/lang/String;I)V", "")]
public void AddDataPath (string? path, Android.OS.Pattern type);
[<Android.Runtime.Register("addDataPath", "(Ljava/lang/String;I)V", "")>]
member this.AddDataPath : string * Android.OS.Pattern -> unit

Parameters

path
String

Either a raw string that must exactly match the file path, or a simple pattern, depending on <var>type</var>.

type
Pattern

Determines how <var>path</var> will be compared to determine a match: either PatternMatcher#PATTERN_LITERAL, PatternMatcher#PATTERN_PREFIX, PatternMatcher#PATTERN_SUFFIX, or PatternMatcher#PATTERN_SIMPLE_GLOB.

Attributes

Remarks

Add a new Intent data path to match against. The filter must include one or more schemes (via #addDataScheme) <em>and</em> one or more authorities (via #addDataAuthority) for the path to be considered. If any paths are included in the filter, then an Intent's data must match one of them. If no paths are included, then only the scheme/authority must match.

The path given here can either be a literal that must directly match or match against a prefix, or it can be a simple globbing pattern. If the latter, you can use '*' anywhere in the pattern to match zero or more instances of the previous character, '.' as a wildcard to match any character, and '\' to escape the next character.

Java documentation for android.content.IntentFilter.addDataPath(java.lang.String, int).

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.MatchData(System.String%2c+System.String%2c+System.String)>
  • AddDataScheme(String)
  • <xref:Android.Content.IntentFilter.AddDataAuthority(System.String%2c+System.String)>