- syntax:
<action android:name="string" />
- contained in:
<intent-filter>- description:
- Adds an action to an intent filter.
An
<intent-filter>element must contain one or more<action>elements. If there are no<action>elements in an intent filter, the filter doesn't accept anyIntentobjects. For details about intent filters and the role of action specifications within a filter, see Intents and Intent Filters. - attributes:
android:name- The name of the action. Some standard actions are defined in the
Intentclass asACTION_stringconstants. To assign one of these actions to this attribute, prependandroid.intent.action.to thestringthat followsACTION_. For example, forACTION_MAIN, useandroid.intent.action.MAIN, and forACTION_WEB_SEARCH, useandroid.intent.action.WEB_SEARCH.For actions you define, it's best to use your app's package name as a prefix to help ensure uniqueness. For example, a
TRANSMOGRIFYaction might be specified as follows:<action android:name="com.example.project.TRANSMOGRIFY" />
- introduced in:
- API Level 1
- see also:
<intent-filter>