Home

intentfilter

IntentFilter is a component of Android's intent resolution mechanism. It describes the kinds of intents a component can respond to and is used when declaring components in the manifest or when registering receivers at runtime. An intent filter defines three aspects an intent must satisfy to be delivered to the component: actions, categories, and data.

Actions specify the operation the intent represents, such as viewing or sending data. Categories provide additional

Declaration and usage: In the manifest, an intent filter is nested inside a component tag (activity, service,

Matching and resolution: When an implicit intent is sent, the system compares the intent’s action, categories,

Notes: IntentFilter plays a central role in enabling inter-app communication and flexible routing of intents, while

constraints,
commonly
including
DEFAULT.
Data
describes
what
kind
of
data
the
intent
carries,
which
can
be
specified
as
a
MIME
type
or
as
a
data
URI
with
components
such
as
scheme,
host,
port,
and
path.
A
data
filter
may
require
any
combination
of
these
elements,
and
matching
occurs
only
if
the
intent’s
data
aligns
with
the
filter’s
data
constraints.
or
broadcast
receiver)
using
elements
for
action,
category,
and
data.
Filters
can
also
be
created
programmatically
at
runtime
and
registered
with
a
component
via
a
system
call,
using
an
IntentFilter
object
that
is
populated
with
actions,
categories,
and
data
specifications.
and
data
against
all
registered
filters.
Only
filters
that
match
all
specified
fields
are
considered.
If
multiple
filters
match,
the
system
may
rely
on
filter
priority,
explicit
declarations,
or
user
selection
through
a
chooser
to
determine
the
handling
component.
preserving
component
boundaries
and
security
by
ensuring
that
only
appropriately
declared
handlers
can
respond
to
specific
actions
and
data
types.