See the class description for the full list of categories | You can start a new instance of an by passing an to |
---|---|
Specifying the MIME type of your data helps the Android system find the best component to receive your intent |
The rest of this page explains how intents work and how to use them.
24Declares the type of data accepted, using one or more attributes that specify various aspects of the data URI scheme, host, port, path and MIME type | Figure 1 shows how an intent is used when starting an activity |
---|---|
For more information about using pending intents, see the documentation for each of the respective use cases, such as in the and API guides |
An intent can also supply the following information: Extras Key-value pairs that carry additional information required to accomplish the requested action.
3Caution: If you want to set both the URI and MIME type, don't call and because they each nullify the value of the other | In other words, a component is presumed to support content: and file: data if its filter lists only a MIME type |
---|---|
An app component should declare separate filters for each unique job it can do | You can start a service to perform a one-time operation such as downloading a file by passing an to |
The value must be the literal string value of an action, not the class constant.
27