The Tool Desk
Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →An Android intent is a message that asks an app component to do something. An explicit intent names its destination; an implicit intent describes the requested work and lets Android find a component that can handle it. To build or receive intents correctly, understand the action, data, extras, and categories—and remember that a matching filter is not a security boundary.
What is an Android intent?
An intent is a message object used to activate an activity, service, or broadcast receiver. Apps use intents to communicate between their own components and, when appropriate, with components in other apps. Android can deliver an intent directly to a named component or resolve an intent against components that advertise matching capabilities in their manifests. See Android Developers’ guide to intents and intent filters.
What are intent actions, data, and extras?
An intent can carry several kinds of information. The action, data, and categories help describe and route a request; extras carry additional inputs for the receiver.
- Action: The operation being requested, such as sending content. In code, actions are commonly represented by constants. In a manifest filter, the
android:namevalue is the corresponding literal action string, such asandroid.intent.action.SEND. - Data: The resource or object the action concerns. It may be represented by a URI, a MIME type, or both. A filter can specify URI details such as scheme, host, port, and path, as well as MIME types.
- Extras: Additional key-value inputs for the receiving component. For instance, an alarm intent can use extras for the hour, minutes, and message. Extras do not substitute for the action or determine whether an intent matches a filter. Android’s common intents guide shows action-specific examples.
- Category: Extra information about the kind of component that can handle a request. For a filter to match a typical activity launch made with
startActivity(), it must includeandroid.intent.category.DEFAULT.
What is the difference between explicit and implicit intents?
| Intent type | Destination | Resolution and user choice | Privacy consideration |
|---|---|---|---|
| Explicit | Names a component; it can also constrain an implicit request to a package. | Android sends it to the named component rather than searching filters for a destination. | Useful when the intended receiver is known, but still validate data at the destination. |
| Implicit | Leaves the component unspecified and describes the task, optionally with data. | Android searches for a component whose filter matches. If multiple activities qualify, Android may show a chooser or resolution dialog. | Any app with a compatible handler may receive the request, so do not include information that those handlers should not see. |
Use an implicit intent when the user should be able to choose among suitable apps—for example, to open a map or share content. Use an explicit intent when you need a specific component, particularly for a service or a request containing sensitive information. For security considerations around implicit routing, see Android Developers’ guidance on implicit intent hijacking.
#1 Best Overall
How do Android intent filters work?
An intent filter is declared inside a component’s manifest entry, such as an <activity>. It advertises which implicit intents that component is prepared to handle. Android checks an incoming implicit intent against the filter’s action, data, and categories; it must pass the applicable matching tests. A component can declare multiple filters. Use separate filters for distinct jobs or combinations of actions and data that should not be treated as interchangeable. Explicit intents go to their named target regardless of its filters. The matching rules and manifest examples are covered in the official intents guide.
Example: advertise a text-sharing activity
A receiving activity can declare a filter with action android.intent.action.SEND, category android.intent.category.DEFAULT, and data MIME type text/plain. That declaration tells Android the activity may handle text shares. It does not guarantee that the activity’s code can safely process every value another app sends; the receiver must still validate incoming content.
Rank #2
How to send an intent and handle missing apps
- Choose the destination model. Use an implicit intent if compatible apps should be considered; use an explicit intent or an appropriate package restriction when the destination must be constrained.
- Set the request fields. Add the action and the relevant URI or MIME type, then include only the extras needed by that action.
- Check for a handler before launching. For an implicit activity request, call
resolveActivity()beforestartActivity()when a device might lack a suitable app. If none is available, handle that case in the app instead of allowing the launch to fail. Android’s common intents guidance includes this pattern. - Send the request. Start the activity only when a suitable handler exists, or show an appropriate fallback message or action when it does not.
Intent security and Android 12 compatibility
Filters do not control access
An intent filter is a routing declaration, not an access-control mechanism. Another app can explicitly start a component if that component is exported and its name is known. Set android:exported intentionally, keep components that should remain internal unexported, and validate the action, URI, extras, and any nested intent when receiving a request. These practices align with Android Developers’ security tips.
Protect sensitive data in implicit requests
A different app can register a matching filter and receive an implicit intent. Do not place secrets such as tokens in an implicit request unless exposure to a compatible handler is acceptable. If implicit routing is required, omit secret or mutable data; otherwise, target a known component or restrict resolution to a package where appropriate. See the official guidance on implicit intent hijacking.
Make exported status explicit
For apps targeting Android 12 or later, a component that declares an intent filter must explicitly set android:exported; otherwise, Android will not install the app. The launcher activity normally needs to be accessible, while internal components should remain private. Check the Android Developers manifest guidance for the applicable component requirements.
Target services deliberately
Use explicit intents for services: an implicit service intent can start an unintended service. Implicit calls to bindService() have thrown since Android 5.0 (API level 21). Validate service inputs just as you would inputs delivered to an activity or receiver. Android’s security tips discuss safer component communication.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




