Intents are messaging objects used to request an action from a component — most commonly to start activities (navigate between screens), but also to start services, send broadcasts, and communicate between apps. They're fundamental to how Android components interact.
What Intents do
An INTENT is a message describing an operation to perform:
→ START an ACTIVITY (open another screen, in your app or another app)
→ START a SERVICE (begin background work)
→ DELIVER a BROADCAST (system/app-wide event)
→ carry DATA (extras) and specify the target/action
→ The mechanism for components to request actions and communicate.
Explicit vs implicit intents
// EXPLICIT — specify the exact component (e.g. navigate to YOUR another activity)
val intent = Intent(this, DetailActivity::class.java)
intent.putExtra("itemId", 42) // pass data
startActivity(intent) // open the activity
// IMPLICIT — specify an ACTION; the system finds an app that can handle it
val intent = Intent(Intent.ACTION_VIEW, Uri.parse("https://example.com"))
startActivity(intent) // opens a browser (any app that handles ACTION_VIEW)
// other examples: dial a number, share content, open the camera, send an email
EXPLICIT → name the exact target component (used WITHIN your app, e.g. navigation)
IMPLICIT → describe an ACTION; the system picks a capable app (interact with OTHER apps:
open a URL, share, take a photo, etc.)
Passing data and getting results
→ EXTRAS — attach data to an intent (putExtra) → read it in the target
→ Get a RESULT back (Activity Result API) — e.g. pick an image and receive it
→ Intent FILTERS (in the manifest) declare what implicit intents your app can handle
Why it matters
Understanding Intents is fundamental to Android development because they're how components interact — especially how you navigate between screens — so it's must-know foundational knowledge.
An Intent is a messaging object that requests an action, and its most common use, starting activities to navigate between screens (passing data via extras), is essential to virtually every Android app (moving between screens is core functionality).
Understanding the explicit vs implicit distinction is key: explicit intents (naming the exact target component) are used for navigation within your own app, while implicit intents (describing an action that the system matches to a capable app) enable powerful inter-app interactions — opening a URL in a browser, sharing content, taking a photo with the camera, dialing a number, sending an email — letting your app leverage other apps' capabilities, a distinctive and powerful Android feature.
Understanding passing data (extras attached to intents and read by the target) and getting results (the Activity Result API for receiving data back, like a picked image) is necessary for components to communicate and exchange data.
Understanding intent filters (declaring what implicit intents your app can handle, so other apps can invoke yours) completes the picture of inter-component and inter-app communication.
Since Intents are the fundamental mechanism for Android component interaction (especially navigation between screens, a core need, and inter-app communication, a powerful capability) and understanding them — explicit vs implicit, passing data, and getting results — is essential for building apps that navigate and interact, understanding Intents is essential, foundational Android knowledge — a core concept for how Android components and apps communicate, necessary for navigation (used in every app) and for leveraging the Android ecosystem's inter-app capabilities.
