DevBits
DevBitsAndroid Handbook
Android Fundamentals

What is the difference between an explicit and implicit Intent?

Explain how Android chooses the destination of an Intent and when to use each form.

AF-006Foundational~30 sec

What the interviewer is testing

The interviewer is checking whether you understand that the difference is not simply “internal versus external.” It is about how the target component is selected.

A strong answer explains Android's resolution process, knows when a chooser improves user control, and recognises that intent filters and exported components create an inter-app entry point with security implications.

❌ Common mistake

If they ask you to elaborate

A useful shortcut is to ask: do I own and know the destination? If yes, use an explicit Intent. If not, describe the capability and let Android resolve it.

QuestionExplicit IntentImplicit Intent
Who chooses the destination?Your appAndroid
Common useNavigate to a known componentDelegate a capability
Real-world exampleOpen OrderDetailsActivityShare an article or open a map
Intent filter required for targeting?NoThe receiving component needs a compatible filter
Possible resultThe named component starts or the request failsZero, one, or multiple apps may match

Common examples:

ScenarioUseWhy
Open SettingsActivity in your appExplicitThe destination is known
Navigate to OrderDetailsActivityExplicitYour app owns the screen
Open a website or map locationImplicitAny capable app may handle it
Share an articleImplicitThe user may choose a messaging, email, or social app
Capture a photo with another camera appImplicitYou are requesting a capability, not a specific component

An explicit Intent supplies a concrete component, while an implicit Intent supplies matching information such as an action and data.

For an Activity, Android compares the Intent's action, data, MIME type, and categories against registered intent filters. If more than one app is eligible, the system may use the user's existing default. Use Intent.createChooser() when choosing the receiving app is part of the user action—for example, sharing content.

Do not assume “implicit” means “outside your app.” A component in your own app can match an implicit Intent, although explicit targeting is normally clearer and safer for internal navigation. Conversely, an explicit Intent can target another app when its component is known and accessible.

Code example

fun Activity.openSettings() {
    // Explicit: this app knows and owns the destination.
    startActivity(Intent(this, SettingsActivity::class.java))
}

fun Activity.shareArticle(articleUrl: Uri) {
    // Implicit: describe the capability and let Android find handlers.
    val sendIntent = Intent(Intent.ACTION_SEND).apply {
        type = "text/plain"
        putExtra(Intent.EXTRA_TEXT, articleUrl.toString())
    }

    val chooser = Intent.createChooser(
        sendIntent,
        getString(R.string.share_article)
    )

    try {
        startActivity(chooser)
    } catch (_: ActivityNotFoundException) {
        Toast.makeText(this, R.string.no_share_app, Toast.LENGTH_SHORT).show()
    }
}

The first function uses an explicit Intent because the destination is a known screen owned by the app. The second describes the capability—sharing plain text—without naming an application, and a chooser lets the user select the receiving app.

An implicit Activity Intent may resolve to zero, one, or multiple handlers. Handle failure rather than assuming another app is installed, and treat data received from external Intents as untrusted input.

Follow-up questions

What separates a senior answer

Key takeaways

Learn more

On this page