whenever you want to handle implicit
intents you have to declare intent
filters now those intent filters are
simply advertisers they say what action
category or data the particular activity
or service or broadcast receiver can
handle for example you have your
activity a you say you want to send an
email so what are you going to do you're
going to create an intent object that
has some action some category and some
date now on the other side you have your
email activity now what it does is it
defines an intent filter where it
defines the actions categories and data
that it can handle all right and now
your package manager accepts the intent
which you sent which is on the left side
you can see for the example the Apple it
compares the action category and data
requested by you through the intent with
the action category and data inside the
intent filter and if they match then
that activity is called and that's how
your email activity gets called through
implicit intents so I hope you guys have
understood what intent filters are Now
intent filters are on the other side of
the picture you send an intent and that
intent gets compared by the intent
filter on the receiving side to check if
it matches if it matches then that
activity or service or broadcast
receiver is called otherwise bam nothing
happens so like I said an intent filter
describes what action data or categories
that the component can handle they are
mostly defined inside your Manifesto
file now for each activity or service or
broadcast receiver if you want them to
handle implicit intents you have to
declare intent filters because that's
the way they're going to be compared
right and next you define what intent
can be handled by that component right
and then what do you write inside an
intent filter well you write one or more
action to indicate what are the
different or possible actions that your
component handles you write categories
to Define what categories you support
and you write data 28 what data types
you have now now matching for action
category and data is different all right
we are going to talk about how each of
them is matched with the def definition
inside the intent filter in detail in
the upcoming videos but for now all you
need to remember is that some sort of
matching occurs between the intent that
was sent by the user from his activity
with the activity that is about to be
called right so now let's actually talk
about how your package manager works
with uh activities and services you have
this activity when you when you install
it you're going to have to Define an
intent filter to the package manager the
package manager is going to read your
intent filter and Define what actions
categories and data that your activity
can handle this happens for every app
that you install every app all the
activities what are the intent filters
they have what actions categories and
data they can handle this list is
maintained by your package manager so
now here's the question it has how many
activities or services does the app have
and what intents can be handled by each
activ your service now this data is
managed by your package manager all
right so now when someone says that I
have an intent with this action this
category this data can you do something
about this the package manager is going
to take that intent it's going to
compare it with the list of activities
and the list of services it has and
check the intent filter for each with
this information and when it finds no
one it says no apps can perform this
action when it does find someone it's
going to start that activity directly
and and it when it finds more than one
person who can handle that intent then
it's going to go ahead and give you this
list where it says complete action using
a BC so this is what your intent
resolution process is all about this
process is actually called intent
resolution in Android and I hope you
guys have understood what intent
resolution is this is only for
activities and services broadcast
receivers have a different way of
dealing with the same thing now let's go
ahead and see how broadcast receivers
work with your package manager so if you
remember remember broadcast receivers
are nothing but there are people who
respond to events right your battery
goes low your Airplane Mode was turned
on your network is unavailable all these
kinds of notifications when you're
whenever your system generates
notifications like that your broadcast
receiver handles them but it doesn't
mean that you can't generate
notifications you can also create your
own notifications and let broadcast
receivers handle them for example you
can say something like Facebook profile
updated and the broadcast receiver can
do something about
it so here there's a simple example
there is a system notification that
comes up saying the battery is low only
15% remaining now that event is
converted into an intent object with a
specific action category and data and
that is given to your package manager
now what your package manager is going
to do in case of broadcast receivers is
that it's going to call every broadcast
receiver whose intent filter matches the
action category and data that your
intent has generated right that is the
action category data on the left side
which was generated inside your int
intent and the broadcast receiver on the
right side whose intent filter matches
with it it's going to call every
broadcast receiver like so this is all
about theoretical aspects of implicit
intents there are still a lot of things
I haven't discussed about but I believe
that as I go ahead I'll talk about each
of these things in detail again remember
one thing the way your action gets
matched category and data differ from
each other all right so I hope you guys
understood something out of this vid if
you like what you saw please subscribe
to my channel comment let me know your
thoughts I would love to hear from you
guys thanks for watching I'll catch you
guys later have a nice day