blob: 884eeb579e09c2aee8db6fc900574b51be304455 [file] [log] [blame]
Scott Main71d4b282009-08-13 12:45:31 -07001page.title=<uses-feature>
Joe Fernandez33baa5a2013-11-14 11:41:19 -08002page.tags=filtering,features,google play filters,permissions
Scott Main71d4b282009-08-13 12:45:31 -07003@jd:body
4
Scott Mainc0bf19a2011-05-06 16:38:02 -07005<div id="qv-wrapper">
6<div id="qv">
7
8
9<h2>In this document</h2>
10<ol>
Dirk Dougherty4d7bc6552012-01-27 17:56:49 -080011 <li><a href="#market-feature-filtering">Google Play and Feature-Based Filtering</a>
Scott Mainc0bf19a2011-05-06 16:38:02 -070012 <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
Dirk Dougherty95b528e2010-01-22 16:52:34 -080030 <div class="sidebox-wrapper">
Dirk Dougherty2b286bb2012-11-29 17:25:09 -080031 <div class="sidebox">
Dirk Dougherty4d7bc6552012-01-27 17:56:49 -080032 <img src="{@docRoot}assets/images/icon_play.png" style="float:left;margin:0;padding:0;">
Dirk Dougherty2b286bb2012-11-29 17:25:09 -080033 <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 it's hardware and software feature requirements. </p>
Dirk Dougherty95b528e2010-01-22 16:52:34 -080037
Dirk Doughertyf1e134b2010-07-28 08:19:45 -070038<p style="margin-top:1em;">By specifying the features that your application requires,
Dirk Dougherty4d7bc6552012-01-27 17:56:49 -080039you enable Google Play to present your application only to users whose
Dirk Dougherty95b528e2010-01-22 16:52:34 -080040devices meet the application's feature requirements, rather than presenting it
41to all users. </p>
Dirk Doughertyf1e134b2010-07-28 08:19:45 -070042
Dirk Dougherty2b286bb2012-11-29 17:25:09 -080043<p>For important information about how
Dirk Dougherty4d7bc6552012-01-27 17:56:49 -080044Google Play uses features as the basis for filtering, please read <a
45href="#market-feature-filtering">Google Play and Feature-Based Filtering</a>,
Dirk Doughertyf1e134b2010-07-28 08:19:45 -070046below.</p>
Dirk Dougherty95b528e2010-01-22 16:52:34 -080047</div>
48</div>
49
Dirk Dougherty2b286bb2012-11-29 17:25:09 -080050<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
62href="{@docRoot}guide/topics/manifest/manifest-element.html">&lt;manifest&gt;</a></code></dd>
63
Scott Main71d4b282009-08-13 12:45:31 -070064<dt>description:</dt>
Dirk Doughertyf1e134b2010-07-28 08:19:45 -070065<dd>Declares a single hardware or software feature that is used by the
66application.
Scott Main71d4b282009-08-13 12:45:31 -070067
Dirk Doughertyf1e134b2010-07-28 08:19:45 -070068<p>The purpose of a <code>&lt;uses-feature&gt;</code> declaration is to inform
69any external entity of the set of hardware and software features on which your
70application depends. The element offers a <code>required</code> attribute that
71lets you specify whether your application requires and cannot function without
72the declared feature, or whether it prefers to have the feature but can function
73without 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
75application describe the device-variable features that it uses.</p>
76
77<p>The set of available features that your application declares corresponds to
78the set of feature constants made available by the Android {@link
79android.content.pm.PackageManager}, which are listed for
80convenience in the <a href="#features-reference">Features Reference</a> tables
81at the bottom of this document.
82
83<p>You must specify each feature in a separate <code>&lt;uses-feature&gt;</code>
84element, so if your application requires multiple features, it would declare
85multiple <code>&lt;uses-feature&gt;</code> elements. For example, an application
86that requires both Bluetooth and camera features in the device would declare
87these 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
96application requires.</p>
97
98<p>Declared <code>&lt;uses-feature></code> elements are informational only, meaning
Dirk Dougherty95b528e2010-01-22 16:52:34 -080099that the Android system itself does not check for matching feature support on
Dirk Doughertyf1e134b2010-07-28 08:19:45 -0700100the device before installing an application. However, other services
Dirk Dougherty4d7bc6552012-01-27 17:56:49 -0800101(such as Google Play) or applications may check your application's
Dirk Doughertyf1e134b2010-07-28 08:19:45 -0700102<code>&lt;uses-feature></code> declarations as part of handling or interacting
Dirk Dougherty95b528e2010-01-22 16:52:34 -0800103with your application. For this reason, it's very important that you declare all of
104the features (from the list below) that your application uses. </p>
Scott Mainc6747d02009-09-01 14:10:06 -0700105
Scott Mainc351ab42011-08-05 17:13:46 -0700106<p>For some features, there may exist a specific attribute that allows you to define
Scott Mainc6747d02009-09-01 14:10:06 -0700107a version of the feature, such as the version of Open GL used (declared with
Dirk Doughertyf1e134b2010-07-28 08:19:45 -0700108<a href="#glEsVersion"><code>glEsVersion</code></a>). Other features that either do or do not
Scott Main0b916352009-12-17 18:01:04 -0800109exist for a device, such as a camera, are declared using the
Dirk Doughertyf1e134b2010-07-28 08:19:45 -0700110<a href="#name"><code>name</code></a> attribute.</p>
Scott Mainc6747d02009-09-01 14:10:06 -0700111
Scott Mainc6747d02009-09-01 14:10:06 -0700112
Dirk Doughertyf1e134b2010-07-28 08:19:45 -0700113<p>Although the <code>&lt;uses-feature></code> element is only activated for
114devices running API Level 4 or higher, it is recommended to include these
115elements for all applications, even if the <a href="uses-sdk-element.html#min"><code>minSdkVersion</code></a>
116is "3" or lower. Devices running older versions of the platform will simply
117ignore the element.</p>
Scott Mainc6747d02009-09-01 14:10:06 -0700118
Dirk Doughertyf1e134b2010-07-28 08:19:45 -0700119<p class="note"><strong>Note:</strong> When declaring a feature, remember
120that you must also request permissions as appropriate. For example, you must
121still request the {@link android.Manifest.permission#CAMERA}
122permission before your application can access the camera API. Requesting the
123permission grants your application access to the appropriate hardware and
124software, while declaring the features used by your application ensures proper
125device compatibility.</p>
Scott Mainc6747d02009-09-01 14:10:06 -0700126
Scott Main71d4b282009-08-13 12:45:31 -0700127</dd>
128
129
130<dt>attributes:</dt>
131
132<dd>
Scott Main0b916352009-12-17 18:01:04 -0800133<dl class="attr">
Dirk Doughertyf1e134b2010-07-28 08:19:45 -0700134
135 <dt><a name="name"></a><code>android:name</code></dt>
136 <dd>Specifies a single hardware or software feature used by the application,
137as a descriptor string. Valid descriptor values are listed in the <a
138href="#hw-features">Hardware features</a> and <a href="#sw-features">Software
qudduscbe64abc2013-12-20 15:12:58 -0800139features</a> tables, below. Descriptor string values are case-sensitive.</dd>
Dirk Doughertyf1e134b2010-07-28 08:19:45 -0700140
141 <dt><a name="required"></a><code>android:required</code></dt> <!-- added in api level 5 -->
142 <dd>Boolean value that indicates whether the application requires
143 the feature specified in <code>android:name</code>.
144
145<ul>
146<li>When you declare <code>"android:required="true"</code> for a feature,
147you are specifying that the application <em>cannot function, or is not
148designed to function</em>, when the specified feature is not present on the
149device. </li>
150
151<li>When you declare <code>"android:required="false"</code> for a feature, it
152means that the application <em>prefers to use the feature</em> if present on
153the device, but that it <em>is designed to function without the specified
154feature</em>, if necessary. </li>
155
156</ul>
157
158<p>The default value for <code>android:required</code> if not declared is
159<code>"true"</code>.</p>
160 </dd>
161
162 <dt><a name="glEsVersion"></a><code>android:glEsVersion</code></dt>
Dirk Dougherty95b528e2010-01-22 16:52:34 -0800163 <dd>The OpenGL ES version required by the application. The higher 16 bits
164represent the major number and the lower 16 bits represent the minor number. For
165example, to specify OpenGL ES version 2.0, you would set the value as
Scott Main7b604312013-08-06 13:07:34 -0700166"0x00020000", or to specify OpenGL ES 3.0, you would set the value as "0x00030000".
Dirk Dougherty95b528e2010-01-22 16:52:34 -0800167
168 <p>An application should specify at most one <code>android:glEsVersion</code>
169attribute in its manifest. If it specifies more than one, the
170<code>android:glEsVersion</code> with the numerically highest value is used and
171any other values are ignored.</p>
172
173 <p>If an application does not specify an <code>android:glEsVersion</code>
174attribute, then it is assumed that the application requires only OpenGL ES 1.0,
175which is supported by all Android-powered devices.</p>
176
177 <p>An application can assume that if a platform supports a given OpenGL ES
178version, it also supports all numerically lower OpenGL ES versions. Therefore,
179an application that requires both OpenGL ES 1.0 and OpenGL ES 2.0 must specify
180that it requires OpenGL ES 2.0.</p>
181
182 <p>An application that can work with any of several OpenGL ES versions should
183only specify the numerically lowest version of OpenGL ES that it requires. (It
184can check at run-time whether a higher level of OpenGL ES is available.)</p>
Scott Main7b604312013-08-06 13:07:34 -0700185
186 <p>For more information about using OpenGL ES, including how to check the supported OpenGL ES
187version at runtime, see the <a href="{@docRoot}guide/topics/graphics/opengl.html">OpenGL ES</a>
188API guide.</p>
Scott Main71d4b282009-08-13 12:45:31 -0700189 </dd>
Scott Main71d4b282009-08-13 12:45:31 -0700190
Scott Main05902f02009-08-29 14:41:57 -0700191</dl>
192</dd>
193
Scott Main71d4b282009-08-13 12:45:31 -0700194<!-- ##api level indication## -->
195<dt>introduced in:</dt>
196<dd>API Level 4</dd>
197
198<dt>see also:</dt>
199<dd>
200 <ul>
Dirk Doughertyf1e134b2010-07-28 08:19:45 -0700201 <li>{@link android.content.pm.PackageManager}</li>
202 <li>{@link android.content.pm.FeatureInfo}</li>
Scott Main71d4b282009-08-13 12:45:31 -0700203 <li>{@link android.content.pm.ConfigurationInfo}</li>
Dirk Doughertyf1e134b2010-07-28 08:19:45 -0700204 <li><a href="{@docRoot}guide/topics/manifest/uses-permission-element.html"><code>&lt;uses-permission&gt;</code></a></li>
Dirk Dougherty2b286bb2012-11-29 17:25:09 -0800205 <li><a href="{@docRoot}google/play/filters.html">Filters on Google Play</a></li>
Scott Main71d4b282009-08-13 12:45:31 -0700206 </ul>
207</dd>
208
209</dl>
Dirk Doughertyf1e134b2010-07-28 08:19:45 -0700210
211
Dirk Dougherty4d7bc6552012-01-27 17:56:49 -0800212<h2 id="market-feature-filtering">Google Play and Feature-Based Filtering</h2>
Dirk Doughertyf1e134b2010-07-28 08:19:45 -0700213
Dirk Dougherty4d7bc6552012-01-27 17:56:49 -0800214<p>Google Play filters the applications that are visible to users, so that
Dirk Doughertyf1e134b2010-07-28 08:19:45 -0700215users can see and download only those applications that are compatible with
Dirk Dougherty4d7bc6552012-01-27 17:56:49 -0800216their devices. One of the ways it filters applications is by feature
Dirk Doughertyf1e134b2010-07-28 08:19:45 -0700217compatibility.</p>
218
219<p>To determine an application's feature compatibility with a given user's
Dirk Dougherty4d7bc6552012-01-27 17:56:49 -0800220device, Google Play compares:</p>
Dirk Doughertyf1e134b2010-07-28 08:19:45 -0700221
222<ul>
223<li>Features required by the application &mdash; an application declares features in
224<code>&lt;uses-feature&gt;</code> elements in its manifest <br/>with...</li>
225<li>Features available on the device, in hardware or software &mdash;
226a device reports the features it supports as read-only system properties.</li>
227</ul>
228
229<p>To ensure an accurate comparison of features, the Android Package Manager
230provides a shared set of feature constants that both applications and devices
231use to declare feature requirements and support. The available feature constants
232are listed in the <a href="#features-reference">Features Reference</a> tables at
233the bottom of this document, and in the class documentation for {@link
234android.content.pm.PackageManager}.</p>
235
Dirk Dougherty4d7bc6552012-01-27 17:56:49 -0800236<p>When the user launches Google Play, the application queries the
Dirk Doughertyf1e134b2010-07-28 08:19:45 -0700237Package Manager for the list of features available on the device by calling
238{@link android.content.pm.PackageManager#getSystemAvailableFeatures()}. The
Dirk Dougherty4d7bc6552012-01-27 17:56:49 -0800239Store application then passes the features list up to Google Play
240when establishing the session for the user.</p>
Dirk Doughertyf1e134b2010-07-28 08:19:45 -0700241
Dirk Doughertyaca4a772012-09-04 18:09:08 -0700242<p>Each time you upload an application to the Google Play Developer Console,
Dirk Dougherty4d7bc6552012-01-27 17:56:49 -0800243Google Play scans the application's manifest file. It looks for
Dirk Doughertyf1e134b2010-07-28 08:19:45 -0700244<code>&lt;uses-feature&gt;</code> elements and evaluates them in combination
245with other elements, in some cases, such as <code>&lt;uses-sdk&gt;</code> and
246<code>&lt;uses-permission&gt;</code> elements. After establishing the
247application's set of required features, it stores that list internally as
248metadata associated with the application <code>.apk</code> and the application
249version. </p>
250
Dirk Dougherty4d7bc6552012-01-27 17:56:49 -0800251<p>When a user searches or browses for applications using the Google Play
Dirk Doughertyf1e134b2010-07-28 08:19:45 -0700252application, the service compares the features needed by each application with
253the features available on the user's device. If all of an application's required
Dirk Dougherty4d7bc6552012-01-27 17:56:49 -0800254features are present on the device, Google Play allows the user to see the
Dirk Doughertyf1e134b2010-07-28 08:19:45 -0700255application and potentially download it. If any required feature is not
Dirk Dougherty4d7bc6552012-01-27 17:56:49 -0800256supported by the device, Google Play filters the application so that it is
Dirk Doughertyf1e134b2010-07-28 08:19:45 -0700257not visible to the user and not available for download. </p>
258
259<p>Because the features you declare in <code>&lt;uses-feature&gt;</code>
Dirk Dougherty4d7bc6552012-01-27 17:56:49 -0800260elements directly affect how Google Play filters your application, it's
261important to understand how Google Play evaluates the application's manifest
Dirk Doughertyf1e134b2010-07-28 08:19:45 -0700262and establishes the set of required features. The sections below provide more
263information. </p>
264
265<h3 id="declared">Filtering based on explicitly declared features</h3>
266
267<p>An explicitly declared feature is one that your application declares in a
268<code>&lt;uses-feature&gt;</code> element. The feature declaration can include
269an <code>android:required=["true" | "false"]</code> attribute (if you are
270compiling against API level 5 or higher), which lets you specify whether the
271application absolutely requires the feature and cannot function properly without
272it (<code>"true"</code>), or whether the application prefers to use the feature
273if available, but is designed to run without it (<code>"false"</code>).</p>
274
Dirk Dougherty4d7bc6552012-01-27 17:56:49 -0800275<p>Google Play handles explicitly declared features in this way: </p>
Dirk Doughertyf1e134b2010-07-28 08:19:45 -0700276
277<ul>
Dirk Dougherty4d7bc6552012-01-27 17:56:49 -0800278<li>If a feature is explicitly declared as being required, Google Play adds
Dirk Doughertyf1e134b2010-07-28 08:19:45 -0700279the feature to the list of required features for the application. It then
280filters the application from users on devices that do not provide that feature.
281For example:
282<pre>&lt;uses-feature android:name="android.hardware.camera" android:required="true" /&gt;</pre></li>
Dirk Dougherty4d7bc6552012-01-27 17:56:49 -0800283<li>If a feature is explicitly declared as <em>not</em> being required, Google
284Play <em>does not</em> add the feature to the list of required features. For
Scott Mainc351ab42011-08-05 17:13:46 -0700285that reason, an explicitly declared non-required feature is never considered when
Dirk Doughertyf1e134b2010-07-28 08:19:45 -0700286filtering the application. Even if the device does not provide the declared
Dirk Dougherty4d7bc6552012-01-27 17:56:49 -0800287feature, Google Play will still consider the application compatible with the
Dirk Doughertyf1e134b2010-07-28 08:19:45 -0700288device and will show it to the user, unless other filtering rules apply. For
289example:
290<pre>&lt;uses-feature android:name="android.hardware.camera" android:required="false" /&gt;</pre></li>
291<li>If a feature is explicitly declared, but without an
Dirk Dougherty4d7bc6552012-01-27 17:56:49 -0800292<code>android:required</code> attribute, Google Play assumes that the feature
Dirk Doughertyf1e134b2010-07-28 08:19:45 -0700293is required and sets up filtering on it. </li>
294</ul>
295
296<p>In general, if your application is designed to run on Android 1.6 and earlier
297versions, the <code>android:required</code> attribute is not available in the
Dirk Dougherty4d7bc6552012-01-27 17:56:49 -0800298API and Google Play assumes that any and all
Dirk Doughertyf1e134b2010-07-28 08:19:45 -0700299<code>&lt;uses-feature&gt;</code> declarations are required. </p>
300
301<p class="note"><strong>Note:</strong> By declaring a feature explicitly and
302including an <code>android:required="false"</code> attribute, you can
Dirk Dougherty4d7bc6552012-01-27 17:56:49 -0800303effectively disable all filtering on Google Play for the specified feature.
Dirk Doughertyf1e134b2010-07-28 08:19:45 -0700304</p>
305
306
307<h3 id="implicit">Filtering based on implicit features</h3>
308
309<p>An <em>implicit</em> feature is one that an application requires in order to
310function properly, but which is <em>not</em> declared in a
311<code>&lt;uses-feature&gt;</code> element in the manifest file. Strictly
312speaking, every application should <em>always</em> declare all features that it
313uses or requires, so the absence of a declaration for a feature used by an
314application should be considered an error. However, as a safeguard for users and
Dirk Dougherty4d7bc6552012-01-27 17:56:49 -0800315developers, Google Play looks for implicit features in each application and
Dirk Doughertyf1e134b2010-07-28 08:19:45 -0700316sets up filters for those features, just as it would do for an explicitly
317declared feature. </p>
318
319<p>An application might require a feature but not declare it because: </p>
320
321<ul>
322<li>The application was compiled against an older version of the Android library
323(Android 1.5 or earlier) and the <code>&lt;uses-feature&gt;</code> element was
324not available.</li>
325<li>The developer incorrectly assumed that the feature would be present on all
326devices and a declaration was unnecessary.</li>
327<li>The developer omitted the feature declaration accidentally.</li>
328<li>The developer declared the feature explicitly, but the declaration was not
329valid. For example, a spelling error in the <code>&lt;uses-feature&gt;</code>
330element name or an unrecognized string value for the
331<code>android:name</code> attribute would invalidate the feature declaration.
332</li>
333</ul>
334
Dirk Dougherty4d7bc6552012-01-27 17:56:49 -0800335<p>To account for the cases above, Google Play attempts to discover an
Dirk Doughertyf1e134b2010-07-28 08:19:45 -0700336application's implied feature requirements by examining <em>other elements</em>
337declared in the manifest file, specifically,
338<code>&lt;uses-permission&gt;</code> elements.</p>
339
Dirk Dougherty4d7bc6552012-01-27 17:56:49 -0800340<p>If an application requests hardware-related permissions, Google Play
Dirk Doughertyf1e134b2010-07-28 08:19:45 -0700341<em>assumes that the application uses the underlying hardware features and
342therefore requires those features</em>, even though there might be no
343corresponding to <code>&lt;uses-feature&gt;</code> declarations. For such
Dirk Dougherty4d7bc6552012-01-27 17:56:49 -0800344permissions, Google Play adds the underlying hardware features to the
Dirk Doughertyf1e134b2010-07-28 08:19:45 -0700345metadata that it stores for the application and sets up filters for them.</p>
346
347<p>For example, if an application requests the <code>CAMERA</code> permission
348but does not declare a <code>&lt;uses-feature&gt;</code> element for
Dirk Dougherty4d7bc6552012-01-27 17:56:49 -0800349<code>android.hardware.camera</code>, Google Play considers that the
Dirk Doughertyf1e134b2010-07-28 08:19:45 -0700350application requires a camera and should not be shown to users whose devices do
351not offer a camera.</p>
352
Dirk Dougherty4d7bc6552012-01-27 17:56:49 -0800353<p>If you don't want Google Play to filter based on a specific implied
Dirk Doughertyf1e134b2010-07-28 08:19:45 -0700354feature, you can disable that behavior. To do so, declare the feature explicitly
355in a <code>&lt;uses-feature&gt;</code> element and include an
356<code>android:required="false"</code> attribute. For example, to disable
357filtering derived from the <code>CAMERA</code> permission, you would declare
358the feature as shown below.</p>
359
360<pre>&lt;uses-feature android:name="android.hardware.camera" android:required="false" /&gt;</pre>
361
362<p class="caution">It's important to understand that the permissions that you
363request in <code>&lt;uses-permission&gt;</code> elements can directly affect how
Dirk Dougherty4d7bc6552012-01-27 17:56:49 -0800364Google Play filters your application. The reference section <a
Scott Maine9123962010-12-06 16:19:32 -0800365href="#permissions">Permissions that Imply Feature Requirements</a>,
Dirk Doughertyf1e134b2010-07-28 08:19:45 -0700366below, lists the full set of permissions that imply feature requirements and
367therefore trigger filtering.</p>
368
369<h3 id="bt-permission-handling">Special handling for Bluetooth feature</h3>
370
Dirk Dougherty4d7bc6552012-01-27 17:56:49 -0800371<p>Google Play applies slightly different rules than described above, when
Dirk Doughertyf1e134b2010-07-28 08:19:45 -0700372determining filtering for Bluetooth.</p>
373
374<p>If an application declares a Bluetooth permission in a
375<code>&lt;uses-permission&gt;</code> element, but does not explicitly declare
Dirk Dougherty4d7bc6552012-01-27 17:56:49 -0800376the Bluetooth feature in a <code>&lt;uses-feature&gt;</code> element, Google
377Play checks the version(s) of the Android platform on which the application is
Dirk Doughertyf1e134b2010-07-28 08:19:45 -0700378designed to run, as specified in the <code>&lt;uses-sdk&gt;</code> element. </p>
379
Dirk Dougherty4d7bc6552012-01-27 17:56:49 -0800380<p>As shown in the table below, Google Play enables filtering for the
Dirk Doughertyf1e134b2010-07-28 08:19:45 -0700381Bluetooth feature only if the application declares its lowest or targeted
Dirk Dougherty4d7bc6552012-01-27 17:56:49 -0800382platform as Android 2.0 (API level 5) or higher. However, note that Google
383Play applies the normal rules for filtering when the application explicitly
Dirk Doughertyf1e134b2010-07-28 08:19:45 -0700384declares the Bluetooth feature in a <code>&lt;uses-feature&gt;</code> element.
385</p>
386
Dirk Dougherty4d7bc6552012-01-27 17:56:49 -0800387<p class="caption"><strong>Table 1.</strong> How Google Play determines the
Dirk Doughertyf1e134b2010-07-28 08:19:45 -0700388Bluetooth feature requirement for an application that requests a Bluetooth
389permission but does not declare the Bluetooth feature in a
390<code>&lt;uses-feature&gt;</code> element.</p>
391
392<table style="margin-top:1em;">
393<tr>
394<th><nobr>If <code>minSdkVersion</code> is ...</nobr></th>
395<th><nobr>or <code>targetSdkVersion</code> is</nobr></th>
396<th>Result</th>
397</tr>
398<tr>
399<td><nobr>&lt;=4 (or uses-sdk is not declared)</nobr></td>
400<td>&lt;=4</td>
Dirk Dougherty4d7bc6552012-01-27 17:56:49 -0800401<td>Google Play <em>will not</em> filter the application from any devices
Dirk Doughertyf1e134b2010-07-28 08:19:45 -0700402based on their reported support for the <code>android.hardware.bluetooth</code>
403feature.</td>
404</tr>
405<tr>
406<td>&lt;=4</td>
407<td>&gt;=5</td>
Dirk Dougherty4d7bc6552012-01-27 17:56:49 -0800408<td rowspan="2">Google Play filters the application from any devices that
Dirk Doughertyf1e134b2010-07-28 08:19:45 -0700409do not support the <code>android.hardware.bluetooth</code> feature (including
410older releases).</td>
411</tr>
412<tr>
413<td>&gt;=5</td>
414<td>&gt;=5</td>
415</tr>
416</table>
417
418<p>The examples below illustrate the different filtering effects, based on how
Dirk Dougherty4d7bc6552012-01-27 17:56:49 -0800419Google Play handles the Bluetooth feature. </p>
Dirk Doughertyf1e134b2010-07-28 08:19:45 -0700420
421<dl>
422<dt>In first example, an application that is designed to run on older API levels
423declares a Bluetooth permission, but does not declare the Bluetooth feature in a
424<code>&lt;uses-feature&gt;</code> element.</dt>
Dirk Dougherty4d7bc6552012-01-27 17:56:49 -0800425<dd><em>Result:</em> Google Play does not filter the application from any device.</dd>
Dirk Doughertyf1e134b2010-07-28 08:19:45 -0700426</dl>
427
428<pre>&lt;manifest ...>
Dirk Doughertyf1e134b2010-07-28 08:19:45 -0700429 &lt;uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
430 &lt;uses-sdk android:minSdkVersion="3" />
Scott Mainb94df622010-12-02 15:43:02 -0800431 ...
Dirk Doughertyf1e134b2010-07-28 08:19:45 -0700432&lt;/manifest></pre>
433
434<dl>
435<dt>In the second example, below, the same application also declares a target
436API level of "5". </dt>
Dirk Dougherty4d7bc6552012-01-27 17:56:49 -0800437<dd><em>Result:</em> Google Play now assumes that the feature is required and
Dirk Doughertyf1e134b2010-07-28 08:19:45 -0700438will filter the application from all devices that do not report Bluetooth support,
439including devices running older versions of the platform. </dd>
440</dl>
441
442<pre>&lt;manifest ...>
Dirk Doughertyf1e134b2010-07-28 08:19:45 -0700443 &lt;uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
444 &lt;uses-sdk android:minSdkVersion="3" android:targetSdkVersion="5" />
Scott Mainb94df622010-12-02 15:43:02 -0800445 ...
Dirk Doughertyf1e134b2010-07-28 08:19:45 -0700446&lt;/manifest></pre>
447
448<dl>
449<dt>Here the same application now specifically declares the Bluetooth feature.</dt>
450<dd><em>Result:</em> Identical to the previous example (filtering is applied).</dd>
451</dl>
452
453<pre>&lt;manifest ...>
Dirk Doughertyf1e134b2010-07-28 08:19:45 -0700454 &lt;uses-feature android:name="android.hardware.bluetooth" />
455 &lt;uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
456 &lt;uses-sdk android:minSdkVersion="3" android:targetSdkVersion="5" />
Scott Mainb94df622010-12-02 15:43:02 -0800457 ...
Dirk Doughertyf1e134b2010-07-28 08:19:45 -0700458&lt;/manifest></pre>
459
460<dl>
461<dt>Finally, in the case below, the same application adds an
462<code>android:required="false"</code> attribute.</dt>
Dirk Dougherty4d7bc6552012-01-27 17:56:49 -0800463<dd><em>Result:</em> Google Play disables filtering based on Bluetooth
Dirk Doughertyf1e134b2010-07-28 08:19:45 -0700464feature support, for all devices.</dd>
465</dl>
466
467<pre>&lt;manifest ...>
Dirk Doughertyf1e134b2010-07-28 08:19:45 -0700468 &lt;uses-feature android:name="android.hardware.bluetooth" android:required="false" />
469 &lt;uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
470 &lt;uses-sdk android:minSdkVersion="3" android:targetSdkVersion="5" />
Scott Mainb94df622010-12-02 15:43:02 -0800471 ...
Dirk Doughertyf1e134b2010-07-28 08:19:45 -0700472&lt;/manifest></pre>
473
474
475
Scott Mainc0bf19a2011-05-06 16:38:02 -0700476<h3 id="testing">Testing the features required by your application</h3>
Dirk Doughertyf1e134b2010-07-28 08:19:45 -0700477
478<p>You can use the <code>aapt</code> tool, included in the Android SDK, to
Dirk Dougherty4d7bc6552012-01-27 17:56:49 -0800479determine how Google Play will filter your application, based on its declared
Dirk Doughertyf1e134b2010-07-28 08:19:45 -0700480features and permissions. To do so, run <code>aapt</code> with the <code>dump
481badging</code> command. This causes <code>aapt</code> to parse your
Dirk Dougherty4d7bc6552012-01-27 17:56:49 -0800482application's manifest and apply the same rules as used by Google Play to
Dirk Doughertyf1e134b2010-07-28 08:19:45 -0700483determine the features that your application requires. </p>
484
485<p>To use the tool, follow these steps: </p>
486
487<ol>
488<li>First, build and export your application as an unsigned <code>.apk</code>.
489If you are developing in Eclipse with ADT, right-click the project and select
490<strong>Android Tools</strong> &gt; <strong>Export Unsigned Application
491Package</strong>. Select a destination filename and path and click
492<strong>OK</strong>. </li>
493<li>Next, locate the <code>aapt</code> tool, if it is not already in your PATH.
Dirk Doughertyfc1f5e22010-11-02 19:15:51 -0700494If you are using SDK Tools r8 or higher, you can find <code>aapt</code> in the
495<code>&lt;<em>SDK</em>&gt;/platform-tools/</code> directory.
Dirk Doughertyf1e134b2010-07-28 08:19:45 -0700496<p class="note"><strong>Note:</strong> You must use the version of
Dirk Doughertyfc1f5e22010-11-02 19:15:51 -0700497<code>aapt</code> that is provided for the latest Platform-Tools component available. If
498you do not have the latest Platform-Tools component, download it using the <a
Scott Main50e990c2012-06-21 17:14:39 -0700499href="{@docRoot}sdk/exploring.html">Android SDK Manager</a>.
Dirk Doughertyf1e134b2010-07-28 08:19:45 -0700500</p></li>
501<li>Run <code>aapt</code> using this syntax: </li>
502</ol>
503
504<pre>$ aapt dump badging &lt;<em>path_to_exported_.apk</em>&gt;</pre>
505
506<p>Here's an example of the command output for the second Bluetooth example, above: </p>
507
508<pre>$ ./aapt dump badging BTExample.apk
509package: name='com.example.android.btexample' versionCode='' versionName=''
510<strong>uses-permission:'android.permission.BLUETOOTH_ADMIN'</strong>
511<strong>uses-feature:'android.hardware.bluetooth'</strong>
512sdkVersion:'3'
513targetSdkVersion:'5'
514application: label='BT Example' icon='res/drawable/app_bt_ex.png'
515launchable activity name='com.example.android.btexample.MyActivity'label='' icon=''
516uses-feature:'android.hardware.touchscreen'
517main
518supports-screens: 'small' 'normal' 'large'
519locales: '--_--'
520densities: '160'
521</pre>
522
523
524<h2 id=features-reference>Features Reference</h2>
525
526<p>The tables below provide reference information about hardware and software
Dirk Dougherty4d7bc6552012-01-27 17:56:49 -0800527features and the permissions that can imply them on Google Play. </p>
Dirk Doughertyf1e134b2010-07-28 08:19:45 -0700528
529<h3 id="hw-features">Hardware features</h3>
530
531<p>The table below describes the hardware feature descriptors supported by the
532most current platform release. To signal that your application uses or requires
533a hardware feature, declare each value in a <code>android:name</code> attribute
534in a separate <code>&lt;uses-feature&gt;</code> element. </p>
535
536 <table>
537 <tr>
538 <th>Feature Type</th>
539 <th>Feature Descriptor</th>
Scott Mainc0bf19a2011-05-06 16:38:02 -0700540 <th style="min-width:170px">Description</th>
Dirk Doughertyf1e134b2010-07-28 08:19:45 -0700541 <th>Comments</th>
542 </tr>
543 <tr>
Dirk Doughertyfc1f5e22010-11-02 19:15:51 -0700544 <td>Audio</td>
545 <td><code>android.hardware.audio.low_latency</td>
546 <td>The application uses a low-latency audio pipeline on the device and
547is sensitive to delays or lag in sound input or output.</td>
548<td>
549</td>
550 </tr>
551 <tr>
Dirk Doughertyf1e134b2010-07-28 08:19:45 -0700552 <td>Bluetooth</td>
553 <td><code>android.hardware.bluetooth</td>
554 <td>The application uses Bluetooth radio features in the device.</td>
Scott Maind608d5e2013-08-26 12:31:09 -0700555 <td>If your app uses Bluetooth Low Energy, also declare
556 {@code android.software.bluetooth_le}.</td>
Dirk Doughertyf1e134b2010-07-28 08:19:45 -0700557 </tr>
558 <tr>
Eino-Ville Talvala72b4db12012-09-18 15:03:27 -0700559 <td rowspan="5">Camera</td>
Dirk Doughertyf1e134b2010-07-28 08:19:45 -0700560 <td><code>android.hardware.camera</code></td>
561 <td>The application uses the device's camera. If the device supports
562 multiple cameras, the application uses the camera that facing
563 away from the screen.</td>
564 <td></td>
565 </tr>
566<tr>
567 <td><code>android.hardware.camera.autofocus</code></td>
568 <td>Subfeature. The application uses the device camera's autofocus capability.</td>
Scott Mainc0bf19a2011-05-06 16:38:02 -0700569 <td rowspan="3">These subfeatures implicitly declare the
570<code>android.hardware.camera</code> parent feature, unless declared with
571<code>android:required="false"</code>.</td>
Dirk Doughertyf1e134b2010-07-28 08:19:45 -0700572</tr>
573<tr>
574 <td><code>android.hardware.camera.flash</code></td>
575 <td>Subfeature. The application uses the device camera's flash.</td>
576</tr>
Dirk Doughertyfc1f5e22010-11-02 19:15:51 -0700577<tr>
578 <td><code>android.hardware.camera.front</code></td>
579 <td>Subfeature. The application uses a front-facing camera on the device.</td>
580</tr>
Eino-Ville Talvala72b4db12012-09-18 15:03:27 -0700581<tr>
582 <td><code>android.hardware.camera.any</code></td>
583 <td>The application uses at least one camera facing in any direction. Use this
584in preference to <code>android.hardware.camera</code> if a back-facing camera is
585not required.</td>
586</tr>
Dirk Doughertyf1e134b2010-07-28 08:19:45 -0700587
588<tr>
589 <td rowspan="3">Location</td>
590 <td><code>android.hardware.location</code></td>
591 <td>The application uses one or more features on the device for determining
592location, such as GPS location, network location, or cell location.</td>
593 <td></td>
594</tr>
595<tr>
596 <td><code>android.hardware.location.network</code></td>
597 <td>Subfeature. The application uses coarse location coordinates obtained from
598a network-based geolocation system supported on the device.</td>
Scott Mainc0bf19a2011-05-06 16:38:02 -0700599 <td rowspan="2">These subfeatures implicitly declare the
600<code>android.hardware.location</code> parent feature, unless declared with
601<code>android:required="false"</code>. </td>
Dirk Doughertyf1e134b2010-07-28 08:19:45 -0700602</tr>
603<tr>
604 <td><code>android.hardware.location.gps</code></td>
605 <td>Subfeature. The application uses precise location coordinates obtained
606from a Global Positioning System receiver on the device. </td>
607</tr>
Dirk Doughertyf1e134b2010-07-28 08:19:45 -0700608<tr>
Dirk Doughertyfc1f5e22010-11-02 19:15:51 -0700609 <td>Microphone</td>
610 <td><code>android.hardware.microphone</code></td>
611 <td>The application uses a microphone on the device.
612 </td>
613 <td></td>
614</tr>
615<tr>
Scott Mainc0bf19a2011-05-06 16:38:02 -0700616 <td>NFC</td>
Dirk Doughertyfc1f5e22010-11-02 19:15:51 -0700617 <td><code>android.hardware.nfc</td>
Scott Mainc0bf19a2011-05-06 16:38:02 -0700618 <td>The application uses Near Field Communications radio features in the device.</td>
Dirk Doughertyfc1f5e22010-11-02 19:15:51 -0700619 <td></td>
620</tr>
621<tr>
622 <td rowspan="6">Sensors</td>
Dirk Doughertyf1e134b2010-07-28 08:19:45 -0700623 <td><code>android.hardware.sensor.accelerometer</code></td>
624 <td>The application uses motion readings from an accelerometer on the
625device.</td>
626 <td></td>
627</tr>
628<tr>
Dirk Doughertyfc1f5e22010-11-02 19:15:51 -0700629 <td><code>android.hardware.sensor.barometer</code></td>
630 <td>The application uses the device's barometer.</td>
631 <td></td>
632</tr>
633<tr>
Dirk Doughertyf1e134b2010-07-28 08:19:45 -0700634 <td><code>android.hardware.sensor.compass</code></td>
635 <td>The application uses directional readings from a magnetometer (compass) on
636the device.</td>
637 <td></td>
638</tr>
639<tr>
Dirk Doughertyfc1f5e22010-11-02 19:15:51 -0700640 <td><code>android.hardware.sensor.gyroscope</code></td>
641 <td>The application uses the device's gyroscope sensor.</td>
642 <td></td>
643</tr>
644<tr>
Dirk Doughertyf1e134b2010-07-28 08:19:45 -0700645 <td><code>android.hardware.sensor.light</code></td>
646 <td>The application uses the device's light sensor.</td>
647 <td></td>
648</tr>
649<tr>
650 <td><code>android.hardware.sensor.proximity</code></td>
651 <td>The application uses the device's proximity sensor.</td>
652 <td></td>
653</tr>
Scott Mainc351ab42011-08-05 17:13:46 -0700654
655<tr>
656 <td rowspan="2">Screen</td>
657 <td><code>android.hardware.screen.landscape</code></td>
658 <td>The application requires landscape orientation.</td>
659 <td rowspan="2">
660 <p>For example, if your app requires portrait orientation, you should declare
661<code>&lt;uses-feature android:name="android.hardware.screen.portrait"/></code> so that only devices
662that support portrait orientation (whether always or by user choice) can install your app. If your
663application <em>supports</em> both orientations, then you don't need to declare either.</p>
664 <p>Both orientations are assumed <em>not required</em>, by default, so your app may be installed
665on devices that support one or both orientations. However, if any of your activities request that
666they run in a specific orientation, using the <a
667href="{@docRoot}guide/topics/manifest/activity-element.html#screen">{@code
668android:screenOrientation}</a> attribute, then this also declares that the application requires that
669orientation. For example, if you declare <a
670href="{@docRoot}guide/topics/manifest/activity-element.html#screen">{@code
671android:screenOrientation}</a> with either {@code "landscape"}, {@code "reverseLandscape"}, or
672{@code "sensorLandscape"}, then your application will be available only to devices that support
673landscape orientation. As a best practice, you should still declare your requirement for this
674orientation using a {@code &lt;uses-feature&gt;} element. If you declare an orientation for your
675activity using <a href="{@docRoot}guide/topics/manifest/activity-element.html#screen">{@code
676android:screenOrientation}</a>, but don't actually <em>require</em> it, you can disable the
677requirement by declaring the orientation with a {@code &lt;uses-feature&gt;} element and include
678{@code android:required="false"}.</p>
679 <p>For backwards compatibility, any device running a platform version that supports only API
680level 12 or lower is assumed to support both landscape and portrait.</p>
681 </td>
682</tr>
683<tr>
684 <td><code>android.hardware.screen.portrait</code></td>
685 <td>The application requires portrait orientation.</td>
686</tr>
687
Dirk Doughertyf1e134b2010-07-28 08:19:45 -0700688<tr>
Dirk Doughertyf1e134b2010-07-28 08:19:45 -0700689 <td rowspan="3">Telephony</td>
690 <td><code>android.hardware.telephony</code></td>
691 <td>The application uses telephony features on the device, such as telephony
692radio with data communication services.</td>
693 <td></td>
694</tr>
695<tr>
696 <td><code>android.hardware.telephony.cdma</code></td>
697 <td>Subfeature. The application uses CDMA telephony radio features on the
698device. </td>
Scott Mainc0bf19a2011-05-06 16:38:02 -0700699 <td rowspan="2">These subfeatures implicitly declare the
700<code>android.hardware.telephony</code> parent feature, unless declared with
701<code>android:required="false"</code>. </td>
Dirk Doughertyf1e134b2010-07-28 08:19:45 -0700702</tr>
703<tr>
704 <td><code>android.hardware.telephony.gsm</code></td>
705 <td>Subfeature. The application uses GSM telephony radio features on the
706device.</td>
707</tr>
708
709<tr>
Scott Main60dd5202012-06-23 00:01:22 -0700710 <td>Television</td>
711 <td><code>android.hardware.type.television</code></td>
712 <td>The application is designed for a television user experience.</td>
Scott Maine30d31c2013-01-07 15:54:30 -0800713 <td>This feature defines "television" to be a typical living room television experience:
Scott Main60dd5202012-06-23 00:01:22 -0700714 displayed on a big screen, where the user is sitting far away and the dominant form of
Scott Maine30d31c2013-01-07 15:54:30 -0800715 input is something like a d-pad, and generally not through touch or a
Scott Main60dd5202012-06-23 00:01:22 -0700716 mouse/pointer-device.</td>
717</tr>
718
719<tr>
Scott Mainc351ab42011-08-05 17:13:46 -0700720 <td rowspan="7">Touchscreen</td>
Scott Main6209b622011-02-14 12:09:50 -0800721 <td><code>android.hardware.faketouch</code></td>
722 <td>The application uses basic touch interaction events, such as "click down", "click
723up", and drag.</td>
Scott Mainc351ab42011-08-05 17:13:46 -0700724 <td><p>When declared as required, this indicates that the application is compatible with a device
725only if it offers an emulated touchscreen ("fake touch" interface), or better. A device that offers
726a fake touch interface provides a user input system that emulates a subset of touchscreen
727capabilities. For example, a mouse or remote control that drives an on-screen cursor provides a fake
728touch interface. If your application requires basic point and click interaction (in other
729words, it won't work with <em>only</em> a d-pad controller), you should declare this feature.
730Because this is the minimum level of touch interaction, your app will also be compatible with
731devices that offer more complex touch interfaces.</p>
Scott Maine3373ff2011-08-04 14:09:34 -0700732 <p class="note"><strong>Note:</strong> Because applications require the {@code
733android.hardware.touchscreen} feature by default, if you want your application to be available to
734devices that provide a fake touch interface, you must also explicitly declare that a touch screen is
735<em>not</em> required by declaring {@code &lt;uses-feature
736android:name="android.hardware.touchscreen" <strong>android:required="false"</strong>
737/&gt;}</p></td>
Scott Main6209b622011-02-14 12:09:50 -0800738</tr>
Scott Mainc351ab42011-08-05 17:13:46 -0700739
740<tr>
741 <td><code>android.hardware.faketouch.multitouch.distinct</code></td>
742 <td>The application performs distinct tracking of two or more "fingers" on a fake touch
743interface. This is a superset of the faketouch feature.</td>
744 <td><p>When declared as required, this indicates that the application is compatible with a device
745only if it supports touch emulation for events that supports distinct tracking of two or more
746fingers, or better.</p>
747 <p>Unlike the distinct multitouch defined by {@code
748android.hardware.touchscreen.multitouch.distinct}, input devices that support distinct multi-touch
749with a fake touch interface will not support all two-finger gestures, because the input is
750being transformed to cursor movement on the screen. That is, single finger gestures on such a device
751move a cursor; two-finger swipes will result in single-finger touch events; other two-finger
752gestures will result in the corresponding two-finger touch event. An example device that supports
753distinct multi-touch with a fake touch interface is one that provides a trackpad for cursor movement
754which also supports two or more fingers.</p></td>
755</tr>
756
757<tr>
758 <td><code>android.hardware.faketouch.multitouch.jazzhand</code></td>
759 <td>The application performs distinct tracking of five or more "fingers" on a fake touch
760interface. This is a superset of the faketouch feature.</td>
761 <td><p>When declared as required, this indicates that the application is compatible with a device
762only if it supports touch emulation for events that supports distinct tracking of five or more
763fingers.</p>
764 <p>Unlike the distinct multitouch defined by {@code
765android.hardware.touchscreen.multitouch.jazzhand}, input devices that support jazzhand multi-touch
766with a fake touch interface will not support all five-finger gestures, because the input is being
767transformed to cursor movement on the screen. That is, single finger gestures on such a device move
768a cursor; multi-finger gestures will result in single-finger touch events; other multi-finger
769gestures will result in the corresponding multi-finger touch event. An example device that supports
770distinct multi-touch with a fake touch interface is one that provides a trackpad for cursor movement
771which also supports five or more fingers.</p></td>
772</tr>
773
Scott Main6209b622011-02-14 12:09:50 -0800774<tr>
Dirk Doughertyf1e134b2010-07-28 08:19:45 -0700775 <td><code>android.hardware.touchscreen</code></td>
Scott Maine3373ff2011-08-04 14:09:34 -0700776 <td>The application uses touchscreen capabilities for gestures that are more interactive
Scott Mainc351ab42011-08-05 17:13:46 -0700777than basic touch events, such as a fling. This is a superset of the basic faketouch feature.</td>
778 <td><p>By default, your application requires this. As such, your application is <em>not</em>
779available to devices that provide only an emulated touch interface ("fake touch"), by default. If
780you want your application available to devices that provide a fake touch interface (or even devices
781that provide only a d-pad controller), you must explicitly declare that a touch screen is not
782required, by declaring {@code android.hardware.touchscreen} with {@code android:required="false"}.
783You should do so even if your application uses&mdash;but does not <em>require</em>&mdash;a real
784touch screen interface.</p>
785<p>If your application <em>does require</em> a touch interface (in order to perform touch
Scott Maine3373ff2011-08-04 14:09:34 -0700786gestures such as a fling), then you don't need to do anything, because this is required by default.
787However, it's best if you explicitly declare all features used by your application, so you should
788still declare this if your app uses it.</p>
789 <p>If you require more complex touch interaction, such as multi-finger gestures, you
790should declare the advanced touch screen features below.</p></td>
Dirk Doughertyf1e134b2010-07-28 08:19:45 -0700791</tr>
792<tr>
793 <td><code>android.hardware.touchscreen.multitouch</code></td>
Scott Main6209b622011-02-14 12:09:50 -0800794 <td>The application uses basic two-point multitouch capabilities on the device
795screen, such as for pinch gestures, but does not need to track touches independently. This
Scott Mainc351ab42011-08-05 17:13:46 -0700796is a superset of touchscreen feature.</td>
Scott Mainc0bf19a2011-05-06 16:38:02 -0700797 <td>This implicitly declares the <code>android.hardware.touchscreen</code> parent feature, unless
798declared with <code>android:required="false"</code>. </td>
Dirk Doughertyf1e134b2010-07-28 08:19:45 -0700799</tr>
800<tr>
801 <td><code>android.hardware.touchscreen.multitouch.distinct</code></td>
802 <td>Subfeature. The application uses advanced multipoint multitouch
803capabilities on the device screen, such as for tracking two or more points fully
Scott Mainc351ab42011-08-05 17:13:46 -0700804independently. This is a superset of multitouch feature.</td>
Scott Mainc0bf19a2011-05-06 16:38:02 -0700805 <td rowspan="2">This implicitly declares the <code>android.hardware.touchscreen.multitouch</code>
806parent feature, unless declared with <code>android:required="false"</code>. </td>
Dirk Doughertyf1e134b2010-07-28 08:19:45 -0700807</tr>
Dirk Doughertyfc1f5e22010-11-02 19:15:51 -0700808<tr>
809 <td><code>android.hardware.touchscreen.multitouch.jazzhand</code></td>
Scott Main6209b622011-02-14 12:09:50 -0800810 <td>The application uses advanced multipoint multitouch
Dirk Doughertyfc1f5e22010-11-02 19:15:51 -0700811capabilities on the device screen, for tracking up to five points fully
Scott Mainc351ab42011-08-05 17:13:46 -0700812independently. This is a superset of distinct multitouch feature.</td>
Dirk Doughertyfc1f5e22010-11-02 19:15:51 -0700813</tr>
Dirk Doughertyf1e134b2010-07-28 08:19:45 -0700814
815<tr>
Scott Mainc0bf19a2011-05-06 16:38:02 -0700816 <td rowspan="2">USB</td>
817 <td><code>android.hardware.usb.host</code></td>
818 <td>The application uses USB host mode features (behaves as the host and connects to USB
819devices).</td>
820 <td></td>
821</tr>
822
823<tr>
824 <td><code>android.hardware.usb.accessory</code></td>
825 <td>The application uses USB accessory features (behaves as the USB device and connects to USB
826hosts).</td>
827 <td></td>
828</tr>
829
830<tr>
Dirk Doughertyf1e134b2010-07-28 08:19:45 -0700831 <td>Wifi</td>
832 <td><code>android.hardware.wifi</code></td>
833 <td>The application uses 802.11 networking (wifi) features on the device.</td>
834 <td></td>
835</tr>
836
837 </table>
838
839<h3 id="sw-features">Software features</h3>
840
841<p>The table below describes the software feature descriptors supported by the
842most current platform release. To signal that your application uses or requires
843a software feature, declare each value in a <code>android:name</code> attribute
844in a separate <code>&lt;uses-feature&gt;</code> element. </p>
845
846
847 <table>
Dirk Dougherty50f84452010-11-11 11:52:05 -0800848<tr>
849 <th>Feature</th>
850 <th>Attribute Value</th>
851 <th>Description</th>
Scott Maind608d5e2013-08-26 12:31:09 -0700852</tr>
853<tr>
854 <td>App Widgets</td>
855 <td><code>android.software.app_widgets</code></td>
856 <td>The application uses or provides App Widgets and should be installed only on devices
857 that include a Home screen or similar location where users can embed App Widgets.</td>
858</tr>
859<tr>
860 <td>Bluetooth Low Energy</td>
861 <td><code>android.software.bluetooth_le</code></td>
862 <td><p>The application uses Bluetooth Low Energy APIs and should be installed only on devices
863 that are capable of communicating with other devices via Bluetooth Low Energy.
864 <p>This implicitly also declares the {@code android.hardware.bluetooth} feature.</td>
865</tr>
866<tr>
867 <td>Home Screen</td>
868 <td><code>android.software.home_screen</code></td>
869 <td>The application behaves as a Home screen replacement and should be installed only on
870 devices that support third-party Home screen apps.</td>
871</tr>
872<tr>
873 <td>Input Method</td>
874 <td><code>android.software.input_methods</code></td>
875 <td>The application provides a custom input method and should be installed only on devices that
876 support third-party input methods.</td>
Dirk Dougherty50f84452010-11-11 11:52:05 -0800877</tr>
878<tr>
879 <td>Live Wallpaper</td>
880 <td><code>android.software.live_wallpaper</code></td>
Scott Maind608d5e2013-08-26 12:31:09 -0700881 <td>The application uses or provides Live Wallpapers and should be installed only on devices that
882 support Live Wallpapers.</td>
Dirk Dougherty50f84452010-11-11 11:52:05 -0800883</tr>
884<tr>
885 <td rowspan="2">SIP/VOIP</td>
886 <td><code>android.software.sip</code></td>
Scott Maind608d5e2013-08-26 12:31:09 -0700887 <td>The application uses SIP service on the device and should be installed only on devices that
888 support SIP.
Dirk Dougherty50f84452010-11-11 11:52:05 -0800889 </td>
Dirk Dougherty50f84452010-11-11 11:52:05 -0800890</tr>
891<tr>
892 <td><code>android.software.sip.voip</code></td>
Scott Maind608d5e2013-08-26 12:31:09 -0700893 <td><p>Subfeature. The application uses SIP-based VOIP service on the device.
894 <p>This subfeature implicitly declares the <code>android.software.sip</code> parent feature,
Scott Mainc0bf19a2011-05-06 16:38:02 -0700895unless declared with <code>android:required="false"</code>.</td>
Dirk Dougherty50f84452010-11-11 11:52:05 -0800896</tr>
Dirk Doughertyf1e134b2010-07-28 08:19:45 -0700897 </table>
898
899
900<h3 id="permissions">Permissions that Imply Feature Requirements</h3>
901
902<p>Some feature constants listed in the tables above were made available to
903applications <em>after</em> the corresponding API; for example, the
904<code>android.hardware.bluetooth</code> feature was added in Android 2.2 (API
905level 8), but the bluetooth API that it refers to was added in Android 2.0 (API
906level 5). Because of this, some apps were able to use the API before they had
907the ability to declare that they require the API via the
908<code>&lt;uses-feature&gt;</code> system. </p>
909
Dirk Dougherty4d7bc6552012-01-27 17:56:49 -0800910<p>To prevent those apps from being made available unintentionally, Google
911Play assumes that certain hardware-related permissions indicate that the
Dirk Doughertyf1e134b2010-07-28 08:19:45 -0700912underlying hardware features are required by default. For instance, applications
913that use Bluetooth must request the <code>BLUETOOTH</code> permission in a
Dirk Dougherty4d7bc6552012-01-27 17:56:49 -0800914<code>&lt;uses-permission&gt;</code> element &mdash; for legacy apps, Google
915Play assumes that the permission declaration means that the underlying
Dirk Doughertyf1e134b2010-07-28 08:19:45 -0700916<code>android.hardware.bluetooth</code> feature is required by the application
917and sets up filtering based on that feature. </p>
918
919<p>The table below lists permissions that imply feature requirements
920equivalent to those declared in <code>&lt;uses-feature&gt;</code> elements. Note
921that <code>&lt;uses-feature&gt;</code> declarations, including any declared
922<code>android:required</code> attribute, always take precedence over features
923implied by the permissions below. </p>
924
925<p>For any of the permissions below, you can disable filtering based on the
926implied feature by explicitly declaring the implied feature explicitly, in a
927<code>&lt;uses-feature&gt;</code> element, with an
928<code>android:required="false"</code> attribute. For example, to disable any
929filtering based on the <code>CAMERA</code> permission, you would add this
930<code>&lt;uses-feature&gt;</code> declaration to the manifest file:</p>
931
932<pre>&lt;uses-feature android:name="android.hardware.camera" android:required="false" /&gt;</pre>
933
934<table id="permissions-features" >
935 <tr>
936 <th>Category</th>
937 <th>This Permission...</th>
938 <th>Implies This Feature Requirement</th>
939 <!-- <th>Comments</th> -->
940 </tr>
941
942
943<tr>
944 <td rowspan="2">Bluetooth</td>
945 <td><code>BLUETOOTH</code></td>
946 <td><code>android.hardware.bluetooth</code>
947<p>(See <a href="#bt-permission-handling">Special handling for Bluetooth feature</a> for details.)</p></td>
948<!-- <td></td> -->
949</tr>
950<tr>
951 <td><code>BLUETOOTH_ADMIN</code></td>
952 <td><code>android.hardware.bluetooth</code></td>
953<!-- <td></td> -->
954</tr>
955
956<tr>
957 <td>Camera</td>
958 <td><code>CAMERA</code></td>
959 <td><code>android.hardware.camera</code> <em>and</em>
960<br><code>android.hardware.camera.autofocus</code></td>
961<!-- <td></td> -->
962</tr>
963
964<tr>
965 <td rowspan="5">Location</td>
966 <td><code>ACCESS_MOCK_LOCATION</code></td>
967 <td><code>android.hardware.location</code></td>
968<!-- <td></td> -->
969</tr>
970<tr>
971 <td><code>ACCESS_LOCATION_EXTRA_COMMANDS</code></td>
972 <td><code>android.hardware.location</code></td>
973<!-- <td></td> -->
974</tr>
975<tr>
976 <td><code>INSTALL_LOCATION_PROVIDER</code></td>
977 <td><code>android.hardware.location</code></td>
978<!-- <td></td> -->
979</tr>
980<tr>
981 <td><code>ACCESS_COARSE_LOCATION</code></td>
982 <td><code>android.hardware.location.network</code> <em>and</em>
983<br><code>android.hardware.location</code></td>
984<!-- <td></td> -->
985</tr>
986<tr>
987 <td><code>ACCESS_FINE_LOCATION</code></td>
988 <td><code>android.hardware.location.gps</code> <em>and</em>
989<br><code>android.hardware.location</code></td>
990<!-- <td></td> -->
991</tr>
992
993<tr>
994 <td>Microphone</td>
995 <td><code>RECORD_AUDIO</code></td>
996 <td><code>android.hardware.microphone</code></td>
997<!-- <td></td> -->
998</tr>
999
1000<tr>
1001 <td rowspan="11">Telephony</td>
1002 <td><code>CALL_PHONE</code></td>
1003 <td><code>android.hardware.telephony</code></td>
1004<!-- <td></td> -->
1005</tr>
1006<tr>
1007 <td><code>CALL_PRIVILEGED</code></td>
1008 <td><code>android.hardware.telephony</code></td>
1009<!-- <td></td> -->
1010</tr>
1011
1012<tr>
1013 <td><code>MODIFY_PHONE_STATE</code></td>
1014 <td><code>android.hardware.telephony</code></td>
1015<!-- <td></td> -->
1016</tr>
1017<tr>
1018 <td><code>PROCESS_OUTGOING_CALLS</code></td>
1019 <td><code>android.hardware.telephony</code></td>
1020<!-- <td></td> -->
1021</tr>
1022<tr>
1023 <td><code>READ_SMS</code></td>
1024 <td><code>android.hardware.telephony</code></td>
1025<!-- <td></td> -->
1026</tr>
1027<tr>
1028 <td><code>RECEIVE_SMS</code></td>
1029 <td><code>android.hardware.telephony</code></td>
1030<!-- <td></td> -->
1031</tr>
1032<tr>
1033 <td><code>RECEIVE_MMS</code></td>
1034 <td><code>android.hardware.telephony</code></td>
1035<!-- <td></td> -->
1036</tr>
1037<tr>
1038 <td><code>RECEIVE_WAP_PUSH</code></td>
1039 <td><code>android.hardware.telephony</code></td>
1040<!-- <td></td> -->
1041</tr>
1042<tr>
1043 <td><code>SEND_SMS</code></td>
1044 <td><code>android.hardware.telephony</code></td>
1045<!-- <td></td> -->
1046</tr>
1047<tr>
1048 <td><code>WRITE_APN_SETTINGS</code></td>
1049 <td><code>android.hardware.telephony</code></td>
1050<!-- <td></td> -->
1051</tr>
1052<tr>
1053 <td><code>WRITE_SMS</code></td>
1054 <td><code>android.hardware.telephony</code></td>
1055<!-- <td></td> -->
1056</tr>
1057
1058<tr>
1059 <td rowspan="3">Wifi</td>
1060 <td><code>ACCESS_WIFI_STATE</code></td>
1061 <td><code>android.hardware.wifi</code></td>
1062<!-- <td></td> -->
1063</tr>
1064<tr>
1065 <td><code>CHANGE_WIFI_STATE</code></td>
1066 <td><code>android.hardware.wifi</code></td>
1067<!-- <td></td> -->
1068</tr>
1069<tr>
1070 <td><code>CHANGE_WIFI_MULTICAST_STATE</code></td>
1071 <td><code>android.hardware.wifi</code></td>
1072<!-- <td></td> -->
1073</tr>
Joe Fernandez33baa5a2013-11-14 11:41:19 -08001074</table>