- 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 anyIntent
objects. 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
Intent
class asACTION_string
constants. To assign one of these actions to this attribute, prependandroid.intent.action.
to thestring
that 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
TRANSMOGRIFY
action might be specified as follows:<action android:name="com.example.project.TRANSMOGRIFY" />
- introduced in:
- API Level 1
- see also:
<intent-filter>