共用方式為


IntentFilter.AddDataSchemeSpecificPart(String, Pattern) Method

Definition

Add a new Intent data "scheme specific part" to match against.

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

Parameters

ssp
String

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

type
Pattern

Determines how <var>ssp</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 "scheme specific part" to match against. The filter must include one or more schemes (via #addDataScheme) for the scheme specific part to be considered. If any scheme specific parts are included in the filter, then an Intent's data must match one of them. If no scheme specific parts are included, then only the scheme must match.

The "scheme specific part" that this matches against is the string returned by android.net.Uri#getSchemeSpecificPart() Uri.getSchemeSpecificPart. For Uris that contain a path, this kind of matching is not generally of interest, since #addDataAuthority(String, String) and #addDataPath(String, int) can provide a better mechanism for matching them. However, for Uris that do not contain a path, the authority and path are empty, so this is the only way to match against the non-scheme part.

Java documentation for android.content.IntentFilter.addDataSchemeSpecificPart(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)