• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1page.title=<uses-feature>
2parent.title=The AndroidManifest.xml File
3parent.link=manifest-intro.html
4@jd:body
5
6<div id="qv-wrapper">
7<div id="qv">
8
9
10<h2>In this document</h2>
11<ol>
12  <li><a href="#market-feature-filtering">Google Play and Feature-Based Filtering</a>
13    <ol>
14      <li><a href="#declared">Filtering based on explicitly declared features</a></li>
15      <li><a href="#implicit">Filtering based on implicit features</a></li>
16      <li><a href="#bt-permission-handling">Special handling for Bluetooth feature</a></li>
17      <li><a href="#testing">Testing the features required by your application</a></li>
18    </ol>
19  </li>
20  <li><a href="#features-reference">Features Reference</a>
21    <ol>
22      <li><a href="#hw-features">Hardware features</a></li>
23      <li><a href="#sw-features">Software features</a></li>
24      <li><a href="#permissions">Permissions that Imply Feature Requirements</a></li>
25    </ol>
26  </li>
27</ol>
28</div>
29</div>
30
31 <div class="sidebox-wrapper">
32 <div class="sidebox">
33    <img src="{@docRoot}assets/images/icon_play.png" style="float:left;margin:0;padding:0;">
34    <p style="color:#669999;padding-top:1em;">Google Play Filtering</p>
35    <p style="padding-top:1em;">Google Play uses the <code>&lt;uses-feature&gt;</code>
36    elements declared in your app manifest to filter your app from devices
37    that do not meet it's hardware and software feature requirements. </p>
38
39<p style="margin-top:1em;">By specifying the features that your application requires,
40you enable Google Play to present your application only to users whose
41devices meet the application's feature requirements, rather than presenting it
42to all users. </p>
43
44<p>For important information about how
45Google Play uses features as the basis for filtering, please read <a
46href="#market-feature-filtering">Google Play and Feature-Based Filtering</a>,
47below.</p>
48</div>
49</div>
50
51<dl class="xml">
52
53<dt>syntax:</dt>
54<dd>
55<pre class="stx">&lt;uses-feature
56  android:<a href="#name">name</a>="<em>string</em>"
57  android:<a href="#required">required</a>=["true" | "false"]
58  android:<a href="#glEsVersion">glEsVersion</a>="<em>integer</em>" /&gt;</pre>
59</dd>
60
61<dt>contained in:</dt>
62<dd><code><a
63href="{@docRoot}guide/topics/manifest/manifest-element.html">&lt;manifest&gt;</a></code></dd>
64
65<dt>description:</dt>
66<dd>Declares a single hardware or software feature that is used by the
67application.
68
69<p>The purpose of a <code>&lt;uses-feature&gt;</code> declaration is to inform
70any external entity of the set of hardware and software features on which your
71application depends. The element offers a <code>required</code> attribute that
72lets you specify whether your application requires and cannot function without
73the declared feature, or whether it prefers to have the feature but can function
74without it. Because feature support can vary across Android devices, the
75<code>&lt;uses-feature&gt;</code> element serves an important role in letting an
76application describe the device-variable features that it uses.</p>
77
78<p>The set of available features that your application declares corresponds to
79the set of feature constants made available by the Android {@link
80android.content.pm.PackageManager}, which are listed for
81convenience in the <a href="#features-reference">Features Reference</a> tables
82at the bottom of this document.
83
84<p>You must specify each feature in a separate <code>&lt;uses-feature&gt;</code>
85element, so if your application requires multiple features, it would declare
86multiple <code>&lt;uses-feature&gt;</code> elements. For example, an application
87that requires both Bluetooth and camera features in the device would declare
88these two elements:</p>
89
90<pre>
91&lt;uses-feature android:name="android.hardware.bluetooth" />
92&lt;uses-feature android:name="android.hardware.camera" />
93</pre>
94
95<p>In general, you should always make sure to declare
96<code>&lt;uses-feature&gt;</code> elements for all of the features that your
97application requires.</p>
98
99<p>Declared <code>&lt;uses-feature></code> elements are informational only, meaning
100that the Android system itself does not check for matching feature support on
101the device before installing an application. However, other services
102(such as Google Play) or applications may check your application's
103<code>&lt;uses-feature></code> declarations as part of handling or interacting
104with your application. For this reason, it's very important that you declare all of
105the features (from the list below) that your application uses. </p>
106
107<p>For some features, there may exist a specific attribute that allows you to define
108a version of the feature, such as the version of Open GL used (declared with
109<a href="#glEsVersion"><code>glEsVersion</code></a>). Other features that either do or do not
110exist for a device, such as a camera, are declared using the
111<a href="#name"><code>name</code></a> attribute.</p>
112
113
114<p>Although the <code>&lt;uses-feature></code> element is only activated for
115devices running API Level 4 or higher, it is recommended to include these
116elements for all applications, even if the <a href="uses-sdk-element.html#min"><code>minSdkVersion</code></a>
117is "3" or lower. Devices running older versions of the platform will simply
118ignore the element.</p>
119
120<p class="note"><strong>Note:</strong> When declaring a feature, remember
121that you must also request permissions as appropriate. For example, you must
122still request the {@link android.Manifest.permission#CAMERA}
123permission before your application can access the camera API. Requesting the
124permission grants your application access to the appropriate hardware and
125software, while declaring the features used by your application ensures proper
126device compatibility.</p>
127
128</dd>
129
130
131<dt>attributes:</dt>
132
133<dd>
134<dl class="attr">
135
136  <dt><a name="name"></a><code>android:name</code></dt>
137  <dd>Specifies a single hardware or software feature used by the application,
138as a descriptor string. Valid descriptor values are listed in the <a
139href="#hw-features">Hardware features</a> and <a href="#sw-features">Software
140features</a> tables, below. </dd>
141
142  <dt><a name="required"></a><code>android:required</code></dt>  <!-- added in api level 5 -->
143  <dd>Boolean value that indicates whether the application requires
144  the feature specified in <code>android:name</code>.
145
146<ul>
147<li>When you declare <code>"android:required="true"</code> for a feature,
148you are specifying that the application <em>cannot function, or is not
149designed to function</em>, when the specified feature is not present on the
150device. </li>
151
152<li>When you declare <code>"android:required="false"</code> for a feature, it
153means that the application <em>prefers to use the feature</em> if present on
154the device, but that it <em>is designed to function without the specified
155feature</em>, if necessary. </li>
156
157</ul>
158
159<p>The default value for <code>android:required</code> if not declared is
160<code>"true"</code>.</p>
161  </dd>
162
163  <dt><a name="glEsVersion"></a><code>android:glEsVersion</code></dt>
164  <dd>The OpenGL ES version required by the application. The higher 16 bits
165represent the major number and the lower 16 bits represent the minor number. For
166example, to specify OpenGL ES version 2.0, you would set the value as
167"0x00020000". To specify OpenGL ES 2.1, if/when such a version were made
168available, you would set the value as "0x00020001".
169
170  <p>An application should specify at most one <code>android:glEsVersion</code>
171attribute in its manifest. If it specifies more than one, the
172<code>android:glEsVersion</code> with the numerically highest value is used and
173any other values are ignored.</p>
174
175  <p>If an application does not specify an <code>android:glEsVersion</code>
176attribute, then it is assumed that the application requires only OpenGL ES 1.0,
177which is supported by all Android-powered devices.</p>
178
179  <p>An application can assume that if a platform supports a given OpenGL ES
180version, it also supports all numerically lower OpenGL ES versions. Therefore,
181an application that requires both OpenGL ES 1.0 and OpenGL ES 2.0 must specify
182that it requires OpenGL ES 2.0.</p>
183
184  <p>An application that can work with any of several OpenGL ES versions should
185only specify the numerically lowest version of OpenGL ES that it requires. (It
186can check at run-time whether a higher level of OpenGL ES is available.)</p>
187  </dd>
188
189</dl>
190</dd>
191
192<!-- ##api level indication## -->
193<dt>introduced in:</dt>
194<dd>API Level 4</dd>
195
196<dt>see also:</dt>
197<dd>
198  <ul>
199    <li>{@link android.content.pm.PackageManager}</li>
200    <li>{@link android.content.pm.FeatureInfo}</li>
201    <li>{@link android.content.pm.ConfigurationInfo}</li>
202    <li><a href="{@docRoot}guide/topics/manifest/uses-permission-element.html"><code>&lt;uses-permission&gt;</code></a></li>
203    <li><a href="{@docRoot}google/play/filters.html">Filters on Google Play</a></li>
204  </ul>
205</dd>
206
207</dl>
208
209
210<h2 id="market-feature-filtering">Google Play and Feature-Based Filtering</h2>
211
212<p>Google Play filters the applications that are visible to users, so that
213users can see and download only those applications that are compatible with
214their devices. One of the ways it filters applications is by feature
215compatibility.</p>
216
217<p>To determine an application's feature compatibility with a given user's
218device, Google Play compares:</p>
219
220<ul>
221<li>Features required by the application &mdash; an application declares features in
222<code>&lt;uses-feature&gt;</code> elements in its manifest <br/>with...</li>
223<li>Features available on the device, in hardware or software &mdash;
224a device reports the features it supports as read-only system properties.</li>
225</ul>
226
227<p>To ensure an accurate comparison of features, the Android Package Manager
228provides a shared set of feature constants that both applications and devices
229use to declare feature requirements and support. The available feature constants
230are listed in the <a href="#features-reference">Features Reference</a> tables at
231the bottom of this document, and in the class documentation for {@link
232android.content.pm.PackageManager}.</p>
233
234<p>When the user launches Google Play, the application queries the
235Package Manager for the list of features available on the device by calling
236{@link android.content.pm.PackageManager#getSystemAvailableFeatures()}. The
237Store application then passes the features list up to Google Play
238when establishing the session for the user.</p>
239
240<p>Each time you upload an application to the Google Play publisher site,
241Google Play scans the application's manifest file. It looks for
242<code>&lt;uses-feature&gt;</code> elements and evaluates them in combination
243with other elements, in some cases, such as <code>&lt;uses-sdk&gt;</code> and
244<code>&lt;uses-permission&gt;</code> elements. After establishing the
245application's set of required features, it stores that list internally as
246metadata associated with the application <code>.apk</code> and the application
247version. </p>
248
249<p>When a user searches or browses for applications using the Google Play
250application, the service compares the features needed by each application with
251the features available on the user's device. If all of an application's required
252features are present on the device, Google Play allows the user to see the
253application and potentially download it. If any required feature is not
254supported by the device, Google Play filters the application so that it is
255not visible to the user and not available for download. </p>
256
257<p>Because the features you declare in <code>&lt;uses-feature&gt;</code>
258elements directly affect how Google Play filters your application, it's
259important to understand how Google Play evaluates the application's manifest
260and establishes the set of required features. The sections below provide more
261information. </p>
262
263<h3 id="declared">Filtering based on explicitly declared features</h3>
264
265<p>An explicitly declared feature is one that your application declares in a
266<code>&lt;uses-feature&gt;</code> element. The feature declaration can include
267an <code>android:required=["true" | "false"]</code> attribute (if you are
268compiling against API level 5 or higher), which lets you specify whether the
269application absolutely requires the feature and cannot function properly without
270it (<code>"true"</code>), or whether the application prefers to use the feature
271if available, but is designed to run without it (<code>"false"</code>).</p>
272
273<p>Google Play handles explicitly declared features in this way: </p>
274
275<ul>
276<li>If a feature is explicitly declared as being required, Google Play adds
277the feature to the list of required features for the application. It then
278filters the application from users on devices that do not provide that feature.
279For example:
280<pre>&lt;uses-feature android:name="android.hardware.camera" android:required="true" /&gt;</pre></li>
281<li>If a feature is explicitly declared as <em>not</em> being required, Google
282Play <em>does not</em> add the feature to the list of required features. For
283that reason, an explicitly declared non-required feature is never considered when
284filtering the application. Even if the device does not provide the declared
285feature, Google Play will still consider the application compatible with the
286device and will show it to the user, unless other filtering rules apply. For
287example:
288<pre>&lt;uses-feature android:name="android.hardware.camera" android:required="false" /&gt;</pre></li>
289<li>If a feature is explicitly declared, but without an
290<code>android:required</code> attribute, Google Play assumes that the feature
291is required and sets up filtering on it. </li>
292</ul>
293
294<p>In general, if your application is designed to run on Android 1.6 and earlier
295versions, the <code>android:required</code> attribute is not available in the
296API and Google Play assumes that any and all
297<code>&lt;uses-feature&gt;</code> declarations are required. </p>
298
299<p class="note"><strong>Note:</strong> By declaring a feature explicitly and
300including an <code>android:required="false"</code> attribute, you can
301effectively disable all filtering on Google Play for the specified feature.
302</p>
303
304
305<h3 id="implicit">Filtering based on implicit features</h3>
306
307<p>An <em>implicit</em> feature is one that an application requires in order to
308function properly, but which is <em>not</em> declared in a
309<code>&lt;uses-feature&gt;</code> element in the manifest file. Strictly
310speaking, every application should <em>always</em> declare all features that it
311uses or requires, so the absence of a declaration for a feature used by an
312application should be considered an error. However, as a safeguard for users and
313developers, Google Play looks for implicit features in each application and
314sets up filters for those features, just as it would do for an explicitly
315declared feature. </p>
316
317<p>An application might require a feature but not declare it because: </p>
318
319<ul>
320<li>The application was compiled against an older version of the Android library
321(Android 1.5 or earlier) and the <code>&lt;uses-feature&gt;</code> element was
322not available.</li>
323<li>The developer incorrectly assumed that the feature would be present on all
324devices and a declaration was unnecessary.</li>
325<li>The developer omitted the feature declaration accidentally.</li>
326<li>The developer declared the feature explicitly, but the declaration was not
327valid. For example, a spelling error in the <code>&lt;uses-feature&gt;</code>
328element name or an unrecognized string value for the
329<code>android:name</code> attribute would invalidate the feature declaration.
330</li>
331</ul>
332
333<p>To account for the cases above, Google Play attempts to discover an
334application's implied feature requirements by examining <em>other elements</em>
335declared in the manifest file, specifically,
336<code>&lt;uses-permission&gt;</code> elements.</p>
337
338<p>If an application requests hardware-related permissions, Google Play
339<em>assumes that the application uses the underlying hardware features and
340therefore requires those features</em>, even though there might be no
341corresponding to <code>&lt;uses-feature&gt;</code> declarations. For such
342permissions, Google Play adds the underlying hardware features to the
343metadata that it stores for the application and sets up filters for them.</p>
344
345<p>For example, if an application requests the <code>CAMERA</code> permission
346but does not declare a <code>&lt;uses-feature&gt;</code> element for
347<code>android.hardware.camera</code>, Google Play considers that the
348application requires a camera and should not be shown to users whose devices do
349not offer a camera.</p>
350
351<p>If you don't want Google Play to filter based on a specific implied
352feature, you can disable that behavior. To do so, declare the feature explicitly
353in a <code>&lt;uses-feature&gt;</code> element and include an
354<code>android:required="false"</code> attribute. For example, to disable
355filtering derived from the <code>CAMERA</code> permission, you would declare
356the feature as shown below.</p>
357
358<pre>&lt;uses-feature android:name="android.hardware.camera" android:required="false" /&gt;</pre>
359
360<p class="caution">It's important to understand that the permissions that you
361request in <code>&lt;uses-permission&gt;</code> elements can directly affect how
362Google Play filters your application. The reference section <a
363href="#permissions">Permissions that Imply Feature Requirements</a>,
364below, lists the full set of permissions that imply feature requirements and
365therefore trigger filtering.</p>
366
367<h3 id="bt-permission-handling">Special handling for Bluetooth feature</h3>
368
369<p>Google Play applies slightly different rules than described above, when
370determining filtering for Bluetooth.</p>
371
372<p>If an application declares a Bluetooth permission in a
373<code>&lt;uses-permission&gt;</code> element, but does not explicitly declare
374the Bluetooth feature in a <code>&lt;uses-feature&gt;</code> element, Google
375Play checks the version(s) of the Android platform on which the application is
376designed to run, as specified in the <code>&lt;uses-sdk&gt;</code> element. </p>
377
378<p>As shown in the table below, Google Play enables filtering for the
379Bluetooth feature only if the application declares its lowest or targeted
380platform as Android 2.0 (API level 5) or higher. However, note that Google
381Play applies the normal rules for filtering when the application explicitly
382declares the Bluetooth feature in a <code>&lt;uses-feature&gt;</code> element.
383</p>
384
385<p class="caption"><strong>Table 1.</strong> How Google Play determines the
386Bluetooth feature requirement for an application that requests a Bluetooth
387permission but does not declare the Bluetooth feature in a
388<code>&lt;uses-feature&gt;</code> element.</p>
389
390<table style="margin-top:1em;">
391<tr>
392<th><nobr>If <code>minSdkVersion</code> is ...</nobr></th>
393<th><nobr>or <code>targetSdkVersion</code> is</nobr></th>
394<th>Result</th>
395</tr>
396<tr>
397<td><nobr>&lt;=4 (or uses-sdk is not declared)</nobr></td>
398<td>&lt;=4</td>
399<td>Google Play <em>will not</em> filter the application from any devices
400based on their reported support for the <code>android.hardware.bluetooth</code>
401feature.</td>
402</tr>
403<tr>
404<td>&lt;=4</td>
405<td>&gt;=5</td>
406<td rowspan="2">Google Play filters the application from any devices that
407do not support the <code>android.hardware.bluetooth</code> feature (including
408older releases).</td>
409</tr>
410<tr>
411<td>&gt;=5</td>
412<td>&gt;=5</td>
413</tr>
414</table>
415
416<p>The examples below illustrate the different filtering effects, based on how
417Google Play handles the Bluetooth feature. </p>
418
419<dl>
420<dt>In first example, an application that is designed to run on older API levels
421declares a Bluetooth permission, but does not declare the Bluetooth feature in a
422<code>&lt;uses-feature&gt;</code> element.</dt>
423<dd><em>Result:</em> Google Play does not filter the application from any device.</dd>
424</dl>
425
426<pre>&lt;manifest ...>
427    &lt;uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
428    &lt;uses-sdk android:minSdkVersion="3" />
429    ...
430&lt;/manifest></pre>
431
432<dl>
433<dt>In the second example, below, the same application also declares a target
434API level of "5". </dt>
435<dd><em>Result:</em> Google Play now assumes that the feature is required and
436will filter the application from all devices that do not report Bluetooth support,
437including devices running older versions of the platform. </dd>
438</dl>
439
440<pre>&lt;manifest ...>
441    &lt;uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
442    &lt;uses-sdk android:minSdkVersion="3" android:targetSdkVersion="5" />
443    ...
444&lt;/manifest></pre>
445
446<dl>
447<dt>Here the same application now specifically declares the Bluetooth feature.</dt>
448<dd><em>Result:</em> Identical to the previous example (filtering is applied).</dd>
449</dl>
450
451<pre>&lt;manifest ...>
452    &lt;uses-feature android:name="android.hardware.bluetooth" />
453    &lt;uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
454    &lt;uses-sdk android:minSdkVersion="3" android:targetSdkVersion="5" />
455    ...
456&lt;/manifest></pre>
457
458<dl>
459<dt>Finally, in the case below, the same application adds an
460<code>android:required="false"</code> attribute.</dt>
461<dd><em>Result:</em> Google Play disables filtering based on Bluetooth
462feature support, for all devices.</dd>
463</dl>
464
465<pre>&lt;manifest ...>
466    &lt;uses-feature android:name="android.hardware.bluetooth" android:required="false" />
467    &lt;uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
468    &lt;uses-sdk android:minSdkVersion="3" android:targetSdkVersion="5" />
469    ...
470&lt;/manifest></pre>
471
472
473
474<h3 id="testing">Testing the features required by your application</h3>
475
476<p>You can use the <code>aapt</code> tool, included in the Android SDK, to
477determine how Google Play will filter your application, based on its declared
478features and permissions. To do so, run  <code>aapt</code> with the <code>dump
479badging</code> command. This causes <code>aapt</code> to parse your
480application's manifest and apply the same rules as used by Google Play to
481determine the features that your application requires. </p>
482
483<p>To use the tool, follow these steps: </p>
484
485<ol>
486<li>First, build and export your application as an unsigned <code>.apk</code>.
487If you are developing in Eclipse with ADT, right-click the project and select
488<strong>Android Tools</strong> &gt; <strong>Export Unsigned Application
489Package</strong>. Select a destination filename and path and click
490<strong>OK</strong>. </li>
491<li>Next, locate the <code>aapt</code> tool, if it is not already in your PATH.
492If you are using SDK Tools r8 or higher, you can find <code>aapt</code> in the
493<code>&lt;<em>SDK</em>&gt;/platform-tools/</code> directory.
494<p class="note"><strong>Note:</strong> You must use the version of
495<code>aapt</code> that is provided for the latest Platform-Tools component available. If
496you do not have the latest Platform-Tools component, download it using the <a
497href="{@docRoot}sdk/exploring.html">Android SDK Manager</a>.
498</p></li>
499<li>Run <code>aapt</code> using this syntax: </li>
500</ol>
501
502<pre>$ aapt dump badging &lt;<em>path_to_exported_.apk</em>&gt;</pre>
503
504<p>Here's an example of the command output for the second Bluetooth example, above: </p>
505
506<pre>$ ./aapt dump badging BTExample.apk
507package: name='com.example.android.btexample' versionCode='' versionName=''
508<strong>uses-permission:'android.permission.BLUETOOTH_ADMIN'</strong>
509<strong>uses-feature:'android.hardware.bluetooth'</strong>
510sdkVersion:'3'
511targetSdkVersion:'5'
512application: label='BT Example' icon='res/drawable/app_bt_ex.png'
513launchable activity name='com.example.android.btexample.MyActivity'label='' icon=''
514uses-feature:'android.hardware.touchscreen'
515main
516supports-screens: 'small' 'normal' 'large'
517locales: '--_--'
518densities: '160'
519</pre>
520
521
522<h2 id=features-reference>Features Reference</h2>
523
524<p>The tables below provide reference information about hardware and software
525features and the permissions that can imply them on Google Play. </p>
526
527<h3 id="hw-features">Hardware features</h3>
528
529<p>The table below describes the hardware feature descriptors supported by the
530most current platform release. To signal that your application uses or requires
531a hardware feature, declare each value in a <code>android:name</code> attribute
532in a separate <code>&lt;uses-feature&gt;</code> element. </p>
533
534  <table>
535    <tr>
536       <th>Feature Type</th>
537       <th>Feature Descriptor</th>
538       <th style="min-width:170px">Description</th>
539       <th>Comments</th>
540    </tr>
541    <tr>
542       <td>Audio</td>
543       <td><code>android.hardware.audio.low_latency</td>
544       <td>The application uses a low-latency audio pipeline on the device and
545is sensitive to delays or lag in sound input or output.</td>
546<td>
547</td>
548    </tr>
549    <tr>
550       <td>Bluetooth</td>
551       <td><code>android.hardware.bluetooth</td>
552       <td>The application uses Bluetooth radio features in the device.</td>
553<td>
554</td>
555    </tr>
556    <tr>
557       <td rowspan="5">Camera</td>
558       <td><code>android.hardware.camera</code></td>
559       <td>The application uses the device's camera. If the device supports
560           multiple cameras, the application uses the camera that facing
561           away from the screen.</td>
562       <td></td>
563    </tr>
564<tr>
565  <td><code>android.hardware.camera.autofocus</code></td>
566  <td>Subfeature. The application uses the device camera's autofocus capability.</td>
567  <td rowspan="3">These subfeatures implicitly declare the
568<code>android.hardware.camera</code> parent feature, unless declared with
569<code>android:required="false"</code>.</td>
570</tr>
571<tr>
572  <td><code>android.hardware.camera.flash</code></td>
573  <td>Subfeature. The application uses the device camera's flash.</td>
574</tr>
575<tr>
576  <td><code>android.hardware.camera.front</code></td>
577  <td>Subfeature. The application uses a front-facing camera on the device.</td>
578</tr>
579<tr>
580  <td><code>android.hardware.camera.any</code></td>
581  <td>The application uses at least one camera facing in any direction. Use this
582in preference to <code>android.hardware.camera</code> if a back-facing camera is
583not required.</td>
584</tr>
585
586<tr>
587  <td rowspan="3">Location</td>
588  <td><code>android.hardware.location</code></td>
589  <td>The application uses one or more features on the device for determining
590location, such as GPS location, network location, or cell location.</td>
591  <td></td>
592</tr>
593<tr>
594  <td><code>android.hardware.location.network</code></td>
595  <td>Subfeature. The application uses coarse location coordinates obtained from
596a network-based geolocation system supported on the device.</td>
597  <td rowspan="2">These subfeatures implicitly declare the
598<code>android.hardware.location</code> parent feature, unless declared with
599<code>android:required="false"</code>. </td>
600</tr>
601<tr>
602  <td><code>android.hardware.location.gps</code></td>
603  <td>Subfeature. The application uses precise location coordinates obtained
604from a Global Positioning System receiver on the device. </td>
605</tr>
606<tr>
607  <td>Microphone</td>
608  <td><code>android.hardware.microphone</code></td>
609  <td>The application uses a microphone on the device.
610  </td>
611  <td></td>
612</tr>
613<tr>
614  <td>NFC</td>
615  <td><code>android.hardware.nfc</td>
616  <td>The application uses Near Field Communications radio features in the device.</td>
617  <td></td>
618</tr>
619<tr>
620  <td rowspan="6">Sensors</td>
621  <td><code>android.hardware.sensor.accelerometer</code></td>
622  <td>The application uses motion readings from an accelerometer on the
623device.</td>
624  <td></td>
625</tr>
626<tr>
627  <td><code>android.hardware.sensor.barometer</code></td>
628  <td>The application uses the device's barometer.</td>
629  <td></td>
630</tr>
631<tr>
632  <td><code>android.hardware.sensor.compass</code></td>
633  <td>The application uses directional readings from a magnetometer (compass) on
634the device.</td>
635  <td></td>
636</tr>
637<tr>
638  <td><code>android.hardware.sensor.gyroscope</code></td>
639  <td>The application uses the device's gyroscope sensor.</td>
640  <td></td>
641</tr>
642<tr>
643  <td><code>android.hardware.sensor.light</code></td>
644  <td>The application uses the device's light sensor.</td>
645  <td></td>
646</tr>
647<tr>
648  <td><code>android.hardware.sensor.proximity</code></td>
649  <td>The application uses the device's proximity sensor.</td>
650  <td></td>
651</tr>
652
653<tr>
654  <td rowspan="2">Screen</td>
655  <td><code>android.hardware.screen.landscape</code></td>
656  <td>The application requires landscape orientation.</td>
657  <td rowspan="2">
658     <p>For example, if your app requires portrait orientation, you should declare
659<code>&lt;uses-feature android:name="android.hardware.screen.portrait"/></code> so that only devices
660that support portrait orientation (whether always or by user choice) can install your app. If your
661application <em>supports</em> both orientations, then you don't need to declare either.</p>
662    <p>Both orientations are assumed <em>not required</em>, by default, so your app may be installed
663on devices that support one or both orientations. However, if any of your activities request that
664they run in a specific orientation, using the <a
665href="{@docRoot}guide/topics/manifest/activity-element.html#screen">{@code
666android:screenOrientation}</a> attribute, then this also declares that the application requires that
667orientation. For example, if you declare <a
668href="{@docRoot}guide/topics/manifest/activity-element.html#screen">{@code
669android:screenOrientation}</a> with either {@code "landscape"}, {@code "reverseLandscape"}, or
670{@code "sensorLandscape"}, then your application will be available only to devices that support
671landscape orientation. As a best practice, you should still declare your requirement for this
672orientation using a {@code &lt;uses-feature&gt;} element. If you declare an orientation for your
673activity using <a href="{@docRoot}guide/topics/manifest/activity-element.html#screen">{@code
674android:screenOrientation}</a>, but don't actually <em>require</em> it, you can disable the
675requirement by declaring the orientation with a {@code &lt;uses-feature&gt;} element and include
676{@code android:required="false"}.</p>
677    <p>For backwards compatibility, any device running a platform version that supports only API
678level 12 or lower is assumed to support both landscape and portrait.</p>
679  </td>
680</tr>
681<tr>
682  <td><code>android.hardware.screen.portrait</code></td>
683  <td>The application requires portrait orientation.</td>
684</tr>
685
686<tr>
687  <td rowspan="3">Telephony</td>
688  <td><code>android.hardware.telephony</code></td>
689  <td>The application uses telephony features on the device, such as telephony
690radio with data communication services.</td>
691  <td></td>
692</tr>
693<tr>
694  <td><code>android.hardware.telephony.cdma</code></td>
695  <td>Subfeature. The application uses CDMA telephony radio features on the
696device. </td>
697  <td rowspan="2">These subfeatures implicitly declare the
698<code>android.hardware.telephony</code> parent feature, unless declared with
699<code>android:required="false"</code>. </td>
700</tr>
701<tr>
702  <td><code>android.hardware.telephony.gsm</code></td>
703  <td>Subfeature. The application uses GSM telephony radio features on the
704device.</td>
705</tr>
706
707<tr>
708  <td>Television</td>
709  <td><code>android.hardware.type.television</code></td>
710  <td>The application is designed for a television user experience.</td>
711  <td>This feature defines "television" to be a typical living room television experience:
712  displayed on a big screen, where the user is sitting far away and the dominant form of
713  input is something like a d-pad, and generally not through touch or a
714  mouse/pointer-device.</td>
715</tr>
716
717<tr>
718  <td rowspan="7">Touchscreen</td>
719  <td><code>android.hardware.faketouch</code></td>
720  <td>The application uses basic touch interaction events, such as "click down", "click
721up", and drag.</td>
722  <td><p>When declared as required, this indicates that the application is compatible with a device
723only if it offers an emulated touchscreen ("fake touch" interface), or better. A device that offers
724a fake touch interface provides a user input system that emulates a subset of touchscreen
725capabilities. For example, a mouse or remote control that drives an on-screen cursor provides a fake
726touch interface. If your application requires basic point and click interaction (in other
727words, it won't work with <em>only</em> a d-pad controller), you should declare this feature.
728Because this is the minimum level of touch interaction, your app will also be compatible with
729devices that offer more complex touch interfaces.</p>
730  <p class="note"><strong>Note:</strong> Because applications require the {@code
731android.hardware.touchscreen} feature by default, if you want your application to be available to
732devices that provide a fake touch interface, you must also explicitly declare that a touch screen is
733<em>not</em> required by declaring {@code &lt;uses-feature
734android:name="android.hardware.touchscreen" <strong>android:required="false"</strong>
735/&gt;}</p></td>
736</tr>
737
738<tr>
739  <td><code>android.hardware.faketouch.multitouch.distinct</code></td>
740  <td>The application performs distinct tracking of two or more "fingers" on a fake touch
741interface. This is a superset of the faketouch feature.</td>
742  <td><p>When declared as required, this indicates that the application is compatible with a device
743only if it supports touch emulation for events that supports distinct tracking of two or more
744fingers, or better.</p>
745  <p>Unlike the distinct multitouch defined by {@code
746android.hardware.touchscreen.multitouch.distinct}, input devices that support distinct multi-touch
747with a fake touch interface will not support all two-finger gestures, because the input is
748being transformed to cursor movement on the screen. That is, single finger gestures on such a device
749move a cursor; two-finger swipes will result in single-finger touch events; other two-finger
750gestures will result in the corresponding two-finger touch event. An example device that supports
751distinct multi-touch with a fake touch interface is one that provides a trackpad for cursor movement
752which also supports two or more fingers.</p></td>
753</tr>
754
755<tr>
756  <td><code>android.hardware.faketouch.multitouch.jazzhand</code></td>
757  <td>The application performs distinct tracking of five or more "fingers" on a fake touch
758interface. This is a superset of the faketouch feature.</td>
759  <td><p>When declared as required, this indicates that the application is compatible with a device
760only if it supports touch emulation for events that supports distinct tracking of five or more
761fingers.</p>
762  <p>Unlike the distinct multitouch defined by {@code
763android.hardware.touchscreen.multitouch.jazzhand}, input devices that support jazzhand multi-touch
764with a fake touch interface will not support all five-finger gestures, because the input is being
765transformed to cursor movement on the screen. That is, single finger gestures on such a device move
766a cursor; multi-finger gestures will result in single-finger touch events; other multi-finger
767gestures will result in the corresponding multi-finger touch event. An example device that supports
768distinct multi-touch with a fake touch interface is one that provides a trackpad for cursor movement
769which also supports five or more fingers.</p></td>
770</tr>
771
772<tr>
773  <td><code>android.hardware.touchscreen</code></td>
774  <td>The application uses touchscreen capabilities for gestures that are more interactive
775than basic touch events, such as a fling. This is a superset of the basic faketouch feature.</td>
776  <td><p>By default, your application requires this. As such, your application is <em>not</em>
777available to devices that provide only an emulated touch interface ("fake touch"), by default. If
778you want your application available to devices that provide a fake touch interface (or even devices
779that provide only a d-pad controller), you must explicitly declare that a touch screen is not
780required, by declaring {@code android.hardware.touchscreen} with {@code android:required="false"}.
781You should do so even if your application uses&mdash;but does not <em>require</em>&mdash;a real
782touch screen interface.</p>
783<p>If your application <em>does require</em> a touch interface (in order to perform touch
784gestures such as a fling), then you don't need to do anything, because this is required by default.
785However, it's best if you explicitly declare all features used by your application, so you should
786still declare this if your app uses it.</p>
787  <p>If you require more complex touch interaction, such as multi-finger gestures, you
788should declare the advanced touch screen features below.</p></td>
789</tr>
790<tr>
791  <td><code>android.hardware.touchscreen.multitouch</code></td>
792  <td>The application uses basic two-point multitouch capabilities on the device
793screen, such as for pinch gestures, but does not need to track touches independently. This
794is a superset of touchscreen feature.</td>
795  <td>This implicitly declares the <code>android.hardware.touchscreen</code> parent feature, unless
796declared with <code>android:required="false"</code>. </td>
797</tr>
798<tr>
799  <td><code>android.hardware.touchscreen.multitouch.distinct</code></td>
800  <td>Subfeature. The application uses advanced multipoint multitouch
801capabilities on the device screen, such as for tracking two or more points fully
802independently. This is a superset of multitouch feature.</td>
803  <td rowspan="2">This implicitly declares the <code>android.hardware.touchscreen.multitouch</code>
804parent feature, unless declared with <code>android:required="false"</code>. </td>
805</tr>
806<tr>
807  <td><code>android.hardware.touchscreen.multitouch.jazzhand</code></td>
808  <td>The application uses advanced multipoint multitouch
809capabilities on the device screen, for tracking up to five points fully
810independently. This is a superset of distinct multitouch feature.</td>
811</tr>
812
813<tr>
814  <td rowspan="2">USB</td>
815  <td><code>android.hardware.usb.host</code></td>
816  <td>The application uses USB host mode features (behaves as the host and connects to USB
817devices).</td>
818  <td></td>
819</tr>
820
821<tr>
822  <td><code>android.hardware.usb.accessory</code></td>
823  <td>The application uses USB accessory features (behaves as the USB device and connects to USB
824hosts).</td>
825  <td></td>
826</tr>
827
828<tr>
829  <td>Wifi</td>
830  <td><code>android.hardware.wifi</code></td>
831  <td>The application uses 802.11 networking (wifi) features on the device.</td>
832  <td></td>
833</tr>
834
835  </table>
836
837<h3 id="sw-features">Software features</h3>
838
839<p>The table below describes the software feature descriptors supported by the
840most current platform release. To signal that your application uses or requires
841a software feature, declare each value in a <code>android:name</code> attribute
842in a separate <code>&lt;uses-feature&gt;</code> element. </p>
843
844
845  <table>
846<tr>
847  <th>Feature</th>
848  <th>Attribute Value</th>
849  <th>Description</th>
850  <th>Comments</th>
851</tr>
852<tr>
853  <td>Live Wallpaper</td>
854  <td><code>android.software.live_wallpaper</code></td>
855  <td>The application uses or provides Live Wallpapers.</td>
856  <td></td>
857</tr>
858<tr>
859  <td rowspan="2">SIP/VOIP</td>
860  <td><code>android.software.sip</code></td>
861  <td>The application uses SIP service on the device.
862  </td>
863  <td></td>
864</tr>
865<tr>
866  <td><code>android.software.sip.voip</code></td>
867  <td>Subfeature. The application uses SIP-based VOIP service on the device.
868  </td>
869  <td>This subfeature implicitly declares the <code>android.software.sip</code> parent feature,
870unless declared with <code>android:required="false"</code>.</td>
871</tr>
872  </table>
873
874
875<h3 id="permissions">Permissions that Imply Feature Requirements</h3>
876
877<p>Some feature constants listed in the tables above were made available to
878applications <em>after</em> the corresponding API; for example, the
879<code>android.hardware.bluetooth</code> feature was added in Android 2.2 (API
880level 8), but the bluetooth API that it refers to was added in Android 2.0 (API
881level 5). Because of this, some apps were able to use the API before they had
882the ability to declare that they require the API via the
883<code>&lt;uses-feature&gt;</code> system. </p>
884
885<p>To prevent those apps from being made available unintentionally,  Google
886Play assumes that certain hardware-related permissions indicate that the
887underlying hardware features are required by default. For instance, applications
888that use Bluetooth must request the <code>BLUETOOTH</code> permission in a
889<code>&lt;uses-permission&gt;</code> element &mdash; for legacy apps, Google
890Play assumes that the permission declaration means that the underlying
891<code>android.hardware.bluetooth</code> feature is required by the application
892and sets up filtering based on that feature. </p>
893
894<p>The table below lists permissions that imply feature requirements
895equivalent to those declared in <code>&lt;uses-feature&gt;</code> elements. Note
896that <code>&lt;uses-feature&gt;</code> declarations, including any declared
897<code>android:required</code> attribute, always take precedence over features
898implied by the permissions below. </p>
899
900<p>For any of the permissions below, you can disable filtering based on the
901implied feature by explicitly declaring the implied feature explicitly, in a
902<code>&lt;uses-feature&gt;</code> element, with an
903<code>android:required="false"</code> attribute. For example, to disable any
904filtering based on the <code>CAMERA</code> permission, you would add this
905<code>&lt;uses-feature&gt;</code> declaration to the manifest file:</p>
906
907<pre>&lt;uses-feature android:name="android.hardware.camera" android:required="false" /&gt;</pre>
908
909<table id="permissions-features" >
910  <tr>
911    <th>Category</th>
912    <th>This Permission...</th>
913    <th>Implies This Feature Requirement</th>
914    <!-- <th>Comments</th> -->
915  </tr>
916
917
918<tr>
919  <td rowspan="2">Bluetooth</td>
920  <td><code>BLUETOOTH</code></td>
921  <td><code>android.hardware.bluetooth</code>
922<p>(See <a href="#bt-permission-handling">Special handling for Bluetooth feature</a> for details.)</p></td>
923<!--  <td></td> -->
924</tr>
925<tr>
926  <td><code>BLUETOOTH_ADMIN</code></td>
927  <td><code>android.hardware.bluetooth</code></td>
928<!--  <td></td> -->
929</tr>
930
931<tr>
932  <td>Camera</td>
933  <td><code>CAMERA</code></td>
934  <td><code>android.hardware.camera</code> <em>and</em>
935<br><code>android.hardware.camera.autofocus</code></td>
936<!--  <td></td> -->
937</tr>
938
939<tr>
940  <td rowspan="5">Location</td>
941  <td><code>ACCESS_MOCK_LOCATION</code></td>
942  <td><code>android.hardware.location</code></td>
943<!--  <td></td> -->
944</tr>
945<tr>
946  <td><code>ACCESS_LOCATION_EXTRA_COMMANDS</code></td>
947  <td><code>android.hardware.location</code></td>
948<!--  <td></td> -->
949</tr>
950<tr>
951  <td><code>INSTALL_LOCATION_PROVIDER</code></td>
952  <td><code>android.hardware.location</code></td>
953<!--  <td></td> -->
954</tr>
955<tr>
956  <td><code>ACCESS_COARSE_LOCATION</code></td>
957  <td><code>android.hardware.location.network</code> <em>and</em>
958<br><code>android.hardware.location</code></td>
959<!--  <td></td> -->
960</tr>
961<tr>
962  <td><code>ACCESS_FINE_LOCATION</code></td>
963  <td><code>android.hardware.location.gps</code> <em>and</em>
964<br><code>android.hardware.location</code></td>
965<!--  <td></td> -->
966</tr>
967
968<tr>
969  <td>Microphone</td>
970  <td><code>RECORD_AUDIO</code></td>
971  <td><code>android.hardware.microphone</code></td>
972<!--  <td></td> -->
973</tr>
974
975<tr>
976  <td rowspan="11">Telephony</td>
977  <td><code>CALL_PHONE</code></td>
978  <td><code>android.hardware.telephony</code></td>
979<!--  <td></td> -->
980</tr>
981<tr>
982  <td><code>CALL_PRIVILEGED</code></td>
983  <td><code>android.hardware.telephony</code></td>
984<!--  <td></td> -->
985</tr>
986
987<tr>
988  <td><code>MODIFY_PHONE_STATE</code></td>
989  <td><code>android.hardware.telephony</code></td>
990<!--  <td></td> -->
991</tr>
992<tr>
993  <td><code>PROCESS_OUTGOING_CALLS</code></td>
994  <td><code>android.hardware.telephony</code></td>
995<!--  <td></td> -->
996</tr>
997<tr>
998  <td><code>READ_SMS</code></td>
999  <td><code>android.hardware.telephony</code></td>
1000<!--  <td></td> -->
1001</tr>
1002<tr>
1003  <td><code>RECEIVE_SMS</code></td>
1004  <td><code>android.hardware.telephony</code></td>
1005<!--  <td></td> -->
1006</tr>
1007<tr>
1008  <td><code>RECEIVE_MMS</code></td>
1009  <td><code>android.hardware.telephony</code></td>
1010<!--  <td></td> -->
1011</tr>
1012<tr>
1013  <td><code>RECEIVE_WAP_PUSH</code></td>
1014  <td><code>android.hardware.telephony</code></td>
1015<!--  <td></td> -->
1016</tr>
1017<tr>
1018  <td><code>SEND_SMS</code></td>
1019  <td><code>android.hardware.telephony</code></td>
1020<!--  <td></td> -->
1021</tr>
1022<tr>
1023  <td><code>WRITE_APN_SETTINGS</code></td>
1024  <td><code>android.hardware.telephony</code></td>
1025<!--  <td></td> -->
1026</tr>
1027<tr>
1028  <td><code>WRITE_SMS</code></td>
1029  <td><code>android.hardware.telephony</code></td>
1030<!--  <td></td> -->
1031</tr>
1032
1033<tr>
1034  <td rowspan="3">Wifi</td>
1035  <td><code>ACCESS_WIFI_STATE</code></td>
1036  <td><code>android.hardware.wifi</code></td>
1037<!--  <td></td> -->
1038</tr>
1039<tr>
1040  <td><code>CHANGE_WIFI_STATE</code></td>
1041  <td><code>android.hardware.wifi</code></td>
1042<!--  <td></td> -->
1043</tr>
1044<tr>
1045  <td><code>CHANGE_WIFI_MULTICAST_STATE</code></td>
1046  <td><code>android.hardware.wifi</code></td>
1047<!--  <td></td> -->
1048</tr>
1049</table>