1page.title=<action> 2parent.title=The AndroidManifest.xml File 3parent.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 itemprop="description">Adds an action to an intent filter. 16An <code><a href="{@docRoot}guide/topics/manifest/intent-filter-element.html"><intent-filter></a></code> element must contain 17one or more {@code <action>} elements. If it doesn't contain any, no 18Intent objects will get through the filter. See 19<a href="{@docRoot}guide/components/intents-filters.html">Intents and 20Intent Filters</a> for details on intent filters and the role of action 21specifications 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 30this attribute, prepend "{@code android.intent.action.}" to the 31{@code <i>string</i>} that follows {@code ACTION_}. 32For example, for {@code ACTION_MAIN}, use "{@code android.intent.action.MAIN}" 33and for {@code ACTION_WEB_SEARCH}, use "{@code android.intent.action.WEB_SEARCH}". 34 35<p> 36For actions you define, it's best to use the package name as a prefix to 37ensure uniqueness. For example, a {@code TRANSMOGRIFY} action might be specified 38as 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>