uses-feature-element.jd revision 05902f06f6fd2dd30f068d185f7c476e3d9b5717
1page.title=<uses-feature>
2@jd:body
3
4<dl class="xml">
5
6<dt>syntax:</dt>
7<dd>
8<pre class="stx">
9&lt;uses-feature android:<a href="#glEsVersion">glEsVersion</a>="<em>integer</em>"
10              android:<a href="#name">name</a>="<em>string</em>" /&gt;
11</pre>
12</dd>
13
14<dt>contained in:</dt>
15<dd><code><a href="{@docRoot}guide/topics/manifest/manifest-element.html">&lt;manifest&gt;</a></code></dd>
16
17<dt>description:</dt>
18<dd>This element specifies a specific feature used by the application.
19Android provides some features that may not be equally supported by all
20Android devices. In a manner similar to the <code><a href="uses-sdk-element.html">&lt;uses-sdk></a></code> 
21element, this element allows an application to specify which potentially variable
22features it requires. In this way, the application
23will not be installed on devices that do not offer the required feature.</p>
24
25<p>For example, an application might specify that it requires a certain version of Open GL.
26If a device does not support that version of Open GL, then it will not allow installation of the application.</p>
27
28<p class="note"><strong>Note:</strong>
29For each feature required by your application, you must include a new {@code
30&lt;uses-feature>} element. Multiple features cannot be declared in one 
31instance of this element.</p>
32</dd> 
33
34
35<dt>attributes:</dt>
36
37<dd>
38<dl class="attr"><dt><a name="glEsVersion"></a>{@code android:glEsVersion}</dt>
39  <dd>The GLES version needed by the application.
40     The higher 16 bits represent the major number and the lower 16 bits
41     represent the minor number. For example, for GL 1.2 referring to
42     0x00000102, the actual value should be set as 0x00010002.
43  </dd>
44</dl>
45</dd>
46
47<dd>
48<dl class="attr"><dt><a name="name"></a>{@code android:name}</dt>
49  <dd>The name of a feature required by the application. 
50  The value must be one of the following accepted strings:
51  
52  <table> 
53    <tr> 
54       <th>Value</th> 
55       <th>Description</th> 
56    </tr><tr> 
57       <td>"{@code android.hardware.camera}"</td> 
58       <td>The application requires a camera.</td> 
59    </tr><tr> 
60       <td>"{@code android.hardware.camera.autofocus}"</td> 
61       <td>The application requires a camera with auto-focus capability.
62       As a prerequisite, "{@code android.hardware.camera}" must also be declared
63       with a separate {@code &lt;uses-feature>} element.</td> 
64    </tr>
65  </table>
66  
67  </dd>
68</dl>
69</dd>
70
71<!-- ##api level indication## -->
72<dt>introduced in:</dt>
73<dd>API Level 4</dd>
74
75<dt>see also:</dt>
76<dd>
77  <ul>
78    <li>{@link android.content.pm.ConfigurationInfo}</li>
79  </ul>
80</dd>
81
82</dl>
83