1 page.title=<action> 2 parent.title=The AndroidManifest.xml File 3 parent.link=manifest-intro.html 4 @jd:body 5 6 <dl class="xml"> 7 <dt>syntax:</dt> 8 <dd><pre class="stx"><action android:<a href="#nm">name</a>="<i>string</i>" /></pre></dd> 9 10 <dt>contained in:</dt> 11 <dd><code><a href="{@docRoot}guide/topics/manifest/intent-filter-element.html"><intent-filter></a></code></dd> 12 13 <p> 14 <dt>description:</dt> 15 <dd>Adds an action to an intent filter. 16 An <code><a href="{@docRoot}guide/topics/manifest/intent-filter-element.html"><intent-filter></a></code> element must contain 17 one or more {@code <action>} elements. If it doesn't contain any, no 18 Intent objects will get through the filter. See 19 <a href="{@docRoot}guide/components/intents-filters.html">Intents and 20 Intent Filters</a> for details on intent filters and the role of action 21 specifications within a filter. 22 </dd> 23 24 <dt>attributes:</dt> 25 <dd><dl class="attr"> 26 <dt><a name="nm"></a>{@code android:name}</dt> 27 <dd>The name of the action. Some standard actions are defined in the 28 {@link android.content.Intent#ACTION_CHOOSER Intent} class as 29 {@code ACTION_<i>string</i>} constants. To assign one of these actions to 30 this attribute, prepend "{@code android.intent.action.}" to the 31 {@code <i>string</i>} that follows {@code ACTION_}. 32 For example, for {@code ACTION_MAIN}, use "{@code android.intent.action.MAIN}" 33 and for {@code ACTION_WEB_SEARCH}, use "{@code android.intent.action.WEB_SEARCH}". 34 35 <p> 36 For actions you define, it's best to use the package name as a prefix to 37 ensure uniqueness. For example, a {@code TRANSMOGRIFY} action might be specified 38 as follows: 39 </p> 40 41 <pre><action android:name="com.example.project.TRANSMOGRIFY" /></pre> 42 </dd> 43 </dl></dd> 44 45 <!-- ##api level indication## --> 46 <dt>introduced in:</dt> 47 <dd>API Level 1</dd> 48 49 <dt>see also:</dt> 50 <dd><code><a href="{@docRoot}guide/topics/manifest/intent-filter-element.html"><intent-filter></a></code></dd> 51 52 </dl>