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