- contained in:
- must contain:
- can contain:
- Specifies the types of intents that an activity, service, or broadcast
receiver can respond to. An intent filter declares the capabilities of its
parent component: what an activity or service can do and what types
of broadcasts a receiver can handle.
It opens the component to receiving intents of the advertised type while filtering out those that aren't meaningful for the component. Most of the contents of the filter are described by its
- An icon that represents the parent activity, service, or broadcast
receiver when that component is presented to the user as having the
capability described by the filter.
This attribute is set as a reference to a drawable resource containing the image definition. The default value is the icon set by the parent component's
iconattribute. If the parent doesn't specify an icon, the default is the icon set by the
For more information about intent filter icons, see the Icons and labels section in the app manifest overview.
- A user-readable label for the parent component. This label, rather than
the one set by the parent component, is used when the component is presented
to the user as having the capability described by the filter.
The label is set as a reference to a string resource so that it can be localized like other strings in the user interface. However, as a convenience while you're developing the application, it can also be set as a raw string.
For more information about intent filter labels, see the Icons and labels section in the app manifest overview.
- The priority given to the parent component with regard
to handling intents of the type described by the filter. This attribute has
meaning for both activities and broadcast receivers.
- It provides information about how able an activity is to respond to an intent that matches the filter, relative to other activities that can also respond to the intent. When an intent can be handled by multiple activities with different priorities, Android considers only those with higher priority values as potential targets for the intent.
It controls the order in which broadcast receivers are executed to receive broadcast messages, with those having higher priority values being called before those having lower values. The order applies only to synchronous messages. It's ignored for asynchronous messages.
Use this attribute only if you need to impose a specific order in which the broadcasts are received or want to force Android to prefer one activity over others.
The value is an integer, such as
100. Higher numbers have a higher priority. The default value is
In certain circumstances the requested priority is ignored and the value is capped to
0. This occurs when:
- A non-privileged application requests any priority >0.
- A privileged application requests a priority >0 for
For more information, see
The order in which the filter is processed when multiple filters match.
priorityapplies across apps, while
orderdisambiguates multiple matching filters in a single app.
When multiple filters can match, use a directed intent instead.
The value is an integer, such as
100. Higher numbers are matched first. The default value is
This attribute was introduced in API level 28.
- Whether Android needs to verify that the Digital Asset Links JSON file from the specified host matches this application.
For more information, see Verify Android App Links.
The default value is
This attribute was introduced in API level 23.
- introduced in:
- API level 1
- see also:
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2023-05-04 UTC.