Implicit Intents
suggest changeImplicit 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.
Example:
// Create the text message with a string
Intent sendIntent = new Intent();
sendIntent.setAction(Intent.ACTION_SEND);
sendIntent.putExtra(Intent.EXTRA_TEXT, textMessage);
sendIntent.setType("text/plain");
// Verify that the intent will resolve to an activity
if (sendIntent.resolveActivity(getPackageManager()) != null) {
startActivity(sendIntent);
}
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents