Implicit Intents


  • Intent()
  • Intent (Intent o)
  • Intent (String action)
  • Intent (String action, Uri uri)
  • Intent (Context packageContext, Class<?> cls)
  • Intent (String action, Uri uri, Context packageContext, Class<?> cls)


actionString: The Intent action, such as ACTION_VIEW.
uriUri: The Intent data URI.
packageContextContext: A Context of the application package implementing this class.
clsClass: The component class that is to be used for the intent.


Implicit and Explicit Intents

An explicit intent is used for starting an activity or service within the same application package. In this case the name of the intended class is explicitly mentioned:

Intent intent = new Intent(this, MyComponent.class);

However, an implicit intent is sent across the system for any application installed on the user's device that can handle that intent. This is used to share information between different applications.

Intent intent = new Intent("com.stackoverflow.example.VIEW");

//We need to check to see if there is an application installed that can handle this intent
if (getPackageManager().resolveActivity(intent, 0) != null){ 
    //Handle error

More details on the differences can be found in the Android Developer docs here: Intent Resolution

Implicit Intents

Implicit intents do not name a specific component, but instead declare a general action to perform, which allows a component from another app to handle it.

For example, if you want to show the user a location on a map, you can use an implicit intent to request that another capable app show a specified location on a map.


// Create the text message with a string
Intent sendIntent = new Intent();
sendIntent.putExtra(Intent.EXTRA_TEXT, textMessage);

// Verify that the intent will resolve to an activity
if (sendIntent.resolveActivity(getPackageManager()) != null) {