Home | History | Annotate | Download | only in manifest
      1 page.title=<uses-feature>
      2 page.tags=filtering,features,google play filters,permissions
      3 @jd:body
      4 
      5 <div id="qv-wrapper">
      6 <div id="qv">
      7 
      8 
      9 <h2>In this document</h2>
     10 <ol>
     11   <li><a href="#market-feature-filtering">Google Play and Feature-Based Filtering</a>
     12     <ol>
     13       <li><a href="#declared">Filtering based on explicitly declared features</a></li>
     14       <li><a href="#implicit">Filtering based on implicit features</a></li>
     15       <li><a href="#bt-permission-handling">Special handling for Bluetooth feature</a></li>
     16       <li><a href="#testing">Testing the features required by your application</a></li>
     17     </ol>
     18   </li>
     19   <li><a href="#features-reference">Features Reference</a>
     20     <ol>
     21       <li><a href="#hw-features">Hardware features</a></li>
     22       <li><a href="#sw-features">Software features</a></li>
     23       <li><a href="#permissions">Permissions that Imply Feature Requirements</a></li>
     24     </ol>
     25   </li>
     26 </ol>
     27 </div>
     28 </div>
     29 
     30  <div class="sidebox-wrapper">
     31  <div class="sidebox">
     32     <img src="{@docRoot}assets/images/icon_play.png" style="float:left;margin:0;padding:0;">
     33     <p style="color:#669999;padding-top:1em;">Google Play Filtering</p>
     34     <p style="padding-top:1em;">Google Play uses the <code>&lt;uses-feature&gt;</code>
     35     elements declared in your app manifest to filter your app from devices
     36     that do not meet its hardware and software feature requirements. </p>
     37 
     38 <p style="margin-top:1em;">By specifying the features that your application requires,
     39 you enable Google Play to present your application only to users whose
     40 devices meet the application's feature requirements, rather than presenting it
     41 to all users. </p>
     42 
     43 <p>For important information about how
     44 Google Play uses features as the basis for filtering, please read <a
     45 href="#market-feature-filtering">Google Play and Feature-Based Filtering</a>,
     46 below.</p>
     47 </div>
     48 </div>
     49 
     50 <dl class="xml">
     51 
     52 <dt>syntax:</dt>
     53 <dd>
     54 <pre class="stx">&lt;uses-feature
     55   android:<a href="#name">name</a>="<em>string</em>"
     56   android:<a href="#required">required</a>=["true" | "false"]
     57   android:<a href="#glEsVersion">glEsVersion</a>="<em>integer</em>" /&gt;</pre>
     58 </dd>
     59 
     60 <dt>contained in:</dt>
     61 <dd><code><a
     62 href="{@docRoot}guide/topics/manifest/manifest-element.html">&lt;manifest&gt;</a></code></dd>
     63 
     64 <dt>description:</dt>
     65 <dd itemprop="description">Declares a single hardware or software feature that is used by the
     66 application.
     67 
     68 <p>The purpose of a <code>&lt;uses-feature&gt;</code> declaration is to inform
     69 any external entity of the set of hardware and software features on which your
     70 application depends. The element offers a <code>required</code> attribute that
     71 lets you specify whether your application requires and cannot function without
     72 the declared feature, or whether it prefers to have the feature but can function
     73 without it. Because feature support can vary across Android devices, the
     74 <code>&lt;uses-feature&gt;</code> element serves an important role in letting an
     75 application describe the device-variable features that it uses.</p>
     76 
     77 <p>The set of available features that your application declares corresponds to
     78 the set of feature constants made available by the Android {@link
     79 android.content.pm.PackageManager}, which are listed for
     80 convenience in the <a href="#features-reference">Features Reference</a> sections
     81 at the bottom of this document.
     82 
     83 <p>You must specify each feature in a separate <code>&lt;uses-feature&gt;</code>
     84 element, so if your application requires multiple features, it would declare
     85 multiple <code>&lt;uses-feature&gt;</code> elements. For example, an application
     86 that requires both Bluetooth and camera features in the device would declare
     87 these two elements:</p>
     88 
     89 <pre>
     90 &lt;uses-feature android:name="android.hardware.bluetooth" />
     91 &lt;uses-feature android:name="android.hardware.camera" />
     92 </pre>
     93 
     94 <p>In general, you should always make sure to declare
     95 <code>&lt;uses-feature&gt;</code> elements for all of the features that your
     96 application requires.</p>
     97 
     98 <p>Declared <code>&lt;uses-feature></code> elements are informational only, meaning
     99 that the Android system itself does not check for matching feature support on
    100 the device before installing an application. However, other services
    101 (such as Google Play) or applications may check your application's
    102 <code>&lt;uses-feature></code> declarations as part of handling or interacting
    103 with your application. For this reason, it's very important that you declare all of
    104 the features (from the list below) that your application uses. </p>
    105 
    106 <p>For some features, there may exist a specific attribute that allows you to define
    107 a version of the feature, such as the version of Open GL used (declared with
    108 <a href="#glEsVersion"><code>glEsVersion</code></a>). Other features that either do or do not
    109 exist for a device, such as a camera, are declared using the
    110 <a href="#name"><code>name</code></a> attribute.</p>
    111 
    112 
    113 <p>Although the <code>&lt;uses-feature></code> element is only activated for
    114 devices running API Level 4 or higher, it is recommended to include these
    115 elements for all applications, even if the <a href="uses-sdk-element.html#min"><code>minSdkVersion</code></a>
    116 is "3" or lower. Devices running older versions of the platform will simply
    117 ignore the element.</p>
    118 
    119 <p class="note"><strong>Note:</strong> When declaring a feature, remember
    120 that you must also request permissions as appropriate. For example, you must
    121 still request the {@link android.Manifest.permission#CAMERA}
    122 permission before your application can access the camera API. Requesting the
    123 permission grants your application access to the appropriate hardware and
    124 software, while declaring the features used by your application ensures proper
    125 device compatibility.</p>
    126 
    127 </dd>
    128 
    129 
    130 <dt>attributes:</dt>
    131 
    132 <dd>
    133 <dl class="attr">
    134   <dt>
    135     <a name="name"></a><code>android:name</code>
    136   </dt>
    137 
    138   <dd>
    139     Specifies a single hardware or software feature used by the application, as
    140     a descriptor string. Valid attribute values are listed in the <a href=
    141     "#hw-features">Hardware features</a> and <a href="#sw-features">Software
    142     features</a> sections. These attribute values are case-sensitive.
    143   </dd>
    144 
    145   <dt>
    146     <a name="required"></a><code>android:required</code>
    147   </dt>
    148   <!-- added in api level 5 -->
    149 
    150   <dd>
    151     Boolean value that indicates whether the application requires the feature
    152     specified in <code>android:name</code>.
    153     <ul>
    154     <li>When you declare <code>android:required="true"</code> for a feature,
    155     you are specifying that the application <em>cannot function, or is not
    156     designed to function</em>, when the specified feature is not present on the
    157     device. </li>
    158 
    159     <li>When you declare <code>android:required="false"</code> for a feature, it
    160     means that the application <em>prefers to use the feature</em> if present on
    161     the device, but that it <em>is designed to function without the specified
    162     feature</em>, if necessary. </li>
    163 
    164     </ul>
    165 
    166     <p>The default value for <code>android:required</code> if not declared is
    167     <code>"true"</code>.</p>
    168   </dd>
    169 
    170   <dt><a name="glEsVersion"></a><code>android:glEsVersion</code></dt>
    171   <dd>The OpenGL ES version required by the application. The higher 16 bits
    172 represent the major number and the lower 16 bits represent the minor number. For
    173 example, to specify OpenGL ES version 2.0, you would set the value as
    174 "0x00020000", or to specify OpenGL ES 3.2, you would set the value as "0x00030002".
    175 
    176   <p>An application should specify at most one <code>android:glEsVersion</code>
    177 attribute in its manifest. If it specifies more than one, the
    178 <code>android:glEsVersion</code> with the numerically highest value is used and
    179 any other values are ignored.</p>
    180 
    181   <p>If an application does not specify an <code>android:glEsVersion</code>
    182 attribute, then it is assumed that the application requires only OpenGL ES 1.0,
    183 which is supported by all Android-powered devices.</p>
    184 
    185   <p>An application can assume that if a platform supports a given OpenGL ES
    186 version, it also supports all numerically lower OpenGL ES versions. Therefore,
    187 an application that requires both OpenGL ES 1.0 and OpenGL ES 2.0 must specify
    188 that it requires OpenGL ES 2.0.</p>
    189 
    190   <p>An application that can work with any of several OpenGL ES versions should
    191 only specify the numerically lowest version of OpenGL ES that it requires. (It
    192 can check at run-time whether a higher level of OpenGL ES is available.)</p>
    193 
    194   <p>For more information about using OpenGL ES, including how to check the supported OpenGL ES
    195 version at runtime, see the <a href="{@docRoot}guide/topics/graphics/opengl.html">OpenGL ES
    196 API guide</a>.</p>
    197   </dd>
    198 
    199 </dl>
    200 </dd>
    201 
    202 <!-- ##api level indication## -->
    203 <dt>introduced in:</dt>
    204 <dd>API Level 4</dd>
    205 
    206 <dt>see also:</dt>
    207 <dd>
    208   <ul>
    209     <li>{@link android.content.pm.PackageManager}</li>
    210     <li>{@link android.content.pm.FeatureInfo}</li>
    211     <li>{@link android.content.pm.ConfigurationInfo}</li>
    212     <li><a href="{@docRoot}guide/topics/manifest/uses-permission-element.html"><code>&lt;uses-permission&gt;</code></a></li>
    213     <li><a href="{@docRoot}google/play/filters.html">Filters on Google Play</a></li>
    214   </ul>
    215 </dd>
    216 
    217 </dl>
    218 
    219 
    220 <h2 id="market-feature-filtering">Google Play and Feature-Based Filtering</h2>
    221 
    222 <p>Google Play filters the applications that are visible to users, so that
    223 users can see and download only those applications that are compatible with
    224 their devices. One of the ways it filters applications is by feature
    225 compatibility.</p>
    226 
    227 <p>To determine an application's feature compatibility with a given user's
    228 device, Google Play compares:</p>
    229 
    230 <ul>
    231 <li>Features required by the application &mdash; an application declares features in
    232 <code>&lt;uses-feature&gt;</code> elements in its manifest <br/>with...</li>
    233 <li>Features available on the device, in hardware or software &mdash;
    234 a device reports the features it supports as read-only system properties.</li>
    235 </ul>
    236 
    237 <p>To ensure an accurate comparison of features, the Android Package Manager
    238 provides a shared set of feature constants that both applications and devices
    239 use to declare feature requirements and support. The available feature constants
    240 are listed in the <a href="#features-reference">Features Reference</a> sections at
    241 the bottom of this document, and in the class documentation for {@link
    242 android.content.pm.PackageManager}.</p>
    243 
    244 <p>When the user launches Google Play, the application queries the
    245 Package Manager for the list of features available on the device by calling
    246 {@link android.content.pm.PackageManager#getSystemAvailableFeatures()}. The
    247 Store application then passes the features list up to Google Play
    248 when establishing the session for the user.</p>
    249 
    250 <p>Each time you upload an application to the Google Play Developer Console,
    251 Google Play scans the application's manifest file. It looks for
    252 <code>&lt;uses-feature&gt;</code> elements and evaluates them in combination
    253 with other elements, in some cases, such as <code>&lt;uses-sdk&gt;</code> and
    254 <code>&lt;uses-permission&gt;</code> elements. After establishing the
    255 application's set of required features, it stores that list internally as
    256 metadata associated with the application <code>.apk</code> and the application
    257 version. </p>
    258 
    259 <p>When a user searches or browses for applications using the Google Play
    260 application, the service compares the features needed by each application with
    261 the features available on the user's device. If all of an application's required
    262 features are present on the device, Google Play allows the user to see the
    263 application and potentially download it. If any required feature is not
    264 supported by the device, Google Play filters the application so that it is
    265 not visible to the user and not available for download. </p>
    266 
    267 <p>Because the features you declare in <code>&lt;uses-feature&gt;</code>
    268 elements directly affect how Google Play filters your application, it's
    269 important to understand how Google Play evaluates the application's manifest
    270 and establishes the set of required features. The sections below provide more
    271 information. </p>
    272 
    273 <h3 id="declared">Filtering based on explicitly declared features</h3>
    274 
    275 <p>An explicitly declared feature is one that your application declares in a
    276 <code>&lt;uses-feature&gt;</code> element. The feature declaration can include
    277 an <code>android:required=["true" | "false"]</code> attribute (if you are
    278 compiling against API level 5 or higher), which lets you specify whether the
    279 application absolutely requires the feature and cannot function properly without
    280 it (<code>"true"</code>), or whether the application prefers to use the feature
    281 if available, but is designed to run without it (<code>"false"</code>).</p>
    282 
    283 <p>Google Play handles explicitly declared features in this way: </p>
    284 
    285 <ul>
    286 <li>If a feature is explicitly declared as being required, Google Play adds
    287 the feature to the list of required features for the application. It then
    288 filters the application from users on devices that do not provide that feature.
    289 For example:
    290 <pre>&lt;uses-feature android:name="android.hardware.camera" android:required="true" /&gt;</pre></li>
    291 <li>If a feature is explicitly declared as <em>not</em> being required, Google
    292 Play <em>does not</em> add the feature to the list of required features. For
    293 that reason, an explicitly declared non-required feature is never considered when
    294 filtering the application. Even if the device does not provide the declared
    295 feature, Google Play will still consider the application compatible with the
    296 device and will show it to the user, unless other filtering rules apply. For
    297 example:
    298 <pre>&lt;uses-feature android:name="android.hardware.camera" android:required="false" /&gt;</pre></li>
    299 <li>If a feature is explicitly declared, but without an
    300 <code>android:required</code> attribute, Google Play assumes that the feature
    301 is required and sets up filtering on it. </li>
    302 </ul>
    303 
    304 <p>In general, if your application is designed to run on Android 1.6 and earlier
    305 versions, the <code>android:required</code> attribute is not available in the
    306 API and Google Play assumes that any and all
    307 <code>&lt;uses-feature&gt;</code> declarations are required. </p>
    308 
    309 <p class="note"><strong>Note:</strong> By declaring a feature explicitly and
    310 including an <code>android:required="false"</code> attribute, you can
    311 effectively disable all filtering on Google Play for the specified feature.
    312 </p>
    313 
    314 
    315 <h3 id="implicit">Filtering based on implicit features</h3>
    316 
    317 <p>An <em>implicit</em> feature is one that an application requires in order to
    318 function properly, but which is <em>not</em> declared in a
    319 <code>&lt;uses-feature&gt;</code> element in the manifest file. Strictly
    320 speaking, every application should <em>always</em> declare all features that it
    321 uses or requires, so the absence of a declaration for a feature used by an
    322 application should be considered an error. However, as a safeguard for users and
    323 developers, Google Play looks for implicit features in each application and
    324 sets up filters for those features, just as it would do for an explicitly
    325 declared feature. </p>
    326 
    327 <p>An application might require a feature but not declare it because: </p>
    328 
    329 <ul>
    330 <li>The application was compiled against an older version of the Android library
    331 (Android 1.5 or earlier) and the <code>&lt;uses-feature&gt;</code> element was
    332 not available.</li>
    333 <li>The developer incorrectly assumed that the feature would be present on all
    334 devices and a declaration was unnecessary.</li>
    335 <li>The developer omitted the feature declaration accidentally.</li>
    336 <li>The developer declared the feature explicitly, but the declaration was not
    337 valid. For example, a spelling error in the <code>&lt;uses-feature&gt;</code>
    338 element name or an unrecognized string value for the
    339 <code>android:name</code> attribute would invalidate the feature declaration.
    340 </li>
    341 </ul>
    342 
    343 <p>To account for the cases above, Google Play attempts to discover an
    344 application's implied feature requirements by examining <em>other elements</em>
    345 declared in the manifest file, specifically,
    346 <code>&lt;uses-permission&gt;</code> elements.</p>
    347 
    348 <p>If an application requests hardware-related permissions, Google Play
    349 <em>assumes that the application uses the underlying hardware features and
    350 therefore requires those features</em>, even though there might be no
    351 corresponding to <code>&lt;uses-feature&gt;</code> declarations. For such
    352 permissions, Google Play adds the underlying hardware features to the
    353 metadata that it stores for the application and sets up filters for them.</p>
    354 
    355 <p>For example, if an application requests the <code>CAMERA</code> permission
    356 but does not declare a <code>&lt;uses-feature&gt;</code> element for
    357 <code>android.hardware.camera</code>, Google Play considers that the
    358 application requires a camera and should not be shown to users whose devices do
    359 not offer a camera.</p>
    360 
    361 <p>If you don't want Google Play to filter based on a specific implied
    362 feature, you can disable that behavior. To do so, declare the feature explicitly
    363 in a <code>&lt;uses-feature&gt;</code> element and include an
    364 <code>android:required="false"</code> attribute. For example, to disable
    365 filtering derived from the <code>CAMERA</code> permission, you would declare
    366 the feature as shown below.</p>
    367 
    368 <pre>&lt;uses-feature android:name="android.hardware.camera" android:required="false" /&gt;</pre>
    369 
    370 <p class="caution">It's important to understand that the permissions that you
    371 request in <code>&lt;uses-permission&gt;</code> elements can directly affect how
    372 Google Play filters your application. The reference section <a
    373 href="#permissions">Permissions that Imply Feature Requirements</a> lists the
    374 full set of permissions that imply feature requirements and
    375 therefore trigger filtering.</p>
    376 
    377 <h3 id="bt-permission-handling">Special handling for Bluetooth feature</h3>
    378 
    379 <p>Google Play applies slightly different rules than described above, when
    380 determining filtering for Bluetooth.</p>
    381 
    382 <p>If an application declares a Bluetooth permission in a
    383 <code>&lt;uses-permission&gt;</code> element, but does not explicitly declare
    384 the Bluetooth feature in a <code>&lt;uses-feature&gt;</code> element, Google
    385 Play checks the version(s) of the Android platform on which the application is
    386 designed to run, as specified in the <code>&lt;uses-sdk&gt;</code> element. </p>
    387 
    388 <p>As shown in the table below, Google Play enables filtering for the
    389 Bluetooth feature only if the application declares its lowest or targeted
    390 platform as Android 2.0 (API level 5) or higher. However, note that Google
    391 Play applies the normal rules for filtering when the application explicitly
    392 declares the Bluetooth feature in a <code>&lt;uses-feature&gt;</code> element.
    393 </p>
    394 
    395 <p class="caption"><strong>Table 1.</strong> How Google Play determines the
    396 Bluetooth feature requirement for an application that requests a Bluetooth
    397 permission but does not declare the Bluetooth feature in a
    398 <code>&lt;uses-feature&gt;</code> element.</p>
    399 
    400 <table style="margin-top:1em;">
    401 <tr>
    402 <th><nobr>If <code>minSdkVersion</code> is ...</nobr></th>
    403 <th><nobr>or <code>targetSdkVersion</code> is</nobr></th>
    404 <th>Result</th>
    405 </tr>
    406 <tr>
    407 <td><nobr>&lt;=4 (or uses-sdk is not declared)</nobr></td>
    408 <td>&lt;=4</td>
    409 <td>Google Play <em>will not</em> filter the application from any devices
    410 based on their reported support for the <code>android.hardware.bluetooth</code>
    411 feature.</td>
    412 </tr>
    413 <tr>
    414 <td>&lt;=4</td>
    415 <td>&gt;=5</td>
    416 <td rowspan="2">Google Play filters the application from any devices that
    417 do not support the <code>android.hardware.bluetooth</code> feature (including
    418 older releases).</td>
    419 </tr>
    420 <tr>
    421 <td>&gt;=5</td>
    422 <td>&gt;=5</td>
    423 </tr>
    424 </table>
    425 
    426 <p>The examples below illustrate the different filtering effects, based on how
    427 Google Play handles the Bluetooth feature. </p>
    428 
    429 <dl>
    430 <dt>In first example, an application that is designed to run on older API levels
    431 declares a Bluetooth permission, but does not declare the Bluetooth feature in a
    432 <code>&lt;uses-feature&gt;</code> element.</dt>
    433 <dd><em>Result:</em> Google Play does not filter the application from any device.</dd>
    434 </dl>
    435 
    436 <pre>&lt;manifest ...>
    437     &lt;uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
    438     &lt;uses-sdk android:minSdkVersion="3" />
    439     ...
    440 &lt;/manifest></pre>
    441 
    442 <dl>
    443 <dt>In the second example, below, the same application also declares a target
    444 API level of "5". </dt>
    445 <dd><em>Result:</em> Google Play now assumes that the feature is required and
    446 will filter the application from all devices that do not report Bluetooth support,
    447 including devices running older versions of the platform. </dd>
    448 </dl>
    449 
    450 <pre>&lt;manifest ...>
    451     &lt;uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
    452     &lt;uses-sdk android:minSdkVersion="3" android:targetSdkVersion="5" />
    453     ...
    454 &lt;/manifest></pre>
    455 
    456 <dl>
    457 <dt>Here the same application now specifically declares the Bluetooth feature.</dt>
    458 <dd><em>Result:</em> Identical to the previous example (filtering is applied).</dd>
    459 </dl>
    460 
    461 <pre>&lt;manifest ...>
    462     &lt;uses-feature android:name="android.hardware.bluetooth" />
    463     &lt;uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
    464     &lt;uses-sdk android:minSdkVersion="3" android:targetSdkVersion="5" />
    465     ...
    466 &lt;/manifest></pre>
    467 
    468 <dl>
    469 <dt>Finally, in the case below, the same application adds an
    470 <code>android:required="false"</code> attribute.</dt>
    471 <dd><em>Result:</em> Google Play disables filtering based on Bluetooth
    472 feature support, for all devices.</dd>
    473 </dl>
    474 
    475 <pre>&lt;manifest ...>
    476     &lt;uses-feature android:name="android.hardware.bluetooth" android:required="false" />
    477     &lt;uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
    478     &lt;uses-sdk android:minSdkVersion="3" android:targetSdkVersion="5" />
    479     ...
    480 &lt;/manifest></pre>
    481 
    482 
    483 
    484 <h3 id="testing">Testing the features required by your application</h3>
    485 
    486 <p>You can use the <code>aapt</code> tool, included in the Android SDK, to
    487 determine how Google Play will filter your application, based on its declared
    488 features and permissions. To do so, run  <code>aapt</code> with the <code>dump
    489 badging</code> command. This causes <code>aapt</code> to parse your
    490 application's manifest and apply the same rules as used by Google Play to
    491 determine the features that your application requires. </p>
    492 
    493 <p>To use the tool, follow these steps: </p>
    494 
    495 <ol>
    496 <li>First, build and export your application as an unsigned <code>.apk</code>.
    497 If you are developing in Android Studio, build your application with Gradle:
    498 <ol TYPE=a>
    499 <li>Open the project and select <strong>Run > Edit Configurations</strong>.
    500 <li>Select the plus sign near the top-left corner of the <strong>Run/Debug
    501 Configurations</strong> window.
    502 <li>Select <strong>Gradle.</strong>
    503 <li>Enter <code>Unsigned APK</code> in <strong>Name</strong>.
    504 <li>Choose your module from the <strong>Gradle project</strong> section.
    505 <li>Enter <code>assemble</code> in <strong>Tasks</strong>.
    506 <li>Select <strong>OK</strong> to complete the new configuration.
    507 <li>Make sure the <strong>Unsigned APK</strong> run configuration is selected
    508 in the toolbar and select <strong>Run > Run 'Unsigned APK'</strong>.</li>
    509 </ol>
    510 You can find your unsigned <code>.apk</code> in the
    511 <code>&lt;<em>ProjectName</em>&gt;/app/build/outputs/apk/</code> directory.
    512 
    513 <li>Next, locate the <code>aapt</code> tool, if it is not already in your PATH.
    514 If you are using SDK Tools r8 or higher, you can find <code>aapt</code> in the
    515 <code>&lt;<em>SDK</em>&gt;/platform-tools/</code> directory.
    516 <p class="note"><strong>Note:</strong> You must use the version of
    517 <code>aapt</code> that is provided for the latest Platform-Tools component available. If
    518 you do not have the latest Platform-Tools component, download it using the <a
    519 href="{@docRoot}studio/intro/update.html">Android SDK Manager</a>.
    520 </p></li>
    521 <li>Run <code>aapt</code> using this syntax: </li>
    522 </ol>
    523 
    524 <pre>$ aapt dump badging &lt;<em>path_to_exported_.apk</em>&gt;</pre>
    525 
    526 <p>Here's an example of the command output for the second Bluetooth example, above: </p>
    527 
    528 <pre>$ ./aapt dump badging BTExample.apk
    529 package: name='com.example.android.btexample' versionCode='' versionName=''
    530 <strong>uses-permission:'android.permission.BLUETOOTH_ADMIN'</strong>
    531 <strong>uses-feature:'android.hardware.bluetooth'</strong>
    532 sdkVersion:'3'
    533 targetSdkVersion:'5'
    534 application: label='BT Example' icon='res/drawable/app_bt_ex.png'
    535 launchable activity name='com.example.android.btexample.MyActivity'label='' icon=''
    536 uses-feature:'android.hardware.touchscreen'
    537 main
    538 supports-screens: 'small' 'normal' 'large'
    539 locales: '--_--'
    540 densities: '160'
    541 </pre>
    542 
    543 <h2 id="features-reference">
    544   Features Reference
    545 </h2>
    546 
    547 <p>
    548   The following sections provide reference information about hardware features,
    549   software features, and sets of permissions that imply specific feature
    550   requirements.
    551 </p>
    552 
    553 <h3 id="hw-features">
    554   Hardware features
    555 </h3>
    556 
    557 <p>
    558   This section presents the hardware features supported by the most current
    559   platform release. To indicate that your app uses or requires a hardware
    560   feature, declare the corresponding value (beginning with
    561   <code>"android.hardware"</code>) in an <code>android:name</code> attribute.
    562   Each time you declare a hardware feature, use a separate
    563   <code>&lt;uses-feature&gt;</code> element.
    564 </p>
    565 
    566 <h4 id="audio-hw-features">
    567   Audio hardware features
    568 </h4>
    569 
    570 <dl>
    571   <dt>
    572     <code>android.hardware.audio.low_latency</code>
    573   </dt>
    574 
    575   <dd>
    576     The app uses the device's low-latency audio pipeline, which reduces lag and
    577     delays when processing sound input or output.
    578   </dd>
    579 
    580   <dt>
    581     <code>android.hardware.audio.output</code>
    582   </dt>
    583 
    584   <dd>
    585     The app transmits sound using the device's speakers, audio jack, Bluetooth
    586     streaming capabilities, or a similar mechanism.
    587   </dd>
    588 
    589   <dt>
    590     <code>android.hardware.audio.pro</code>
    591   </dt>
    592 
    593   <dd>
    594     The app uses the device's high-end audio functionality and performance
    595     capabilities.
    596   </dd>
    597 
    598   <dt>
    599     <code>android.hardware.microphone</code>
    600   </dt>
    601 
    602   <dd>
    603     The app records audio using the device's microphone.
    604   </dd>
    605 </dl>
    606 
    607 <h4 id="bluetooth-hw-features">
    608   Bluetooth hardware features
    609 </h4>
    610 
    611 <dl>
    612   <dt>
    613     <code>android.hardware.bluetooth</code>
    614   </dt>
    615 
    616   <dd>
    617     The app uses the device's Bluetooth features, usually to communicate with
    618     other Bluetooth-enabled devices.
    619   </dd>
    620 
    621   <dt>
    622     <code>android.hardware.bluetooth_le</code>
    623   </dt>
    624 
    625   <dd>
    626     The app uses the device's Bluetooth Low Energy radio features.
    627   </dd>
    628 </dl>
    629 
    630 <h4 id="camera-hw-features">
    631   Camera hardware features
    632 </h4>
    633 
    634 <dl>
    635   <dt>
    636     <code>android.hardware.camera</code>
    637   </dt>
    638 
    639   <dd>
    640     The app uses the device's back-facing camera. Devices with only a
    641     front-facing camera do not list this feature, so use the
    642     <code>android.hardware.camera.any</code> feature instead if your app can
    643     communicate with any camera, regardless of which direction the camera
    644     faces.
    645   </dd>
    646 
    647   <dt>
    648     <code>android.hardware.camera.any</code>
    649   </dt>
    650 
    651   <dd>
    652     The app uses one of the device's cameras, or an external camera that the
    653     user connects to the device. Use this value instead of
    654     <code>android.hardware.camera</code> if your app does not require the
    655     camera to be a back-facing one.
    656   </dd>
    657 
    658   <dt>
    659     <code>android.hardware.camera.autofocus</code>
    660   </dt>
    661 
    662   <dd>
    663     <p>
    664       The app uses the autofocus feature that the device's camera supports.
    665     </p>
    666 
    667     <p>
    668       By using this feature, an app implies that it also uses the
    669       <code>android.hardware.camera</code> feature, unless this parent feature
    670       is declared with <code>android:required="false"</code>.
    671     </p>
    672   </dd>
    673 
    674   <dt>
    675     <code>android.hardware.camera.capability.manual_post_processing</code>
    676   </dt>
    677 
    678   <dd>
    679     <p>
    680       The app uses the <code>MANUAL_POST_PROCESSING</code> feature that the
    681       device's camera supports.
    682     </p>
    683 
    684     <p>
    685       This feature allows your app to override the camera's auto white balance
    686       functionality. Use <code>android.colorCorrection.transform</code>,
    687       <code>android.colorCorrection.gains</code>, and an
    688       <code>android.colorCorrection.mode</code> of
    689       <code>TRANSFORM_MATRIX</code>.
    690     </p>
    691   </dd>
    692 
    693   <dt>
    694     <code>android.hardware.camera.capability.manual_sensor</code>
    695   </dt>
    696 
    697   <dd>
    698     <p>
    699       The app uses the <code>MANUAL_SENSOR</code> feature that the device's
    700       camera supports.
    701     </p>
    702 
    703     <p>
    704       This feature implies support for auto-exposure locking
    705       (<code>android.control.aeLock</code>), which allows the camera's exposure
    706       time and sensitivity to remain fixed at specific values.
    707     </p>
    708   </dd>
    709 
    710   <dt>
    711     <code>android.hardware.camera.capability.raw</code>
    712   </dt>
    713 
    714   <dd>
    715     <p>
    716       The app uses the <code>RAW</code> feature that the device's camera
    717       supports.
    718     </p>
    719 
    720     <p>
    721       This feature implies that the device can save DNG (raw) files and that
    722       the device's camera provides the DNG-related metadata necessary for your
    723       app to process these raw images directly.
    724     </p>
    725   </dd>
    726 
    727   <dt>
    728     <code>android.hardware.camera.external</code>
    729   </dt>
    730 
    731   <dd>
    732     The app communicates with an external camera that the user connects to the
    733     device. This feature does not guarantee, however, that the external camera
    734     is available for your app to use.
    735   </dd>
    736 
    737   <dt>
    738     <code>android.hardware.camera.flash</code>
    739   </dt>
    740 
    741   <dd>
    742     <p>
    743       The app uses the flash feature that the device's camera supports.
    744     </p>
    745 
    746     <p>
    747       By using this feature, an app implies that it also uses the
    748       <code>android.hardware.camera</code> feature, unless this parent feature
    749       is declared with <code>android:required="false"</code>.
    750     </p>
    751   </dd>
    752 
    753   <dt>
    754     <code>android.hardware.camera.front</code>
    755   </dt>
    756 
    757   <dd>
    758     <p>
    759       The app uses the device's front-facing camera.
    760     </p>
    761 
    762     <p>
    763       By using this feature, an app implies that it also uses the
    764       <code>android.hardware.camera</code> feature, unless this parent feature
    765       is declared with <code>android:required="false"</code>.
    766     </p>
    767   </dd>
    768 
    769   <dt>
    770     <code>android.hardware.camera.level.full</code>
    771   </dt>
    772 
    773   <dd>
    774     The app uses the <code>FULL</code>-level image-capturing support that at
    775     least one of the device's cameras provides. Cameras with <code>FULL</code>
    776     support provide burst-capture capabilities, per-frame control, and manual
    777     post-processing control.
    778   </dd>
    779 </dl>
    780 
    781 <h4 id="device-ui-hw-features">
    782   Device UI hardware features
    783 </h4>
    784 
    785 <dl>
    786   <dt>
    787     <code>android.hardware.type.automotive</code>
    788   </dt>
    789 
    790   <dd>
    791     <p>
    792       The app is designed to show its UI on a set of screens inside a vehicle.
    793       The user interacts with the app using hard buttons, touch, rotary
    794       controllers, and mouse-like interfaces. The vehicle's screens usually
    795       appear in the center console or the instrument cluster of a vehicle. These
    796       screens usually have limited size and resolution.
    797     </p>
    798 
    799     <p class="note">
    800       <strong>Note: </strong>It's important to keep in mind that, since the user
    801       is driving while using this type of app UI, the app must minimize driver
    802       distraction.
    803     </p>
    804   </dd>
    805 
    806   <dt>
    807     <code>android.hardware.type.television</code>
    808   </dt>
    809 
    810   <dd>
    811     <p>
    812       (Deprecated; use <a href="#media-sw-features">
    813       <code>android.software.leanback</code></a> instead.)
    814     </p>
    815 
    816     <p>
    817       The app is designed to show its UI on a television. This feature defines
    818       "television" to be a typical living room television experience: displayed
    819       on a big screen, where the user is sitting far away and the dominant form
    820       of input is something like a d-pad, and generally not using a mouse,
    821       pointer, or touch device.
    822     </p>
    823   </dd>
    824 
    825   <dt>
    826     <code>android.hardware.type.watch</code>
    827   </dt>
    828 
    829   <dd>
    830     The app is designed to show its UI on a watch. A watch is worn on the body,
    831     such as on the wrist. The user is very close to the device while
    832     interacting with it.
    833   </dd>
    834 </dl>
    835 
    836 <h4 id="fingerprint-hw-features">
    837   Fingerprint hardware features
    838 </h4>
    839 
    840 <dl>
    841   <dt>
    842     <code>android.hardware.fingerprint</code>
    843   </dt>
    844 
    845   <dd>
    846     The app reads fingerprints using the device's biometric hardware.
    847   </dd>
    848 </dl>
    849 
    850 <h4 id="gamepad-hw-features">
    851   Gamepad hardware features
    852 </h4>
    853 
    854 <dl>
    855   <dt>
    856     <code>android.hardware.gamepad</code>
    857   </dt>
    858 
    859   <dd>
    860     The app captures game controller input, either from the device itself or
    861     from a connected gamepad.
    862   </dd>
    863 </dl>
    864 
    865 <h4 id="infrared-hw-features">
    866   Infrared hardware features
    867 </h4>
    868 
    869 <dl>
    870   <dt>
    871     <code>android.hardware.consumerir</code>
    872   </dt>
    873 
    874   <dd>
    875     The app uses the device's infrared (IR) capabilities, usually to
    876     communicate with other consumer IR devices.
    877   </dd>
    878 </dl>
    879 
    880 <h4 id="location-hw-features">
    881   Location hardware features
    882 </h4>
    883 
    884 <dl>
    885   <dt>
    886     <code>android.hardware.location</code>
    887   </dt>
    888 
    889   <dd>
    890     The app uses one or more features on the device for determining location,
    891     such as GPS location, network location, or cell location.
    892   </dd>
    893 
    894   <dt>
    895     <code>android.hardware.location.gps</code>
    896   </dt>
    897 
    898   <dd>
    899     <p>
    900       The app uses precise location coordinates obtained from a Global
    901       Positioning System (GPS) receiver on the device.
    902     </p>
    903 
    904     <p>
    905       By using this feature, an app implies that it also uses the
    906       <code>android.hardware.location</code> feature, unless this parent
    907       feature is declared with the attribute
    908       <code>android:required="false"</code>.
    909     </p>
    910   </dd>
    911 
    912   <dt>
    913     <code>android.hardware.location.network</code>
    914   </dt>
    915 
    916   <dd>
    917     <p>
    918       The app uses coarse location coordinates obtained from a network-based
    919       geolocation system supported on the device.
    920     </p>
    921 
    922     <p>
    923       By using this feature, an app implies that it also uses the
    924       <code>android.hardware.location</code> feature, unless this parent
    925       feature is declared with the attribute
    926       <code>android:required="false"</code>.
    927     </p>
    928   </dd>
    929 </dl>
    930 
    931 <h4 id="nfc-hw-features">
    932   NFC hardware features
    933 </h4>
    934 
    935 <dl>
    936   <dt>
    937     <code>android.hardware.nfc</code>
    938   </dt>
    939 
    940   <dd>
    941     The app uses the device's Near-Field Communication (NFC) radio features.
    942   </dd>
    943 
    944   <dt>
    945     <code>android.hardware.nfc.hce</code>
    946   </dt>
    947 
    948   <dd>
    949     <p>
    950       (Deprecated.)
    951     </p>
    952 
    953     <p>
    954       The app uses NFC card emulation that is hosted on the device.
    955     </p>
    956   </dd>
    957 </dl>
    958 
    959 <h4 id="opengl-es-hw-features">
    960   OpenGL ES hardware features
    961 </h4>
    962 
    963 <dl>
    964   <dt>
    965     <code>android.hardware.opengles.aep</code>
    966   </dt>
    967 
    968   <dd>
    969     The app uses the <a href=
    970     "http://www.khronos.org/registry/gles/extensions/ANDROID/ANDROID_extension_pack_es31a.txt"
    971     class="external-link">OpenGL ES Android Extension Pack</a>that is installed
    972     on the device.
    973   </dd>
    974 </dl>
    975 
    976 <h4 id="sensor-hw-features">
    977   Sensor hardware features
    978 </h4>
    979 
    980 <dl>
    981   <dt>
    982     <code>android.hardware.sensor.accelerometer</code>
    983   </dt>
    984 
    985   <dd>
    986     The app uses motion readings from the device's accelerometer to detect
    987     the device's current orientation. For example, an app could use
    988     accelerometer readings to determine when to switch between portrait and
    989     landscape orientations.
    990   </dd>
    991 
    992   <dt>
    993     <code>android.hardware.sensor.ambient_temperature</code>
    994   </dt>
    995 
    996   <dd>
    997     The app uses the device's ambient (environmental) temperature sensor. For
    998     example, a weather app could report indoor or outdoor temperature.
    999   </dd>
   1000 
   1001   <dt>
   1002     <code>android.hardware.sensor.barometer</code>
   1003   </dt>
   1004 
   1005   <dd>
   1006     The app uses the device's barometer. For example, a weather app could
   1007     report air pressure.
   1008   </dd>
   1009 
   1010   <dt>
   1011     <code>android.hardware.sensor.compass</code>
   1012   </dt>
   1013 
   1014   <dd>
   1015     The app uses the device's magnetometer (compass). For example, a navigation
   1016     app could show the current direction a user faces.
   1017   </dd>
   1018 
   1019   <dt>
   1020     <code>android.hardware.sensor.gyroscope</code>
   1021   </dt>
   1022 
   1023   <dd>
   1024     The app uses the device's gyroscope to detect rotation and twist, creating
   1025     a six-axis orientation system. By using this sensor, an app can detect more
   1026     smoothly whether it needs to switch between portrait and landscape
   1027     orientations.
   1028   </dd>
   1029 
   1030   <dt>
   1031     <code>android.hardware.sensor.hifi_sensors</code>
   1032   </dt>
   1033 
   1034   <dd>
   1035     The app uses the device's high fidelity (Hi-Fi) sensors. For example, a
   1036     gaming app could detect the user's high-precision movements.
   1037   </dd>
   1038 
   1039   <dt>
   1040     <code>android.hardware.sensor.heartrate</code>
   1041   </dt>
   1042 
   1043   <dd>
   1044     The app uses the device's heart rate monitor. For example, a fitness app
   1045     could report trends in a user's heart rate over time.
   1046   </dd>
   1047 
   1048   <dt>
   1049     <code>android.hardware.sensor.heartrate.ecg</code>
   1050   </dt>
   1051 
   1052   <dd>
   1053     The app uses the device's elcardiogram (ECG) heart rate sensor. For
   1054     example, a fitness app could report more detailed information about a
   1055     user's heart rate.
   1056   </dd>
   1057 
   1058   <dt>
   1059     <code>android.hardware.sensor.light</code>
   1060   </dt>
   1061 
   1062   <dd>
   1063     The app uses the device's light sensor. For example, an app could display
   1064     one of two different color schemes based on the ambient lighting
   1065     conditions.
   1066   </dd>
   1067 
   1068   <dt>
   1069     <code>android.hardware.sensor.proximity</code>
   1070   </dt>
   1071 
   1072   <dd>
   1073     The app uses the device's proximity sensor. For example, a telephony app
   1074     could turn off the device's screen when the app detects that the user is
   1075     holding the device close to their body.
   1076   </dd>
   1077 
   1078   <dt>
   1079     <code>android.hardware.sensor.relative_humidity</code>
   1080   </dt>
   1081 
   1082   <dd>
   1083     The app uses the device's relative humidity sensor. For example, a weather
   1084     app could use the humidity to calculate and report the current dewpoint.
   1085   </dd>
   1086 
   1087   <dt>
   1088     <code>android.hardware.sensor.stepcounter</code>
   1089   </dt>
   1090 
   1091   <dd>
   1092     The app uses the device's step counter. For example, a fitness app could
   1093     report the number of steps a user needs to take to achieve their daily step
   1094     count goal.
   1095   </dd>
   1096 
   1097   <dt>
   1098     <code>android.hardware.sensor.stepdetector</code>
   1099   </dt>
   1100 
   1101   <dd>
   1102     The app uses the device's step detector. For example, a fitness app could
   1103     use the time interval between steps to infer the type of exercise that the
   1104     user is doing.
   1105   </dd>
   1106 </dl>
   1107 
   1108 <h4 id="screen-hw-features">
   1109   Screen hardware features
   1110 </h4>
   1111 
   1112 <dl>
   1113   <dt>
   1114     <code>android.hardware.screen.landscape</code>
   1115   </dt>
   1116 
   1117   <dt>
   1118     <code>android.hardware.screen.portrait</code>
   1119   </dt>
   1120 
   1121   <dd>
   1122     <p>
   1123       The app requires the device to use the portrait or landscape orientation.
   1124       If your app supports both orientations, then you don't need to declare
   1125       either feature.
   1126     </p>
   1127 
   1128     <p>
   1129       For example, if your app requires portrait orientation, you should
   1130       declare the following feature so that only the devices that support
   1131       portrait orientation (always or by user choice) can run your app:
   1132     </p>
   1133     <pre>&lt;uses-feature android:name="android.hardware.screen.portrait" /&gt;</pre>
   1134 
   1135     <p>
   1136       Both orientations are assumed not required by default, so your app may be
   1137       installed on devices that support one or both orientations. However, if
   1138       any of your activities request that they run in a specific orientation,
   1139       using the <a href=
   1140       "{@docRoot}guide/topics/manifest/activity-element.html#screen">{@code
   1141       android:screenOrientation}</a> attribute, then this declaration implies
   1142       that your app requires that orientation. For example, if you declare
   1143       <a href=
   1144       "{@docRoot}guide/topics/manifest/activity-element.html#screen">{@code
   1145       android:screenOrientation}</a> with either {@code "landscape"}, {@code
   1146       "reverseLandscape"}, or {@code "sensorLandscape"}, then your app will be
   1147       available only on devices that support landscape orientation.
   1148     </p>
   1149 
   1150     <p>
   1151       As a best practice, you should still declare your requirement for this
   1152       orientation using a {@code <uses-feature>} element. If you declare
   1153       an orientation for your activity using <a href=
   1154       "{@docRoot}guide/topics/manifest/activity-element.html#screen">{@code
   1155       android:screenOrientation}</a>, but don't actually require it, you can
   1156       disable the requirement by declaring the orientation with a {@code
   1157       <uses-feature>} element and include {@code
   1158       android:required="false"}.
   1159     </p>
   1160 
   1161     <p>
   1162       For backward compatibility, any device running Android 3.1 (API level 12)
   1163       or lower supports both landscape and portrait orientations.
   1164     </p>
   1165   </dd>
   1166 </dl>
   1167 
   1168 <h4 id="telephony-hw-features">
   1169   Telephony hardware features
   1170 </h4>
   1171 
   1172 <dl>
   1173   <dt>
   1174     <code>android.hardware.telephony</code>
   1175   </dt>
   1176 
   1177   <dd>
   1178     The app uses the device's telephony features, such as telephony radio with
   1179     data communication services.
   1180   </dd>
   1181 
   1182   <dt>
   1183     <code>android.hardware.telephony.cdma</code>
   1184   </dt>
   1185 
   1186   <dd>
   1187     <p>
   1188       The app uses the Code Division Multiple Access (CDMA) telephony radio
   1189       system.
   1190     </p>
   1191 
   1192     <p>
   1193       By using this feature, an app implies that it also uses the
   1194       <code>android.hardware.telephony</code> feature, unless this parent
   1195       feature is declared with <code>android:required="false"</code>.
   1196     </p>
   1197   </dd>
   1198 
   1199   <dt>
   1200     <code>android.hardware.telephony.gsm</code>
   1201   </dt>
   1202 
   1203   <dd>
   1204     <p>
   1205       The app uses the Global System for Mobile Communications (GSM) telephony
   1206       radio system.
   1207     </p>
   1208 
   1209     <p>
   1210       By using this feature, an app implies that it also uses the
   1211       <code>android.hardware.telephony</code> feature, unless this parent
   1212       feature is declared with <code>android:required="false"</code>.
   1213     </p>
   1214   </dd>
   1215 </dl>
   1216 
   1217 <h4 id="touchscreen-hw-features">
   1218   Touchscreen hardware features
   1219 </h4>
   1220 
   1221 <dl>
   1222   <dt>
   1223     <code>android.hardware.faketouch</code>
   1224   </dt>
   1225 
   1226   <dd>
   1227     <p>
   1228       The app uses basic touch interaction events, such as tapping and
   1229       dragging.
   1230     </p>
   1231 
   1232     <p>
   1233       By default, your app requires this feature. This feature indicates that the app is
   1234       compatible with a device only if that device emulates a touchscreen
   1235       ("fake touch" interface) or has an actual touchscreen.
   1236     </p>
   1237 
   1238     <p>
   1239       A device that offers a fake touch interface provides a user input system
   1240       that emulates a subset of a touchscreen's capabilities. For example, a
   1241       mouse or remote control could drive an on-screen cursor. If your app
   1242       requires basic point and click interaction (in other words, it won't work
   1243       with only a d-pad controller), you should declare this feature or simply
   1244       avoid declaring any {@code android.hardware.touchscreen.*} features. Because
   1245       this is the minimum level of touch interaction, you can also use an app
   1246       that declares this feature on devices that offer more complex touch
   1247       interfaces.
   1248     </p>
   1249   </dd>
   1250 
   1251   <dt>
   1252     <code>android.hardware.faketouch.multitouch.distinct</code>
   1253   </dt>
   1254 
   1255   <dd>
   1256     <p>
   1257       The app tracks two or more distinct "fingers" on a fake touch interface.
   1258       This is a superset of the <code>android.hardware.faketouch</code>
   1259       feature. When declared as required, this feature indicates that the app
   1260       is compatible with a device only if that device emulates distinct
   1261       tracking of two or more fingers or has an actual touchscreen.
   1262     </p>
   1263 
   1264     <p>
   1265       Unlike the distinct multitouch defined by {@code
   1266       android.hardware.touchscreen.multitouch.distinct}, input devices that
   1267       support distinct multitouch with a fake touch interface don't support all
   1268       two-finger gestures because the input in transformed to cursor movement
   1269       on the screen. That is, single-finger gestures on such a device move a
   1270       cursor, two-finger swipes cause single-finger touch events to occur, and
   1271       other two-finger gestures trigger the corresponding two-finger touch
   1272       events.
   1273     </p>
   1274 
   1275     <p>
   1276       A device that provides a two-finger touch trackpad for cursor movement
   1277       can support this feature.
   1278     </p>
   1279   </dd>
   1280 
   1281   <dt>
   1282     <code>android.hardware.faketouch.multitouch.jazzhand</code>
   1283   </dt>
   1284 
   1285   <dd>
   1286     <p>
   1287       The app tracks five or more distinct "fingers" on a fake touch interface.
   1288       This is a superset of the <code>android.hardware.faketouch</code>
   1289       feature. When declared as required, this feature indicates that the app
   1290       is compatible with a device only if that device emulates distinct
   1291       tracking of five or more fingers or has an actual touchscreen.
   1292     </p>
   1293 
   1294     <p>
   1295       Unlike the distinct multitouch defined by {@code
   1296       android.hardware.touchscreen.multitouch.jazzhand}, input devices that
   1297       support jazzhand multitouch with a fake touch interface don't support all
   1298       five-finger gestures because the input in transformed to cursor movement
   1299       on the screen. That is, single-finger gestures on such a device move a
   1300       cursor, multi-finger gestures cause single-finger touch events to occur,
   1301       and other multi-finger gestures trigger the corresponding multi-finger
   1302       touch events.
   1303     </p>
   1304 
   1305     <p>
   1306       A device that provides a five-finger touch trackpad for cursor movement
   1307       can support this feature.
   1308     </p>
   1309   </dd>
   1310 
   1311   <dt>
   1312     <code>android.hardware.touchscreen</code>
   1313   </dt>
   1314 
   1315   <dd>
   1316     <p>
   1317       The app uses the device's touchscreen capabilities for gestures that are
   1318       more interactive than basic touch events, such as a fling. This is a
   1319       superset of the <code>android.hardware.faketouch</code> feature.
   1320     </p>
   1321 
   1322     <p>
   1323       If your app in fact requires a touch interface (to perform more advanced
   1324       touch gestures such as fling), then you must explicitly declare this feature
   1325       or any advanced touchscreen features.
   1326     </p>
   1327 
   1328     <p>
   1329       If you require more complex touch interaction, such as multi-finger
   1330       gestures, you should declare that your app uses advanced touchscreen
   1331       features.
   1332     </p>
   1333   </dd>
   1334 
   1335   <dt>
   1336     <code>android.hardware.touchscreen.multitouch</code>
   1337   </dt>
   1338 
   1339   <dd>
   1340     <p>
   1341       The app uses the device's basic two-point multitouch capabilities, such
   1342       as for pinch gestures, but the app does not need to track touches
   1343       independently. This is a superset of the
   1344       <code>android.hardware.touchscreen</code> feature.
   1345     </p>
   1346 
   1347     <p>
   1348       By using this feature, an app implies that it also uses the
   1349       <code>android.hardware.touchscreen</code> feature, unless this parent
   1350       feature is declared with <code>android:required="false"</code>.
   1351     </p>
   1352   </dd>
   1353 
   1354   <dt>
   1355     <code>android.hardware.touchscreen.multitouch.distinct</code>
   1356   </dt>
   1357 
   1358   <dd>
   1359     <p>
   1360       The app uses the device's advanced multitouch capabilities for tracking
   1361       two or more points independently. This feature is a superset of the
   1362       <code>android.hardware.touchscreen.multitouch</code> feature.
   1363     </p>
   1364 
   1365     <p>
   1366       By using this feature, an app implies that it also uses the
   1367       <code>android.hardware.touchscreen.multitouch</code> feature, unless this
   1368       parent feature is declared with <code>android:required="false"</code>.
   1369     </p>
   1370   </dd>
   1371 
   1372   <dt>
   1373     <code>android.hardware.touchscreen.multitouch.jazzhand</code>
   1374   </dt>
   1375 
   1376   <dd>
   1377     <p>
   1378       The app uses the device's advanced multitouch capabilities for tracking
   1379       five or more points independently. This feature is a superset of the
   1380       <code>android.hardware.touchscreen.multitouch</code> feature.
   1381     </p>
   1382 
   1383     <p>
   1384       By using this feature, an app implies that it also uses the
   1385       <code>android.hardware.touchscreen.multitouch</code> feature, unless this
   1386       parent feature is declared with <code>android:required="false"</code>.
   1387     </p>
   1388   </dd>
   1389 </dl>
   1390 
   1391 <h4 id="usb-hw-features">
   1392   USB hardware features
   1393 </h4>
   1394 
   1395 <dl>
   1396   <dt>
   1397     <code>android.hardware.usb.accessory</code>
   1398   </dt>
   1399 
   1400   <dd>
   1401     The app behaves as the USB device and connects to USB hosts.
   1402   </dd>
   1403 
   1404   <dt>
   1405     <code>android.hardware.usb.host</code>
   1406   </dt>
   1407 
   1408   <dd>
   1409     The app uses the USB accessories that are connected to the device. The
   1410     device serves as the USB host.
   1411   </dd>
   1412 </dl>
   1413 
   1414 <h4 id="wi-fi-hw-features">
   1415   Wi-Fi hardware features
   1416 </h4>
   1417 
   1418 <dl>
   1419   <dt>
   1420     <code>android.hardware.wifi</code>
   1421   </dt>
   1422 
   1423   <dd>
   1424     The app uses 802.11 networking (Wi-Fi) features on the device.
   1425   </dd>
   1426 
   1427   <dt>
   1428     <code>android.hardware.wifi.direct</code>
   1429   </dt>
   1430 
   1431   <dd>
   1432     The app uses the Wi-Fi Direct networking features on the device.
   1433   </dd>
   1434 </dl>
   1435 
   1436 <h3 id="sw-features">
   1437   Software features
   1438 </h3>
   1439 
   1440 <p>
   1441   This section presents the software features supported by the most current
   1442   platform release. To indicate that your app uses or requires a software
   1443   feature, declare the corresponding value (beginning with
   1444   <code>"android.software"</code>) in an <code>android:name</code> attribute.
   1445   Each time you declare a software feature, use a separate
   1446   <code>&lt;uses-feature&gt;</code> element.
   1447 </p>
   1448 
   1449 <h4 id="communication-sw-features">
   1450   Communication software features
   1451 </h4>
   1452 
   1453 <dl>
   1454   <dt>
   1455     <code>android.software.sip</code>
   1456   </dt>
   1457 
   1458   <dd>
   1459     The app uses Session Initiation Protocol (SIP) services. By using SIP, the
   1460     app can support internet telephony operations, such as video conferencing
   1461     and instant messaging.
   1462   </dd>
   1463 
   1464   <dt>
   1465     <code>android.software.sip.voip</code>
   1466   </dt>
   1467 
   1468   <dd>
   1469     <p>
   1470       The app uses SIP-based Voice Over Internet Protocol (VoIP) services. By
   1471       using VoIP, the app can support real-time internet telephony operations,
   1472       such as two-way video conferencing.
   1473     </p>
   1474 
   1475     <p>
   1476       By using this feature, an app implies that it also uses the
   1477       <code>android.software.sip</code> feature, unless this parent feature is
   1478       declared with <code>android:required="false"</code>.
   1479     </p>
   1480   </dd>
   1481 
   1482   <dt>
   1483     <code>android.software.webview</code>
   1484   </dt>
   1485 
   1486   <dd>
   1487     The app displays content from the internet.
   1488   </dd>
   1489 </dl>
   1490 
   1491 <h4 id="custom-input-sw-features">
   1492   Custom input software features
   1493 </h4>
   1494 
   1495 <dl>
   1496   <dt>
   1497     <code>android.software.input_methods</code>
   1498   </dt>
   1499 
   1500   <dd>
   1501     The app uses a new input method, which the developer defines in an <a href=
   1502     "{@docRoot}reference/android/inputmethodservice/InputMethodService.html">{@code
   1503     InputMethodService}</a>.
   1504   </dd>
   1505 </dl>
   1506 
   1507 <h4 id="device-management-sw-features">
   1508   Device management software features
   1509 </h4>
   1510 
   1511 <dl>
   1512   <dt>
   1513     <code>android.software.backup</code>
   1514   </dt>
   1515 
   1516   <dd>
   1517     The app includes logic to handle a backup and restore operation.
   1518   </dd>
   1519 
   1520   <dt>
   1521     <code>android.software.device_admin</code>
   1522   </dt>
   1523 
   1524   <dd>
   1525     The app uses device administrators to enforce a device policy.
   1526   </dd>
   1527 
   1528   <dt>
   1529     <code>android.software.managed_users</code>
   1530   </dt>
   1531 
   1532   <dd>
   1533     The app supports secondary users and managed profiles.
   1534   </dd>
   1535 
   1536   <dt>
   1537     <code>android.software.securely_removes_users</code>
   1538   </dt>
   1539 
   1540   <dd>
   1541     The app can <strong>permanently</strong> remove users and their associated
   1542     data.
   1543   </dd>
   1544 
   1545   <dt>
   1546     <code>android.software.verified_boot</code>
   1547   </dt>
   1548 
   1549   <dd>
   1550     The app includes logic to handle results from the device's verified boot
   1551     feature, which detects whether the device's configuration changes during a
   1552     restart operation.
   1553   </dd>
   1554 </dl>
   1555 
   1556 <h4 id="media-sw-features">
   1557   Media software features
   1558 </h4>
   1559 
   1560 <dl>
   1561   <dt>
   1562     <code>android.software.midi</code>
   1563   </dt>
   1564 
   1565   <dd>
   1566     The app connects to musical instruments or outputs sound using the Musical
   1567     Instrument Digital Interface (MIDI) protocol.
   1568   </dd>
   1569 
   1570   <dt>
   1571     <code>android.software.print</code>
   1572   </dt>
   1573 
   1574   <dd>
   1575     The app includes commands for printing documents displayed on the device.
   1576   </dd>
   1577 
   1578   <dt>
   1579     <code>android.software.leanback</code>
   1580   </dt>
   1581 
   1582   <dd>
   1583     The app presents a UI that is designed for viewing on a large screen, such
   1584     as a television.
   1585   </dd>
   1586 
   1587   <dt>
   1588     <code>android.software.live_tv</code>
   1589   </dt>
   1590 
   1591   <dd>
   1592     The app streams live television programs.
   1593   </dd>
   1594 </dl>
   1595 
   1596 <h4 id="screen-interface-sw-features">
   1597   Screen interface software features
   1598 </h4>
   1599 
   1600 <dl>
   1601   <dt>
   1602     <code>android.software.app_widgets</code>
   1603   </dt>
   1604 
   1605   <dd>
   1606     The app uses or provides App Widgets and should be installed only on
   1607     devices that include a Home screen or similar location where users can
   1608     embed App Widgets.
   1609   </dd>
   1610 
   1611   <dt>
   1612     <code>android.software.home_screen</code>
   1613   </dt>
   1614 
   1615   <dd>
   1616     The app behaves as a replacement to the device's Home screen.
   1617   </dd>
   1618 
   1619   <dt>
   1620     <code>android.software.live_wallpaper</code>
   1621   </dt>
   1622 
   1623   <dd>
   1624     The app uses or provides wallpapers that include animation.
   1625   </dd>
   1626 </dl>
   1627 
   1628 <h3 id="permissions">
   1629   Permissions that Imply Feature Requirements
   1630 </h3>
   1631 
   1632 <p>
   1633   Some of the hardware and software feature constants were made available to
   1634   applications after the corresponding API; for example, the
   1635   <code>android.hardware.bluetooth</code> feature was added in Android 2.2 (API
   1636   level 8), but the Bluetooth API that it refers to was added in Android 2.0
   1637   (API level 5). Because of this, some apps were able to use the API before
   1638   they had the ability to declare that they require the API using the
   1639   <code>&lt;uses-feature&gt;</code> system.
   1640 </p>
   1641 
   1642 <p>
   1643   To prevent those apps from being made available unintentionally, Google Play
   1644   assumes that certain hardware-related permissions indicate that the
   1645   underlying hardware features are required by default. For instance,
   1646   applications that use Bluetooth must request the <code>BLUETOOTH</code>
   1647   permission in a <code>&lt;uses-permission&gt;</code> element  for legacy
   1648   apps, Google Play assumes that the permission declaration means that the
   1649   underlying <code>android.hardware.bluetooth</code> feature is required by the
   1650   application and sets up filtering based on that feature. Table 2 lists
   1651   permissions that imply feature requirements equivalent to those declared in
   1652   <code>&lt;uses-feature&gt;</code> elements.
   1653 </p>
   1654 
   1655 <p>
   1656   Note that <code>&lt;uses-feature&gt;</code> declarations, including any
   1657   declared <code>android:required</code> attribute, always take precedence over
   1658   features implied by the permissions in table 2. For any of these permissions,
   1659   you can disable filtering based on the implied feature by explicitly
   1660   declaring the implied feature explicitly, in a
   1661   <code>&lt;uses-feature&gt;</code> element, with an
   1662   <code>android:required="false"</code> attribute. For example, to disable any
   1663   filtering based on the <code>CAMERA</code> permission, you would add this
   1664   <code>&lt;uses-feature&gt;</code> declaration to the manifest file:
   1665 </p>
   1666 
   1667 <pre>&lt;uses-feature android:name="android.hardware.camera" android:required="false" /&gt;</pre>
   1668 
   1669 <p class="table-caption" id="permissions-features">
   1670   <strong>Table 2. </strong>Device permissions that imply device hardware use.
   1671 </p>
   1672 <table>
   1673   <tr>
   1674     <th>Category</th>
   1675     <th>This Permission...</th>
   1676     <th>...Implies This Feature Requirement</th>
   1677     <!-- <th>Comments</th> -->
   1678   </tr>
   1679 
   1680 
   1681 <tr>
   1682   <td rowspan="2">Bluetooth</td>
   1683   <td><code>BLUETOOTH</code></td>
   1684   <td><code>android.hardware.bluetooth</code>
   1685 <p>(See <a href="#bt-permission-handling">Special handling for Bluetooth feature</a> for details.)</p></td>
   1686 <!--  <td></td> -->
   1687 </tr>
   1688 <tr>
   1689   <td><code>BLUETOOTH_ADMIN</code></td>
   1690   <td><code>android.hardware.bluetooth</code></td>
   1691 <!--  <td></td> -->
   1692 </tr>
   1693 
   1694 <tr>
   1695   <td>Camera</td>
   1696   <td><code>CAMERA</code></td>
   1697   <td><code>android.hardware.camera</code> <em>and</em>
   1698 <br><code>android.hardware.camera.autofocus</code></td>
   1699 <!--  <td></td> -->
   1700 </tr>
   1701 
   1702 <tr>
   1703   <td rowspan="5">Location</td>
   1704   <td><code>ACCESS_MOCK_LOCATION</code></td>
   1705   <td><code>android.hardware.location</code></td>
   1706 <!--  <td></td> -->
   1707 </tr>
   1708 <tr>
   1709   <td><code>ACCESS_LOCATION_EXTRA_COMMANDS</code></td>
   1710   <td><code>android.hardware.location</code></td>
   1711 <!--  <td></td> -->
   1712 </tr>
   1713 <tr>
   1714   <td><code>INSTALL_LOCATION_PROVIDER</code></td>
   1715   <td><code>android.hardware.location</code></td>
   1716 <!--  <td></td> -->
   1717 </tr>
   1718 <tr>
   1719   <td><code>ACCESS_COARSE_LOCATION</code></td>
   1720   <td><code>android.hardware.location.network</code> <em>and</em>
   1721 <br><code>android.hardware.location</code></td>
   1722 <!--  <td></td> -->
   1723 </tr>
   1724 <tr>
   1725   <td><code>ACCESS_FINE_LOCATION</code></td>
   1726   <td><code>android.hardware.location.gps</code> <em>and</em>
   1727 <br><code>android.hardware.location</code></td>
   1728 <!--  <td></td> -->
   1729 </tr>
   1730 
   1731 <tr>
   1732   <td>Microphone</td>
   1733   <td><code>RECORD_AUDIO</code></td>
   1734   <td><code>android.hardware.microphone</code></td>
   1735 <!--  <td></td> -->
   1736 </tr>
   1737 
   1738 <tr>
   1739   <td rowspan="11">Telephony</td>
   1740   <td><code>CALL_PHONE</code></td>
   1741   <td><code>android.hardware.telephony</code></td>
   1742 <!--  <td></td> -->
   1743 </tr>
   1744 <tr>
   1745   <td><code>CALL_PRIVILEGED</code></td>
   1746   <td><code>android.hardware.telephony</code></td>
   1747 <!--  <td></td> -->
   1748 </tr>
   1749 
   1750 <tr>
   1751   <td><code>MODIFY_PHONE_STATE</code></td>
   1752   <td><code>android.hardware.telephony</code></td>
   1753 <!--  <td></td> -->
   1754 </tr>
   1755 <tr>
   1756   <td><code>PROCESS_OUTGOING_CALLS</code></td>
   1757   <td><code>android.hardware.telephony</code></td>
   1758 <!--  <td></td> -->
   1759 </tr>
   1760 <tr>
   1761   <td><code>READ_SMS</code></td>
   1762   <td><code>android.hardware.telephony</code></td>
   1763 <!--  <td></td> -->
   1764 </tr>
   1765 <tr>
   1766   <td><code>RECEIVE_SMS</code></td>
   1767   <td><code>android.hardware.telephony</code></td>
   1768 <!--  <td></td> -->
   1769 </tr>
   1770 <tr>
   1771   <td><code>RECEIVE_MMS</code></td>
   1772   <td><code>android.hardware.telephony</code></td>
   1773 <!--  <td></td> -->
   1774 </tr>
   1775 <tr>
   1776   <td><code>RECEIVE_WAP_PUSH</code></td>
   1777   <td><code>android.hardware.telephony</code></td>
   1778 <!--  <td></td> -->
   1779 </tr>
   1780 <tr>
   1781   <td><code>SEND_SMS</code></td>
   1782   <td><code>android.hardware.telephony</code></td>
   1783 <!--  <td></td> -->
   1784 </tr>
   1785 <tr>
   1786   <td><code>WRITE_APN_SETTINGS</code></td>
   1787   <td><code>android.hardware.telephony</code></td>
   1788 <!--  <td></td> -->
   1789 </tr>
   1790 <tr>
   1791   <td><code>WRITE_SMS</code></td>
   1792   <td><code>android.hardware.telephony</code></td>
   1793 <!--  <td></td> -->
   1794 </tr>
   1795 
   1796 <tr>
   1797   <td rowspan="3">Wi-Fi</td>
   1798   <td><code>ACCESS_WIFI_STATE</code></td>
   1799   <td><code>android.hardware.wifi</code></td>
   1800 <!--  <td></td> -->
   1801 </tr>
   1802 <tr>
   1803   <td><code>CHANGE_WIFI_STATE</code></td>
   1804   <td><code>android.hardware.wifi</code></td>
   1805 <!--  <td></td> -->
   1806 </tr>
   1807 <tr>
   1808   <td><code>CHANGE_WIFI_MULTICAST_STATE</code></td>
   1809   <td><code>android.hardware.wifi</code></td>
   1810 <!--  <td></td> -->
   1811 </tr>
   1812 </table>
   1813