From the course: Android Development: Understanding Intents

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Intent filters

Intent filters - Android Tutorial

From the course: Android Development: Understanding Intents

Start my 1-month free trial

Intent filters

- [Instructor] At this point in the course, you might be wondering how your app can respond to implicit intents in the same way that the apps I've been demonstrating do it. The answer is with intent filters, and we're going to see how to implement one in this chapter. Intent filters are used to advertise the fact that your app knows how to respond to a given set of implicit intents. You declare intent filters in your app's manifest file, and each one of your app's components that can handle implicit intents will declare one or more separate filters for the intents it can handle. So to take an example, you would create an intent filter tag inside the definition for one of your app's activities. Inside that tag, you would declare an action tag that indicates what kind of action your activity can handle. In this case, it's the SEND action. Then you would declare a category which, in the case of implicit intents, has to be the default category, otherwise your component won't receive any…

Contents