page.title=<data> parent.title=The AndroidManifest.xml File parent.link=manifest-intro.html @jd:body
<data android:scheme="string" android:host="string" android:port="string" android:path="string" android:pathPattern="string" android:pathPrefix="string" android:mimeType="string" />
<intent-filter>
mimeType
attribute),
just a URI, or both a data type and a URI. A URI is specified by separate
attributes for each of its parts:
{@code
These attributes that specify the URL format are optional, but also mutually dependent:
scheme
is not specified for the intent filter, all the other URI attributes are ignored.host
is not specified for the filter, the {@code port} attribute and all the path attributes are ignored.
All the {@code } elements contained within the same
<intent-filter>
element contribute to
the same filter. So, for example, the following filter specification,
<intent-filter . . . > <data android:scheme="something" android:host="project.example.com" /> . . . </intent-filter>
is equivalent to this one:
<intent-filter . . . > <data android:scheme="something" /> <data android:host="project.example.com" /> . . . </intent-filter>
You can place any number of {@code } elements inside an
<intent-filter>
to give it multiple data
options. None of its attributes have default values.
Information on how intent filters work, including the rules for how Intent objects are matched against filters, can be found in another document, Intents and Intent Filters. See also the Intent Filters section in the manifest file overview.
A scheme is specified without the trailing colon (for example, {@code http}, rather than {@code http:}).
If the filter has a data type set (the mimeType
attribute) but no scheme, the {@code content:} and {@code file:} schemes are
assumed.
Note: Scheme matching in the Android framework is case-sensitive, unlike the RFC. As a result, you should always specify schemes using lowercase letters.
scheme
attribute is also
specified for the filter.
Note: host name matching in the Android framework is case-sensitive, unlike the formal RFC. As a result, you should always specify host names using lowercase letters.
scheme
and
host
attributes are also specified for
the filter.Because '{@code \}' is used as an escape character when the string is read from XML (before it is parsed as a pattern), you will need to double-escape: For example, a literal '{@code *}' would be written as "{@code \\*}" and a literal '{@code \}' would be written as "{@code \\\\}". This is basically the same as what you would need to write if constructing the string in Java code.
For more information on these three types of patterns, see the descriptions of {@link android.os.PatternMatcher#PATTERN_LITERAL}, {@link android.os.PatternMatcher#PATTERN_PREFIX}, and {@link android.os.PatternMatcher#PATTERN_SIMPLE_GLOB} in the {@link android.os.PatternMatcher} class.
These attributes are meaningful only if the
scheme
and host
attributes are also specified for the filter.
It's common for an intent filter to declare a {@code } that includes only the {@code android:mimeType} attribute.
Note: MIME type matching in the Android framework is case-sensitive, unlike formal RFC MIME types. As a result, you should always specify MIME types using lowercase letters.
<action>
<category>