blob: 08a7a4f678bff58d193acdf470db934e81ba2bf6 [file] [log] [blame]
Clay Murphy8dc6c772015-02-13 10:22:33 -08001<?xml version="1.0" encoding="UTF-8"?>
2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4<head>
5<title>Android 5.0 Compatibility Definition</title>
6<link rel="stylesheet" type="text/css" href="cdd.css"/>
7</head>
8<body>
9<div><img src="header.jpg" alt="Android logo"/></div>
10<h1>Android 5.0 Compatibility Definition</h1>
11<!--
12<span style="color: red; font-weight: bold;"><h2>Revision 1</h2></span><br/>
13<span style="color: red;">Last updated: July 23, 2013</span>
14-->
15<p><b><font color="red">Revision 1</font></b><br/>
16Last updated: January 12, 2015
17</p>
18<p>Copyright &copy; 2015, Google Inc. All rights reserved.<br/>
19<a href="mailto:compatibility@android.com">compatibility@android.com</a>
20</p>
21
22<h1 id=table_of_contents>Table of Contents</h1>
23
24<table>
25 <tr>
26 <td>
27<p><a href="#heading=h.msc7y995n414">1. Introduction</a></p>
28
29<p><a href="#heading=h.40sdoojaw5k9">2. Device Types</a></p>
30
31<p><a href="#heading=h.562rcc5o7p3c">2.1 Device Configurations</a></p>
32
33<p><a href="#heading=h.yhzgiu12663m">3. Software</a></p>
34
35<p><a href="#heading=h.kr68507hndy4">3.1. Managed API Compatibility</a></p>
36
37<p><a href="#heading=h.klxc9p5alm1k">3.2. Soft API Compatibility</a></p>
38
39<p><a href="#heading=h.db11p7gvg81n">3.2.1. Permissions</a></p>
40
41<p><a href="#heading=h.3710ebc7nsew">3.2.2. Build Parameters</a></p>
42
43<p><a href="#heading=h.gthv9fjcs0pe">3.2.3. Intent Compatibility</a></p>
44
45<p><a href="#heading=h.qiy4ddbiirgy">3.2.3.1. Core Application Intents</a></p>
46
47<p><a href="#heading=h.bpmvwqbxsymp">3.2.3.2. Intent Overrides</a></p>
48
49<p><a href="#heading=h.r3yyvgtvim43">3.2.3.3. Intent Namespaces</a></p>
50
51<p><a href="#heading=h.r8urpa426zy">3.2.3.4. Broadcast Intents</a></p>
52
53<p><a href="#heading=h.oek6k3rdi0v8">3.2.3.5. Default App Settings</a></p>
54
55<p><a href="#heading=h.3dpths90svxf">3.3. Native API Compatibility</a></p>
56
57<p><a href="#heading=h.jcm6fp8o7lhj">3.3.1 Application Binary Interfaces</a></p>
58
59<p><a href="#heading=h.svlldf3npn1t">3.4. Web Compatibility</a></p>
60
61<p><a href="#heading=h.swqsalizdkk8">3.4.1. WebView Compatibility</a></p>
62
63<p><a href="#heading=h.minm6jqu934x">3.4.2. Browser Compatibility</a></p>
64
65<p><a href="#heading=h.xq343byyb0fz">3.5. API Behavioral Compatibility</a></p>
66
67<p><a href="#heading=h.blmhfmxlmvir">3.6. API Namespaces</a></p>
68
69<p><a href="#heading=h.5159yfnui03c">3.7. Runtime Compatibility</a></p>
70
71<p><a href="#heading=h.6jv9libgzj5i">3.8. User Interface Compatibility</a></p>
72
73<p><a href="#heading=h.uihb1eijkvo">3.8.1. Launcher (Home Screen)</a></p>
74
75<p><a href="#heading=h.v9h5ffzht332">3.8.2. Widgets</a></p>
76
77<p><a href="#heading=h.i9vjtu1lr6go">3.8.3. Notifications</a></p>
78
79<p><a href="#heading=h.6hexhtx5tmrs">3.8.4. Search</a></p>
80
81<p><a href="#heading=h.xc1emmi207w5">3.8.5. Toasts</a></p>
82
83<p><a href="#heading=h.qip8398skywq">3.8.6. Themes</a></p>
84
85<p><a href="#heading=h.c5ay2hae9td">3.8.7. Live Wallpapers</a></p>
86
87<p><a href="#heading=h.zc10jlx04bz">3.8.8. Activity Switching</a></p>
88
89<p><a href="#heading=h.z2dmdulh39vh">3.8.9. Input Management</a></p>
90
91<p><a href="#heading=h.y1dfuxk4g759">3.8.10. Lock Screen Media Control</a></p>
92
93<p><a href="#heading=h.w9tpfodgdigq">3.8.11. Dreams</a></p>
94
95<p><a href="#heading=h.ifi3tjbpjckl">3.8.12. Location</a></p>
96
97<p><a href="#heading=h.ugmg9aj091f8">3.8.13. Unicode and Font</a></p>
Clay Murphy43729fd2015-03-02 17:02:12 -080098
Clay Murphy8dc6c772015-02-13 10:22:33 -080099<p><a href="#heading=h.yyjxs5mhy231">3.9. Device Administration</a></p>
100
101<p><a href="#heading=h.ynv25r97q6m">3.10. Accessibility</a></p>
102
103<p><a href="#heading=h.d6m0oago1d3y">3.11. Text-to-Speech</a></p>
104
105<p><a href="#heading=h.zdns59cgtxwy">3.12. TV Input Framework</a></p>
106
107<p><a href="#heading=h.z51ce4vpkix">4. Application Packaging Compatibility</a></p>
108
109<p><a href="#heading=h.ddcqv1ggh4y7">5. Multimedia Compatibility</a></p>
110
111<p><a href="#heading=h.qj4xbxk4bysl">5.1. Media Codecs</a></p>
112
113<p><a href="#heading=h.iad8gjulqe75">5.1.1. Audio Codecs</a></p>
114
115<p><a href="#heading=h.rv9qy784zhuc">5.1.2. Image Codecs</a></p>
116
117<p><a href="#heading=h.gxu0pnbldfle">5.1.3. Video Codecs</a></p>
118
119<p><a href="#heading=h.be1ledetmole">5.2. Video Encoding</a></p>
120
121<p><a href="#heading=h.7971wdynbtij">5.3. Video Decoding</a></p>
122
123<p><a href="#heading=h.vtmgyrsev5dt">5.4. Audio Recording</a></p>
124
Clay Murphy43729fd2015-03-02 17:02:12 -0800125<p><a href="#heading=h.ng7fac8ci8vj">5.4.1. Raw Audio Capture</a></p>
Clay Murphy8dc6c772015-02-13 10:22:33 -0800126
127<p><a href="#heading=h.sro7nvcaeuc1">5.4.2. Capture for Voice Recognition</a></p>
128
129<p><a href="#heading=h.n5ikz5dupfno">5.4.3. Capture for Rerouting of Playback</a></p>
130
131<p><a href="#heading=h.1xocvxnwynnm">5.5. Audio Playback</a></p>
132
133<p><a href="#heading=h.6zy7486s5cfa">5.5.1. Raw Audio Playback</a></p>
134
135<p><a href="#heading=h.ai1naitm7qfy">5.5.2. Audio Effects</a></p>
136
137<p><a href="#heading=h.fngymkz0321y">5.5.3. Audio Output Volume</a></p>
138
139<p><a href="#heading=h.qpj70us2l5pn">5.6. Audio Latency</a></p>
140
141<p><a href="#heading=h.1p55xhbym9l4">5.7. Network Protocols</a></p>
142
143<p><a href="#heading=h.mpxr2yu72m6t">5.8. Secure Media</a></p>
144
145<p><a href="#heading=h.9v14hzhfhm3p">6. Developer Tools and Options Compatibility</a></p>
146
147<p><a href="#heading=h.9cfw1b5q4g96">6.1. Developer Tools</a></p>
148
149<p><a href="#heading=h.yipuqt964xra">6.2. Developer Options</a></p>
150
151<p><a href="#heading=h.5h5uvpadidzr">7. Hardware Compatibility</a></p>
152
153<p><a href="#heading=h.22h5j37xan6e">7.1. Display and Graphics</a></p>
154
155<p><a href="#heading=h.6fey5v3qb5m3">7.1.1. Screen Configuration</a></p>
156
157<p><a href="#heading=h.mrv5xyps1ba8">7.1.1.1. Screen Size</a></p>
158
159<p><a href="#heading=h.h4amzk7515h2">7.1.1.2. Screen Aspect Ratio</a></p>
160
161<p><a href="#heading=h.2d6r63hcnjt0">7.1.1.3. Screen Density</a></p>
162
163<p><a href="#heading=h.p3dcj1v9ofv0">7.1.2. Display Metrics</a></p>
164</td>
165 </tr>
166</table>
167
168<table>
169 <tr>
170 <td>
Clay Murphy43729fd2015-03-02 17:02:12 -0800171<p><a href="#heading=h.try1r2p8m3vf">7.1.3. Screen Orientation</a></p>
172
173<p><a href="#heading=h.r5sa5dwl0cjh">7.1.4. 2D and 3D Graphics Acceleration</a></p>
174
175<p><a href="#heading=h.r1yeedum5wsi">7.1.5. Legacy Application Compatibility Mode</a></p>
176
177<p><a href="#heading=h.dvbqyf6vof9p">7.1.6. Screen Technology</a></p>
178
179<p><a href="#heading=h.yeaulmskczp3">7.1.7. External Displays</a></p>
180
181<p><a href="#heading=h.1rhjcel5zbe5">7.2. Input Devices</a></p>
182
183<p><a href="#heading=h.egbk02citmz">7.2.1. Keyboard</a></p>
184
185<p><a href="#heading=h.h86aqgcxrqbz">7.2.2. Non-touch Navigation</a></p>
186
187<p><a href="#heading=h.dzfhwcjzm5z6">7.2.3. Navigation Keys</a></p>
188
189<p><a href="#heading=h.p7pmjzzatkph">7.2.4. Touchscreen Input</a></p>
190
191<p><a href="#heading=h.7tz929qk2hjr">7.2.5. Fake Touch Input</a></p>
192
193<p><a href="#heading=h.sdgxpot7e9ff">7.2.6. Game Controller Support</a></p>
194
195<p><a href="#heading=h.e96izopb7n42">7.2.6.1. Button Mappings</a></p>
196
197<p><a href="#heading=h.eija3q5owqll">7.2.7. Remote Control</a></p>
198
199<p><a href="#heading=h.j40lqogjtait">7.3. Sensors</a></p>
200
201<p><a href="#heading=h.3u857dtnrtuj">7.3.1. Accelerometer</a></p>
202
203<p><a href="#heading=h.sf5gr3iz7tz4">7.3.2. Magnetometer</a></p>
204
205<p><a href="#heading=h.2x1nre62p60d">7.3.3. GPS</a></p>
206
207<p><a href="#heading=h.kczbjun4pvap">7.3.4. Gyroscope</a></p>
208
209<p><a href="#heading=h.vmgl07rl8eir">7.3.5. Barometer</a></p>
210
211<p><a href="#heading=h.7gtmh7pqnekm">7.3.6. Thermometer</a></p>
212
213<p><a href="#heading=h.nbgggpsrc5wj">7.3.7. Photometer</a></p>
214
215<p><a href="#heading=h.gus8hybydyk8">7.3.8. Proximity Sensor</a></p>
216
217<p><a href="#heading=h.7y7dtt5ikji6">7.4. Data Connectivity</a></p>
218
219<p><a href="#heading=h.u12n5f7z5iiq">7.4.1. Telephony</a></p>
220
221<p><a href="#heading=h.39g0jrqcl40">7.4.2. IEEE 802.11 (Wi-Fi)</a></p>
222
223<p><a href="#heading=h.82i6ovyqynfx">7.4.2.1. Wi-Fi Direct</a></p>
224
225<p><a href="#heading=h.aia2dpbgueab">7.4.2.2. Wi-Fi Tunneled Direct Link Setup</a></p>
226
227<p><a href="#heading=h.420i0exy2mxj">7.4.3. Bluetooth</a></p>
228
229<p><a href="#heading=h.twzy3bitgp2k">7.4.4. Near-Field Communications</a></p>
230
231<p><a href="#heading=h.sg0l1jarhok9">7.4.5. Minimum Network Capability</a></p>
232
233<p><a href="#heading=h.7agkwed6used">7.4.6. Sync Settings</a></p>
234
235<p><a href="#heading=h.ups9ebpvb6ja">7.5. Cameras</a></p>
236
237<p><a href="#heading=h.v6dmzvarwqkm">7.5.1. Rear-Facing Camera</a></p>
238
239<p><a href="#heading=h.xze6dyxaadh9">7.5.2. Front-Facing Camera</a></p>
240
241<p><a href="#heading=h.q85mgg9m8zhf">7.5.3. External Camera</a></p>
242
243<p><a href="#heading=h.s349dbv4ffl4">7.5.4. Camera API Behavior</a></p>
244
245<p><a href="#heading=h.zguadou53wls">7.5.5. Camera Orientation</a></p>
246
247<p><a href="#heading=h.bodawgb0ngf8">7.6. Memory and Storage</a></p>
248
249<p><a href="#heading=h.q4aoj3xvrlxe">7.6.1. Minimum Memory and Storage</a></p>
250
251<p><a href="#heading=h.8qr43vll8ow">7.6.2. Application Shared Storage</a></p>
252
253<p><a href="#heading=h.rp4zc78xvn6s">7.7. USB</a></p>
254
255<p><a href="#heading=h.fzr0lrcrrfak">7.8. Audio</a></p>
256
257<p><a href="#heading=h.74o7ndqnyrjr">7.8.1. Microphone</a></p>
258
259<p><a href="#heading=h.ro0d402dzkaq">7.8.2. Audio Output</a></p>
260
261<p><a href="#heading=h.luy58niin3j">7.8.2.1. Analog Audio Ports</a></p>
262
263<p><a href="#heading=h.v33sc890yqtg">8. Performance Compatibility</a></p>
264
265<p><a href="#heading=h.jyh6oga0ubgs">8.1. User Experience Consistency</a></p>
266
267<p><a href="#heading=h.9vv5a25p8zcz">8.2. Memory Performance</a></p>
268
269<p><a href="#heading=h.a32osmf1tmwt">9. Security Model Compatibility</a></p>
270
271<p><a href="#heading=h.rj8bxiqpff6s">9.1. Permissions</a></p>
272
273<p><a href="#heading=h.p4gtpuihccdf">9.2. UID and Process Isolation</a></p>
274
275<p><a href="#heading=h.en5p20nyss66">9.3. Filesystem Permissions</a></p>
276
277<p><a href="#heading=h.p5sjwl72r3oz">9.4. Alternate Execution Environments</a></p>
278
279<p><a href="#heading=h.xspotnaue6fc">9.5. Multi-User Support</a></p>
280
281<p><a href="#heading=h.7b5lq2p9nv4j">9.6. Premium SMS Warning</a></p>
282
283<p><a href="#heading=h.io2qcx4xe6hh">9.7. Kernel Security Features</a></p>
284
285<p><a href="#heading=h.u9w027jkf7bb">9.8. Privacy</a></p>
286
287<p><a href="#heading=h.qq3tcq94r919">9.9. Full-Disk Encryption</a></p>
288
289<p><a href="#heading=h.ngllntwu29p6">9.10. Verified Boot</a></p>
290
291<p><a href="#heading=h.rafv96b0uwer">10. Software Compatibility Testing</a></p>
292
293<p><a href="#heading=h.7iuzt59bizon">10.1. Compatibility Test Suite</a></p>
294
295<p><a href="#heading=h.opluz3h21s0b">10.2. CTS Verifier</a></p>
296
297<p><a href="#heading=h.141487psajcw">11. Updatable Software</a></p>
298
299<p><a href="#heading=h.4et8ifl401m5">12. Document Changelog</a></p>
300
301<p><a href="#heading=h.codus8wcjysp">13. Contact Us</a></p>
302
303<p><a href="#heading=h.jhgs5yq2lqtj">14. Resources</a></p>
304</td>
305 </tr>
306</table>
Clay Murphy8dc6c772015-02-13 10:22:33 -0800307
308<h1 id=1_introduction>1. Introduction</h1>
309
310
311<p>This document enumerates the requirements that must be met in order for devices
312to be compatible with Android 5.0.</p>
313
314<p>The use of "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD",
315"SHOULD NOT", "RECOMMENDED", "MAY" and "OPTIONAL" is per the IETF standard
316defined in RFC2119 [<a href="http://www.ietf.org/rfc/rfc2119.txt">Resources, 1</a>].</p>
317
318<p>As used in this document, a "device implementer" or "implementer" is a person
319or organization developing a hardware/software solution running Android 5.0. A
320"device implementation" or "implementation" is the hardware/software solution
321so developed.</p>
322
323<p>To be considered compatible with Android 5.0, device implementations MUST meet
324the requirements presented in this Compatibility Definition, including any
325documents incorporated via reference.</p>
326
327<p>Where this definition or the software tests described in <a href="#heading=h.rafv96b0uwer">section 10</a> is silent, ambiguous, or incomplete, it is the responsibility of the device
328implementer to ensure compatibility with existing implementations.</p>
329
330<p>For this reason, the Android Open Source Project [<a href="http://source.android.com/">Resources, 2</a>] is both the reference and preferred implementation of Android. Device
331implementers are strongly encouraged to base their implementations to the
332greatest extent possible on the "upstream" source code available from the
333Android Open Source Project. While some components can hypothetically be
334replaced with alternate implementations this practice is strongly discouraged,
335as passing the software tests will become substantially more difficult. It is
336the implementer's responsibility to ensure full behavioral compatibility with
337the standard Android implementation, including and beyond the Compatibility
338Test Suite. Finally, note that certain component substitutions and
339modifications are explicitly forbidden by this document.</p>
340
341<p>Many of the resources listed in <a href="#heading=h.jhgs5yq2lqtj">section 14</a> are derived directly or indirectly from the Android SDK, and will be
342functionally identical to the information in that SDK's documentation. For any
343case where this Compatibility Definition or the Compatibility Test Suite
344disagrees with the SDK documentation, the SDK documentation is considered
345authoritative. Any technical details provided in the references included in <a href="#heading=h.jhgs5yq2lqtj">section 14</a> are considered by inclusion to be part of this Compatibility Definition. </p>
346
347<h1 id=2_device_types>2. Device Types</h1>
348
349
350<p>While the Android Open Source Project has been used in the implementation of a
351variety of device types and form factors, many aspects of the architecture and
352compatibility requirements were optimized for handheld devices. Starting from
353Android 5.0, the Android Open Source Project aims to embrace a wider variety of
354device types as described in this section.</p>
355
356<p><strong>Android Handheld device</strong> refers to an Android device implementation that is typically used by holding
357it in the hand, such as mp3 players, phones, and tablets. Android Handheld
358device implementations:</p>
359
360<ul>
361 <li> MUST have a touchscreen embedded in the device
362 <li> MUST have a power source that provides mobility, such as a battery
363</ul>
364
365<p><strong>Android Television device</strong> refers to an Android device implementation that is an entertainment interface
366for consuming digital media, movies, games, apps, and/or live TV for users
367sitting about ten feet away (a “lean back” or “10-foot user interface”).
368Android Television devices:</p>
369
370<ul>
371 <li> MUST have an embedded screen OR include a video output port, such as VGA, HDMI,
372or a wireless port for display
373 <li> MUST declare the features android.software.leanback and
374android.hardware.type.television [<a href="http://developer.android.com/reference/android/content/pm/PackageManager.html#FEATURE_LEANBACK">Resources, 3</a>]
375</ul>
376
377<p><strong>Android Watch device</strong> refers to an Android device implementation intended to be worn on the body,
378perhaps on the wrist, and:</p>
379
380<ul>
381 <li> MUST have a screen with the physical diagonal length in the range from 1.1 to
3822.5 inches
383 <li> MUST declare the feature android.hardware.type.watch
384 <li> MUST support uiMode = UI_MODE_TYPE_WATCH [<a href="http://developer.android.com/reference/android/content/res/Configuration.html#UI_MODE_TYPE_WATCH">Resources, 4</a>]
385</ul>
386
387<p>All Android device implementations that do not fit into any of the above device
388types still MUST meet all requirements in this document to be Android 5.0
389compatible, unless the requirement is explicitly described to be only
390applicable to a specific Android device type. </p>
391
392<h2 id=2_1_device_configurations>2.1 Device Configurations</h2>
393
394
395<p>This is a summary of major differences in hardware configuration by device
396type. (Empty cells denote a “MAY”). Not all configurations are covered in this
397table; see relevant hardware sections for more detail.</p>
398<table>
399 <tr>
400 <td class="tab0">
401<p><strong>Category</strong></p>
402</td>
403 <td class="tab0">
404<p><strong>Feature </strong></p>
405</td>
406 <td class="tab0">
407<p><strong>Section</strong></p>
408</td>
409 <td class="tab0">
410<p><strong>Handheld</strong></p>
411</td>
412 <td class="tab0">
413<p><strong>Television</strong></p>
414</td>
415 <td class="tab0">
416<p><strong>Watch</strong></p>
417</td>
418 <td class="tab0">
419<p><strong>Other</strong></p>
420</td>
421 </tr>
422 <tr>
423 <td>
424<p>Input</p>
425</td>
426 <td>
427<p>D-pad</p>
428</td>
429 <td>
430<p><a href="#heading=h.h86aqgcxrqbz">7.2.2. Non-touch Navigation</a></p>
431</td>
432 <td></td>
433 <td>
434<p>MUST</p>
435</td>
436 <td></td>
437 <td></td>
438 </tr>
439 <tr>
440 <td></td>
441 <td>
442<p>Touchscreen </p>
443</td>
444 <td>
445<p> <a href="#heading=h.p7pmjzzatkph">7.2.4. Touchscreen input</a></p>
446</td>
447 <td>
448<p>MUST</p>
449</td>
450 <td></td>
451 <td>
452<p>MUST</p>
453</td>
454 <td>
455<p>SHOULD</p>
456</td>
457 </tr>
458 <tr>
459 <td></td>
460 <td>
461<p>Microphone </p>
462</td>
463 <td>
464<p><a href="#heading=h.74o7ndqnyrjr">7.8.1. Microphone</a></p>
465</td>
466 <td>
467<p>MUST</p>
468</td>
469 <td>
470<p>SHOULD </p>
471</td>
472 <td>
473<p>MUST</p>
474</td>
475 <td>
476<p>SHOULD</p>
477</td>
478 </tr>
479 <tr>
480 <td>
481<p>Sensors</p>
482</td>
483 <td>
484<p>Accelerometer </p>
485</td>
486 <td>
487<p><a href="#heading=h.3u857dtnrtuj">7.3.1 Accelerometer</a></p>
488</td>
489 <td>
490<p>SHOULD</p>
491</td>
492 <td></td>
493 <td>
494<p>SHOULD</p>
495</td>
496 <td>
497<p>SHOULD</p>
498</td>
499 </tr>
500 <tr>
501 <td></td>
502 <td>
503<p>GPS </p>
504</td>
505 <td>
506<p><a href="#heading=h.2x1nre62p60d">7.3.3. GPS</a></p>
507</td>
508 <td>
509<p>SHOULD</p>
510</td>
511 <td></td>
512 <td></td>
513 <td></td>
514 </tr>
515 <tr>
516 <td>
517<p>Connectivity</p>
518</td>
519 <td>
520<p>Wi-Fi </p>
521</td>
522 <td>
523<p><a href="#heading=h.39g0jrqcl40">7.4.2. IEEE 802.11</a></p>
524</td>
525 <td>
526<p>SHOULD</p>
527</td>
528 <td>
529<p> MUST</p>
530</td>
531 <td></td>
532 <td>
533<p>SHOULD</p>
534</td>
535 </tr>
536 <tr>
537 <td></td>
538 <td>
539<p>Wi-Fi Direct </p>
540</td>
541 <td>
542<p><a href="#heading=h.82i6ovyqynfx">7.4.2.1. Wi-Fi Direct</a></p>
543</td>
544 <td>
545<p>SHOULD</p>
546</td>
547 <td>
548<p>SHOULD</p>
549</td>
550 <td></td>
551 <td>
552<p>SHOULD</p>
553</td>
554 </tr>
555 <tr>
556 <td></td>
557 <td>
558<p>Bluetooth </p>
559</td>
560 <td>
561<p><a href="#heading=h.420i0exy2mxj">7.4.3. Bluetooth</a></p>
562</td>
563 <td>
564<p>SHOULD</p>
565</td>
566 <td>
567<p>MUST</p>
568</td>
569 <td>
570<p>MUST</p>
571</td>
572 <td>
573<p>SHOULD</p>
574</td>
575 </tr>
576 <tr>
577 <td></td>
578 <td>
579<p>Bluetooth Low Energy </p>
580</td>
581 <td>
582<p><a href="#heading=h.420i0exy2mxj">7.4.3. Bluetooth</a></p>
583</td>
584 <td>
585<p>SHOULD</p>
586</td>
587 <td>
588<p>MUST</p>
589</td>
590 <td>
591<p>SHOULD</p>
592</td>
593 <td>
594<p>SHOULD</p>
595</td>
596 </tr>
597 <tr>
598 <td></td>
599 <td>
600<p>USB peripheral/ host mode </p>
601</td>
602 <td>
603<p><a href="#heading=h.rp4zc78xvn6s">7.7. USB</a></p>
604</td>
605 <td>
606<p>SHOULD</p>
607</td>
608 <td>
609<p> </p>
610</td>
611 <td></td>
612 <td>
613<p>SHOULD</p>
614</td>
615 </tr>
616 <tr>
617 <td>
618<p>Output</p>
619</td>
620 <td>
621<p>Speaker and/or Audio output ports </p>
622</td>
623 <td>
624<p><a href="#heading=h.ro0d402dzkaq">7.8.2. Audio Output</a></p>
625</td>
626 <td>
627<p>MUST</p>
628</td>
629 <td>
630<p>MUST</p>
631</td>
632 <td></td>
633 <td>
634<p>MUST</p>
635</td>
636 </tr>
637</table>
638
639
640<h1 id=3_software>3. Software</h1>
641
642
643<h2 id=3_1_managed_api_compatibility>3.1. Managed API Compatibility</h2>
644
645
646<p>The managed Dalvik bytecode execution environment is the primary vehicle for
647Android applications. The Android application programming interface (API) is
648the set of Android platform interfaces exposed to applications running in the
649managed runtime environment. Device implementations MUST provide complete
650implementations, including all documented behaviors, of any documented API
651exposed by the Android SDK [<a href="http://developer.android.com/reference/packages.html">Resources, 5</a>] or any API decorated with the "@SystemApi" marker in the upstream Android
652source code. </p>
653
654<p>Device implementations MUST NOT omit any managed APIs, alter API interfaces or
655signatures, deviate from the documented behavior, or include no-ops, except
656where specifically allowed by this Compatibility Definition.</p>
657
658<p>This Compatibility Definition permits some types of hardware for which Android
659includes APIs to be omitted by device implementations. In such cases, the APIs
660MUST still be present and behave in a reasonable way. See <a href="#heading=h.5h5uvpadidzr">section 7</a> for specific requirements for this scenario.</p>
661
662<h2 id=3_2_soft_api_compatibility>3.2. Soft API Compatibility</h2>
663
664
665<p>In addition to the managed APIs from <a href="#heading=h.kr68507hndy4">section 3.1</a>, Android also includes a significant runtime-only "soft" API, in the form of
666such things as intents, permissions, and similar aspects of Android
667applications that cannot be enforced at application compile time.</p>
668
669<h3 id=3_2_1_permissions>3.2.1. Permissions</h3>
670
671
672<p>Device implementers MUST support and enforce all permission constants as
673documented by the Permission reference page [<a href="http://developer.android.com/reference/android/Manifest.permission.html">Resources, 6]</a>. Note that <a href="#heading=h.a32osmf1tmwt">section 9</a> lists additional requirements related to the Android security model.</p>
674
675<h3 id=3_2_2_build_parameters>3.2.2. Build Parameters</h3>
676
677
678<p>The Android APIs include a number of constants on the android.os.Build class [<a href="http://developer.android.com/reference/android/os/Build.html">Resources, 7</a>] that are intended to describe the current device. To provide consistent,
679meaningful values across device implementations, the table below includes
680additional restrictions on the formats of these values to which device
681implementations MUST conform.</p>
682<table>
683 <tr>
684 <td class="tab0">
685<p><strong>Parameter</strong></p>
686</td>
687 <td class="tab0">
688<p><strong>Details</strong></p>
689</td>
690 </tr>
691 <tr>
692 <td>
693<p>VERSION.RELEASE</p>
694</td>
695 <td>
696<p>The version of the currently-executing Android system, in human-readable
697format. This field MUST have one of the string values defined in [<a href="http://source.android.com/compatibility/5.0/versions.html">Resources, 8]</a>.</p>
698</td>
699 </tr>
700 <tr>
701 <td>
702<p>VERSION.SDK</p>
703</td>
704 <td>
705<p>The version of the currently-executing Android system, in a format accessible
706to third-party application code. For Android 5.0, this field MUST have the
707integer value 21.</p>
708</td>
709 </tr>
710 <tr>
711 <td>
712<p>VERSION.SDK_INT</p>
713</td>
714 <td>
715<p>The version of the currently-executing Android system, in a format accessible
716to third-party application code. For Android 5.0, this field MUST have the
717integer value 21.</p>
718</td>
719 </tr>
720 <tr>
721 <td>
722<p>VERSION.INCREMENTAL</p>
723</td>
724 <td>
725<p>A value chosen by the device implementer designating the specific build of the
726currently-executing Android system, in human-readable format. This value MUST
727NOT be reused for different builds made available to end users. A typical use
728of this field is to indicate which build number or source-control change
729identifier was used to generate the build. There are no requirements on the
730specific format of this field, except that it MUST NOT be null or the empty
731string ("").</p>
732</td>
733 </tr>
734 <tr>
735 <td>
736<p>BOARD</p>
737</td>
738 <td>
739<p>A value chosen by the device implementer identifying the specific internal
740hardware used by the device, in human-readable format. A possible use of this
741field is to indicate the specific revision of the board powering the device.
742The value of this field MUST be encodable as 7-bit ASCII and match the regular
743expression "^[a-zA-Z0-9_-]+$".</p>
744</td>
745 </tr>
746 <tr>
747 <td>
748<p>BRAND</p>
749</td>
750 <td>
751<p>A value reflecting the brand name associated with the device as known to the
752end users. MUST be in human-readable format and SHOULD represent the
753manufacturer of the device or the company brand under which the device is
754marketed. The value of this field MUST be encodable as 7-bit ASCII and match
755the regular expression "^[a-zA-Z0-9_-]+$".</p>
756</td>
757 </tr>
758 <tr>
759 <td class="tab1">
760<p>SUPPORTED_ABIS</p>
761</td>
762 <td>
763<p>The name of the instruction set (CPU type + ABI convention) of native code. See <a href="#heading=h.3dpths90svxf">section 3.3. Native API Compatibility</a>.</p>
764</td>
765 </tr>
766 <tr>
767 <td class="tab1">
768<p>SUPPORTED_32_BIT_ABIS</p>
769</td>
770 <td>
771<p>The name of the instruction set (CPU type + ABI convention) of native code. See <a href="#heading=h.3dpths90svxf">section 3.3. Native API Compatibility</a>.</p>
772</td>
773 </tr>
774 <tr>
775 <td class="tab1">
776<p>SUPPORTED_64_BIT_ABIS</p>
777</td>
778 <td>
779<p>The name of the second instruction set (CPU type + ABI convention) of native
780code. See <a href="#heading=h.3dpths90svxf">section 3.3. Native API Compatibility</a>.</p>
781</td>
782 </tr>
783 <tr>
784 <td>
785<p>CPU_ABI</p>
786</td>
787 <td>
788<p>The name of the instruction set (CPU type + ABI convention) of native code. See <a href="#heading=h.3dpths90svxf">section 3.3. Native API Compatibility</a>.</p>
789</td>
790 </tr>
791 <tr>
792 <td>
793<p>CPU_ABI2</p>
794</td>
795 <td>
796<p>The name of the second instruction set (CPU type + ABI convention) of native
797code. See <a href="#heading=h.3dpths90svxf">section 3.3. Native API Compatibility</a>.</p>
798</td>
799 </tr>
800 <tr>
801 <td>
802<p>DEVICE</p>
803</td>
804 <td>
805<p>A value chosen by the device implementer containing the development name or
806code name identifying the configuration of the hardware features and industrial
807design of the device. The value of this field MUST be encodable as 7-bit ASCII
808and match the regular expression "^[a-zA-Z0-9_-]+$".</p>
809</td>
810 </tr>
811 <tr>
812 <td>
813<p>FINGERPRINT</p>
814</td>
815 <td>
816<p>A string that uniquely identifies this build. It SHOULD be reasonably
817human-readable. It MUST follow this template:</p>
818
819<p>$(BRAND)/$(PRODUCT)/$(DEVICE):$(VERSION.RELEASE)/$(ID)/$(VERSION.INCREMENTAL):$(TYPE)/$(TAGS)</p>
820
821<p>For example:</p>
822
823<p>acme/myproduct/mydevice:5.0/LRWXX/3359:userdebug/test-keys</p>
824
825<p>The fingerprint MUST NOT include whitespace characters. If other fields
826included in the template above have whitespace characters, they MUST be
827replaced in the build fingerprint with another character, such as the
828underscore ("_") character. The value of this field MUST be encodable as 7-bit
829ASCII.</p>
830</td>
831 </tr>
832 <tr>
833 <td>
834<p>HARDWARE</p>
835</td>
836 <td>
837<p>The name of the hardware (from the kernel command line or /proc). It SHOULD be
838reasonably human-readable. The value of this field MUST be encodable as 7-bit
839ASCII and match the regular expression "^[a-zA-Z0-9_-]+$". </p>
840</td>
841 </tr>
842 <tr>
843 <td>
844<p>HOST</p>
845</td>
846 <td>
847<p>A string that uniquely identifies the host the build was built on, in
848human-readable format. There are no requirements on the specific format of this
849field, except that it MUST NOT be null or the empty string ("").</p>
850</td>
851 </tr>
852 <tr>
853 <td>
854<p>ID</p>
855</td>
856 <td>
857<p>An identifier chosen by the device implementer to refer to a specific release,
858in human-readable format. This field can be the same as
859android.os.Build.VERSION.INCREMENTAL, but SHOULD be a value sufficiently
860meaningful for end users to distinguish between software builds. The value of
861this field MUST be encodable as 7-bit ASCII and match the regular expression
862"^[a-zA-Z0-9._-]+$".</p>
863</td>
864 </tr>
865 <tr>
866 <td>
867<p>MANUFACTURER</p>
868</td>
869 <td>
870<p>The trade name of the Original Equipment Manufacturer (OEM) of the product.
871There are no requirements on the specific format of this field, except that it
872MUST NOT be null or the empty string ("").</p>
873</td>
874 </tr>
875 <tr>
876 <td>
877<p>MODEL</p>
878</td>
879 <td>
880<p>A value chosen by the device implementer containing the name of the device as
881known to the end user. This SHOULD be the same name under which the device is
882marketed and sold to end users. There are no requirements on the specific
883format of this field, except that it MUST NOT be null or the empty string ("").</p>
884</td>
885 </tr>
886 <tr>
887 <td>
888<p>PRODUCT</p>
889</td>
890 <td>
891<p>A value chosen by the device implementer containing the development name or
892code name of the specific product (SKU) that MUST be unique within the same
893brand. MUST be human-readable, but is not necessarily intended for view by end
894users. The value of this field MUST be encodable as 7-bit ASCII and match the
895regular expression "^[a-zA-Z0-9_-]+$".</p>
896</td>
897 </tr>
898 <tr>
899 <td>
900<p>SERIAL</p>
901</td>
902 <td>
903<p>A hardware serial number, which MUST be available. The value of this field MUST
904be encodable as 7-bit ASCII and match the regular expression
905"^([a-zA-Z0-9]{6,20})$".</p>
906</td>
907 </tr>
908 <tr>
909 <td>
910<p>TAGS</p>
911</td>
912 <td>
913<p>A comma-separated list of tags chosen by the device implementer that further
914distinguishes the build. This field MUST have one of the values corresponding
915to the three typical Android platform signing configurations: release-keys,
916dev-keys, test-keys. </p>
917</td>
918 </tr>
919 <tr>
920 <td>
921<p>TIME</p>
922</td>
923 <td>
924<p>A value representing the timestamp of when the build occurred.</p>
925</td>
926 </tr>
927 <tr>
928 <td>
929<p>TYPE</p>
930</td>
931 <td>
932<p>A value chosen by the device implementer specifying the runtime configuration
933of the build. This field MUST have one of the values corresponding to the three
934typical Android runtime configurations: user, userdebug, or eng.</p>
935</td>
936 </tr>
937 <tr>
938 <td>
939<p>USER</p>
940</td>
941 <td>
942<p>A name or user ID of the user (or automated user) that generated the build.
943There are no requirements on the specific format of this field, except that it
944MUST NOT be null or the empty string ("").</p>
945</td>
946 </tr>
947</table>
948
949
950<h3 id=3_2_3_intent_compatibility>3.2.3. Intent Compatibility</h3>
951
952
953<p>Device implementations MUST honor Android's loose-coupling intent system, as
954described in the sections below. By "honored", it is meant that the device
955implementer MUST provide an Android Activity or Service that specifies a
956matching intent filter that binds to and implements correct behavior for each
957specified intent pattern.</p>
958
959<h4 id=3_2_3_1_core_application_intents>3.2.3.1. Core Application Intents</h4>
960
961
962<p>Android intents allow application components to request functionality from
963other Android components. The Android upstream project includes a list of
964applications considered core Android applications, which implements several
965intent patterns to perform common actions. The core Android applications are:</p>
966
967<ul>
968 <li> Desk Clock
969 <li> Browser
970 <li> Calendar
971 <li> Contacts
972 <li> Gallery
973 <li> GlobalSearch
974 <li> Launcher
975 <li> Music
976 <li> Settings
977</ul>
978
979<p>Device implementations SHOULD include the core Android applications as
980appropriate but MUST include a component implementing the same intent patterns
981defined by all the “public” Activity or Service components of these core
982Android applications. Note that Activity or Service components are considered
983"public" when the attribute android:exported is absent or has the value true.</p>
984
985<h4 id=3_2_3_2_intent_overrides>3.2.3.2. Intent Overrides</h4>
986
987
988<p>As Android is an extensible platform, device implementations MUST allow each
989intent pattern referenced in <a href="#heading=h.qiy4ddbiirgy">section 3.2.3.1</a> to be overridden by third-party applications. The upstream Android open source
990implementation allows this by default; device implementers MUST NOT attach
991special privileges to system applications' use of these intent patterns, or
992prevent third-party applications from binding to and assuming control of these
993patterns. This prohibition specifically includes but is not limited to
994disabling the "Chooser" user interface that allows the user to select between
995multiple applications that all handle the same intent pattern.</p>
996
997<p>However, device implementations MAY provide default activities for specific URI
998patterns (eg. http://play.google.com) if the default activity provides a more
999specific filter for the data URI. For example, an intent filter specifying the
1000data URI "http://www.android.com" is more specific than the browser filter for
1001"http://". Device implementations MUST provide a user interface for users to
1002modify the default activity for intents.</p>
1003
1004<h4 id=3_2_3_3_intent_namespaces>3.2.3.3. Intent Namespaces</h4>
1005
1006
1007<p>Device implementations MUST NOT include any Android component that honors any
1008new intent or broadcast intent patterns using an ACTION, CATEGORY, or other key
1009string in the android.* or com.android.* namespace. Device implementers MUST
1010NOT include any Android components that honor any new intent or broadcast
1011intent patterns using an ACTION, CATEGORY, or other key string in a package
1012space belonging to another organization. Device implementers MUST NOT alter or
1013extend any of the intent patterns used by the core apps listed in <a href="#heading=h.qiy4ddbiirgy">section 3.2.3.1</a>. Device implementations MAY include intent patterns using namespaces clearly
1014and obviously associated with their own organization. This prohibition is
1015analogous to that specified for Java language classes in <a href="#heading=h.blmhfmxlmvir">section 3.6</a>.</p>
1016
1017<h4 id=3_2_3_4_broadcast_intents>3.2.3.4. Broadcast Intents</h4>
1018
1019
1020<p>Third-party applications rely on the platform to broadcast certain intents to
1021notify them of changes in the hardware or software environment.
1022Android-compatible devices MUST broadcast the public broadcast intents in
1023response to appropriate system events. Broadcast intents are described in the
1024SDK documentation.</p>
1025
1026<h4 id=3_2_3_5_default_app_settings>3.2.3.5. Default App Settings</h4>
1027
1028
1029<p>Android includes settings that provide users an easy way to select their
1030default applications, for example for Home screen or SMS. Where it makes sense,
1031device implementations MUST provide a similar settings menu and be compatible
1032with the intent filter pattern and API methods described in the SDK
1033documentation as below.</p>
1034
1035<p>Device implementations:</p>
1036
1037<ul>
1038 <li> MUST honor the android.settings.HOME_SETTINGS intent to show a default app
1039settings menu for Home Screen, if the device implementation reports
1040android.software.home_screen [<a href="http://developer.android.com/reference/android/provider/Settings.html">Resources, 10]</a>
1041 <li> MUST provide a settings menu that will call the
1042android.provider.Telephony.ACTION_CHANGE_DEFAULT intent to show a dialog to
1043change the default SMS application, if the device implementation reports
1044android.hardware.telephony [<a href="https://developer.android.com/reference/android/provider/Telephony.Sms.Intents.html">Resources, 9</a>]
1045 <li> MUST honor the android.settings.NFC_PAYMENT_SETTINGS intent to show a default
1046app settings menu for Tap and Pay, if the device implementation reports
1047android.hardware.nfc.hce [<a href="http://developer.android.com/reference/android/provider/Settings.html">Resources, 10]</a>
1048</ul>
1049
1050<h2 id=3_3_native_api_compatibility>3.3. Native API Compatibility</h2>
1051
1052
1053<h3 id=3_3_1_application_binary_interfaces>3.3.1 Application Binary Interfaces</h3>
1054
1055
1056<p>Managed Dalvik bytecode can call into native code provided in the application
1057.apk file as an ELF .so file compiled for the appropriate device hardware
1058architecture. As native code is highly dependent on the underlying processor
1059technology, Android defines a number of Application Binary Interfaces (ABIs) in
1060the Android NDK. Device implementations MUST be compatible with one or more
1061defined ABIs, and MUST implement compatibility with the Android NDK, as below.</p>
1062
1063<p>If a device implementation includes support for an Android ABI, it:</p>
1064
1065<ul>
1066 <li> MUST include support for code running in the managed environment to call into
1067native code, using the standard Java Native Interface (JNI) semantics
1068 <li> MUST be source-compatible (i.e. header compatible) and binary-compatible (for
1069the ABI) with each required library in the list below
1070 <li> MUST support the equivalent 32-bit ABI if any 64-bit ABI is supported
1071 <li> MUST accurately report the native Application Binary Interface (ABI) supported
1072by the device, via the android.os.Build.SUPPORTED_ABIS,
1073android.os.Build.SUPPORTED_32_BIT_ABIS, and
1074android.os.Build.SUPPORTED_64_BIT_ABIS parameters, each a comma separated list
1075of ABIs ordered from the most to the least preferred one
1076 <li> MUST report, via the above parameters, only those ABIs documented in the latest
1077version of the Android NDK, “NDK Programmer's Guide | ABI Management” in docs/
1078directory
1079 <li> SHOULD be built using the source code and header files available in the
1080upstream Android Open Source Project
1081</ul>
1082
1083<p>The following native code APIs MUST be available to apps that include native
1084code:</p>
1085
1086<ul>
1087 <li> libc (C library)
1088 <li> libm (math library)
1089 <li> Minimal support for C++
1090 <li> JNI interface
1091 <li> liblog (Android logging)
1092 <li> libz (Zlib compression)
1093 <li> libdl (dynamic linker)
1094 <li> libGLESv1_CM.so (OpenGL ES 1.x)
1095 <li> libGLESv2.so (OpenGL ES 2.0)
1096 <li> libGLESv3.so (OpenGL ES 3.x)
1097 <li> libEGL.so (native OpenGL surface management)
1098 <li> libjnigraphics.so
1099 <li> libOpenSLES.so (OpenSL ES 1.0.1 audio support)
1100 <li> libOpenMAXAL.so (OpenMAX AL 1.0.1 support)
1101 <li> libandroid.so (native Android activity support)
1102 <li> libmediandk.so (native media APIs support)
1103 <li> Support for OpenGL, as described below
1104</ul>
1105
1106<p>Note that future releases of the Android NDK may introduce support for
1107additional ABIs. If a device implementation is not compatible with an existing
1108predefined ABI, it MUST NOT report support for any ABIs at all.</p>
1109
1110<p>Note that device implementations MUST include libGLESv3.so and it MUST symlink
1111(symbolic link) to libGLESv2.so. in turn, MUST export all the OpenGL ES 3.1 and
1112Android Extension Pack [<a href="http://developer.android.com/guide/topics/graphics/opengl.html#aep">Resources, 11</a>] function symbols as defined in the NDK release android-21. Although all the
1113symbols must be present, only the corresponding functions for OpenGL ES
1114versions and extensions actually supported by the device must be fully
1115implemented.</p>
1116
1117<p>Native code compatibility is challenging. For this reason, device implementers
1118are <strong>very strongly encouraged</strong> to use the implementations of the libraries listed above from the upstream
1119Android Open Source Project. </p>
1120
1121<h2 id=3_4_web_compatibility>3.4. Web Compatibility</h2>
1122
1123
1124<h3 id=3_4_1_webview_compatibility>3.4.1. WebView Compatibility</h3>
1125
1126<table>
1127 <tr>
1128 <td class="tab2"></td>
1129 <td>
1130<p>The complete implementation of the android.webkit.Webview API MAY be provided
1131on Android Watch devices but MUST be provided on all other types of device
1132implementations.</p>
1133</td>
1134 </tr>
1135</table>
1136
1137
1138<p>The platform feature android.software.webview MUST be reported on any device
1139that provides a complete implementation of the android.webkit.WebView API, and
1140MUST NOT be reported on devices without a complete implementation of the API.
1141The Android Open Source implementation uses code from the Chromium Project to
1142implement the android.webkit.WebView [<a href="http://developer.android.com/reference/android/webkit/WebView.html">Resources, 12</a>]. Because it is not feasible to develop a comprehensive test suite for a web
1143rendering system, device implementers MUST use the specific upstream build of
1144Chromium in the WebView implementation. Specifically:</p>
1145
1146<ul>
1147 <li> Device android.webkit.WebView implementations MUST be based on the Chromium
1148build from the upstream Android Open Source Project for Android 5.0. This build
1149includes a specific set of functionality and security fixes for the WebView [<a href="http://www.chromium.org/">Resources, 13</a>].
1150 <li> The user agent string reported by the WebView MUST be in this format:
1151</ul>
1152
1153<p>Mozilla/5.0 (Linux; Android $(VERSION); $(MODEL) Build/$(BUILD))
1154AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 $(CHROMIUM_VER) Mobile
1155Safari/537.36</p>
1156 <ul>
1157 <li> The value of the $(VERSION) string MUST be the same as the value for
1158android.os.Build.VERSION.RELEASE.
1159 <li> The value of the $(MODEL) string MUST be the same as the value for
1160android.os.Build.MODEL.
1161 <li> The value of the $(BUILD) string MUST be the same as the value for
1162android.os.Build.ID.
1163 <li> The value of the $(CHROMIUM_VER) string MUST be the version of Chromium in the
1164upstream Android Open Source Project.
1165 <li> Device implementations MAY omit Mobile in the user agent string.
1166 </ul>
1167
1168<p>The WebView component SHOULD include support for as many HTML5 features as
1169possible and if it supports the feature SHOULD conform to the HTML5
1170specification [<a href="https://www.google.com/url?q=https%3A%2F%2Fhtml.spec.whatwg.org%2Fmultipage%2F&sa=D&sntz=1&usg=AFQjCNH7pPjEWho8n19H_n0ZXrQbI9RVlg">Resources, 14</a>].</p>
1171
1172<h3 id=3_4_2_browser_compatibility>3.4.2. Browser Compatibility</h3>
1173
1174<table>
1175 <tr>
1176 <td class="tab2"></td>
1177 <td>
1178<p>Android Television and Watch Devices MAY omit a browser application, but MUST
1179support the public intent patterns as described in <a href="#heading=h.qiy4ddbiirgy">section 3.2.3.1</a>. All other types of device implementations MUST include a standalone Browser
1180application for general user web browsing. </p>
1181</td>
1182 </tr>
1183</table>
1184
1185
1186<p>The standalone Browser MAY be based on a browser technology other than WebKit.
1187However, even if an alternate Browser application is used, the
1188android.webkit.WebView component provided to third-party applications MUST be
1189based on WebKit, as described in <a href="#heading=h.swqsalizdkk8">section 3.4.1</a>.</p>
1190
1191<p>Implementations MAY ship a custom user agent string in the standalone Browser
1192application.</p>
1193
1194<p>The standalone Browser application (whether based on the upstream WebKit
1195Browser application or a third-party replacement) SHOULD include support for as
1196much of HTML5 [<a href="https://www.google.com/url?q=https%3A%2F%2Fhtml.spec.whatwg.org%2Fmultipage%2F&sa=D&sntz=1&usg=AFQjCNH7pPjEWho8n19H_n0ZXrQbI9RVlg">Resources, 14</a>] as possible. Minimally, device implementations MUST support each of these
1197APIs associated with HTML5:</p>
1198
1199<ul>
1200 <li> application cache/offline operation [<a href="http://www.w3.org/html/wg/drafts/html/master/browsers.html#offline">Resources, 15</a>]
1201 <li> the <video> tag [<a href="http://www.w3.org/html/wg/drafts/html/master/embedded-content.html#video">Resources, 16</a>]
1202 <li> geolocation [<a href="http://www.w3.org/TR/geolocation-API/">Resources, 17</a>]
1203</ul>
1204
1205<p>Additionally, device implementations MUST support the HTML5/W3C webstorage API
1206[<a href="http://www.w3.org/TR/webstorage/">Resources, 18</a>], and SHOULD support the HTML5/W3C IndexedDB API [<a href="http://www.w3.org/TR/IndexedDB/">Resources, 19</a>]. Note that as the web development standards bodies are transitioning to favor
1207IndexedDB over webstorage, IndexedDB is expected to become a required component
1208in a future version of Android.</p>
1209
1210<h2 id=3_5_api_behavioral_compatibility>3.5. API Behavioral Compatibility</h2>
1211
1212
1213<p>The behaviors of each of the API types (managed, soft, native, and web) must be
1214consistent with the preferred implementation of the upstream Android Open
1215Source Project [<a href="http://source.android.com/">Resources, 2</a>]. Some specific areas of compatibility are:</p>
1216
1217<ul>
1218 <li> Devices MUST NOT change the behavior or semantics of a standard intent.
1219 <li> Devices MUST NOT alter the lifecycle or lifecycle semantics of a particular
1220type of system component (such as Service, Activity, ContentProvider, etc.).
1221 <li> Devices MUST NOT change the semantics of a standard permission.
1222</ul>
1223
1224<p>The above list is not comprehensive. The Compatibility Test Suite (CTS) tests
1225significant portions of the platform for behavioral compatibility, but not all.
1226It is the responsibility of the implementer to ensure behavioral compatibility
1227with the Android Open Source Project. For this reason, device implementers
1228SHOULD use the source code available via the Android Open Source Project where
1229possible, rather than re-implement significant parts of the system.</p>
1230
1231<h2 id=3_6_api_namespaces>3.6. API Namespaces</h2>
1232
1233
1234<p>Android follows the package and class namespace conventions defined by the Java
1235programming language. To ensure compatibility with third-party applications,
1236device implementers MUST NOT make any prohibited modifications (see below) to
1237these package namespaces:</p>
1238
1239<ul>
1240 <li> java.*
1241 <li> javax.*
1242 <li> sun.*
1243 <li> android.*
1244 <li> com.android.*
1245</ul>
1246
1247<p><strong>Prohibited modifications include</strong>:</p>
1248
1249<ul>
1250 <li> Device implementations MUST NOT modify the publicly exposed APIs on the Android
1251platform by changing any method or class signatures, or by removing classes or
1252class fields.
1253 <li> Device implementers MAY modify the underlying implementation of the APIs, but
1254such modifications MUST NOT impact the stated behavior and Java-language
1255signature of any publicly exposed APIs.
1256 <li> Device implementers MUST NOT add any publicly exposed elements (such as classes
1257or interfaces, or fields or methods to existing classes or interfaces) to the
1258APIs above.
1259</ul>
1260
1261<p>A "publicly exposed element” is any construct which is not decorated with the
1262"@hide" marker as used in the upstream Android source code. In other words,
1263device implementers MUST NOT expose new APIs or alter existing APIs in the
1264namespaces noted above. Device implementers MAY make internal-only
1265modifications, but those modifications MUST NOT be advertised or otherwise
1266exposed to developers.</p>
1267
1268<p>Device implementers MAY add custom APIs, but any such APIs MUST NOT be in a
1269namespace owned by or referring to another organization. For instance, device
1270implementers MUST NOT add APIs to the com.google.* or similar namespace: only
1271Google may do so. Similarly, Google MUST NOT add APIs to other companies'
1272namespaces. Additionally, if a device implementation includes custom APIs
1273outside the standard Android namespace, those APIs MUST be packaged in an
1274Android shared library so that only apps that explicitly use them (via the
1275<uses-library> mechanism) are affected by the increased memory usage of such
1276APIs.</p>
1277
1278<p>If a device implementer proposes to improve one of the package namespaces above
1279(such as by adding useful new functionality to an existing API, or adding a new
1280API), the implementer SHOULD visit <a href="https://source.android.com/">source.android.com</a> and begin the process for contributing changes and code, according to the
1281information on that site.</p>
1282
1283<p>Note that the restrictions above correspond to standard conventions for naming
1284APIs in the Java programming language; this section simply aims to reinforce
1285those conventions and make them binding through inclusion in this Compatibility
1286Definition.</p>
1287
1288<h2 id=3_7_runtime_compatibility>3.7. Runtime Compatibility</h2>
1289
1290
1291<p>Device implementations MUST support the full Dalvik Executable (DEX) format and
1292Dalvik bytecode specification and semantics [<a href="https://android.googlesource.com/platform/dalvik/+/lollipop-release/docs/">Resources, 20</a>]. Device implementers SHOULD use ART, the reference upstream implementation of
1293the Dalvik Executable Format, and the reference implementation's package
1294management system.</p>
1295
1296<p>Device implementations MUST configure Dalvik runtimes to allocate memory in
1297accordance with the upstream Android platform, and as specified by the
1298following table. (See <a href="#heading=h.6fey5v3qb5m3">section 7.1.1</a> for screen size and screen density definitions.)</p>
1299
1300<p>Note that memory values specified below are considered minimum values and
1301device implementations MAY allocate more memory per application.</p>
1302<table>
1303 <tr>
1304 <td class="tab0">
1305<p><strong>Screen Layout</strong></p>
1306</td>
1307 <td class="tab0">
1308<p><strong>Screen Density</strong></p>
1309</td>
1310 <td class="tab0">
1311<p><strong>Minimum Application Memory</strong></p>
1312</td>
1313 </tr>
1314 <tr>
1315 <td>
1316<p>small / normal</p>
1317</td>
1318 <td>
1319<p>120 dpi (ldpi) </p>
1320</td>
1321 <td>
1322<p>16MB</p>
1323</td>
1324 </tr>
1325 <tr>
1326 <td></td>
1327 <td>
1328<p>160 dpi (mdpi)</p>
1329</td>
1330 <td></td>
1331 </tr>
1332 <tr>
1333 <td></td>
1334 <td>
1335<p>213 dpi (tvdpi)</p>
1336</td>
1337 <td>
1338<p>32MB</p>
1339</td>
1340 </tr>
1341 <tr>
1342 <td></td>
1343 <td>
1344<p>240 dpi (hdpi)</p>
1345</td>
1346 <td></td>
1347 </tr>
1348 <tr>
1349 <td></td>
1350 <td>
1351<p>320 dpi (xhdpi)</p>
1352</td>
1353 <td>
1354<p>64MB</p>
1355</td>
1356 </tr>
1357 <tr>
1358 <td></td>
1359 <td>
1360<p>400 dpi (400dpi)</p>
1361</td>
1362 <td>
1363<p>96MB</p>
1364</td>
1365 </tr>
1366 <tr>
1367 <td></td>
1368 <td>
1369<p>480 dpi (xxhdpi)</p>
1370</td>
1371 <td>
1372<p>128MB</p>
1373</td>
1374 </tr>
1375 <tr>
1376 <td></td>
1377 <td>
1378<p>560 dpi (560dpi)</p>
1379</td>
1380 <td>
1381<p>192MB</p>
1382</td>
1383 </tr>
1384 <tr>
1385 <td></td>
1386 <td>
1387<p>640 dpi (xxxhdpi)</p>
1388</td>
1389 <td>
1390<p>256MB</p>
1391</td>
1392 </tr>
1393 <tr>
1394 <td>
1395<p>large</p>
1396</td>
1397 <td>
1398<p>120 dpi (ldpi) </p>
1399</td>
1400 <td>
1401<p>16MB</p>
1402</td>
1403 </tr>
1404 <tr>
1405 <td></td>
1406 <td>
1407<p>160 dpi (mdpi)</p>
1408</td>
1409 <td>
1410<p>32MB</p>
1411</td>
1412 </tr>
1413 <tr>
1414 <td></td>
1415 <td>
1416<p>213 dpi (tvdpi)</p>
1417</td>
1418 <td>
1419<p>64MB</p>
1420</td>
1421 </tr>
1422 <tr>
1423 <td></td>
1424 <td>
1425<p>240 dpi (hdpi)</p>
1426</td>
1427 <td></td>
1428 </tr>
1429 <tr>
1430 <td></td>
1431 <td>
1432<p>320 dpi (xhdpi)</p>
1433</td>
1434 <td>
1435<p>128MB</p>
1436</td>
1437 </tr>
1438 <tr>
1439 <td></td>
1440 <td>
1441<p>400 dpi (400dpi)</p>
1442</td>
1443 <td>
1444<p>192MB</p>
1445</td>
1446 </tr>
1447 <tr>
1448 <td></td>
1449 <td>
1450<p>480 dpi (xxhdpi)</p>
1451</td>
1452 <td>
1453<p>256MB</p>
1454</td>
1455 </tr>
1456 <tr>
1457 <td></td>
1458 <td>
1459<p>560 dpi (560dpi)</p>
1460</td>
1461 <td>
1462<p>384MB</p>
1463</td>
1464 </tr>
1465 <tr>
1466 <td></td>
1467 <td>
1468<p>640 dpi (xxxhdpi)</p>
1469</td>
1470 <td>
1471<p>512MB</p>
1472</td>
1473 </tr>
1474 <tr>
1475 <td>
1476<p>xlarge</p>
1477</td>
1478 <td>
1479<p>160 dpi (mdpi)</p>
1480</td>
1481 <td>
1482<p>64MB</p>
1483</td>
1484 </tr>
1485 <tr>
1486 <td></td>
1487 <td>
1488<p>213 dpi (tvdpi)</p>
1489</td>
1490 <td>
1491<p>96MB</p>
1492</td>
1493 </tr>
1494 <tr>
1495 <td></td>
1496 <td>
1497<p>240 dpi (hdpi)</p>
1498</td>
1499 <td></td>
1500 </tr>
1501 <tr>
1502 <td></td>
1503 <td>
1504<p>320 dpi (xhdpi)</p>
1505</td>
1506 <td>
1507<p>192MB</p>
1508</td>
1509 </tr>
1510 <tr>
1511 <td></td>
1512 <td>
1513<p>400 dpi (400dpi)</p>
1514</td>
1515 <td>
1516<p>288MB</p>
1517</td>
1518 </tr>
1519 <tr>
1520 <td></td>
1521 <td>
1522<p>480 dpi (xxhdpi)</p>
1523</td>
1524 <td>
1525<p>384MB</p>
1526</td>
1527 </tr>
1528 <tr>
1529 <td></td>
1530 <td>
1531<p>560 dpi (560dpi)</p>
1532</td>
1533 <td>
1534<p>576MB</p>
1535</td>
1536 </tr>
1537 <tr>
1538 <td></td>
1539 <td>
1540<p>640 dpi (xxxhdpi)</p>
1541</td>
1542 <td>
1543<p>768MB</p>
1544</td>
1545 </tr>
1546</table>
1547
1548
1549<h2 id=3_8_user_interface_compatibility>3.8. User Interface Compatibility</h2>
1550
1551
1552<h3 id=3_8_1_launcher_home_screen>3.8.1. Launcher (Home Screen)</h3>
1553
1554
1555<p>Android includes a launcher application (home screen) and support for
1556third-party applications to replace the device launcher (home screen). Device
1557implementations that allow third-party applications to replace the device home
1558screen MUST declare the platform feature android.software.home_screen.</p>
1559
1560<h3 id=3_8_2_widgets>3.8.2. Widgets</h3>
1561
1562<table>
1563 <tr>
1564 <td class="tab2"></td>
1565 <td>
1566<p>Widgets are optional for all Android device implementations, but SHOULD be
1567supported on Android Handheld devices.</p>
1568</td>
1569 </tr>
1570</table>
1571
1572
1573<p>Android defines a component type and corresponding API and lifecycle that
1574allows applications to expose an "AppWidget" to the end user [<a href="http://developer.android.com/guide/practices/ui_guidelines/widget_design.html">Resources, 21</a>] a feature that is strongly RECOMMENDED to be supported on Handheld Device
1575implementations. Device implementations that support embedding widgets on the
1576home screen MUST meet the following requirements and declare support for
1577platform feature android.software.app_widgets.</p>
1578
1579<ul>
1580 <li> Device launchers MUST include built-in support for AppWidgets, and expose user
1581interface affordances to add, configure, view, and remove AppWidgets directly
1582within the Launcher.
1583 <li> Device implementations MUST be capable of rendering widgets that are 4 x 4 in
1584the standard grid size. See the App Widget Design Guidelines in the Android SDK
1585documentation [<a href="http://developer.android.com/guide/practices/ui_guidelines/widget_design.html">Resources, 21</a>] for details.
1586 <li> Device implementations that include support for lock screen MAY support
1587application widgets on the lock screen.
1588</ul>
1589
1590<h3 id=3_8_3_notifications>3.8.3. Notifications</h3>
1591
1592
1593<p>Android includes APIs that allow developers to notify users of notable events [<a href="http://developer.android.com/guide/topics/ui/notifiers/notifications.html">Resources, 22</a>], using hardware and software features of the device.</p>
1594
1595<p>Some APIs allow applications to perform notifications or attract attention
1596using hardware—specifically sound, vibration, and light. Device implementations
1597MUST support notifications that use hardware features, as described in the SDK
1598documentation, and to the extent possible with the device implementation
1599hardware. For instance, if a device implementation includes a vibrator, it MUST
1600correctly implement the vibration APIs. If a device implementation lacks
1601hardware, the corresponding APIs MUST be implemented as no-ops. This behavior
1602is further detailed in <a href="#heading=h.5h5uvpadidzr">section 7</a>.</p>
1603
1604<p>Additionally, the implementation MUST correctly render all resources (icons,
1605sound files, etc.) provided for in the APIs [<a href="https://developer.android.com/guide/topics/resources/available-resources.html">Resources, 23</a>], or in the Status/System Bar icon style guide [<a href="http://developer.android.com/design/style/iconography.html">Resources, 24</a>]. Device implementers MAY provide an alternative user experience for
1606notifications than that provided by the reference Android Open Source
1607implementation; however, such alternative notification systems MUST support
1608existing notification resources, as above. </p>
1609
1610<p>Android includes support for various notifications, such as:</p>
1611
1612<ul>
1613 <li> <strong>Rich notifications</strong>—Interactive Views for ongoing notifications.
1614 <li> <strong>Heads-up notifications</strong>—Interactive Views users can act on or dismiss without leaving the current app.
1615 <li> <strong>Lockscreen notifications</strong>—Notifications shown over a lock screen with granular control on visibility.
1616</ul>
1617
1618<p>Device implementations MUST properly display and execute these notifications,
1619including the title/name, icon, text as documented in the Android APIs <a href="https://developer.android.com/design/patterns/notifications.html">[Resources, 25]</a>.</p>
1620
1621<p>Android includes Notification Listener Service APIs that allow apps (once
1622explicitly enabled by the user) to receive a copy of all notifications as they
1623are posted or updated. Device implementations MUST correctly and promptly send
1624notifications in their entirety to all such installed and user-enabled listener
1625services, including any and all metadata attached to the Notification object.</p>
1626
1627<h3 id=3_8_4_search>3.8.4. Search</h3>
1628
1629
1630<p>Android includes APIs [<a href="http://developer.android.com/reference/android/app/SearchManager.html">Resources, 26</a>] that allow developers to incorporate search into their applications, and
1631expose their application's data into the global system search. Generally
1632speaking, this functionality consists of a single, system-wide user interface
1633that allows users to enter queries, displays suggestions as users type, and
1634displays results. The Android APIs allow developers to reuse this interface to
1635provide search within their own apps, and allow developers to supply results to
1636the common global search user interface.</p>
1637
1638<p>Android device implementations SHOULD include global search, a single, shared,
1639system-wide search user interface capable of real-time suggestions in response
1640to user input. Device implementations SHOULD implement the APIs that allow
1641developers to reuse this user interface to provide search within their own
1642applications. Device implementations that implement the global search interface
1643MUST implement the APIs that allow third-party applications to add suggestions
1644to the search box when it is run in global search mode. If no third-party
1645applications are installed that make use of this functionality, the default
1646behavior SHOULD be to display web search engine results and suggestions.</p>
1647
1648<h3 id=3_8_5_toasts>3.8.5. Toasts</h3>
1649
1650
1651<p>Applications can use the "Toast" API to display short non-modal strings to the
1652end user, that disappear after a brief period of time [<a href="http://developer.android.com/reference/android/widget/Toast.html">Resources, 27</a>]. Device implementations MUST display Toasts from applications to end users in
1653some high-visibility manner.</p>
1654
1655<h3 id=3_8_6_themes>3.8.6. Themes</h3>
1656
1657
1658<p>Android provides "themes" as a mechanism for applications to apply styles
1659across an entire Activity or application.</p>
1660
1661<p>Android includes a "Holo" theme family as a set of defined styles for
1662application developers to use if they want to match the Holo theme look and
1663feel as defined by the Android SDK [<a href="http://developer.android.com/guide/topics/ui/themes.html">Resources, 28</a>]. Device implementations MUST NOT alter any of the Holo theme attributes
1664exposed to applications [<a href="http://developer.android.com/reference/android/R.style.html">Resources, 29</a>].</p>
1665
1666<p>Android 5.0 includes a “Material” theme family as a set of defined styles for
1667application developers to use if they want to match the design theme’s look and
1668feel across the wide variety of different Android device types. Device
1669implementations MUST support the “Material” theme family and MUST NOT alter any
1670of the Material theme attributes or their assets exposed to applications [<a href="http://developer.android.com/reference/android/R.style.html#Theme_Material">Resources, 30</a>].</p>
1671
1672<p>Android also includes a "Device Default" theme family as a set of defined
1673styles for application developers to use if they want to match the look and
1674feel of the device theme as defined by the device implementer. Device
1675implementations MAY modify the Device Default theme attributes exposed to
1676applications [<a href="http://developer.android.com/reference/android/R.style.html">Resources, 29</a>].</p>
1677
1678<p>Android supports a new variant theme with translucent system bars, which allows
1679application developers to fill the area behind the status and navigation bar
1680with their app content. To enable a consistent developer experience in this
1681configuration, it is important the status bar icon style is maintained across
1682different device implementations. Therefore, Android device implementations
1683MUST use white for system status icons (such as signal strength and battery
1684level) and notifications issued by the system, unless the icon is indicating a
1685problematic status [<a href="http://developer.android.com/reference/android/R.style.html">Resources, 29</a>].</p>
1686
1687<h3 id=3_8_7_live_wallpapers>3.8.7. Live Wallpapers</h3>
1688
1689
1690<p>Android defines a component type and corresponding API and lifecycle that
1691allows applications to expose one or more "Live Wallpapers" to the end user [<a href="http://developer.android.com/reference/android/service/wallpaper/WallpaperService.html">Resources, 31</a>]. Live wallpapers are animations, patterns, or similar images with limited
1692input capabilities that display as a wallpaper, behind other applications.</p>
1693
1694<p>Hardware is considered capable of reliably running live wallpapers if it can
1695run all live wallpapers, with no limitations on functionality, at a reasonable
1696frame rate with no adverse effects on other applications. If limitations in the
1697hardware cause wallpapers and/or applications to crash, malfunction, consume
1698excessive CPU or battery power, or run at unacceptably low frame rates, the
1699hardware is considered incapable of running live wallpaper. As an example, some
1700live wallpapers may use an OpenGL 2.0 or 3.x context to render their content.
1701Live wallpaper will not run reliably on hardware that does not support multiple
1702OpenGL contexts because the live wallpaper use of an OpenGL context may
1703conflict with other applications that also use an OpenGL context.</p>
1704
1705<p>Device implementations capable of running live wallpapers reliably as described
1706above SHOULD implement live wallpapers, and when implemented MUST report the
1707platform feature flag android.software.live_wallpaper.</p>
1708
1709<h3 id=3_8_8_activity_switching>3.8.8. Activity Switching</h3>
1710
1711<table>
1712 <tr>
1713 <td class="tab2"></td>
1714 <td>
1715<p>As the Recent function navigation key is OPTIONAL, the requirements to
1716implement the overview screen is OPTIONAL for Android Television devices and
1717Android Watch devices.</p>
1718</td>
1719 </tr>
1720</table>
1721
1722
1723<p>The upstream Android source code includes the overview screen [<a href="http://developer.android.com/guide/components/recents.html">Resources, 32</a>], a system-level user interface for task switching and displaying recently
1724accessed activities and tasks using a thumbnail image of the application's
1725graphical state at the moment the user last left the application. Device
1726implementations including the recents function navigation key as detailed in <a href="#heading=h.dzfhwcjzm5z6">section 7.2.3</a>, MAY alter the interface but MUST meet the following requirements:</p>
1727
1728<ul>
1729 <li> MUST display affiliated recents as a group that moves together
1730 <li> MUST support at least up to 20 displayed activities
1731 <li> MUST at least display the title of 4 activities at a time
1732 <li> SHOULD display highlight color, icon, screen title in recents
1733 <li> MUST implement the screen pinning behavior [<a href="https://developer.android.com/about/versions/android-5.0.html#ScreenPinning">Resources, 33</a>] and provide the user with a settings menu to toggle the feature
1734 <li> SHOULD display a closing affordance ("x") but MAY delay this until user
1735interacts with screens
1736</ul>
1737
1738<p>Device implementations are STRONGLY ENCOURAGED to use the upstream Android user
1739interface (or a similar thumbnail-based interface) for the overview screen.</p>
1740
1741<h3 id=3_8_9_input_management>3.8.9. Input Management</h3>
1742
1743
1744<p>Android includes support for Input Management and support for third-party input
1745method editors [<a href="http://developer.android.com/guide/topics/text/creating-input-method.html">Resources, 34</a>]. Device implementations that allow users to use third-party input methods on
1746the device MUST declare the platform feature android.software.input_methods and
1747support IME APIs as defined in the Android SDK documentation.</p>
1748
1749<p>Device implementations that declare the android.software.input_methods feature
1750MUST provide a user-accessible mechanism to add and configure third-party input
1751methods. Device implementations MUST display the settings interface in response
1752to the android.settings.INPUT_METHOD_SETTINGS intent.</p>
1753
1754<h3 id=3_8_10_lock_screen_media_control>3.8.10. Lock Screen Media Control</h3>
1755
1756
1757<p>The Remote Control Client API is deprecated from Android 5.0 in favor of the
1758Media Notification Template that allows media applications to integrate with
1759playback controls that are displayed on the lock screen [<a href="https://developer.android.com/reference/android/app/Notification.MediaStyle.html">Resources, 35</a>]. Device implementations that support a lock screen in the device MUST support
1760the Media Notification Template along with other notifications.</p>
1761
1762<h3 id=3_8_11_dreams>3.8.11. Dreams</h3>
1763
1764
1765<p>Android includes support for interactive screensavers called Dreams [<a href="http://developer.android.com/reference/android/service/dreams/DreamService.html">Resources, 36</a>]. Dreams allows users to interact with applications when a device connected to
1766a power source is idle or docked in a desk dock. Android Watch devices MAY
1767implement Dreams, but other types of device implementations SHOULD include
1768support for Dreams and provide a settings option for users to configure Dreams
1769in response to the android.settings.DREAM_SETTINGS intent.</p>
1770
1771<h3 id=3_8_12_location>3.8.12. Location</h3>
1772
1773
1774<p>When a device has a hardware sensor (e.g. GPS) that is capable of providing the
1775location coordinates, location modes MUST be displayed in the Location menu
1776within Settings [<a href="http://developer.android.com/reference/android/provider/Settings.Secure.html#LOCATION_MODE">Resources, 37</a>]. </p>
1777
1778<h3 id=3_8_13_unicode_and_font>3.8.13. Unicode and Font</h3>
1779
1780
1781<p>Android includes support for color emoji characters. When Android device
1782implementations include an IME, devices MUST provide an input method to the
1783user for the Emoji characters defined in Unicode 6.1 [<a href="http://www.unicode.org/versions/Unicode6.1.0/">Resources, 38</a>]. All devices MUST be capable of rendering these emoji characters in color
1784glyph.</p>
1785
1786<p>Android 5.0 includes support for Roboto 2 font with different
1787weights—sans-serif-thin, sans-serif-light, sans-serif-medium, sans-serif-black,
1788sans-serif-condensed, sans-serif-condensed-light—which MUST all be included for
1789the languages available on the device and full Unicode 7.0 coverage of Latin,
1790Greek, and Cyrillic, including the Latin Extended A, B, C, and D ranges, and
1791all glyphs in the currency symbols block of Unicode 7.0.</p>
1792
1793<h2 id=3_9_device_administration>3.9. Device Administration</h2>
1794
1795
1796<p>Android includes features that allow security-aware applications to perform
1797device administration functions at the system level, such as enforcing password
1798policies or performing remote wipe, through the Android Device Administration
1799API [<a href="http://developer.android.com/guide/topics/admin/device-admin.html">Resources, 39</a>]. Device implementations MUST provide an implementation of the
1800DevicePolicyManager class [<a href="http://developer.android.com/reference/android/app/admin/DevicePolicyManager.html">Resources, 40</a>]. Device implementations that include support for lock screen MUST support the
1801full range of device administration policies defined in the Android SDK
1802documentation [<a href="http://developer.android.com/guide/topics/admin/device-admin.html">Resources, 39</a>] and report the platform feature android.software.device_admin.</p>
1803
1804<p>Device implementations MAY have a preinstalled application performing device
1805administration functions but this application MUST NOT be set out-of-the box as
1806the default Device Owner app [<a href="http://developer.android.com/reference/android/app/admin/DevicePolicyManager.html#isDeviceOwnerApp(java.lang.String)">Resources, 41</a>].</p>
1807
1808<h2 id=3_10_accessibility>3.10. Accessibility</h2>
1809
1810
1811<p>Android provides an accessibility layer that helps users with disabilities to
1812navigate their devices more easily. In addition, Android provides platform APIs
1813that enable accessibility service implementations to receive callbacks for user
1814and system events and generate alternate feedback mechanisms, such as
1815text-to-speech, haptic feedback, and trackball/d-pad navigation [<a href="http://developer.android.com/reference/android/accessibilityservice/AccessibilityService.html">Resources, 42</a>]. Device implementations MUST provide an implementation of the Android
1816accessibility framework consistent with the default Android implementation.
1817Device implementations MUST meet the following requirements:</p>
1818
1819<ul>
1820 <li> MUST support third-party accessibility service implementations through the
1821android.accessibilityservice APIs [<a href="http://developer.android.com/reference/android/view/accessibility/package-summary.html">Resources, 43</a>]
1822 <li> MUST generate AccessibilityEvents and deliver these events to all registered
1823AccessibilityService implementations in a manner consistent with the default
1824Android implementation
1825 <li> Unless an Android Watch device with no audio output, device implementations
1826MUST provide a user-accessible mechanism to enable and disable accessibility
1827services, and MUST display this interface in response to the
1828android.provider.Settings.ACTION_ACCESSIBILITY_SETTINGS intent.
1829</ul>
1830
1831<p>Additionally, device implementations SHOULD provide an implementation of an
1832accessibility service on the device, and SHOULD provide a mechanism for users
1833to enable the accessibility service during device setup. An open source
1834implementation of an accessibility service is available from the Eyes Free
1835project [<a href="https://code.google.com/p/eyes-free/">Resources, 44</a>].</p>
1836
1837<h2 id=3_11_text-to-speech>3.11. Text-to-Speech</h2>
1838
1839
1840<p>Android includes APIs that allow applications to make use of text-to-speech
1841(TTS) services and allows service providers to provide implementations of TTS
1842services [<a href="http://developer.android.com/reference/android/speech/tts/package-summary.html">Resources, 45</a>]. Device implementations reporting the feature android.hardware.audio.output
1843MUST meet these requirements related to the Android TTS framework. </p>
1844
1845<p>Device implementations:</p>
1846
1847<ul>
1848 <li> MUST support the Android TTS framework APIs and SHOULD include a TTS engine
1849supporting the languages available on the device. Note that the upstream
1850Android open source software includes a full-featured TTS engine
1851implementation.
1852 <li> MUST support installation of third-party TTS engines
1853 <li> MUST provide a user-accessible interface that allows users to select a TTS
1854engine for use at the system level
1855</ul>
1856
1857<h2 id=3_12_tv_input_framework>3.12. TV Input Framework</h2>
1858
1859
1860<p>The Android Television Input Framework (TIF) simplifies the delivery of live
1861content to Android Television devices. TIF provides a standard API to create
1862input modules that control Android Television devices. Android Television
1863device implementations MUST support Television Input Framework [<a href="https://source.android.com/devices/tv/index.html">Resources, 46</a>].</p>
1864
1865<p>Device implementations that support TIF MUST declare the platform feature
1866android.software.live_tv. </p>
1867
1868<h1 id=4_application_packaging_compatibility>4. Application Packaging Compatibility</h1>
1869
1870
1871<p>Device implementations MUST install and run Android ".apk" files as generated
1872by the "aapt" tool included in the official Android SDK [<a href="http://developer.android.com/guide/developing/tools/index.html">Resources, 47</a>].</p>
1873
1874<p>Devices implementations MUST NOT extend either the .apk [<a href="http://developer.android.com/guide/components/fundamentals.html">Resources, 48</a>], Android Manifest [<a href="http://developer.android.com/guide/topics/manifest/manifest-intro.html">Resources, 49</a>], Dalvik bytecode [<a href="https://android.googlesource.com/platform/dalvik/+/lollipop-release/docs/">Resources, 20</a>], or RenderScript bytecode formats in such a way that would prevent those
1875files from installing and running correctly on other compatible devices</p>
1876
1877<h1 id=5_multimedia_compatibility>5. Multimedia Compatibility</h1>
1878
1879
1880<h2 id=5_1_media_codecs>5.1. Media Codecs</h2>
1881
1882
1883<p>Device implementations MUST support the core media formats specified in the
1884Android SDK documentation [<a href="http://developer.android.com/guide/appendix/media-formats.html">Resources, 50</a>] except where explicitly permitted in this document. Specifically, device
1885implementations MUST support the media formats, encoders, decoders, file types,
1886and container formats defined in the tables below. All of these codecs are
1887provided as software implementations in the preferred Android implementation
1888from the Android Open Source Project.</p>
1889
1890<p>Please note that neither Google nor the Open Handset Alliance make any
1891representation that these codecs are free from third-party patents. Those
1892intending to use this source code in hardware or software products are advised
1893that implementations of this code, including in open source software or
1894shareware, may require patent licenses from the relevant patent holders.</p>
1895
1896<h3 id=5_1_1_audio_codecs>5.1.1. Audio Codecs</h3>
1897
1898<table>
1899 <tr>
1900 <td class="tab0">
1901<p><strong>Format / Codec</strong></p>
1902</td>
1903 <td class="tab0">
1904<p><strong>Encoder</strong></p>
1905</td>
1906 <td class="tab0">
1907<p><strong>Decoder</strong></p>
1908</td>
1909 <td class="tab0">
1910<p><strong>Details</strong></p>
1911</td>
1912 <td class="tab0">
1913<p><strong>Supported File Type(s) / Container Formats</strong></p>
1914</td>
1915 </tr>
1916 <tr>
1917 <td class="tab3">
1918<p>MPEG-4 AAC Profile</p>
1919
1920<p>(AAC LC)</p>
1921</td>
1922 <td class="tab3">
1923<p>REQUIRED1</p>
1924</td>
1925 <td class="tab3">
1926<p>REQUIRED</p>
1927</td>
1928 <td class="tab3">
1929<p>Support for mono/stereo/5.0/5.12 content with standard sampling rates from 8 to
193048 kHz.</p>
1931</td>
1932 <td class="tab4">
1933<p>• 3GPP (.3gp)</p>
1934
1935<p>• MPEG-4 (.mp4, .m4a)</p>
1936
1937<p>• ADTS raw AAC (.aac, decode in Android 3.1+, encode in Android 4.0+, ADIF not
1938supported)</p>
1939
1940<p>• MPEG-TS (.ts, not seekable, Android 3.0+)</p>
1941</td>
1942 </tr>
1943 <tr>
1944 <td class="tab3">
1945<p>MPEG-4 HE AAC Profile (AAC+)</p>
1946</td>
1947 <td>
1948<p>REQUIRED1</p>
1949
1950<p>(Android 4.1+)</p>
1951</td>
1952 <td class="tab3">
1953<p>REQUIRED</p>
1954</td>
1955 <td class="tab3">
1956<p>Support for mono/stereo/5.0/5.12 content with standard sampling rates from 16
1957to 48 kHz.</p>
1958</td>
1959 <td class="tab4"></td>
1960 </tr>
1961 <tr>
1962 <td class="tab3">
1963<p>MPEG-4 HE AACv2</p>
1964
1965<p>Profile (enhanced AAC+)</p>
1966</td>
1967 <td class="tab3">
1968<p> </p>
1969</td>
1970 <td class="tab3">
1971<p>REQUIRED</p>
1972</td>
1973 <td class="tab3">
1974<p>Support for mono/stereo/5.0/5.12 content with standard sampling rates from 16
1975to 48 kHz.</p>
1976</td>
1977 <td class="tab4"></td>
1978 </tr>
1979 <tr>
1980 <td class="tab3">
1981<p>AAC ELD (enhanced low delay AAC)</p>
1982</td>
1983 <td>
1984<p>REQUIRED1 </p>
1985
1986<p>(Android 4.1+)</p>
1987</td>
1988 <td>
1989<p>REQUIRED</p>
1990
1991<p>(Android 4.1+)</p>
1992</td>
1993 <td class="tab3">
1994<p>Support for mono/stereo content with standard sampling rates from 16 to 48 kHz.</p>
1995</td>
1996 <td class="tab4"></td>
1997 </tr>
1998 <tr>
1999 <td class="tab3">
2000<p>AMR-NB</p>
2001</td>
2002 <td class="tab3">
2003<p>REQUIRED3</p>
2004</td>
2005 <td class="tab3">
2006<p>REQUIRED3</p>
2007</td>
2008 <td class="tab3">
2009<p>4.75 to 12.2 kbps sampled @ 8kHz</p>
2010</td>
2011 <td class="tab4">
2012<p>3GPP (.3gp)</p>
2013</td>
2014 </tr>
2015 <tr>
2016 <td class="tab3">
2017<p>AMR-WB</p>
2018</td>
2019 <td class="tab3">
2020<p>REQUIRED3 </p>
2021</td>
2022 <td class="tab3">
2023<p>REQUIRED3</p>
2024</td>
2025 <td class="tab3">
2026<p>9 rates from 6.60 kbit/s to 23.85 kbit/s sampled @ 16kHz</p>
2027</td>
2028 <td class="tab4"></td>
2029 </tr>
2030 <tr>
2031 <td class="tab3">
2032<p>FLAC</p>
2033</td>
2034 <td class="tab3">
2035<p> </p>
2036</td>
2037 <td>
2038<p>REQUIRED</p>
2039
2040<p>(Android 3.1+)</p>
2041</td>
2042 <td class="tab3">
2043<p>Mono/Stereo (no multichannel). Sample rates up to 48 kHz (but up to 44.1 kHz is
2044recommended on devices with 44.1 kHz output, as the 48 to 44.1 kHz downsampler
2045does not include a low-pass filter). 16-bit recommended; no dither applied for
204624-bit.</p>
2047</td>
2048 <td class="tab3">
2049<p>FLAC (.flac) only</p>
2050</td>
2051 </tr>
2052 <tr>
2053 <td class="tab3">
2054<p>MP3</p>
2055</td>
2056 <td class="tab3">
2057<p> </p>
2058</td>
2059 <td class="tab3">
2060<p>REQUIRED</p>
2061</td>
2062 <td>
2063<p>Mono/Stereo 8-320Kbps constant (CBR) or variable bitrate (VBR)</p>
2064</td>
2065 <td class="tab3">
2066<p>MP3 (.mp3)</p>
2067</td>
2068 </tr>
2069 <tr>
2070 <td class="tab3">
2071<p>MIDI</p>
2072</td>
2073 <td class="tab3">
2074<p> </p>
2075</td>
2076 <td class="tab3">
2077<p>REQUIRED</p>
2078</td>
2079 <td class="tab3">
2080<p>MIDI Type 0 and 1. DLS Version 1 and 2. XMF and Mobile XMF. Support for
2081ringtone formats RTTTL/RTX, OTA, and iMelody</p>
2082</td>
2083 <td class="tab3">
2084<p>• Type 0 and 1 (.mid, .xmf, .mxmf)</p>
2085
2086<p>• RTTTL/RTX (.rtttl, .rtx)</p>
2087
2088<p>• OTA (.ota)</p>
2089
2090<p>• iMelody (.imy)</p>
2091</td>
2092 </tr>
2093 <tr>
2094 <td class="tab3">
2095<p>Vorbis</p>
2096</td>
2097 <td class="tab3">
2098<p> </p>
2099</td>
2100 <td class="tab3">
2101<p>REQUIRED</p>
2102</td>
2103 <td class="tab3">
2104<p> </p>
2105</td>
2106 <td class="tab3">
2107<p>• Ogg (.ogg)</p>
2108
2109<p>• Matroska (.mkv, Android 4.0+)</p>
2110</td>
2111 </tr>
2112 <tr>
2113 <td class="tab3">
2114<p>PCM/WAVE</p>
2115</td>
2116 <td>
2117<p>REQUIRED4</p>
2118
2119<p>(Android 4.1+)</p>
2120</td>
2121 <td class="tab3">
2122<p>REQUIRED</p>
2123</td>
2124 <td class="tab3">
2125<p>16-bit linear PCM (rates up to limit of hardware). Devices MUST support
2126sampling rates for raw PCM recording at 8000, 11025, 16000, and 44100 Hz
2127frequencies.</p>
2128</td>
2129 <td class="tab3">
2130<p>WAVE (.wav)</p>
2131</td>
2132 </tr>
2133 <tr>
2134 <td class="tab3">
2135<p>Opus</p>
2136</td>
2137 <td class="tab3"></td>
2138 <td class="tab3">
2139<p>REQUIRED</p>
2140
2141<p>(Android 5.0+)</p>
2142</td>
2143 <td class="tab3"></td>
2144 <td class="tab3">
2145<p>Matroska (.mkv)</p>
2146</td>
2147 </tr>
2148</table>
2149
2150
2151<p>1 Required for device implementations that define android.hardware.microphone
2152but optional for Android Watch device implementations.</p>
2153
2154<p>2 Only downmix of 5.0/5.1 content is required; recording or rendering more than
21552 channels is optional.</p>
2156
2157<p>3 Required for Android Handheld device implementations. </p>
2158
2159<p>4 Required for device implementations that define android.hardware.microphone,
2160including Android Watch device implementations.</p>
2161
2162<h3 id=5_1_2_image_codecs>5.1.2. Image Codecs</h3>
2163
2164<table>
2165 <tr>
2166 <td class="tab0">
2167<p><strong>Format / Codec</strong></p>
2168</td>
2169 <td class="tab0">
2170<p><strong>Encoder</strong></p>
2171</td>
2172 <td class="tab0">
2173<p><strong>Decoder</strong></p>
2174</td>
2175 <td class="tab0">
2176<p><strong>Details</strong></p>
2177</td>
2178 <td class="tab0">
2179<p><strong>Supported File Type(s) / Container Formats</strong></p>
2180</td>
2181 </tr>
2182 <tr>
2183 <td class="tab3">
2184<p>JPEG</p>
2185</td>
2186 <td class="tab3">
2187<p>REQUIRED</p>
2188</td>
2189 <td class="tab3">
2190<p>REQUIRED</p>
2191</td>
2192 <td class="tab3">
2193<p>Base+progressive</p>
2194</td>
2195 <td class="tab3">
2196<p>JPEG (.jpg)</p>
2197</td>
2198 </tr>
2199 <tr>
2200 <td class="tab3">
2201<p>GIF</p>
2202</td>
2203 <td class="tab3">
2204<p> </p>
2205</td>
2206 <td class="tab3">
2207<p>REQUIRED</p>
2208</td>
2209 <td class="tab3">
2210<p> </p>
2211</td>
2212 <td class="tab3">
2213<p>GIF (.gif)</p>
2214</td>
2215 </tr>
2216 <tr>
2217 <td class="tab3">
2218<p>PNG</p>
2219</td>
2220 <td class="tab3">
2221<p>REQUIRED</p>
2222</td>
2223 <td class="tab3">
2224<p>REQUIRED</p>
2225</td>
2226 <td class="tab3">
2227<p> </p>
2228</td>
2229 <td class="tab3">
2230<p>PNG (.png)</p>
2231</td>
2232 </tr>
2233 <tr>
2234 <td class="tab3">
2235<p>BMP</p>
2236</td>
2237 <td class="tab3">
2238<p> </p>
2239</td>
2240 <td class="tab3">
2241<p>REQUIRED</p>
2242</td>
2243 <td class="tab3">
2244<p> </p>
2245</td>
2246 <td class="tab3">
2247<p>BMP (.bmp)</p>
2248</td>
2249 </tr>
2250 <tr>
2251 <td class="tab3">
2252<p>WebP</p>
2253</td>
2254 <td class="tab3">
2255<p>REQUIRED</p>
2256</td>
2257 <td class="tab3">
2258<p>REQUIRED</p>
2259</td>
2260 <td class="tab3">
2261<p> </p>
2262</td>
2263 <td class="tab3">
2264<p>WebP (.webp)</p>
2265</td>
2266 </tr>
2267</table>
2268
2269
2270<h3 id=5_1_3_video_codecs>5.1.3. Video Codecs</h3>
2271
2272<table>
2273 <tr>
2274 <td class="tab2"></td>
2275 <td>
2276<p>Video codecs are optional for Android Watch device implementations.</p>
2277</td>
2278 </tr>
2279</table>
2280
2281<table>
2282 <tr>
2283 <td class="tab0">
2284<p><strong>Format / Codec</strong></p>
2285</td>
2286 <td class="tab0">
2287<p><strong>Encoder</strong></p>
2288</td>
2289 <td class="tab0">
2290<p><strong>Decoder</strong></p>
2291</td>
2292 <td class="tab0">
2293<p><strong>Details</strong></p>
2294</td>
2295 <td class="tab0">
2296<p><strong>Supported File Type(s) / Container Formats</strong></p>
2297</td>
2298 </tr>
2299 <tr>
2300 <td class="tab3">
2301<p>H.263</p>
2302</td>
2303 <td class="tab3">
2304<p>REQUIRED1</p>
2305</td>
2306 <td class="tab3">
2307<p>REQUIRED2</p>
2308</td>
2309 <td class="tab3">
2310<p> </p>
2311</td>
2312 <td class="tab3">
2313<p>• 3GPP (.3gp)</p>
2314
2315<p>• MPEG-4 (.mp4)</p>
2316</td>
2317 </tr>
2318 <tr>
2319 <td class="tab3">
2320<p>H.264 AVC</p>
2321</td>
2322 <td class="tab3">
2323<p>REQUIRED2</p>
2324</td>
2325 <td class="tab3">
2326<p>REQUIRED2</p>
2327</td>
2328 <td>
2329<p>See <a href="#heading=h.be1ledetmole">section 5.2 </a>and <a href="#heading=h.ogx7l5t9zub6">5.3</a> for details</p>
2330</td>
2331 <td class="tab3">
2332<p>• 3GPP (.3gp)</p>
2333
2334<p>• MPEG-4 (.mp4)</p>
2335
2336<p>• MPEG-TS (.ts, AAC audio only, not seekable, Android 3.0+)</p>
2337</td>
2338 </tr>
2339 <tr>
2340 <td class="tab3">
2341<p>H.265 HEVC</p>
2342</td>
2343 <td class="tab3"></td>
2344 <td class="tab3">
2345<p>REQUIRED2</p>
2346</td>
2347 <td>
2348<p>See <a href="#heading=h.be1ledetmole">section 5.3</a> for details</p>
2349</td>
2350 <td class="tab3">
2351<p>MPEG-4 (.mp4)</p>
2352</td>
2353 </tr>
2354 <tr>
2355 <td class="tab3">
2356<p>MPEG-4 SP</p>
2357</td>
2358 <td class="tab3">
2359<p> </p>
2360</td>
2361 <td class="tab3">
2362<p>REQUIRED2</p>
2363</td>
2364 <td class="tab3">
2365<p> </p>
2366</td>
2367 <td class="tab3">
2368<p>3GPP (.3gp)</p>
2369</td>
2370 </tr>
2371 <tr>
2372 <td class="tab3">
2373<p>VP83</p>
2374</td>
2375 <td>
2376<p>REQUIRED2</p>
2377
2378<p>(Android 4.3+)</p>
2379</td>
2380 <td>
2381<p>REQUIRED2</p>
2382
2383<p>(Android 2.3.3+)</p>
2384</td>
2385 <td>
2386<p>See <a href="#heading=h.be1ledetmole">section 5.2</a> and <a href="#heading=h.ogx7l5t9zub6">5.3</a> for details</p>
2387</td>
2388 <td>
2389<p>• WebM (.webm) [<a href="http://www.webmproject.org/">Resources, 110</a>]</p>
2390
2391<p>• Matroska (.mkv, Android 4.0+)4</p>
2392</td>
2393 </tr>
2394 <tr>
2395 <td class="tab3">
2396<p>VP9</p>
2397</td>
2398 <td class="tab3"></td>
2399 <td class="tab3">
2400<p>REQUIRED2</p>
2401
2402<p>(Android 4.4+)</p>
2403</td>
2404 <td>
2405<p>See <a href="#heading=h.be1ledetmole">section 5.</a><u>3</u> for details</p>
2406</td>
2407 <td>
2408<p>• WebM (.webm) [<a href="http://www.webmproject.org/">Resources, 110</a>]</p>
2409
2410<p>• Matroska (.mkv, Android 4.0+)4</p>
2411</td>
2412 </tr>
2413</table>
2414
2415
2416<p>1 Required for device implementations that include camera hardware and define
2417android.hardware.camera or android.hardware.camera.front.</p>
2418
2419<p>2 Required for device implementations except Android Watch devices. </p>
2420
2421<p>3 For acceptable quality of web video streaming and video-conference services,
2422device implementations SHOULD use a hardware VP8 codec that meets the
2423requirements in [<a href="http://www.webmproject.org/hardware/rtc-coding-requirements/">Resources, 51</a>].</p>
2424
2425<p>4 Device implementations SHOULD support writing Matroska WebM files.</p>
2426
2427<h2 id=5_2_video_encoding>5.2. Video Encoding</h2>
2428
2429<table>
2430 <tr>
2431 <td class="tab2"></td>
2432 <td>
2433<p>Video codecs are optional for Android Watch device implementations.</p>
2434</td>
2435 </tr>
2436</table>
2437
2438
2439<p>Android device implementations with H.264 codec support, MUST support Baseline
2440Profile Level 3 and the following SD (Standard Definition) video encoding
2441profiles and SHOULD support Main Profile Level 4 and the following HD (High
2442Definition) video encoding profiles. Android Television devices are STRONGLY
2443RECOMMENDED to encode HD 1080p video at 30 fps.</p>
2444<table>
2445 <tr>
2446 <td class="tab0"></td>
2447 <td class="tab0">
2448<p><strong>SD (Low quality)</strong></p>
2449</td>
2450 <td class="tab0">
2451<p><strong>SD (High quality)</strong></p>
2452</td>
2453 <td class="tab0">
2454<p><strong>HD 720p1</strong></p>
2455</td>
2456 <td class="tab0">
2457<p><strong>HD 1080p1</strong></p>
2458</td>
2459 </tr>
2460 <tr>
2461 <td>
2462<p><strong> Video resolution</strong></p>
2463</td>
2464 <td class="tab3">
2465<p>320 x 240 px</p>
2466</td>
2467 <td class="tab3">
2468<p>720 x 480 px</p>
2469</td>
2470 <td class="tab3">
2471<p>1280 x 720 px</p>
2472</td>
2473 <td>
2474<p>1920 x 1080 px</p>
2475</td>
2476 </tr>
2477 <tr>
2478 <td>
2479<p><strong> Video frame rate</strong></p>
2480</td>
2481 <td class="tab3">
2482<p>20 fps</p>
2483</td>
2484 <td class="tab3">
2485<p>30 fps</p>
2486</td>
2487 <td class="tab3">
2488<p>30 fps</p>
2489</td>
2490 <td>
2491<p>30 fps</p>
2492</td>
2493 </tr>
2494 <tr>
2495 <td>
2496<p><strong> Video bitrate</strong></p>
2497</td>
2498 <td class="tab3">
2499<p>384 Kbps</p>
2500</td>
2501 <td class="tab3">
2502<p>2 Mbps</p>
2503</td>
2504 <td class="tab3">
2505<p>4 Mbps</p>
2506</td>
2507 <td>
2508<p>10 Mbps</p>
2509</td>
2510 </tr>
2511</table>
2512
2513
2514<p>1 When supported by hardware, but STRONGLY RECOMMENDED for Android Television
2515devices.</p>
2516
2517<p>Android device implementations with VP8 codec support MUST support the SD video
2518encoding profiles and SHOULD support the following HD (High Definition) video
2519encoding profiles.</p>
2520<table>
2521 <tr>
2522 <td class="tab0"></td>
2523 <td class="tab0">
2524<p><strong>SD (Low quality)</strong></p>
2525</td>
2526 <td class="tab0">
2527<p><strong>SD (High quality)</strong></p>
2528</td>
2529 <td class="tab0">
2530<p><strong>HD 720p1</strong></p>
2531</td>
2532 <td class="tab0">
2533<p><strong>HD 1080p1</strong></p>
2534</td>
2535 </tr>
2536 <tr>
2537 <td>
2538<p><strong>Video resolution</strong></p>
2539</td>
2540 <td>
2541<p>320 x 180 px</p>
2542</td>
2543 <td>
2544<p>640 x 360 px</p>
2545</td>
2546 <td>
2547<p>1280 x 720 px</p>
2548</td>
2549 <td>
2550<p>1920 x 1080 px</p>
2551</td>
2552 </tr>
2553 <tr>
2554 <td>
2555<p><strong>Video frame rate</strong></p>
2556</td>
2557 <td>
2558<p>30 fps</p>
2559</td>
2560 <td>
2561<p>30 fps</p>
2562</td>
2563 <td>
2564<p>30 fps</p>
2565</td>
2566 <td>
2567<p>30 fps</p>
2568</td>
2569 </tr>
2570 <tr>
2571 <td>
2572<p><strong>Video bitrate</strong></p>
2573</td>
2574 <td>
2575<p>800 Kbps </p>
2576</td>
2577 <td>
2578<p>2 Mbps</p>
2579</td>
2580 <td>
2581<p>4 Mbps</p>
2582</td>
2583 <td>
2584<p>10 Mbps</p>
2585</td>
2586 </tr>
2587</table>
2588
2589
2590<p>1 When supported by hardware.</p>
2591
2592<h2 id=5_3_video_decoding>5.3. Video Decoding</h2>
2593
2594<table>
2595 <tr>
2596 <td class="tab2"></td>
2597 <td>
2598<p>Video codecs are optional for Android Watch device implementations.</p>
2599</td>
2600 </tr>
2601</table>
2602
2603
2604<p>Device implementations MUST support dynamic video resolution switching within
2605the same stream for VP8, VP9 ,H.264, and H.265 codecs.</p>
2606
2607<p>Android device implementations with H.264 decoders, MUST support Baseline
2608Profile Level 3 and the following SD video decoding profiles and SHOULD support
2609the HD decoding profiles. Android Television devices MUST support High Profile
2610Level 4.2 and the HD 1080p decoding profile.</p>
2611<table>
2612 <tr>
2613 <td class="tab0"></td>
2614 <td class="tab0">
2615<p><strong>SD (Low quality)</strong></p>
2616</td>
2617 <td class="tab0">
2618<p><strong>SD (High quality)</strong></p>
2619</td>
2620 <td class="tab0">
2621<p><strong>HD 720p1</strong></p>
2622</td>
2623 <td class="tab0">
2624<p><strong>HD 1080p1</strong></p>
2625</td>
2626 </tr>
2627 <tr>
2628 <td>
2629<p><strong>Video resolution</strong></p>
2630</td>
2631 <td>
2632<p>320 x 240 px</p>
2633</td>
2634 <td>
2635<p>720 x 480 px</p>
2636</td>
2637 <td>
2638<p>1280 x 720 px</p>
2639</td>
2640 <td>
2641<p>1920 x 1080 px</p>
2642</td>
2643 </tr>
2644 <tr>
2645 <td>
2646<p><strong>Video frame rate</strong></p>
2647</td>
2648 <td>
2649<p>30 fps</p>
2650</td>
2651 <td>
2652<p>30 fps</p>
2653</td>
2654 <td>
2655<p>30 fps / 60 fps2</p>
2656</td>
2657 <td>
2658<p>30 fps / 60 fps2</p>
2659</td>
2660 </tr>
2661 <tr>
2662 <td></td>
2663 <td></td>
2664 <td></td>
2665 <td></td>
2666 <td></td>
2667 </tr>
2668 <tr>
2669 <td>
2670<p><strong>Video bitrate</strong></p>
2671</td>
2672 <td>
2673<p>800 Kbps </p>
2674</td>
2675 <td>
2676<p>2 Mbps</p>
2677</td>
2678 <td>
2679<p>8 Mbps</p>
2680</td>
2681 <td>
2682<p>20 Mbps</p>
2683</td>
2684 </tr>
2685</table>
2686
2687
2688<p>1 Required for Android Television device implementations, but for other device
2689types only when supported by hardware.</p>
2690
2691<p>2 Required for Android Television device implementations.</p>
2692
2693<p>Android device implementations when supporting VP8 codec as described in <a href="#heading=h.hitn8abpwkj2">section 5.1.3</a>, MUST support the following SD decoding profiles and SHOULD support the HD
2694decoding profiles. Android Television devices MUST support the HD 1080p
2695decoding profile. </p>
2696<table>
2697 <tr>
2698 <td class="tab0"></td>
2699 <td class="tab0">
2700<p><strong>SD (Low quality)</strong></p>
2701</td>
2702 <td class="tab0">
2703<p><strong>SD (High quality)</strong></p>
2704</td>
2705 <td class="tab0">
2706<p><strong>HD 720p1</strong></p>
2707</td>
2708 <td class="tab0">
2709<p><strong>HD 1080p1</strong></p>
2710</td>
2711 </tr>
2712 <tr>
2713 <td>
2714<p><strong>Video resolution</strong></p>
2715</td>
2716 <td>
2717<p>320 x 180 px</p>
2718</td>
2719 <td>
2720<p>640 x 360 px</p>
2721</td>
2722 <td>
2723<p>1280 x 720 px</p>
2724</td>
2725 <td>
2726<p>1920 x 1080 px</p>
2727</td>
2728 </tr>
2729 <tr>
2730 <td>
2731<p><strong>Video frame rate</strong></p>
2732</td>
2733 <td>
2734<p>30 fps</p>
2735</td>
2736 <td>
2737<p>30 fps</p>
2738</td>
2739 <td>
2740<p>30 fps / 60 fps2</p>
2741</td>
2742 <td>
2743<p>30 / 60 fps2</p>
2744</td>
2745 </tr>
2746 <tr>
2747 <td></td>
2748 <td></td>
2749 <td></td>
2750 <td></td>
2751 <td></td>
2752 </tr>
2753 <tr>
2754 <td>
2755<p><strong>Video bitrate</strong></p>
2756</td>
2757 <td>
2758<p>800 Kbps </p>
2759</td>
2760 <td>
2761<p>2 Mbps</p>
2762</td>
2763 <td>
2764<p>8 Mbps</p>
2765</td>
2766 <td>
2767<p>20 Mbps</p>
2768</td>
2769 </tr>
2770</table>
2771
2772
2773<p>1 Required for Android Television device implementations, but for other type of
2774devices only when supported by hardware.</p>
2775
2776<p>2 Required for Android Television device implementations.</p>
2777
2778<p>Android device implementations, when supporting VP9 codec as described in <a href="#heading=h.hitn8abpwkj2">section 5.1.3</a>, MUST support the following SD video decoding profiles and SHOULD support the
2779HD decoding profiles. Android Television devices are STRONGLY RECOMMENDED to
2780support the HD 1080p decoding profile and SHOULD support the UHD decoding
2781profile. When the UHD video decoding profile is supported, it MUST support 8
2782bit color depth.</p>
2783<table>
2784 <tr>
2785 <td class="tab0"></td>
2786 <td class="tab0">
2787<p><strong>SD (Low quality)</strong></p>
2788</td>
2789 <td class="tab0">
2790<p><strong>SD (High quality)</strong></p>
2791</td>
2792 <td class="tab0">
2793<p><strong>HD 720p 1</strong></p>
2794</td>
2795 <td class="tab0">
2796<p><strong>HD 1080p 2</strong></p>
2797</td>
2798 <td class="tab0">
2799<p><strong>UHD 2</strong></p>
2800</td>
2801 </tr>
2802 <tr>
2803 <td>
2804<p><strong>Video resolution</strong></p>
2805</td>
2806 <td>
2807<p>320 x 180 px</p>
2808</td>
2809 <td>
2810<p>640 x 360 px</p>
2811</td>
2812 <td>
2813<p>1280 x 720 px</p>
2814</td>
2815 <td>
2816<p>1920 x 1080 px</p>
2817</td>
2818 <td>
2819<p>3840 x 2160 px</p>
2820</td>
2821 </tr>
2822 <tr>
2823 <td>
2824<p><strong>Video frame rate</strong></p>
2825</td>
2826 <td>
2827<p>30 fps</p>
2828</td>
2829 <td>
2830<p>30 fps</p>
2831</td>
2832 <td>
2833<p>30 fps</p>
2834</td>
2835 <td>
2836<p>30 fps</p>
2837</td>
2838 <td>
2839<p>30 fps</p>
2840</td>
2841 </tr>
2842 <tr>
2843 <td>
2844<p><strong>Video bitrate</strong></p>
2845</td>
2846 <td>
2847<p>600 Kbps </p>
2848</td>
2849 <td>
2850<p>1.6 Mbps</p>
2851</td>
2852 <td>
2853<p>4 Mbps</p>
2854</td>
2855 <td>
2856<p>10 Mbps</p>
2857</td>
2858 <td>
2859<p>20 Mbps</p>
2860</td>
2861 </tr>
2862</table>
2863
2864
2865<p>1 Required for Android Television device implementations, but for other type of
2866devices only when supported by hardware.</p>
2867
2868<p>2 STRONGLY RECOMMENDED for Android Television device implementations when
2869supported by hardware.</p>
2870
2871<p>Android device implementations, when supporting H.265 codec as described in <a href="#heading=h.hitn8abpwkj2">section 5.1.3</a>, MUST support the Main Profile Level 3 Main tier and the following SD video
2872decoding profiles and SHOULD support the HD decoding profiles. Android
2873Television devices MUST support the Main Profile Level 4.1 Main tier and the HD
28741080p decoding profile and SHOULD support Main10 Level 5 Main Tier profile and
2875the UHD decoding profile.</p>
2876<table>
2877 <tr>
2878 <td class="tab0"></td>
2879 <td class="tab0">
2880<p><strong>SD (Low quality)</strong></p>
2881</td>
2882 <td class="tab0">
2883<p><strong>SD (High quality)</strong></p>
2884</td>
2885 <td class="tab0">
2886<p><strong>HD 720p </strong>1 </p>
2887</td>
2888 <td class="tab0">
2889<p><strong>HD 1080p </strong>1 </p>
2890</td>
2891 <td class="tab0">
2892<p><strong>UHD </strong>2</p>
2893</td>
2894 </tr>
2895 <tr>
2896 <td>
2897<p><strong>Video resolution</strong></p>
2898</td>
2899 <td>
2900<p>352 x 288 px</p>
2901</td>
2902 <td>
2903<p>640 x 360 px</p>
2904</td>
2905 <td>
2906<p>1280 x 720 px</p>
2907</td>
2908 <td>
2909<p>1920 x 1080 px</p>
2910</td>
2911 <td>
2912<p>3840 x 2160 px</p>
2913</td>
2914 </tr>
2915 <tr>
2916 <td>
2917<p><strong>Video frame rate</strong></p>
2918</td>
2919 <td>
2920<p>30 fps</p>
2921</td>
2922 <td>
2923<p>30 fps</p>
2924</td>
2925 <td>
2926<p>30 fps</p>
2927</td>
2928 <td>
2929<p>30 fps</p>
2930</td>
2931 <td>
2932<p>30 fps</p>
2933</td>
2934 </tr>
2935 <tr>
2936 <td>
2937<p><strong>Video bitrate</strong></p>
2938</td>
2939 <td>
2940<p>600 Kbps </p>
2941</td>
2942 <td>
2943<p>1.6 Mbps</p>
2944</td>
2945 <td>
2946<p>4 Mbps</p>
2947</td>
2948 <td>
2949<p>10 Mbps</p>
2950</td>
2951 <td>
2952<p>20 Mbps</p>
2953</td>
2954 </tr>
2955</table>
2956
2957
2958<p>1 Required for Android Television device implementation, but for other type of
2959devices only when supported by hardware.</p>
2960
2961<p>2 Required for Android Television device implementations when supported by
2962hardware.</p>
2963
2964<h2 id=5_4_audio_recording>5.4. Audio Recording</h2>
2965
2966
2967<p>While some of the requirements outlined in this section are stated as SHOULD
2968since Android 4.3, the Compatibility Definition for a future version is planned
2969to change these to MUST. Existing and new Android devices are <strong>very strongly encouraged</strong> to meet these requirements, or they will not be able to attain Android
2970compatibility when upgraded to the future version.</p>
2971
2972<h3 id=5_4_1_raw_audio_capture>5.4.1. Raw Audio Capture</h3>
2973
2974
2975<p>Device implementations that declare android.hardware.microphone MUST allow
2976capture of raw audio content with the following characteristics:</p>
2977
2978<ul>
2979 <li> <strong>Format</strong>: Linear PCM, 16-bit
2980 <li> <strong>Sampling rates</strong>: 8000, 11025, 16000, 44100
2981 <li> <strong>Channels</strong>: Mono
2982</ul>
2983
2984<p>Device implementations that declare android.hardware.microphone SHOULD allow
2985capture of raw audio content with the following characteristics:</p>
2986
2987<ul>
2988 <li> <strong>Format</strong>: Linear PCM, 16-bit
2989 <li> <strong>Sampling rates</strong>: 22050, 48000
2990 <li> <strong>Channels</strong>: Stereo
2991</ul>
2992
2993<h3 id=5_4_2_capture_for_voice_recognition>5.4.2. Capture for Voice Recognition</h3>
2994
2995
2996<p>In addition to the above recording specifications, when an application has
2997started recording an audio stream using the
2998android.media.MediaRecorder.AudioSource.VOICE_RECOGNITION audio source:</p>
2999
3000<ul>
3001 <li> The device SHOULD exhibit approximately flat amplitude versus frequency
3002characteristics: specifically, ±3 dB, from 100 Hz to 4000 Hz.
3003 <li> Audio input sensitivity SHOULD be set such that a 90 dB sound power level (SPL)
3004source at 1000 Hz yields RMS of 2500 for 16-bit samples.
3005 <li> PCM amplitude levels SHOULD linearly track input SPL changes over at least a 30
3006dB range from -18 dB to +12 dB re 90 dB SPL at the microphone.
3007 <li> Total harmonic distortion SHOULD be less than 1% for 1Khz at 90 dB SPL input
3008level at the microphone.
3009 <li> Noise reduction processing, if present, MUST be disabled.
3010 <li> Automatic gain control, if present, MUST be disabled
3011</ul>
3012
3013<p>If the platform supports noise suppression technologies tuned for speech
3014recognition, the effect MUST be controllable from the
3015android.media.audiofx.NoiseSuppressor API. Moreover, the UUID field for the
3016noise suppressor's effect descriptor MUST uniquely identify each implementation
3017of the noise suppression technology.</p>
3018
3019<h3 id=5_4_3_capture_for_rerouting_of_playback>5.4.3. Capture for Rerouting of Playback</h3>
3020
3021
3022<p>The android.media.MediaRecorder.AudioSource class includes the REMOTE_SUBMIX
3023audio source. Devices that declare android.hardware.audio.output MUST properly
3024implement the REMOTE_SUBMIX audio source so that when an application uses the
3025android.media.AudioRecord API to record from this audio source, it can capture
3026a mix of all audio streams except for the following:</p>
3027
3028<ul>
3029 <li> STREAM_RING
3030 <li> STREAM_ALARM
3031 <li> STREAM_NOTIFICATION
3032</ul>
3033
3034<h2 id=5_5_audio_playback>5.5. Audio Playback</h2>
3035
3036
3037<p>Device implementations that declare android.hardware.audio.output MUST conform
3038to the requirements in this section.</p>
3039
3040<h3 id=5_5_1_raw_audio_playback>5.5.1. Raw Audio Playback</h3>
3041
3042
3043<p>The device MUST allow playback of raw audio content with the following
3044characteristics:</p>
3045
3046<ul>
3047 <li> <strong>Format</strong>: Linear PCM, 16-bit
3048 <li> <strong>Sampling rates</strong>: 8000, 11025, 16000, 22050, 32000, 44100
3049 <li> <strong>Channels</strong>: Mono, Stereo
3050</ul>
3051
3052<p>The device SHOULD allow playback of raw audio content with the following
3053characteristics:</p>
3054
3055<ul>
3056 <li> <strong>Sampling rates</strong>: 24000, 48000
3057</ul>
3058
3059<h3 id=5_5_2_audio_effects>5.5.2. Audio Effects</h3>
3060
3061
3062<p>Android provides an API for audio effects for device implementations [<a href="http://developer.android.com/reference/android/media/audiofx/AudioEffect.html">Resources, 52</a>]. Device implementations that declare the feature
3063android.hardware.audio.output:</p>
3064
3065<ul>
3066 <li> MUST support the EFFECT_TYPE_EQUALIZER and EFFECT_TYPE_LOUDNESS_ENHANCER
3067implementations controllable through the AudioEffect subclasses Equalizer,
3068LoudnessEnhancer
3069 <li> MUST support the visualizer API implementation, controllable through the
3070Visualizer class
3071 <li> SHOULD support the EFFECT_TYPE_BASS_BOOST, EFFECT_TYPE_ENV_REVERB,
3072EFFECT_TYPE_PRESET_REVERB, and EFFECT_TYPE_VIRTUALIZER implementations
3073controllable through the AudioEffect sub-classes BassBoost,
3074EnvironmentalReverb, PresetReverb, and Virtualizer
3075</ul>
3076
3077<h3 id=5_5_3_audio_output_volume>5.5.3. Audio Output Volume</h3>
3078
3079
3080<p>Android Television device implementations MUST include support for system
3081Master Volume and digital audio output volume attenuation on supported outputs,
3082except for compressed audio passthrough output (where no audio decoding is done
3083on the device).</p>
3084
3085<h2 id=5_6_audio_latency>5.6. Audio Latency</h2>
3086
3087
3088<p>Audio latency is the time delay as an audio signal passes through a system.
3089Many classes of applications rely on short latencies, to achieve real-time
3090sound effects.</p>
3091
3092<p>For the purposes of this section, use the following definitions:</p>
3093
3094<ul>
3095 <li> <strong>output latency</strong>—The interval between when an application writes a frame of PCM-coded data and
3096when the corresponding sound can be heard by an external listener or observed
3097by a transducer.
3098 <li> <strong>cold output latency</strong>—The output latency for the first frame, when the audio output system has been
3099idle and powered down prior to the request.
3100 <li> <strong>continuous output latency</strong>—The output latency for subsequent frames, after the device is playing audio.
3101 <li> <strong>input latency</strong>—The interval between when an external sound is presented to the device and
3102when an application reads the corresponding frame of PCM-coded data.
3103 <li> <strong>cold input latency</strong>—The sum of lost input time and the input latency for the first frame, when the
3104audio input system has been idle and powered down prior to the request.
3105 <li> <strong>continuous input latency</strong>—The input latency for subsequent frames, while the device is capturing audio.
3106 <li> <strong>cold output jitter</strong>—The variance among separate measurements of cold output latency values.
3107 <li> <strong>cold input jitter</strong>—The variance among separate measurements of cold input latency values.
3108 <li> <strong>continuous round-trip latency</strong>—The sum of continuous input latency plus continuous output latency plus 5
3109milliseconds.
3110 <li> <strong>OpenSL ES PCM buffer queue API</strong>—The set of PCM-related OpenSL ES APIs within Android NDK; see
3111NDK_root/docs/opensles/index.html.
3112</ul>
3113
3114<p>Device implementations that declare android.hardware.audio.output SHOULD meet
3115or exceed these audio output requirements:</p>
3116
3117<ul>
3118 <li> cold output latency of 100 milliseconds or less
3119 <li> continuous output latency of 45 milliseconds or less
3120 <li> minimize the cold output jitter
3121</ul>
3122
3123<p>If a device implementation meets the requirements of this section after any
3124initial calibration when using the OpenSL ES PCM buffer queue API, for
3125continuous output latency and cold output latency over at least one supported
3126audio output device, it MAY report support for low-latency audio, by reporting
3127the feature android.hardware.audio.low_latency via the
3128android.content.pm.PackageManager class [<a href="http://developer.android.com/reference/android/content/pm/PackageManager.html">Resources, 53</a>]. Conversely, if the device implementation does not meet these requirements it
3129MUST NOT report support for low-latency audio.</p>
3130
3131<p>Device implementations that include android.hardware.microphone SHOULD meet
3132these input audio requirements:</p>
3133
3134<ul>
3135 <li> cold input latency of 100 milliseconds or less
3136 <li> continuous input latency of 30 milliseconds or less
3137 <li> continuous round-trip latency of 50 milliseconds or less
3138 <li> minimize the cold input jitter
3139</ul>
3140
3141<h2 id=5_7_network_protocols>5.7. Network Protocols</h2>
3142
3143
3144<p>Devices MUST support the media network protocols for audio and video playback
3145as specified in the Android SDK documentation [<a href="http://developer.android.com/guide/appendix/media-formats.html">Resources, 50</a>]. Specifically, devices MUST support the following media network protocols:</p>
3146
3147<ul>
3148 <li> RTSP (RTP, SDP)
3149 <li> HTTP(S) progressive streaming
3150 <li> HTTP(S) Live Streaming draft protocol, Version 3 [<a href="http://tools.ietf.org/html/draft-pantos-http-live-streaming-03">Resources, 54</a>]
3151</ul>
3152
3153<h2 id=5_8_secure_media>5.8. Secure Media</h2>
3154
3155
3156<p>Device implementations that support secure video output and are capable of
3157supporting secure surfaces MUST declare support for Display.FLAG_SECURE. Device
3158implementations that declare support for Display.FLAG_SECURE, if they support a
3159wireless display protocol, MUST secure the link with a cryptographically strong
3160mechanism such as HDCP 2.x or higher for Miracast wireless displays. Similarly
3161if they support a wired external display, the device implementations MUST
3162support HDCP 1.2 or higher. Android Television device implementations MUST
3163support HDCP 2.2 for devices supporting 4K resolution and HDCP 1.4 or above for
3164lower resolutions. The upstream Android open source implementation includes
3165support for wireless (Miracast) and wired (HDMI) displays that satisfies this
3166requirement.</p>
3167
3168<h1 id=6_developer_tools_and_options_compatibility>6. Developer Tools and Options Compatibility</h1>
3169
3170
3171<h2 id=6_1_developer_tools>6.1. Developer Tools</h2>
3172
3173
3174<p>Device implementations MUST support the Android Developer Tools provided in the
3175Android SDK. Android compatible devices MUST be compatible with:</p>
3176
3177<ul>
3178 <li> <strong>Android Debug Bridge (adb)</strong> [<a href="http://developer.android.com/tools/help/adb.html">Resources, 55</a>]
3179</ul>
3180
3181<p>Device implementations MUST support all adb functions as documented in the
3182Android SDK including dumpsys [<a href="https://source.android.com/devices/tech/input/dumpsys.html">Resources, 56</a>]. The device-side adb daemon MUST be inactive by default and there MUST be a
3183user-accessible mechanism to turn on the Android Debug Bridge. If a device
3184implementation omits USB peripheral mode, it MUST implement the Android Debug
3185Bridge via local-area network (such as Ethernet or 802.11). </p>
3186
3187<p>Android includes support for secure adb. Secure adb enables adb on known
3188authenticated hosts. Device implementations MUST support secure adb.</p>
3189
3190<ul>
3191 <li> <strong>Dalvik Debug Monitor Service (ddms)</strong> [<a href="http://developer.android.com/tools/debugging/ddms.html">Resources, 57</a>]
3192</ul>
3193
3194<p>Device implementations MUST support all ddms features as documented in the
3195Android SDK. As ddms uses adb, support for ddms SHOULD be inactive by default,
3196but MUST be supported whenever the user has activated the Android Debug Bridge,
3197as above.</p>
3198
3199<ul>
3200 <li> <strong>Monkey</strong> [<a href="http://developer.android.com/tools/help/monkey.html">Resources, 58</a>]
3201</ul>
3202
3203<p>Device implementations MUST include the Monkey framework, and make it available
3204for applications to use.</p>
3205
3206<ul>
3207 <li> <strong>SysTrace</strong> [<a href="http://developer.android.com/tools/help/systrace.html">Resources, 59</a>]
3208</ul>
3209
3210<p>Device implementations MUST support systrace tool as documented in the Android
3211SDK. Systrace must be inactive by default, and there MUST be a user-accessible
3212mechanism to turn on Systrace.</p>
3213
3214<p>Most Linux-based systems and Apple Macintosh systems recognize Android devices
3215using the standard Android SDK tools, without additional support; however
3216Microsoft Windows systems typically require a driver for new Android devices.
3217(For instance, new vendor IDs and sometimes new device IDs require custom USB
3218drivers for Windows systems.) If a device implementation is unrecognized by the
3219adb tool as provided in the standard Android SDK, device implementers MUST
3220provide Windows drivers allowing developers to connect to the device using the
3221adb protocol. These drivers MUST be provided for Windows XP, Windows Vista,
3222Windows 7, Windows 8, and Windows 9 in both 32-bit and 64-bit versions.</p>
3223
3224<h2 id=6_2_developer_options>6.2. Developer Options</h2>
3225
3226
3227<p>Android includes support for developers to configure application
3228development-related settings. Device implementations MUST honor the
3229android.settings.APPLICATION_DEVELOPMENT_SETTINGS intent to show application
3230development-related settings [<a href="http://developer.android.com/reference/android/provider/Settings.html#ACTION_APPLICATION_DEVELOPMENT_SETTINGS">Resources, 60</a>]. The upstream Android implementation hides the Developer Options menu by
3231default and enables users to launch Developer Options after pressing seven (7)
3232times on the <strong>Settings</strong> > <strong>About Device</strong> > <strong>Build Number</strong> menu item. Device implementations MUST provide a consistent experience for
3233Developer Options. Specifically, device implementations MUST hide Developer
3234Options by default and MUST provide a mechanism to enable Developer Options
3235that is consistent with the upstream Android implementation.</p>
3236
3237<h1 id=7_hardware_compatibility>7. Hardware Compatibility</h1>
3238
3239
3240<p>If a device includes a particular hardware component that has a corresponding
3241API for third-party developers, the device implementation MUST implement that
3242API as described in the Android SDK documentation. If an API in the SDK
3243interacts with a hardware component that is stated to be optional and the
3244device implementation does not possess that component:</p>
3245
3246<ul>
3247 <li> Complete class definitions (as documented by the SDK) for the component's APIs
3248MUST still be presented.
3249 <li> The API's behaviors MUST be implemented as no-ops in some reasonable fashion.
3250 <li> API methods MUST return null values where permitted by the SDK documentation.
3251 <li> API methods MUST return no-op implementations of classes where null values are
3252not permitted by the SDK documentation.
3253 <li> API methods MUST NOT throw exceptions not documented by the SDK documentation.
3254</ul>
3255
3256<p>A typical example of a scenario where these requirements apply is the telephony
3257API: even on non-phone devices, these APIs must be implemented as reasonable
3258no-ops.</p>
3259
3260<p>Device implementations MUST consistently report accurate hardware configuration
3261information via the getSystemAvailableFeatures() and hasSystemFeature(String)
3262methods on the android.content.pm.PackageManager class for the same build
3263fingerprint. [<a href="http://developer.android.com/reference/android/content/pm/PackageManager.html">Resources, 53]</a></p>
3264
3265<h2 id=7_1_display_and_graphics>7.1. Display and Graphics</h2>
3266
3267
3268<p>Android includes facilities that automatically adjust application assets and UI
3269layouts appropriately for the device, to ensure that third-party applications
3270run well on a variety of hardware configurations [<a href="http://developer.android.com/guide/practices/screens_support.html">Resources, 61</a>]. Devices MUST properly implement these APIs and behaviors, as detailed in
3271this section.</p>
3272
3273<p>The units referenced by the requirements in this section are defined as
3274follows:</p>
3275
3276<ul>
3277 <li> <strong>physical diagonal size</strong>—The distance in inches between two opposing corners of the illuminated portion
3278of the display.
3279 <li> <strong>dots per inch (dpi)</strong>—The number of pixels encompassed by a linear horizontal or vertical span of
32801". Where dpi values are listed, both horizontal and vertical dpi must fall
3281within the range.
3282 <li> <strong>aspect ratio</strong>—The ratio of the longer dimension of the screen to the shorter dimension. For
3283example, a display of 480x854 pixels would be 854 / 480 = 1.779, or roughly
3284"16:9".
3285 <li> <strong>density-independent pixel (dp)</strong>—The virtual pixel unit normalized to a 160 dpi screen, calculated as: pixels =
3286dps * (density / 160).
3287</ul>
3288
3289<h3 id=7_1_1_screen_configuration>7.1.1. Screen Configuration</h3>
3290
3291
3292<h4 id=7_1_1_1_screen_size>7.1.1.1. Screen Size</h4>
3293
3294<table>
3295 <tr>
3296 <td class="tab2"></td>
3297 <td>
3298<p>Android Watch devices (detailed in <a href="#heading=h.40sdoojaw5k9">section 2</a>) MAY have smaller screen sizes as described in this section.</p>
3299</td>
3300 </tr>
3301</table>
3302
3303
3304<p>The Android UI framework supports a variety of different screen sizes, and
3305allows applications to query the device screen size (aka "screen layout") via
3306android.content.res.Configuration.screenLayout with the SCREENLAYOUT_SIZE_MASK.
3307Device implementations MUST report the correct screen size as defined in the
3308Android SDK documentation [<a href="http://developer.android.com/guide/practices/screens_support.html">Resources, 61</a>] and determined by the upstream Android platform. Specifically, device
3309implementations MUST report the correct screen size according to the following
3310logical density-independent pixel (dp) screen dimensions.</p>
3311
3312<ul>
3313 <li> Devices MUST have screen sizes of at least 426 dp x 320 dp ('small'), unless it
3314is an Android Watch device.
3315 <li> Devices that report screen size 'normal' MUST have screen sizes of at least 480
3316dp x 320 dp.
3317 <li> Devices that report screen size 'large' MUST have screen sizes of at least 640
3318dp x 480 dp.
3319 <li> Devices that report screen size 'xlarge' MUST have screen sizes of at least 960
3320dp x 720 dp.
3321</ul>
3322
3323<p>In addition, </p>
3324
3325<ul>
3326 <li> Android Watch devices MUST have a screen with the physical diagonal size in the
3327range from 1.1 to 2.5 inches
3328 <li> Other types of Android device implementations, with a physically integrated
3329screen, MUST have a screen at least 2.5 inches in physical diagonal size.
3330</ul>
3331
3332<p>Devices MUST NOT change their reported screen size at any time.</p>
3333
3334<p>Applications optionally indicate which screen sizes they support via the
3335<supports-screens> attribute in the AndroidManifest.xml file. Device
3336implementations MUST correctly honor applications' stated support for small,
3337normal, large, and xlarge screens, as described in the Android SDK
3338documentation.</p>
3339
3340<h4 id=7_1_1_2_screen_aspect_ratio>7.1.1.2. Screen Aspect Ratio</h4>
3341
3342<table>
3343 <tr>
3344 <td class="tab2"></td>
3345 <td>
3346<p>Android Watch devices MAY have an aspect ratio of 1.0 (1:1).</p>
3347</td>
3348 </tr>
3349</table>
3350
3351
3352<p>The screen aspect ratio MUST be a value from 1.3333 (4:3) to 1.86 (roughly
335316:9), but Android Watch devices MAY have an aspect ratio of 1.0 (1:1) because
3354such a device implementation will use a UI_MODE_TYPE_WATCH as the
3355android.content.res.Configuration.uiMode.</p>
3356
3357<h4 id=7_1_1_3_screen_density>7.1.1.3. Screen Density</h4>
3358
3359
3360<p>The Android UI framework defines a set of standard logical densities to help
3361application developers target application resources. Device implementations
3362MUST report only one of the following logical Android framework densities
3363through the android.util.DisplayMetrics APIs, and MUST execute applications at
3364this standard density and MUST NOT change the value at at any time for the
3365default display.</p>
3366
3367<ul>
3368 <li> 120 dpi (ldpi)
3369 <li> 160 dpi (mdpi)
3370 <li> 213 dpi (tvdpi)
3371 <li> 240 dpi (hdpi)
3372 <li> 320 dpi (xhdpi)
3373 <li> 400 dpi (400dpi)
3374 <li> 480 dpi (xxhdpi)
3375 <li> 560 dpi (560dpi)
3376 <li> 640 dpi (xxxhdpi)
3377</ul>
3378
3379<p>Device implementations SHOULD define the standard Android framework density
3380that is numerically closest to the physical density of the screen, unless that
3381logical density pushes the reported screen size below the minimum supported. If
3382the standard Android framework density that is numerically closest to the
3383physical density results in a screen size that is smaller than the smallest
3384supported compatible screen size (320 dp width), device implementations SHOULD
3385report the next lowest standard Android framework density.</p>
3386
3387<h3 id=7_1_2_display_metrics>7.1.2. Display Metrics</h3>
3388
3389
3390<p>Device implementations MUST report correct values for all display metrics
3391defined in android.util.DisplayMetrics [<a href="http://developer.android.com/reference/android/util/DisplayMetrics.html">Resources, 62</a>] and MUST report the same values regardless of whether the embedded or
3392external screen is used as the default display.</p>
3393
3394<h3 id=7_1_3_screen_orientation>7.1.3. Screen Orientation</h3>
3395
3396
3397<p>Devices MUST report which screen orientations they support
3398(android.hardware.screen.portrait and/or android.hardware.screen.landscape) and
3399MUST report at least one supported orientation. For example, a device with a
3400fixed orientation landscape screen, such as a television or laptop, SHOULD only
3401report android.hardware.screen.landscape.</p>
3402
3403<p>Devices that report both screen orientations MUST support dynamic orientation
3404by applications to either portrait or landscape screen orientation. That is,
3405the device must respect the application's request for a specific screen
3406orientation. Device implementations MAY select either portrait or landscape
3407orientation as the default.</p>
3408
3409<p>Devices MUST report the correct value for the device's current orientation,
3410whenever queried via the android.content.res.Configuration.orientation,
3411android.view.Display.getOrientation(), or other APIs.</p>
3412
3413<p>Devices MUST NOT change the reported screen size or density when changing
3414orientation.</p>
3415
3416<h3 id=7_1_4_2d_and_3d_graphics_acceleration>7.1.4. 2D and 3D Graphics Acceleration</h3>
3417
3418
3419<p>Device implementations MUST support both OpenGL ES 1.0 and 2.0, as embodied and
3420detailed in the Android SDK documentations. Device implementations SHOULD
3421support OpenGL ES 3.0 or 3.1 on devices capable of supporting it. Device
3422implementations MUST also support Android RenderScript, as detailed in the
3423Android SDK documentation [<a href="http://developer.android.com/guide/topics/renderscript/">Resources, 63</a>].</p>
3424
3425<p>Device implementations MUST also correctly identify themselves as supporting
3426OpenGL ES 1.0, OpenGL ES 2.0, OpenGL ES 3.0 or OpenGL 3.1. That is:</p>
3427
3428<ul>
3429 <li> The managed APIs (such as via the GLES10.getString()method MUST report support
3430for OpenGL ES 1.0 and OpenGL ES 2.0.
3431 <li> The native C/C++ OpenGL APIs (APIs available to apps via libGLES_v1CM.so,
3432libGLES_v2.so, or libEGL.so) MUST report support for OpenGL ES 1.0 and OpenGL
3433ES 2.0.
3434 <li> Device implementations that declare support for OpenGL ES 3.0 or 3.1 MUST
3435support the corresponding managed APIs and include support for native C/C++
3436APIs. On device implementations that declare support for OpenGL ES 3.0 or 3.1,
3437libGLESv2.so MUST export the corresponding function symbols in addition to the
3438OpenGL ES 2.0 function symbols.
3439</ul>
3440
3441<p>In addition to OpenGL ES 3.1, Android provides an extension pack with Java
3442interfaces [<a href="https://developer.android.com/reference/android/opengl/GLES31Ext.html">Resources, 64</a>] and native support for advanced graphics functionality such as tessellation
3443and the ASTC texture compression format. Android device implementations MAY
3444support this extension pack, and—only if fully implemented—MUST identify the
3445support through the android.hardware.opengles.aep feature flag.</p>
3446
3447<p>Also, device implementations MAY implement any desired OpenGL ES extensions.
3448However, device implementations MUST report via the OpenGL ES managed and
3449native APIs all extension strings that they do support, and conversely MUST NOT
3450report extension strings that they do not support.</p>
3451
3452<p>Note that Android includes support for applications to optionally specify that
3453they require specific OpenGL texture compression formats. These formats are
3454typically vendor-specific. Device implementations are not required by Android
3455to implement any specific texture compression format. However, they SHOULD
3456accurately report any texture compression formats that they do support, via the
3457getString() method in the OpenGL API.</p>
3458
3459<p>Android includes a mechanism for applications to declare that they want to
3460enable hardware acceleration for 2D graphics at the Application, Activity,
3461Window, or View level through the use of a manifest tag
3462android:hardwareAccelerated or direct API calls [<a href="http://developer.android.com/guide/topics/graphics/hardware-accel.html">Resources, 65</a>].</p>
3463
3464<p>Device implementations MUST enable hardware acceleration by default, and MUST
3465disable hardware acceleration if the developer so requests by setting
3466android:hardwareAccelerated="false" or disabling hardware acceleration directly
3467through the Android View APIs.</p>
3468
3469<p>In addition, device implementations MUST exhibit behavior consistent with the
3470Android SDK documentation on hardware acceleration [<a href="http://developer.android.com/guide/topics/graphics/hardware-accel.html">Resources, 65</a>].</p>
3471
3472<p>Android includes a TextureView object that lets developers directly integrate
3473hardware-accelerated OpenGL ES textures as rendering targets in a UI hierarchy.
3474Device implementations MUST support the TextureView API, and MUST exhibit
3475consistent behavior with the upstream Android implementation.</p>
3476
3477<p>Android includes support for EGL_ANDROID_RECORDABLE, an EGLConfig attribute
3478that indicates whether the EGLConfig supports rendering to an ANativeWindow
3479that records images to a video. Device implementations MUST support
3480EGL_ANDROID_RECORDABLE extension [<a href="https://www.khronos.org/registry/egl/extensions/ANDROID/EGL_ANDROID_recordable.txt">Resources, 66</a>].</p>
3481
3482<h3 id=7_1_5_legacy_application_compatibility_mode>7.1.5. Legacy Application Compatibility Mode</h3>
3483
3484
3485<p>Android specifies a "compatibility mode" in which the framework operates in a
3486'normal' screen size equivalent (320dp width) mode for the benefit of legacy
3487applications not developed for old versions of Android that pre-date
3488screen-size independence. Device implementations MUST include support for
3489legacy application compatibility mode as implemented by the upstream Android
3490open source code. That is, device implementations MUST NOT alter the triggers
3491or thresholds at which compatibility mode is activated, and MUST NOT alter the
3492behavior of the compatibility mode itself.</p>
3493
3494<h3 id=7_1_6_screen_technology>7.1.6. Screen Technology</h3>
3495
3496
3497<p>The Android platform includes APIs that allow applications to render rich
3498graphics to the display. Devices MUST support all of these APIs as defined by
3499the Android SDK unless specifically allowed in this document. </p>
3500
3501<ul>
3502 <li> Devices MUST support displays capable of rendering 16-bit color graphics and
3503SHOULD support displays capable of 24-bit color graphics.
3504 <li> Devices MUST support displays capable of rendering animations.
3505 <li> The display technology used MUST have a pixel aspect ratio (PAR) between 0.9
3506and 1.15. That is, the pixel aspect ratio MUST be near square (1.0) with a 10 ~
350715% tolerance.
3508</ul>
3509
3510<h3 id=7_1_7_external_displays>7.1.7. External Displays</h3>
3511
3512
3513<p>Android includes support for secondary display to enable media sharing
3514capabilities and developer APIs for accessing external displays. If a device
3515supports an external display either via a wired, wireless, or an embedded
3516additional display connection then the device implementation MUST implement the
3517display manager API as described in the Android SDK documentation [<a href="http://developer.android.com/reference/android/hardware/display/DisplayManager.html">Resources, 67</a>].</p>
3518
3519<h2 id=7_2_input_devices>7.2. Input Devices</h2>
3520
3521
3522<h3 id=7_2_1_keyboard>7.2.1. Keyboard</h3>
3523
3524<table>
3525 <tr>
3526 <td class="tab2"></td>
3527 <td>
3528<p>Android Watch devices MAY but other type of device implementations MUST
3529implement a soft keyboard.</p>
3530</td>
3531 </tr>
3532</table>
3533
3534
3535<p>Device implementations:</p>
3536
3537<ul>
3538 <li> MUST include support for the Input Management Framework (which allows
3539third-party developers to create Input Method Editors—i.e. soft keyboard) as
3540detailed at <a href="http://developer.android.com">http://developer.android.com</a>
3541 <li> MUST provide at least one soft keyboard implementation (regardless of whether a
3542hard keyboard is present) except for Android Watch devices where the screen
3543size makes it less reasonable to have a soft keyboard
3544 <li> MAY include additional soft keyboard implementations
3545 <li> MAY include a hardware keyboard
3546 <li> MUST NOT include a hardware keyboard that does not match one of the formats
3547specified in android.content.res.Configuration.keyboard [<a href="http://developer.android.com/reference/android/content/res/Configuration.html">Resources, 68</a>] (QWERTY or 12-key)
3548</ul>
3549
3550<h3 id=7_2_2_non-touch_navigation>7.2.2. Non-touch Navigation</h3>
3551
3552<table>
3553 <tr>
3554 <td class="tab2"></td>
3555 <td>
3556<p>Android Television devices MUST support D-pad.</p>
3557</td>
3558 </tr>
3559</table>
3560
3561
3562<p>Device implementations:</p>
3563
3564<ul>
3565 <li> MAY omit a non-touch navigation option (trackball, d-pad, or wheel) if the
3566device implementation is not an Android Television device
3567 <li> MUST report the correct value for android.content.res.Configuration.navigation
3568[<a href="http://developer.android.com/reference/android/content/res/Configuration.html">Resources, 68</a>]
3569 <li> MUST provide a reasonable alternative user interface mechanism for the
3570selection and editing of text, compatible with Input Management Engines. The
3571upstream Android open source implementation includes a selection mechanism
3572suitable for use with devices that lack non-touch navigation inputs.
3573</ul>
3574
3575<h3 id=7_2_3_navigation_keys>7.2.3. Navigation Keys</h3>
3576
3577<table>
3578 <tr>
3579 <td class="tab2"></td>
3580 <td>
3581<p>The availability and visibility requirement of the Home, Recents, and Back
3582functions differ between device types as described in this section.</p>
3583</td>
3584 </tr>
3585</table>
3586
3587
3588<p>The Home, Recents, and Back functions (mapped to the key events KEYCODE_HOME,
3589KEYCODE_APP_SWITCH, KEYCODE_BACK, respectively) are essential to the Android
3590navigation paradigm and therefore;</p>
3591
3592<ul>
3593 <li> Android Handheld device implementations MUST provide the Home, Recents, and
3594Back functions.
3595 <li> Android Television device implementations MUST provide the Home and Back
3596functions.
3597 <li> Android Watch device implementations MUST have the Home function available to
3598the user, and the Back function except for when it is in UI_MODE_TYPE_WATCH.
3599 <li> All other types of device implementations MUST provide the Home and Back
3600functions.
3601</ul>
3602
3603<p>These functions MAY be implemented via dedicated physical buttons (such as
3604mechanical or capacitive touch buttons), or MAY be implemented using dedicated
3605software keys on a distinct portion of the screen, gestures, touch panel, etc.
3606Android supports both implementations. All of these functions MUST be
3607accessible with a single action (e.g. tap, double-click or gesture) when
3608visible.</p>
3609
3610<p>Recents function, if provided, MUST have a visible button or icon unless hidden
3611together with other navigation functions in full-screen mode. This does not
3612apply to devices upgrading from earlier Android versions that have physical
3613buttons for navigation and no recents key.</p>
3614
3615<p> The Home and Back functions, if provided, MUST each have a visible button or
3616icon unless hidden together with other navigation functions in full-screen mode
3617or when the uiMode UI_MODE_TYPE_MASK is set to UI_MODE_TYPE_WATCH.</p>
3618
3619<p>The Menu function is deprecated in favor of action bar since Android 4.0.
3620Therefore the new device implementations shipping with Android 5.0 MUST NOT
3621implement a dedicated physical button for the Menu function. Older device
3622implementations SHOULD NOT implement a dedicated physical button for the Menu
3623function, but if the physical Menu button is implemented and the device is
3624running applications with targetSdkVersion > 10, the device implementation:</p>
3625
3626<ul>
3627 <li> MUST display the action overflow button on the action bar when it is visible
3628and the resulting action overflow menu popup is not empty. For a device
3629implementation launched before Android 4.4 but upgrading to Android 5.0, this
3630is RECOMMENDED.
3631 <li> MUST NOT modify the position of the action overflow popup displayed by
3632selecting the overflow button in the action bar
3633 <li> MAY render the action overflow popup at a modified position on the screen when
3634it is displayed by selecting the physical menu button
3635</ul>
3636
3637<p>For backwards compatibility, device implementations MUST make the Menu function
3638available to applications when targetSdkVersion <= 10, either by a physical
3639button, a software key, or gestures. This Menu function should be presented
3640unless hidden together with other navigation functions.</p>
3641
3642<p>Android supports Assist action [<a href="http://developer.android.com/reference/android/content/Intent.html#ACTION_ASSIST">Resources, 69</a>]. Android device implementations except for Android Watch devices MUST make
3643the Assist action available to the user at all times when running applications.
3644The Assist action SHOULD be implemented as a long-press on the Home button or a
3645swipe-up gesture on the software Home key. This function MAY be implemented via
3646another physical button, software key, or gesture, but MUST be accessible with
3647a single action (e.g. tap, double-click, or gesture) when other navigation keys
3648are visible.</p>
3649
3650<p>Device implementations MAY use a distinct portion of the screen to display the
3651navigation keys, but if so, MUST meet these requirements:</p>
3652
3653<ul>
3654 <li> Device implementation navigation keys MUST use a distinct portion of the
3655screen, not available to applications, and MUST NOT obscure or otherwise
3656interfere with the portion of the screen available to applications.
3657 <li> Device implementations MUST make available a portion of the display to
3658applications that meets the requirements defined in <a href="#heading=h.mrv5xyps1ba8">section 7.1.1</a>.
3659 <li> Device implementations MUST display the navigation keys when applications do
3660not specify a system UI mode, or specify SYSTEM_UI_FLAG_VISIBLE.
3661 <li> Device implementations MUST present the navigation keys in an unobtrusive "low
3662profile" (eg. dimmed) mode when applications specify
3663SYSTEM_UI_FLAG_LOW_PROFILE.
3664 <li> Device implementations MUST hide the navigation keys when applications specify
3665SYSTEM_UI_FLAG_HIDE_NAVIGATION.
3666</ul>
3667
3668<h3 id=7_2_4_touchscreen_input>7.2.4. Touchscreen Input</h3>
3669
3670<table>
3671 <tr>
3672 <td class="tab2"></td>
3673 <td>
3674<p>Android Handhelds and Watch Devices MUST support touchscreen input.</p>
3675</td>
3676 </tr>
3677</table>
3678
3679
3680<p>Device implementations SHOULD have a pointer input system of some kind (either
3681mouse-like or touch). However, if a device implementation does not support a
3682pointer input system, it MUST NOT report the android.hardware.touchscreen or
3683android.hardware.faketouch feature constant. Device implementations that do
3684include a pointer input system:</p>
3685
3686<ul>
3687 <li> SHOULD support fully independently tracked pointers, if the device input system
3688supports multiple pointers
3689 <li> MUST report the value of android.content.res.Configuration.touchscreen [<a href="http://developer.android.com/reference/android/content/res/Configuration.html">Resources, 68</a>] corresponding to the type of the specific touchscreen on the device
3690</ul>
3691
3692<p>Android includes support for a variety of touchscreens, touch pads, and fake
3693touch input devices. Touchscreen based device implementations are associated
3694with a display [<a href="http://source.android.com/devices/tech/input/touch-devices.html">Resources, 70</a>] such that the user has the impression of directly manipulating items on
3695screen. Since the user is directly touching the screen, the system does not
3696require any additional affordances to indicate the objects being manipulated.
3697In contrast, a fake touch interface provides a user input system that
3698approximates a subset of touchscreen capabilities. For example, a mouse or
3699remote control that drives an on-screen cursor approximates touch, but requires
3700the user to first point or focus then click. Numerous input devices like the
3701mouse, trackpad, gyro-based air mouse, gyro-pointer, joystick, and multi-touch
3702trackpad can support fake touch interactions. Android 5.0 includes the feature
3703constant android.hardware.faketouch, which corresponds to a high-fidelity
3704non-touch (pointer-based) input device such as a mouse or trackpad that can
3705adequately emulate touch-based input (including basic gesture support), and
3706indicates that the device supports an emulated subset of touchscreen
3707functionality. Device implementations that declare the fake touch feature MUST
3708meet the fake touch requirements in <a href="#heading=h.7tz929qk2hjr">section 7.2.5</a>.</p>
3709
3710<p>Device implementations MUST report the correct feature corresponding to the
3711type of input used. Device implementations that include a touchscreen
3712(single-touch or better) MUST report the platform feature constant
3713android.hardware.touchscreen. Device implementations that report the platform
3714feature constant android.hardware.touchscreen MUST also report the platform
3715feature constant android.hardware.faketouch. Device implementations that do not
3716include a touchscreen (and rely on a pointer device only) MUST NOT report any
3717touchscreen feature, and MUST report only android.hardware.faketouch if they
3718meet the fake touch requirements in <a href="#heading=h.7tz929qk2hjr">section 7.2.5</a>.</p>
3719
3720<h3 id=7_2_5_fake_touch_input>7.2.5. Fake Touch Input</h3>
3721
3722
3723<p>Device implementations that declare support for android.hardware.faketouch:</p>
3724
3725<ul>
3726 <li> MUST report the absolute X and Y screen positions of the pointer location and
3727display a visual pointer on the screen [<a href="http://developer.android.com/reference/android/view/MotionEvent.html">Resources, 71</a>]
3728 <li> MUST report touch event with the action code that specifies the state change
3729that occurs on the pointer going down or up on the screen [<a href="http://developer.android.com/reference/android/view/MotionEvent.html">Resources, 71</a>]
3730 <li> MUST support pointer down and up on an object on the screen, which allows users
3731to emulate tap on an object on the screen
3732 <li> MUST support pointer down, pointer up, pointer down then pointer up in the same
3733place on an object on the screen within a time threshold, which allows users to
3734emulate double tap on an object on the screen [<a href="http://developer.android.com/reference/android/view/MotionEvent.html">Resources, 71</a>]
3735 <li> MUST support pointer down on an arbitrary point on the screen, pointer move to
3736any other arbitrary point on the screen, followed by a pointer up, which allows
3737users to emulate a touch drag
3738 <li> MUST support pointer down then allow users to quickly move the object to a
3739different position on the screen and then pointer up on the screen, which
3740allows users to fling an object on the screen
3741</ul>
3742
3743<p>Devices that declare support for android.hardware.faketouch.multitouch.distinct
3744MUST meet the requirements for faketouch above, and MUST also support distinct
3745tracking of two or more independent pointer inputs.</p>
3746
3747<h3 id=7_2_6_game_controller_support>7.2.6. Game Controller Support</h3>
3748
3749
3750<p>Android Television device implementations MUST support button mappings for game
3751controllers as listed below. The upstream Android implementation includes
3752implementation for game controllers that satisfies this requirement. </p>
3753
3754<h4 id=7_2_6_1_button_mappings>7.2.6.1. Button Mappings</h4>
3755
3756
3757<p>Android Television device implementations MUST support the following key
3758mappings:</p>
3759<table>
3760 <tr>
3761 <td class="tab0">
3762<p><strong>Button</strong></p>
3763</td>
3764 <td class="tab0">
3765<p><strong>HID Usage</strong>2</p>
3766</td>
3767 <td class="tab0">
3768<p><strong>Android Button</strong></p>
3769</td>
3770 </tr>
3771 <tr>
3772 <td>
3773<p><a href="http://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_BUTTON_A">A</a>1</p>
3774</td>
3775 <td>
3776<p>0x09 0x0001</p>
3777</td>
3778 <td>
3779<p>KEYCODE_BUTTON_A (96)</p>
3780</td>
3781 </tr>
3782 <tr>
3783 <td>
3784<p><a href="http://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_BUTTON_B">B</a>1</p>
3785</td>
3786 <td>
3787<p>0x09 0x0002</p>
3788</td>
3789 <td>
3790<p>KEYCODE_BUTTON_B (97)</p>
3791</td>
3792 </tr>
3793 <tr>
3794 <td>
3795<p><a href="http://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_BUTTON_X">X</a>1</p>
3796</td>
3797 <td>
3798<p>0x09 0x0004</p>
3799</td>
3800 <td>
3801<p>KEYCODE_BUTTON_X (99)</p>
3802</td>
3803 </tr>
3804 <tr>
3805 <td>
3806<p><a href="http://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_BUTTON_Y">Y</a>1</p>
3807</td>
3808 <td>
3809<p>0x09 0x0005</p>
3810</td>
3811 <td>
3812<p>KEYCODE_BUTTON_Y (100)</p>
3813</td>
3814 </tr>
3815 <tr>
3816 <td>
3817<p><a href="http://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_DPAD_UP">D-pad up</a>1</p>
3818
3819<p><a href="http://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_DPAD_DOWN">D-pad down</a>1</p>
3820</td>
3821 <td>
3822<p>0x01 0x00393</p>
3823</td>
3824 <td>
3825<p><a href="http://developer.android.com/reference/android/view/MotionEvent.html#AXIS_HAT_Y">AXIS_HAT_Y</a>4</p>
3826</td>
3827 </tr>
3828 <tr>
3829 <td>
3830<p><a href="http://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_DPAD_LEFT">D-pad left</a>1</p>
3831
3832<p><a href="http://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_DPAD_RIGHT">D-pad right</a>1</p>
3833</td>
3834 <td>
3835<p>0x01 0x00393</p>
3836</td>
3837 <td>
3838<p><a href="http://developer.android.com/reference/android/view/MotionEvent.html#AXIS_HAT_X">AXIS_HAT_X4 </a></p>
3839</td>
3840 </tr>
3841 <tr>
3842 <td>
3843<p><a href="http://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_BUTTON_L1">Left shoulder button</a>1</p>
3844</td>
3845 <td>
3846<p>0x09 0x0007</p>
3847</td>
3848 <td>
3849<p>KEYCODE_BUTTON_L1 (102)</p>
3850</td>
3851 </tr>
3852 <tr>
3853 <td>
3854<p><a href="http://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_BUTTON_R1">Right shoulder button</a>1</p>
3855</td>
3856 <td>
3857<p>0x09 0x0008</p>
3858</td>
3859 <td>
3860<p>KEYCODE_BUTTON_R1 (103)</p>
3861</td>
3862 </tr>
3863 <tr>
3864 <td>
3865<p><a href="http://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_BUTTON_THUMBL">Left stick click</a>1</p>
3866</td>
3867 <td>
3868<p>0x09 0x000E</p>
3869</td>
3870 <td>
3871<p>KEYCODE_BUTTON_THUMBL (106)</p>
3872</td>
3873 </tr>
3874 <tr>
3875 <td>
3876<p><a href="http://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_BUTTON_THUMBR">Right stick click</a>1</p>
3877</td>
3878 <td>
3879<p>0x09 0x000F</p>
3880</td>
3881 <td>
3882<p>KEYCODE_BUTTON_THUMBR (107)</p>
3883</td>
3884 </tr>
3885 <tr>
3886 <td>
3887<p><a href="http://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_HOME">Home</a>1</p>
3888</td>
3889 <td>
3890<p>0x0c 0x0223</p>
3891</td>
3892 <td>
3893<p>KEYCODE_HOME (3)</p>
3894</td>
3895 </tr>
3896 <tr>
3897 <td>
3898<p><a href="http://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_BACK">Back</a>1</p>
3899</td>
3900 <td>
3901<p>0x0c 0x0224</p>
3902</td>
3903 <td>
3904<p>KEYCODE_BACK (4)</p>
3905</td>
3906 </tr>
3907</table>
3908
3909
3910<p>1 [<a href="http://developer.android.com/reference/android/view/KeyEvent.html">Resources, 72</a>]</p>
3911
3912<p>2 The above HID usages must be declared within a Game pad CA (0x01 0x0005).</p>
3913
3914<p>3 This usage must have a Logical Minimum of 0, a Logical Maximum of 7, a
3915Physical Minimum of 0, a Physical Maximum of 315, Units in Degrees, and a
3916Report Size of 4. The logical value is defined to be the clockwise rotation
3917away from the vertical axis; for example, a logical value of 0 represents no
3918rotation and the up button being pressed, while a logical value of 1 represents
3919a rotation of 45 degrees and both the up and left keys being pressed.</p>
3920
3921<p>4 [<a href="http://developer.android.com/reference/android/view/MotionEvent.html">Resources, 71</a>]</p>
3922<table>
3923 <tr>
3924 <td class="tab0">
3925<p><strong>Analog Controls</strong>1</p>
3926</td>
3927 <td class="tab0">
3928<p><strong>HID Usage</strong></p>
3929</td>
3930 <td class="tab0">
3931<p><strong>Android Button</strong></p>
3932</td>
3933 </tr>
3934 <tr>
3935 <td>
3936<p><a href="http://developer.android.com/reference/android/view/MotionEvent.html#AXIS_LTRIGGER">Left Trigger</a></p>
3937</td>
3938 <td>
3939<p>0x02 0x00C5</p>
3940</td>
3941 <td>
3942<p>AXIS_LTRIGGER </p>
3943</td>
3944 </tr>
3945 <tr>
3946 <td>
3947<p><a href="http://developer.android.com/reference/android/view/MotionEvent.html#AXIS_THROTTLE">Right Trigger</a></p>
3948</td>
3949 <td>
3950<p>0x02 0x00C4</p>
3951</td>
3952 <td>
3953<p>AXIS_RTRIGGER </p>
3954</td>
3955 </tr>
3956 <tr>
3957 <td>
3958<p><a href="http://developer.android.com/reference/android/view/MotionEvent.html#AXIS_Y">Left Joystick</a></p>
3959</td>
3960 <td>
3961<p>0x01 0x0030</p>
3962
3963<p>0x01 0x0031</p>
3964</td>
3965 <td>
3966<p>AXIS_X</p>
3967
3968<p>AXIS_Y</p>
3969</td>
3970 </tr>
3971 <tr>
3972 <td>
3973<p><a href="http://developer.android.com/reference/android/view/MotionEvent.html#AXIS_Z">Right Joystick</a></p>
3974</td>
3975 <td>
3976<p>0x01 0x0032</p>
3977
3978<p>0x01 0x0035</p>
3979</td>
3980 <td>
3981<p>AXIS_Z</p>
3982
3983<p>AXIS_RZ</p>
3984</td>
3985 </tr>
3986</table>
3987
3988
3989<p>1 [<a href="http://developer.android.com/reference/android/view/MotionEvent.html">Resources, 71</a>]</p>
3990
3991<h3 id=7_2_7_remote_control>7.2.7. Remote Control</h3>
3992
3993
3994<p>Android Television device implementations SHOULD provide a remote control to
3995allow users to access the TV interface. The remote control MAY be a physical
3996remote or can be a software-based remote that is accessible from a mobile phone
3997or tablet. The remote control MUST meet the requirements defined below.</p>
3998
3999<ul>
4000 <li> <strong>Search affordance</strong>—Device implementations MUST fire KEYCODE_SEARCH when the user invokes voice
4001search either on the physical or software-based remote.
4002 <li> <strong>Navigation</strong>—All Android Television remotes MUST include Back, Home, and Select buttons and
4003support for D-pad events [<a href="http://developer.android.com/reference/android/view/KeyEvent.html">Resources, 72</a>].
4004</ul>
4005
4006<h2 id=7_3_sensors>7.3. Sensors</h2>
4007
4008
4009<p>Android includes APIs for accessing a variety of sensor types. Devices
4010implementations generally MAY omit these sensors, as provided for in the
4011following subsections. If a device includes a particular sensor type that has a
4012corresponding API for third-party developers, the device implementation MUST
4013implement that API as described in the Android SDK documentation and the
4014Android Open Source documentation on sensors [<a href="http://source.android.com/devices/sensors">Resources, 73</a>]. For example, device implementations:</p>
4015
4016<ul>
4017 <li> MUST accurately report the presence or absence of sensors per the
4018android.content.pm.PackageManager class [<a href="http://developer.android.com/reference/android/content/pm/PackageManager.html">Resources, 53]</a>
4019 <li> MUST return an accurate list of supported sensors via the
4020SensorManager.getSensorList() and similar methods
4021 <li> MUST behave reasonably for all other sensor APIs (for example, by returning
4022true or false as appropriate when applications attempt to register listeners,
4023not calling sensor listeners when the corresponding sensors are not present;
4024etc.)
4025 <li> MUST report all sensor measurements using the relevant International System of
4026Units (metric) values for each sensor type as defined in the Android SDK
4027documentation [<a href="http://developer.android.com/reference/android/hardware/SensorEvent.html">Resources, 74</a>]
4028 <li> SHOULD report the event time in nanoseconds as defined in the Android SDK
4029documentation, representing the time the event happened and synchronized with
4030the SystemClock.elapsedRealtimeNano() clock. Existing and new Android devices
4031are <strong>very strongly encouraged</strong> to meet these requirement so they will be able to upgrade to the future
4032platform releases where this might become a REQUIRED component. The
4033synchronization error SHOULD be below 100 milliseconds [<a href="http://developer.android.com/reference/android/hardware/SensorEvent.html#timestamp">Resources, 75</a>].
4034</ul>
4035
4036<p>The list above is not comprehensive; the documented behavior of the Android SDK
4037and the Android Open Source Documentations on Sensors [<a href="http://source.android.com/devices/sensors">Resources, 73</a>] is to be considered authoritative.</p>
4038
4039<p>Some sensor types are composite, meaning they can be derived from data provided
4040by one or more other sensors. (Examples include the orientation sensor, and the
4041linear acceleration sensor.) Device implementations SHOULD implement these
4042sensor types, when they include the prerequisite physical sensors as described
4043in [<a href="http://source.android.com/devices/sensors/composite_sensors.html">Resources, 76</a>]. If a device implementation includes a composite sensor it MUST implement the
4044sensor as described in the Android Open Source documentation on composite
4045sensors [<a href="http://source.android.com/devices/sensors/composite_sensors.html">Resources, 76</a>].</p>
4046
4047<p>Some Android sensor supports a "continuous" trigger mode, which returns data
4048continuously [<a href="http://source.android.com/devices/sensors/base_triggers.html#continuous">Resources, 77</a>]. For any API indicated by the Android SDK documentation to be a continuous
4049sensor, device implementations MUST continuously provide periodic data samples
4050that SHOULD have a jitter below 3%, where jitter is defined as the standard
4051deviation of the difference of the reported timestamp values between
4052consecutive events.</p>
4053
4054<p>Note that the device implementations MUST ensure that the sensor event stream
4055MUST NOT prevent the device CPU from entering a suspend state or waking up from
4056a suspend state.</p>
4057
4058<p>Finally, when several sensors are activated, the power consumption SHOULD NOT
4059exceed the sum of the individual sensor’s reported power consumption.</p>
4060
4061<h3 id=7_3_1_accelerometer>7.3.1. Accelerometer</h3>
4062
4063
4064<p>Device implementations SHOULD include a 3-axis accelerometer. Android Handheld
4065devices and Android Watch devices are strongly encouraged to include this
4066sensor. If a device implementation does include a 3-axis accelerometer, it:</p>
4067
4068<ul>
4069 <li> MUST implement and report TYPE_ACCELEROMETER sensor [<a href="http://developer.android.com/reference/android/hardware/Sensor.html#TYPE_ACCELEROMETER">Resources, 78</a>]
4070 <li> MUST be able to report events up to a frequency of at least 100 Hz and SHOULD
4071report events up to at least 200 Hz
4072 <li> MUST comply with the Android sensor coordinate system as detailed in the
4073Android APIs [<a href="http://developer.android.com/reference/android/hardware/SensorEvent.html">Resources, 74</a>]
4074 <li> MUST be capable of measuring from freefall up to four times the gravity (4g) or
4075more on any axis
4076 <li> MUST have a resolution of at least 8-bits and SHOULD have a resolution of at
4077least 16-bits
4078 <li> SHOULD be calibrated while in use if the characteristics changes over the life
4079cycle and compensated, and preserve the compensation parameters between device
4080reboots
4081 <li> SHOULD be temperature compensated
4082 <li> MUST have a standard deviation no greater than 0.05 m/s^, where the standard
4083deviation should be calculated on a per axis basis on samples collected over a
4084period of at least 3 seconds at the fastest sampling rate
4085 <li> SHOULD implement the TYPE_SIGNIFICANT_MOTION, TYPE_TILT_DETECTOR,
4086TYPE_STEP_DETECTOR, TYPE_STEP_COUNTER composite sensors as described in the
4087Android SDK document. Existing and new Android devices are <strong>very strongly encouraged</strong> to implement the TYPE_SIGNIFICANT_MOTION composite sensor. If any of these
4088sensors are implemented, the sum of their power consumption MUST always be less
4089than 4 mW and SHOULD each be below 2 mW and 0.5 mW for when the device is in a
4090dynamic or static condition.
4091 <li> If a gyroscope sensor is included, MUST implement the TYPE_GRAVITY and
4092TYPE_LINEAR_ACCELERATION composite sensors and SHOULD implement the
4093TYPE_GAME_ROTATION_VECTOR composite sensor. Existing and new Android devices
4094are strongly encouraged to implement the TYPE_GAME_ROTATION_VECTOR sensor.
4095 <li> SHOULD implement a TYPE_ROTATION_VECTOR composite sensor, if a gyroscope sensor
4096and a magnetometer sensor is also included
4097</ul>
4098
4099<h3 id=7_3_2_magnetometer>7.3.2. Magnetometer</h3>
4100
4101
4102<p>Device implementations SHOULD include a 3-axis magnetometer (compass). If a
4103device does include a 3-axis magnetometer, it:</p>
4104
4105<ul>
4106 <li> MUST implement the TYPE_MAGNETIC_FIELD sensor and SHOULD also implement
4107TYPE_MAGNETIC_FIELD_UNCALIBRATED sensor. Existing and new Android devices are
4108strongly encouraged to implement the TYPE_MAGNETIC_FIELD_UNCALIBRATED sensor.
4109 <li> MUST be able to report events up to a frequency of at least 10 Hz and SHOULD
4110report events up to at least 50 Hz
4111 <li> MUST comply with the Android sensor coordinate system as detailed in the
4112Android APIs [<a href="http://developer.android.com/reference/android/hardware/SensorEvent.html">Resources, 74</a>]
4113 <li> MUST be capable of measuring between -900 μT and +900 μT on each axis before
4114saturating
4115 <li> MUST have a hard iron offset value less than 700 μT and SHOULD have a value
4116below 200 μT, by placing the magnetometer far from dynamic (current-induced)
4117and static (magnet-induced) magnetic fields
4118 <li> MUST have a resolution equal or denser than 0.6 μT and SHOULD have a resolution
4119equal or denser than 0.2 μT
4120 <li> SHOULD be temperature compensated
4121 <li> MUST support online calibration and compensation of the hard iron bias, and
4122preserve the compensation parameters between device reboots
4123 <li> MUST have the soft iron compensation applied—the calibration can be done either
4124while in use or during the production of the device
4125 <li> SHOULD have a standard deviation, calculated on a per axis basis on samples
4126collected over a period of at least 3 seconds at the fastest sampling rate, no
4127greater than 0.5 μT
4128 <li> SHOULD implement a TYPE_ROTATION_VECTOR composite sensor, if an accelerometer
4129sensor and a gyroscope sensor is also included
4130 <li> MAY implement the TYPE_GEOMAGNETIC_ROTATION_VECTOR sensor if an accelerometer
4131sensor is also implemented. However if implemented, it MUST consume less than
413210 mW and SHOULD consume less than 3 mW when the sensor is registered for batch
4133mode at 10 Hz.
4134</ul>
4135
4136<h3 id=7_3_3_gps>7.3.3. GPS</h3>
4137
4138
4139<p>Device implementations SHOULD include a GPS receiver. If a device
4140implementation does include a GPS receiver, it SHOULD include some form of
4141"assisted GPS" technique to minimize GPS lock-on time.</p>
4142
4143<h3 id=7_3_4_gyroscope>7.3.4. Gyroscope</h3>
4144
4145
4146<p>Device implementations SHOULD include a gyroscope (angular change sensor).
4147Devices SHOULD NOT include a gyroscope sensor unless a 3-axis accelerometer is
4148also included. If a device implementation includes a gyroscope, it:</p>
4149
4150<ul>
4151 <li> MUST implement the TYPE_GYROSCOPE sensor and SHOULD also implement
4152TYPE_GYROSCOPE_UNCALIBRATED sensor. Existing and new Android devices are
4153strongly encouraged to implement the SENSOR_TYPE_GYROSCOPE_UNCALIBRATED sensor.
4154 <li> MUST be capable of measuring orientation changes up to 1,000 degrees per second
4155 <li> MUST be able to report events up to a frequency of at least 100 Hz and SHOULD
4156report events up to at least 200 Hz
4157 <li> MUST have a resolution of 12-bits or more and SHOULD have a resolution of
415816-bits or more
4159 <li> MUST be temperature compensated
4160 <li> MUST be calibrated and compensated while in use, and preserve the compensation
4161parameters between device reboots
4162 <li> MUST have a variance no greater than 1e-7 rad^2 / s^2 per Hz (variance per Hz,
4163or rad^2 / s). The variance is allowed to vary with the sampling rate, but must
4164be constrained by this value. In other words, if you measure the variance of
4165the gyro at 1 Hz sampling rate it should be no greater than 1e-7 rad^2/s^2.
4166 <li> SHOULD implement a TYPE_ROTATION_VECTOR composite sensor, if an accelerometer
4167sensor and a magnetometer sensor is also included
4168 <li> If an accelerometer sensor is included, MUST implement the TYPE_GRAVITY and
4169TYPE_LINEAR_ACCELERATION composite sensors and SHOULD implement the
4170TYPE_GAME_ROTATION_VECTOR composite sensor. Existing and new Android devices
4171are strongly encouraged to implement the TYPE_GAME_ROTATION_VECTOR sensor.
4172</ul>
4173
4174<h3 id=7_3_5_barometer>7.3.5. Barometer</h3>
4175
4176
4177<p>Device implementations SHOULD include a barometer (ambient air pressure
4178sensor). If a device implementation includes a barometer, it:</p>
4179
4180<ul>
4181 <li> MUST implement and report TYPE_PRESSURE sensor
4182 <li> MUST be able to deliver events at 5 Hz or greater
4183 <li> MUST have adequate precision to enable estimating altitude
4184 <li> MUST be temperature compensated
4185</ul>
4186
4187<h3 id=7_3_6_thermometer>7.3.6. Thermometer</h3>
4188
4189
4190<p>Device implementations MAY include an ambient thermometer (temperature sensor).
4191If present, it MUST be defined as SENSOR_TYPE_AMBIENT_TEMPERATURE and it MUST
4192measure the ambient (room) temperature in degrees Celsius.</p>
4193
4194<p>Device implementations MAY but SHOULD NOT include a CPU temperature sensor. If
4195present, it MUST be defined as SENSOR_TYPE_TEMPERATURE, it MUST measure the
4196temperature of the device CPU, and it MUST NOT measure any other temperature.
4197Note the SENSOR_TYPE_TEMPERATURE sensor type was deprecated in Android 4.0.</p>
4198
4199<h3 id=7_3_7_photometer>7.3.7. Photometer</h3>
4200
4201
4202<p>Device implementations MAY include a photometer (ambient light sensor).</p>
4203
4204<h3 id=7_3_8_proximity_sensor>7.3.8. Proximity Sensor</h3>
4205
4206
4207<p>Device implementations MAY include a proximity sensor. Devices that can make a
4208voice call and indicate any value other than PHONE_TYPE_NONE in getPhoneType
4209SHOULD include a proximity sensor. If a device implementation does include a
4210proximity sensor, it:</p>
4211
4212<ul>
4213 <li> MUST measure the proximity of an object in the same direction as the screen.
4214That is, the proximity sensor MUST be oriented to detect objects close to the
4215screen, as the primary intent of this sensor type is to detect a phone in use
4216by the user. If a device implementation includes a proximity sensor with any
4217other orientation, it MUST NOT be accessible through this API.
4218 <li> MUST have 1-bit of accuracy or more
4219</ul>
4220
4221<h2 id=7_4_data_connectivity>7.4. Data Connectivity</h2>
4222
4223
4224<h3 id=7_4_1_telephony>7.4.1. Telephony</h3>
4225
4226
4227<p>"Telephony" as used by the Android APIs and this document refers specifically
4228to hardware related to placing voice calls and sending SMS messages via a GSM
4229or CDMA network. While these voice calls may or may not be packet-switched,
4230they are for the purposes of Android considered independent of any data
4231connectivity that may be implemented using the same network. In other words,
4232the Android "telephony" functionality and APIs refer specifically to voice
4233calls and SMS. For instance, device implementations that cannot place calls or
4234send/receive SMS messages MUST NOT report the android.hardware.telephony
4235feature or any subfeatures, regardless of whether they use a cellular network
4236for data connectivity.</p>
4237
4238<p>Android MAY be used on devices that do not include telephony hardware. That is,
4239Android is compatible with devices that are not phones. However, if a device
4240implementation does include GSM or CDMA telephony, it MUST implement full
4241support for the API for that technology. Device implementations that do not
4242include telephony hardware MUST implement the full APIs as no-ops.</p>
4243
4244<h3 id=7_4_2_ieee_802_11_wi-fi>7.4.2. IEEE 802.11 (Wi-Fi)</h3>
4245
4246<table>
4247 <tr>
4248 <td class="tab2"></td>
4249 <td>
4250<p>Android Television device implementations MUST include Wi-Fi support. </p>
4251</td>
4252 </tr>
4253</table>
4254
4255
4256<p>Android Television device implementations MUST include support for one or more
4257forms of 802.11 (b/g/a/n, etc.) and other types of Android device
4258implementation SHOULD include support for one or more forms of 802.11. If a
4259device implementation does include support for 802.11 and exposes the
4260functionality to a third-party application, it MUST implement the corresponding
4261Android API and:</p>
4262
4263<ul>
4264 <li> MUST report the hardware feature flag android.hardware.wifi
4265 <li> MUST implement the multicast API as described in the SDK documentation [<a href="http://developer.android.com/reference/android/net/wifi/WifiManager.MulticastLock.html">Resources, 79</a>]
4266 <li> MUST support multicast DNS (mDNS) and MUST NOT filter mDNS packets
4267(224.0.0.251) at any time of operation including when the screen is not in an
4268active state
4269</ul>
4270
4271<h4 id=7_4_2_1_wi-fi_direct>7.4.2.1. Wi-Fi Direct</h4>
4272
4273
4274<p>Device implementations SHOULD include support for Wi-Fi Direct (Wi-Fi
4275peer-to-peer). If a device implementation does include support for Wi-Fi
4276Direct, it MUST implement the corresponding Android API as described in the SDK
4277documentation [<a href="http://developer.android.com/reference/android/net/wifi/p2p/WifiP2pManager.html">Resources, 80</a>]. If a device implementation includes support for Wi-Fi Direct, then it:</p>
4278
4279<ul>
4280 <li> MUST report the hardware feature android.hardware.wifi.direct
4281 <li> MUST support regular Wi-Fi operation
4282 <li> SHOULD support concurrent Wi-Fi and Wi-Fi Direct operation
4283</ul>
4284
4285<h4 id=7_4_2_2_wi-fi_tunneled_direct_link_setup>7.4.2.2. Wi-Fi Tunneled Direct Link Setup</h4>
4286
4287<table>
4288 <tr>
4289 <td class="tab2"></td>
4290 <td>
4291<p>Android Television device implementations MUST include support for Wi-Fi
4292Tunneled Direct Link Setup (TDLS).</p>
4293</td>
4294 </tr>
4295</table>
4296
4297
4298<p>Android Television device implementations MUST include support for Wi-Fi
4299Tunneled Direct Link Setup (TDLS) and other types of Android device
4300implementations SHOULD include support for Wi-Fi TDLS as described in the
4301Android SDK Documentation [<a href="http://developer.android.com/reference/android/net/wifi/WifiManager.html">Resources, 81</a>]. If a device implementation does include support for TDLS and TDLS is enabled
4302by the WiFiManager API, the device:</p>
4303
4304<ul>
4305 <li> SHOULD use TDLS only when it is possible AND beneficial
4306 <li> SHOULD have some heuristic and NOT use TDLS when its performance might be worse
4307than going through the Wi-Fi access point
4308</ul>
4309
4310<h3 id=7_4_3_bluetooth>7.4.3. Bluetooth</h3>
4311
4312<table>
4313 <tr>
4314 <td class="tab2"></td>
4315 <td>
4316<p>Android Television device implementations MUST support Bluetooth and Bluetooth
4317LE and Android Watch device implementations MUST support Bluetooth.</p>
4318</td>
4319 </tr>
4320</table>
4321
4322
4323<p>Android includes support for Bluetooth and Bluetooth Low Energy [<a href="http://developer.android.com/reference/android/bluetooth/package-summary.html">Resources, 82</a>]. Device implementations that include support for Bluetooth and Bluetooth Low
4324Energy MUST declare the relevant platform features (android.hardware.bluetooth
4325and android.hardware.bluetooth_le respectively) and implement the platform
4326APIs. Device implementations SHOULD implement relevant Bluetooth profiles such
4327as A2DP, AVCP, OBEX, etc. as appropriate for the device. Android Television
4328device implementations MUST support Bluetooth and Bluetooth LE. </p>
4329
4330<p>Device implementations including support for Bluetooth Low Energy:</p>
4331
4332<ul>
4333 <li> MUST declare the hardware feature android.hardware.bluetooth_le
4334 <li> MUST enable the GATT (generic attribute profile) based Bluetooth APIs as
4335described in the SDK documentation and [<a href="http://developer.android.com/reference/android/bluetooth/package-summary.html">Resources, 82</a>]
4336 <li> SHOULD support offloading of the filtering logic to the bluetooth chipset when
4337implementing the ScanFilter API [<a href="https://developer.android.com/reference/android/bluetooth/le/ScanFilter.html">Resources, 83</a>], and MUST report the correct value of where the filtering logic is
4338implemented whenever queried via the
4339android.bluetooth.BluetoothAdapter.isOffloadedFilteringSupported() method
4340 <li> SHOULD support offloading of the batched scanning to the bluetooth chipset, but
4341if not supported, MUST report ‘false’ whenever queried via the
4342android.bluetooth.BluetoothAdapater.isOffloadedScanBatchingSupported() method.
4343 <li> SHOULD support multi advertisement with at least 4 slots, but if not supported,
4344MUST report ‘false’ whenever queried via the
4345android.bluetooth.BluetoothAdapter.isMultipleAdvertisementSupported() method
4346</ul>
4347
4348<h3 id=7_4_4_near-field_communications>7.4.4. Near-Field Communications</h3>
4349
4350
4351<p>Device implementations SHOULD include a transceiver and related hardware for
4352Near-Field Communications (NFC). If a device implementation does include NFC
4353hardware and plans to make it available to third-party apps, then it:</p>
4354
4355<ul>
4356 <li> MUST report the android.hardware.nfc feature from the
4357android.content.pm.PackageManager.hasSystemFeature() method [<a href="http://developer.android.com/reference/android/content/pm/PackageManager.html">Resources, 53</a>]
4358 <li> MUST be capable of reading and writing NDEF messages via the following NFC
4359standards:
4360 <ul>
4361 <li> MUST be capable of acting as an NFC Forum reader/writer (as defined by the NFC
4362Forum technical specification NFCForum-TS-DigitalProtocol-1.0) via the
4363following NFC standards:
4364 <ul>
4365 <li> NfcA (ISO14443-3A)
4366 <li> NfcB (ISO14443-3B)
4367 <li> NfcF (JIS 6319-4)
4368 <li> IsoDep (ISO 14443-4)
4369 <li> NFC Forum Tag Types 1, 2, 3, 4 (defined by the NFC Forum)
4370 </ul>
4371 <li> SHOULD be capable of reading and writing NDEF messages via the following NFC
4372standards. Note that while the NFC standards below are stated as SHOULD, the
4373Compatibility Definition for a future version is planned to change these to
4374MUST. These standards are optional in this version but will be required in
4375future versions. Existing and new devices that run this version of Android are <strong>very strongly encouraged</strong> to meet these requirements now so they will be able to upgrade to the future
4376platform releases.
4377 <ul>
4378 <li> NfcV (ISO 15693)
4379 </ul>
4380 <li> MUST be capable of transmitting and receiving data via the following
4381peer-to-peer standards and protocols:
4382 <ul>
4383 <li> ISO 18092
4384 <li> LLCP 1.0 (defined by the NFC Forum)
4385 <li> SDP 1.0 (defined by the NFC Forum)
4386 <li> NDEF Push Protocol [<a href="http://static.googleusercontent.com/media/source.android.com/en/us/compatibility/ndef-push-protocol.pdf">Resources, 84</a>]
4387 <li> SNEP 1.0 (defined by the NFC Forum)
4388 </ul>
4389 <li> MUST include support for Android Beam [<a href="http://developer.android.com/guide/topics/connectivity/nfc/nfc.html">Resources, 85</a>]:
4390 <ul>
4391 <li> MUST implement the SNEP default server. Valid NDEF messages received by the
4392default SNEP server MUST be dispatched to applications using the
4393android.nfc.ACTION_NDEF_DISCOVERED intent. Disabling Android Beam in settings
4394MUST NOT disable dispatch of incoming NDEF message.
4395 <li> MUST honor the android.settings.NFCSHARING_SETTINGS intent to show NFC sharing
4396settings [<a href="http://developer.android.com/reference/android/provider/Settings.html#ACTION_NFCSHARING_SETTINGS">Resources, 86</a>]
4397 <li> MUST implement the NPP server. Messages received by the NPP server MUST be
4398processed the same way as the SNEP default server.
4399 <li> MUST implement a SNEP client and attempt to send outbound P2P NDEF to the
4400default SNEP server when Android Beam is enabled. If no default SNEP server is
4401found then the client MUST attempt to send to an NPP server.
4402 <li> MUST allow foreground activities to set the outbound P2P NDEF message using
4403android.nfc.NfcAdapter.setNdefPushMessage, and
4404android.nfc.NfcAdapter.setNdefPushMessageCallback, and
4405android.nfc.NfcAdapter.enableForegroundNdefPush
4406 <li> SHOULD use a gesture or on-screen confirmation, such as 'Touch to Beam', before
4407sending outbound P2P NDEF messages
4408 <li> SHOULD enable Android Beam by default and MUST be able to send and receive
4409using Android Beam, even when another proprietary NFC P2p mode is turned on
4410 <li> MUST support NFC Connection handover to Bluetooth when the device supports
4411Bluetooth Object Push Profile. Device implementations MUST support connection
4412handover to Bluetooth when using android.nfc.NfcAdapter.setBeamPushUris, by
4413implementing the "Connection Handover version 1.2" [<a href="http://www.nfc-forum.org/specs/spec_list/#conn_handover">Resources, 87</a>] and "Bluetooth Secure Simple Pairing Using NFC version 1.0" [<a href="http://members.nfc-forum.org/apps/group_public/download.php/18688/NFCForum-AD-BTSSP_1_1.pdf">Resources, 88</a>] specs from the NFC Forum. Such an implementation MUST implement the handover
4414LLCP service with service name "urn:nfc:sn:handover" for exchanging the
4415handover request/select records over NFC, and it MUST use the Bluetooth Object
4416Push Profile for the actual Bluetooth data transfer. For legacy reasons (to
4417remain compatible with Android 4.1 devices), the implementation SHOULD still
4418accept SNEP GET requests for exchanging the handover request/select records
4419over NFC. However an implementation itself SHOULD NOT send SNEP GET requests
4420for performing connection handover.
4421 </ul>
4422 <li> MUST poll for all supported technologies while in NFC discovery mode
4423 <li> SHOULD be in NFC discovery mode while the device is awake with the screen
4424active and the lock-screen unlocked
4425</ul>
4426</ul>
4427
4428<p>(Note that publicly available links are not available for the JIS, ISO, and NFC
4429Forum specifications cited above.)</p>
4430
4431<p>Android 5.0 includes support for NFC Host Card Emulation (HCE) mode. If a
4432device implementation does include an NFC controller capable of HCE and
4433Application ID (AID) routing, then it:</p>
4434
4435<ul>
4436 <li> MUST report the android.hardware.nfc.hce feature constant
4437 <li> MUST support NFC HCE APIs as defined in the Android SDK [<a href="http://developer.android.com/guide/topics/connectivity/nfc/hce.html">Resources, 10</a>]
4438</ul>
4439
4440<p>Additionally, device implementations MAY include reader/writer support for the
4441following MIFARE technologies.</p>
4442
4443<ul>
4444 <li> MIFARE Classic
4445 <li> MIFARE Ultralight
4446 <li> NDEF on MIFARE Classic
4447</ul>
4448
4449<p>Note that Android includes APIs for these MIFARE types. If a device
4450implementation supports MIFARE in the reader/writer role, it:</p>
4451
4452<ul>
4453 <li> MUST implement the corresponding Android APIs as documented by the Android SDK
4454 <li> MUST report the feature com.nxp.mifare from the
4455android.content.pm.PackageManager.hasSystemFeature() meth<a href="http://developer.android.com/reference/android/content/pm/PackageManager.html">od [Resources, 53]</a>. Note that this is not a standard Android feature and as such does not appear
4456as a constant on the PackageManager class.
4457 <li> MUST NOT implement the corresponding Android APIs nor report the com.nxp.mifare
4458feature unless it also implements general NFC support as described in this
4459section
4460</ul>
4461
4462<p>If a device implementation does not include NFC hardware, it MUST NOT declare
4463the android.hardware.nfc feature from the
4464android.content.pm.PackageManager.hasSystemFeature() method [<a href="http://developer.android.com/reference/android/content/pm/PackageManager.html">Resources, 53]</a>, and MUST implement the Android NFC API as a no-op.</p>
4465
4466<p>As the classes android.nfc.NdefMessage and android.nfc.NdefRecord represent a
4467protocol-independent data representation format, device implementations MUST
4468implement these APIs even if they do not include support for NFC or declare the
4469android.hardware.nfc feature.</p>
4470
4471<h3 id=7_4_5_minimum_network_capability>7.4.5. Minimum Network Capability</h3>
4472
4473
4474<p>Device implementations MUST include support for one or more forms of data
4475networking. Specifically, device implementations MUST include support for at
4476least one data standard capable of 200Kbit/sec or greater. Examples of
4477technologies that satisfy this requirement include EDGE, HSPA, EV-DO, 802.11g,
4478Ethernet, Bluetooth PAN, etc.</p>
4479
4480<p>Device implementations where a physical networking standard (such as Ethernet)
4481is the primary data connection SHOULD also include support for at least one
4482common wireless data standard, such as 802.11 (Wi-Fi).</p>
4483
4484<p>Devices MAY implement more than one form of data connectivity.</p>
4485
4486<h3 id=7_4_6_sync_settings>7.4.6. Sync Settings</h3>
4487
4488
4489<p>Device implementations MUST have the master auto-sync setting on by default so
4490that the method getMasterSyncAutomatically() returns "true" [<a href="http://developer.android.com/reference/android/content/ContentResolver.html">Resources, 89</a>].</p>
4491
4492<h2 id=7_5_cameras>7.5. Cameras</h2>
4493
4494
4495<p>Device implementations SHOULD include a rear-facing camera and MAY include a
4496front-facing camera. A rear-facing camera is a camera located on the side of
4497the device opposite the display; that is, it images scenes on the far side of
4498the device, like a traditional camera. A front-facing camera is a camera
4499located on the same side of the device as the display; that is, a camera
4500typically used to image the user, such as for video conferencing and similar
4501applications.</p>
4502
4503<p>If a device implementation includes at least one camera, it SHOULD be possible
4504for an application to simultaneously allocate 3 bitmaps equal to the size of
4505the images produced by the largest-resolution camera sensor on the device.</p>
4506
4507<h3 id=7_5_1_rear-facing_camera>7.5.1. Rear-Facing Camera</h3>
4508
4509
4510<p>Device implementations SHOULD include a rear-facing camera. If a device
4511implementation includes at least one rear-facing camera, it:</p>
4512
4513<ul>
4514 <li> MUST report the feature flag android.hardware.camera and
4515android.hardware.camera.any
4516 <li> MUST have a resolution of at least 2 megapixels
4517 <li> SHOULD have either hardware auto-focus or software auto-focus implemented in
4518the camera driver (transparent to application software)
4519 <li> MAY have fixed-focus or EDOF (extended depth of field) hardware
4520 <li> MAY include a flash. If the Camera includes a flash, the flash lamp MUST NOT be
4521lit while an android.hardware.Camera.PreviewCallback instance has been
4522registered on a Camera preview surface, unless the application has explicitly
4523enabled the flash by enabling the FLASH_MODE_AUTO or FLASH_MODE_ON attributes
4524of a Camera.Parameters object. Note that this constraint does not apply to the
4525device's built-in system camera application, but only to third-party
4526applications using Camera.PreviewCallback.
4527</ul>
4528
4529<h3 id=7_5_2_front-facing_camera>7.5.2. Front-Facing Camera</h3>
4530
4531
4532<p>Device implementations MAY include a front-facing camera. If a device
4533implementation includes at least one front-facing camera, it:</p>
4534
4535<ul>
4536 <li> MUST report the feature flag android.hardware.camera.any and
4537android.hardware.camera.front
4538 <li> MUST have a resolution of at least VGA (640x480 pixels)
4539 <li> MUST NOT use a front-facing camera as the default for the Camera API. The
4540camera API in Android has specific support for front-facing cameras and device
4541implementations MUST NOT configure the API to to treat a front-facing camera as
4542the default rear-facing camera, even if it is the only camera on the device.
4543 <li> MAY include features (such as auto-focus, flash, etc.) available to rear-facing
4544cameras as described in <a href="#heading=h.v6dmzvarwqkm">section 7.5.1</a>
4545 <li> MUST horizontally reflect (i.e. mirror) the stream displayed by an app in a
4546CameraPreview, as follows:
4547 <ul>
4548 <li> If the device implementation is capable of being rotated by user (such as
4549automatically via an accelerometer or manually via user input), the camera
4550preview MUST be mirrored horizontally relative to the device's current
4551orientation.
4552 <li> If the current application has explicitly requested that the Camera display be
4553rotated via a call to the android.hardware.Camera.setDisplayOrientation()[<a href="http://developer.android.com/reference/android/hardware/Camera.html#setDisplayOrientation(int)">Resources, 90</a>] method, the camera preview MUST be mirrored horizontally relative to the
4554orientation specified by the application.
4555 <li> Otherwise, the preview MUST be mirrored along the device's default horizontal
4556axis.
4557 </ul>
4558 <li> MUST mirror the image displayed by the postview in the same manner as the
4559camera preview image stream. If the device implementation does not support
4560postview, this requirement obviously does not apply.
4561 <li> MUST NOT mirror the final captured still image or video streams returned to
4562application callbacks or committed to media storage
4563</ul>
4564
4565<h3 id=7_5_3_external_camera>7.5.3. External Camera</h3>
4566
4567
4568<p>Device implementations with USB host mode MAY include support for an external
4569camera that connects to the USB port. If a device includes support for an
4570external camera, it:</p>
4571
4572<ul>
4573 <li> MUST declare the platform feature android.hardware.camera.external and
4574android.hardware camera.any
4575 <li> MUST support USB Video Class (UVC 1.0 or higher)
4576 <li> MAY support multiple cameras
4577</ul>
4578
4579<p>Video compression (such as MJPEG) support is RECOMMENDED to enable transfer of
4580high-quality unencoded streams (i.e. raw or independently compressed picture
4581streams). Camera-based video encoding MAY be supported. If so, a simultaneous
4582unencoded/ MJPEG stream (QVGA or greater resolution) MUST be accessible to the
4583device implementation. </p>
4584
4585<h3 id=7_5_4_camera_api_behavior>7.5.4. Camera API Behavior</h3>
4586
4587
4588<p>Android includes two API packages to access the camera, the newer
4589android.hardware.camera2 API expose lower-level camera control to the app,
4590including efficient zero-copy burst/streaming flows and per-frame controls of
4591exposure, gain, white balance gains, color conversion, denoising, sharpening,
4592and more. </p>
4593
4594<p>The older API package, android.hardware.Camera, is marked as deprecated in
4595Android 5.0 but as it should still be available for apps to use Android device
4596implementations MUST ensure the continued support of the API as described in
4597this section and in the Android SDK.</p>
4598
4599<p>Device implementations MUST implement the following behaviors for the
4600camera-related APIs, for all available cameras:</p>
4601
4602<ul>
4603 <li> If an application has never called
4604android.hardware.Camera.Parameters.setPreviewFormat(int), then the device MUST
4605use android.hardware.PixelFormat.YCbCr_420_SP for preview data provided to
4606application callbacks.
4607 <li> If an application registers an android.hardware.Camera.PreviewCallback instance
4608and the system calls the onPreviewFrame() method when the preview format is
4609YCbCr_420_SP, the data in the byte[] passed into onPreviewFrame() must further
4610be in the NV21 encoding format. That is, NV21 MUST be the default.
4611 <li> For android.hardware.Camera, device implementations MUST support the YV12
4612format (as denoted by the android.graphics.ImageFormat.YV12 constant) for
4613camera previews for both front- and rear-facing cameras. (The hardware video
4614encoder and camera may use any native pixel format, but the device
4615implementation MUST support conversion to YV12.)
4616 <li> For android.hardware.camera2, device implementations must support the
4617android.hardware.ImageFormat.YUV_420_888 and android.hardware.ImageFormat.JPEG
4618formats as outputs through the android.media.ImageReader API.
4619</ul>
4620
4621<p>Device implementations MUST still implement the full Camera API included in the
4622Android SDK documentation [<a href="http://developer.android.com/reference/android/hardware/Camera.html">Resources, 91</a>], regardless of whether the device includes hardware autofocus or other
4623capabilities. For instance, cameras that lack autofocus MUST still call any
4624registered android.hardware.Camera.AutoFocusCallback instances (even though
4625this has no relevance to a non-autofocus camera.) Note that this does apply to
4626front-facing cameras; for instance, even though most front-facing cameras do
4627not support autofocus, the API callbacks must still be "faked" as described.</p>
4628
4629<p>Device implementations MUST recognize and honor each parameter name defined as
4630a constant on the android.hardware.Camera.Parameters class, if the underlying
4631hardware supports the feature. If the device hardware does not support a
4632feature, the API must behave as documented. Conversely, device implementations
4633MUST NOT honor or recognize string constants passed to the
4634android.hardware.Camera.setParameters() method other than those documented as
4635constants on the android.hardware.Camera.Parameters. That is, device
4636implementations MUST support all standard Camera parameters if the hardware
4637allows, and MUST NOT support custom Camera parameter types. For instance,
4638device implementations that support image capture using high dynamic range
4639(HDR) imaging techniques MUST support camera parameter Camera.SCENE_MODE_HDR [<a href="http://developer.android.com/reference/android/hardware/Camera.Parameters.html">Resources, 92</a>].</p>
4640
4641<p>Because not all device implementations can fully support all the features of
4642the android.hardware.camera2 API, device implementations MUST report the proper
4643level of support with the android.info.supportedHardwareLevel property as
4644described in the Android SDK [<a href="https://developer.android.com/reference/android/hardware/camera2/CameraCharacteristics.html#INFO_SUPPORTED_HARDWARE_LEVEL">Resources, 93]</a> and report the appropriate framework feature flags [<a href="http://source.android.com/devices/camera/versioning.html">Resources, 94]</a>. </p>
4645
4646<p>Device implementations MUST also declare its Individual camera capabilities of
4647android.hardware.camera2 via the android.request.availableCapabilities property
4648and declare the appropriate feature flags [<a href="http://source.android.com/devices/camera/versioning.html">Resources, 94]</a>; a device must define the feature flag if any of its attached camera devices
4649supports the feature. </p>
4650
4651<p>Device implementations MUST broadcast the Camera.ACTION_NEW_PICTURE intent
4652whenever a new picture is taken by the camera and the entry of the picture has
4653been added to the media store.</p>
4654
4655<p>Device implementations MUST broadcast the Camera.ACTION_NEW_VIDEO intent
4656whenever a new video is recorded by the camera and the entry of the picture has
4657been added to the media store.</p>
4658
4659<h3 id=7_5_5_camera_orientation>7.5.5. Camera Orientation</h3>
4660
4661
4662<p>Both front- and rear-facing cameras, if present, MUST be oriented so that the
4663long dimension of the camera aligns with the screen's long dimension. That is,
4664when the device is held in the landscape orientation, cameras MUST capture
4665images in the landscape orientation. This applies regardless of the device's
4666natural orientation; that is, it applies to landscape-primary devices as well
4667as portrait-primary devices.</p>
4668
4669<h2 id=7_6_memory_and_storage>7.6. Memory and Storage</h2>
4670
4671
4672<h3 id=7_6_1_minimum_memory_and_storage>7.6.1. Minimum Memory and Storage</h3>
4673
4674<table>
4675 <tr>
4676 <td class="tab2"></td>
4677 <td>
4678<p>Android Television devices MUST have at least 5GB of non-volatile storage
4679available for application private data.</p>
4680</td>
4681 </tr>
4682</table>
4683
4684
4685<p>The memory available to the kernel and userspace on device implementations MUST
4686be at least equal or larger than the minimum values specified by the following
4687table. (See <a href="#heading=h.6fey5v3qb5m3">section 7.1.1</a> for screen size and density definitions.)</p>
4688<table>
4689 <tr>
4690 <td class="tab0">
4691<p><strong>Density and screen size</strong></p>
4692</td>
4693 <td class="tab0">
4694<p><strong>32-bit device</strong></p>
4695</td>
4696 <td class="tab0">
4697<p><strong>64-bit device</strong></p>
4698</td>
4699 </tr>
4700 <tr>
4701 <td>
4702<p>Android Watch devices (due to smaller screens)</p>
4703</td>
4704 <td>
4705<p>416MB</p>
4706</td>
4707 <td>
4708<p>Not applicable</p>
4709</td>
4710 </tr>
4711 <tr>
4712 <td>
4713<p>xhdpi or lower on small/normal screens</p>
4714
4715<p>hdpi or lower on large screens</p>
4716
4717<p>mdpi or lower on extra large screens</p>
4718</td>
4719 <td>
4720<p>512MB</p>
4721</td>
4722 <td>
4723<p>832MB</p>
4724</td>
4725 </tr>
4726 <tr>
4727 <td>
4728<p>400dpi or higher on small/normal screens</p>
4729
4730<p>xhdpi or higher on large screens</p>
4731
4732<p>tvdpi or higher on extra large screens</p>
4733</td>
4734 <td>
4735<p>896MB</p>
4736</td>
4737 <td>
4738<p>1280MB</p>
4739</td>
4740 </tr>
4741 <tr>
4742 <td>
4743<p>560dpi or higher on small/normal screens</p>
4744
4745<p>400dpi or higher on large screens</p>
4746
4747<p>xhdpi or higher on extra large screens</p>
4748</td>
4749 <td>
4750<p>1344MB</p>
4751</td>
4752 <td>
4753<p>1824MB</p>
4754</td>
4755 </tr>
4756</table>
4757
4758
4759<p>The minimum memory values MUST be in addition to any memory space already
4760dedicated to hardware components such as radio, video, and so on that is not
4761under the kernel's control.</p>
4762
4763<p>Android Television devices MUST have at least 5GB and other device
4764implementations MUST have at least 1.5GB of non-volatile storage available for
4765application private data. That is, the /data partition MUST be at least 5GB for
4766Android Television devices and at least 1.5GB for other device implementations.
4767Device implementations that run Android are <strong>very strongly encouraged</strong> to have at least 3GB of non-volatile storage for application private data so
4768they will be able to upgrade to the future platform releases.</p>
4769
4770<p>The Android APIs include a Download Manager that applications MAY use to
4771download data files [<a href="http://developer.android.com/reference/android/app/DownloadManager.html">Resources, 95</a>]. The device implementation of the Download Manager MUST be capable of
4772downloading individual files of at least 100MB in size to the default "cache"
4773location.</p>
4774
4775<h3 id=7_6_2_application_shared_storage>7.6.2. Application Shared Storage</h3>
4776
4777
4778<p>Device implementations MUST offer shared storage for applications also often
4779referred as “shared external storage”. </p>
4780
4781<p>Device implementations MUST be configured with shared storage mounted by
4782default, "out of the box". If the shared storage is not mounted on the Linux
4783path /sdcard, then the device MUST include a Linux symbolic link from /sdcard
4784to the actual mount point.</p>
4785
4786<p>Device implementations MAY have hardware for user-accessible removable storage,
4787such as a Secure Digital (SD) card slot. If this slot is used to satisfy the
4788shared storage requirement, the device implementation:</p>
4789
4790<ul>
4791 <li> MUST implement a toast or pop-up user interface warning the user when there is
4792no SD card
4793 <li> MUST include a FAT-formatted SD card 1GB in size or larger OR show on the box
4794and other material available at time of purchase that the SD card has to be
4795separately purchased
4796 <li> MUST mount the SD card by default
4797</ul>
4798
4799<p>Alternatively, device implementations MAY allocate internal (non-removable)
4800storage as shared storage for apps as included in the upstream Android Open
4801Source Project; device implementations SHOULD use this configuration and
4802software implementation. If a device implementation uses internal
4803(non-removable) storage to satisfy the shared storage requirement, that storage
4804MUST be 1GB in size or larger and mounted on /sdcard (or /sdcard MUST be a
4805symbolic link to the physical location if it is mounted elsewhere).</p>
4806
4807<p>Device implementations MUST enforce as documented the
4808android.permission.WRITE_EXTERNAL_STORAGE permission on this shared storage.
4809Shared storage MUST otherwise be writable by any application that obtains that
4810permission.</p>
4811
4812<p>Device implementations that include multiple shared storage paths (such as both
4813an SD card slot and shared internal storage) MUST NOT allow Android
4814applications to write to the secondary external storage, except for their
4815package-specific directories on the secondary external storage, but SHOULD
4816expose content from both storage paths transparently through Android's media
4817scanner service and android.provider.MediaStore.</p>
4818
4819<p>Regardless of the form of shared storage used, device implementations MUST
4820provide some mechanism to access the contents of shared storage from a host
4821computer, such as USB mass storage (UMS) or Media Transfer Protocol (MTP).
4822Device implementations MAY use USB mass storage, but SHOULD use Media Transfer
4823Protocol. If the device implementation supports Media Transfer Protocol, it:</p>
4824
4825<ul>
4826 <li> SHOULD be compatible with the reference Android MTP host, Android File Transfer
4827[<a href="http://www.android.com/filetransfer">Resources, 96</a>]
4828 <li> SHOULD report a USB device class of 0x00
4829 <li> SHOULD report a USB interface name of 'MTP'
4830</ul>
4831
4832<p>If the device implementation lacks USB ports, it MUST provide a host computer
4833with access to the contents of shared storage by some other means, such as a
4834network file system.</p>
4835
4836<h2 id=7_7_usb>7.7. USB</h2>
4837
4838
4839<p>Device implementations SHOULD support USB peripheral mode and SHOULD support
4840USB host mode.</p>
4841
4842<p>If a device implementation includes a USB port supporting peripheral mode:</p>
4843
4844<ul>
4845 <li> The port MUST be connectable to a USB host that has a standard type-A or type
4846-C USB port.
4847 <li> The port SHOULD use micro-A, micro-AB or type-C USB form factor. Existing and
4848new Android devices are <strong>very strongly encouraged to meet these requirements</strong> so they will be able to upgrade to the future platform releases.
4849 <li> The port SHOULD be centered in the middle of an edge. Device implementations
4850SHOULD either locate the port on the bottom of the device (according to natural
4851orientation) or enable software screen rotation for all apps (including home
4852screen), so that the display draws correctly when the device is oriented with
4853the port at bottom. Existing and new Android devices are <strong>very strongly encouraged to meet these requirements</strong> so they will be able to upgrade to future platform releases.
4854 <li> It MUST allow a USB host connected with the Android device to access the
4855contents of the shared storage volume using either USB mass storage or Media
4856Transfer Protocol, if the device reports the android.hardware.feature.output
4857feature or the android.hardware.camera feature.
4858 <li> It SHOULD implement the Android Open Accessory (AOA) API and specification as
4859documented in the Android SDK documentation, and if it is an Android Handheld
4860device it MUST implement the AOA API. Device implementations implementing the
4861AOA specification:
4862 <ul>
4863 <li> MUST declare support for the hardware feature android.hardware.usb.accessory [<a href="http://developer.android.com/guide/topics/connectivity/usb/accessory.html">Resources, 97</a>]
4864 <li> MUST implement the USB audio class as documented in the Android SDK
4865documentation [<a href="http://developer.android.com/reference/android/hardware/usb/UsbConstants.html#USB_CLASS_AUDIO">Resources, 98</a>]
4866 </ul>
4867 <li> It SHOULD implement support to draw 1.5 A current during HS chirp and traffic
4868as specified in the USB battery charging specification [<a href="http://www.usb.org/developers/docs/devclass_docs/USB_Battery_Charging_1.2.pdf">Resources, 99</a>]. Existing and new Android devices are <strong>very strongly encouraged to meet these requirements</strong> so they will be able to upgrade to the future platform releases.
4869 <li> The value of iSerialNumber in USB standard device descriptor MUST be equal to
4870the value of android.os.Build.SERIAL.
4871</ul>
4872
4873<p>If a device implementation includes a USB port supporting host mode, it:</p>
4874
4875<ul>
4876 <li> SHOULD use a type-C USB port, if the device implementation supports USB 3.1
4877 <li> MAY use a non-standard port form factor, but if so MUST ship with a cable or
4878cables adapting the port to a standard type-A or type-C USB port
4879 <li> MAY use a micro-AB USB port, but if so SHOULD ship with a cable or cables
4880adapting the port to a standard type-A or type-C USB port
4881 <li> is <strong>very strongly RECOMMENDED</strong> to implement the USB audio class as documented in the Android SDK
4882documentation [<a href="http://developer.android.com/reference/android/hardware/usb/UsbConstants.html#USB_CLASS_AUDIO">Resources, 98</a>]
4883 <li> MUST implement the Android USB host API as documented in the Android SDK, and
4884MUST declare support for the hardware feature android.hardware.usb.host [<a href="http://developer.android.com/guide/topics/connectivity/usb/host.html">Resources, 100</a>]
4885 <li> SHOULD support the Charging Downstream Port output current range of 1.5 A ~ 5 A
4886as specified in the USB Battery Charging Specifications [<a href="http://www.usb.org/developers/docs/devclass_docs/USB_Battery_Charging_1.2.pdf">Resources, 99</a>]
4887</ul>
4888
4889<h2 id=7_8_audio>7.8. Audio</h2>
4890
4891
4892<h3 id=7_8_1_microphone>7.8.1. Microphone</h3>
4893
4894<table>
4895 <tr>
4896 <td class="tab2"></td>
4897 <td>
4898<p>Android Handheld and Watch devices MUST include a microphone.</p>
4899</td>
4900 </tr>
4901</table>
4902
4903
4904<p>Device implementations MAY omit a microphone. However, if a device
4905implementation omits a microphone, it MUST NOT report the
4906android.hardware.microphone feature constant, and MUST implement the audio
4907recording API at least as no-ops, per <a href="#heading=h.5h5uvpadidzr">section 7</a>. Conversely, device implementations that do possess a microphone:</p>
4908
4909<ul>
4910 <li> MUST report the android.hardware.microphone feature constant
4911 <li> MUST meet the audio recording requirements in <a href="#heading=h.q24elivs4xtv">section 5.4</a>
4912 <li> MUST meet the audio latency requirements in <a href="#heading=h.1p55xhbym9l4">section 5.6</a>
4913</ul>
4914
4915<h3 id=7_8_2_audio_output>7.8.2. Audio Output</h3>
4916
4917<table>
4918 <tr>
4919 <td class="tab2"></td>
4920 <td>
4921<p>Android Watch devices MAY include an audio output.</p>
4922</td>
4923 </tr>
4924</table>
4925
4926
4927<p>Device implementations including a speaker or with an audio/multimedia output
4928port for an audio output peripheral as a headset or an external speaker:</p>
4929
4930<ul>
4931 <li> MUST report the android.hardware.audio.output feature constant
4932 <li> MUST meet the audio playback requirements in <a href="#heading=h.1xocvxnwynnm">section 5.5</a>
4933 <li> MUST meet the audio latency requirements in <a href="#heading=h.1p55xhbym9l4">section 5.6</a>
4934</ul>
4935
4936<p>Conversely, if a device implementation does not include a speaker or audio
4937output port, it MUST NOT report the android.hardware.audio output feature, and
4938MUST implement the Audio Output related APIs as no-ops at least. </p>
4939
4940<p>Android Watch device implementation MAY but SHOULD NOT have audio output, but
4941other types of Android device implementations MUST have an audio output and
4942declare android.hardware.audio.output.</p>
4943
4944<h4 id=7_8_2_1_analog_audio_ports>7.8.2.1. Analog Audio Ports</h4>
4945
4946
4947<p>In order to be compatible with the headsets and other audio accessories using
4948the 3.5mm audio plug across the Android ecosystem [<a href="http://source.android.com/accessories/headset-spec.html">Resources, 101</a>], if a device implementation includes one or more analog audio ports, at least
4949one of the audio port(s) SHOULD be a 4 conductor 3.5mm audio jack. If a device
4950implementation has a 4 conductor 3.5mm audio jack, it:</p>
4951
4952<ul>
4953 <li> MUST support audio playback to stereo headphones and stereo headsets with a
4954microphone, and SHOULD support audio recording from stereo headsets with a
4955microphone
4956 <li> MUST support TRRS audio plugs with the CTIA pin-out order, and SHOULD support
4957audio plugs with the OMTP pin-out order
4958 <li> MUST support the detection of microphone on the plugged in audio accessory, if
4959the device implementation supports a microphone, and broadcast the
4960android.intent.action.HEADSET_PLUG with the extra value microphone set as 1
4961 <li> SHOULD support the detection and mapping to the keycodes for the following 3
4962ranges of equivalent impedance between the microphone and ground conductors on
4963the audio plug:
4964 <ul>
4965 <li> <strong>70 ohm or less</strong>: KEYCODE_HEADSETHOOK
4966 <li> <strong>210–290 Ohm</strong>:<strong> </strong>KEYCODE_VOLUME_UP
4967 <li> <strong>360–680 Ohm</strong>: KEYCODE_VOLUME_DOWN
4968 </ul>
4969 <li> SHOULD support the detection and mapping to the keycode for the following range
4970of equivalent impedance between the microphone and ground conductors on the
4971audio plug:
4972 <ul>
4973 <li> <strong>110–180 Ohm: </strong>KEYCODE_VOICE_ASSIST
4974 </ul>
4975 <li> MUST trigger ACTION_HEADSET_PLUG upon a plug insert, but only after all
4976contacts on plug are touching their relevant segments on the jack
4977 <li> MUST be capable of driving at least 150mV +/- 10% of output voltage on a 32 Ohm
4978speaker impedance
4979 <li> MUST have a microphone bias voltage between 1.8V ~ 2.9V
4980</ul>
4981
4982<h1 id=8_performance_compatibility>8. Performance Compatibility</h1>
4983
4984
4985<p>Some minimum performance criterias are critical to the user experience and
4986impacts the baseline assumptions developers would have when developing an app.
4987Android Watch devices SHOULD and other type of device implementations MUST meet
4988the following criteria:</p>
4989
4990<h2 id=8_1_user_experience_consistency>8.1. User Experience Consistency</h2>
4991
4992
4993<p>Device implementations MUST provide a smooth user interface by ensuring a
4994consistent frame rate and response times for applications and games. Device
4995implementations MUST meet the following requirements: </p>
4996
4997<ul>
4998 <li> <strong>Consistent frame latency</strong>—Inconsistent frame latency or a delay to render frames MUST NOT happen more
4999often than 5 frames in a second, and SHOULD be below 1 frames in a second.
5000 <li> <strong>User interface latency</strong>—Device implementations MUST ensure low latency user experience by scrolling a
5001list of 10K list entries as defined by the Android Compatibility Test Suite
5002(CTS) in less than 36 secs.
5003 <li> <strong>Task switching</strong>—When multiple applications have been launched, re-launching an already-running
5004application after it has been launched MUST take less than 1 second.
5005</ul>
5006
5007<h2 id=8_2_file_i_o_access_performance>8.2. File I/O Access Performance</h2>
5008
5009
5010<p>Device implementations MUST ensure file access performance consistency for read
5011and write operations. </p>
5012
5013<ul>
5014 <li> <strong>Sequential write</strong>—Device implementations MUST ensure a sequential write performance of 10MB/s
5015for a 256MB file using 10MB write buffer.
5016 <li> <strong>Random write</strong>—Device implementations MUST ensure a random write performance of 0.5MB/s for a
5017256MB file using 4KB write buffer.
5018 <li> <strong>Sequential read</strong>—Device implementations MUST ensure a sequential read performance of 15MB/s for
5019a 256MB file using 10MB write buffer.
5020 <li> <strong>Random read</strong>—Device implementations MUST ensure a random read performance of 3.5MB/s for a
5021256MB file using 4KB write buffer.
5022</ul>
5023
5024<h1 id=9_security_model_compatibility>9. Security Model Compatibility</h1>
5025
5026
5027<p>Device implementations MUST implement a security model consistent with the
5028Android platform security model as defined in Security and Permissions
5029reference document in the APIs [<a href="http://developer.android.com/guide/topics/security/permissions.html">Resources, 102</a>] in the Android developer documentation. Device implementations MUST support
5030installation of self-signed applications without requiring any additional
5031permissions/certificates from any third parties/authorities. Specifically,
5032compatible devices MUST support the security mechanisms described in the follow
5033subsections.</p>
5034
5035<h2 id=9_1_permissions>9.1. Permissions</h2>
5036
5037
5038<p>Device implementations MUST support the Android permissions model as defined in
5039the Android developer documentation [<a href="http://developer.android.com/guide/topics/security/permissions.html">Resources, 102</a>]. Specifically, implementations MUST enforce each permission defined as
5040described in the SDK documentation; no permissions may be omitted, altered, or
5041ignored. Implementations MAY add additional permissions, provided the new
5042permission ID strings are not in the android.* namespace.</p>
5043
5044<h2 id=9_2_uid_and_process_isolation>9.2. UID and Process Isolation</h2>
5045
5046
5047<p>Device implementations MUST support the Android application sandbox model, in
5048which each application runs as a unique Unixstyle UID and in a separate
5049process. Device implementations MUST support running multiple applications as
5050the same Linux user ID, provided that the applications are properly signed and
5051constructed, as defined in the Security and Permissions reference [<a href="http://developer.android.com/guide/topics/security/permissions.html">Resources, 102</a>].</p>
5052
5053<h2 id=9_3_filesystem_permissions>9.3. Filesystem Permissions</h2>
5054
5055
5056<p>Device implementations MUST support the Android file access permissions model
5057as defined in the Security and Permissions reference [<a href="http://developer.android.com/guide/topics/security/permissions.html">Resources, 102</a>].</p>
5058
5059<h2 id=9_4_alternate_execution_environments>9.4. Alternate Execution Environments</h2>
5060
5061
5062<p>Device implementations MAY include runtime environments that execute
5063applications using some other software or technology than the Dalvik Executable
5064Format or native code. However, such alternate execution environments MUST NOT
5065compromise the Android security model or the security of installed Android
5066applications, as described in this section.</p>
5067
5068<p>Alternate runtimes MUST themselves be Android applications, and abide by the
5069standard Android security model, as described elsewhere in <a href="#heading=h.a32osmf1tmwt">section 9</a>.</p>
5070
5071<p>Alternate runtimes MUST NOT be granted access to resources protected by
5072permissions not requested in the runtime's AndroidManifest.xml file via the
5073<uses-permission> mechanism.</p>
5074
5075<p>Alternate runtimes MUST NOT permit applications to make use of features
5076protected by Android permissions restricted to system applications.</p>
5077
5078<p>Alternate runtimes MUST abide by the Android sandbox model. Specifically,
5079alternate runtimes:</p>
5080
5081<ul>
5082 <li> SHOULD install apps via the PackageManager into separate Android sandboxes (
5083Linux user IDs, etc.)
5084 <li> MAY provide a single Android sandbox shared by all applications using the
5085alternate runtime
5086 <li> and installed applications using an alternate runtime, MUST NOT reuse the
5087sandbox of any other app installed on the device, except through the standard
5088Android mechanisms of shared user ID and signing certificate
5089 <li> MUST NOT launch with, grant, or be granted access to the sandboxes
5090corresponding to other Android applications
5091 <li> MUST NOT be launched with, be granted, or grant to other applications any
5092privileges of the superuser (root), or of any other user ID
5093</ul>
5094
5095<p>The .apk files of alternate runtimes MAY be included in the system image of a
5096device implementation, but MUST be signed with a key distinct from the key used
5097to sign other applications included with the device implementation.</p>
5098
5099<p>When installing applications, alternate runtimes MUST obtain user consent for
5100the Android permissions used by the application. If an application needs to
5101make use of a device resource for which there is a corresponding Android
5102permission (such as Camera, GPS, etc.), the alternate runtime MUST inform the
5103user that the application will be able to access that resource. If the runtime
5104environment does not record application capabilities in this manner, the
5105runtime environment MUST list all permissions held by the runtime itself when
5106installing any application using that runtime.</p>
5107
5108<h2 id=9_5_multi-user_support>9.5. Multi-User Support</h2>
5109
5110<table>
5111 <tr>
5112 <td class="tab2"></td>
5113 <td>
5114<p>This feature is optional for all device types.</p>
5115</td>
5116 </tr>
5117</table>
5118
5119
5120<p>Android includes support for multiple users and provides support for full user
5121isolation [<a href="http://developer.android.com/reference/android/os/UserManager.html">Resources, 103]</a>. Device implementations MAY enable multiple users, but when enabled MUST meet
5122the following requirements related to multi-user support [<a href="http://source.android.com/devices/tech/storage">Resources, 104</a>]:</p>
5123
5124<ul>
5125 <li> Device implementations that do not declare the android.hardware.telephony
5126feature flag MUST support restricted profiles, a feature that allows device
5127owners to manage additional users and their capabilities on the device. With
5128restricted profiles, device owners can quickly set up separate environments for
5129additional users to work in, with the ability to manage finer-grained
5130restrictions in the apps that are available in those environments.
5131 <li> Conversely device implementations that declare the android.hardware.telephony
5132feature flag MUST NOT support restricted profiles but MUST align with the AOSP
5133implementation of controls to enable /disable other users from accessing the
5134voice calls and SMS.
5135 <li> Device implementations MUST, for each user, implement a security model
5136consistent with the Android platform security model as defined in Security and
5137Permissions reference document in the APIs [<a href="http://developer.android.com/guide/topics/security/permissions.html">Resources, 102</a>]
5138 <li> Device implementations MAY support creating users and managed profiles via the
5139android.app.admin.DevicePolicyManager APIs, and if supported, MUST declare the
5140platform feature flag android.software.managed_users.
5141 <li> Device implementations that declare the feature flag
5142android.software.managed_users MUST use the upstream AOSP icon badge to
5143represent the managed applications and other badge UI elements like Recents &
5144Notifications.
5145 <li> Each user instance on an Android device MUST have separate and isolated
5146external storage directories. Device implementations MAY store multiple users'
5147data on the same volume or filesystem. However, the device implementation MUST
5148ensure that applications owned by and running on behalf a given user cannot
5149list, read, or write to data owned by any other user. Note that removable
5150media, such as SD card slots, can allow one user to access another's data by
5151means of a host PC. For this reason, device implementations that use removable
5152media for the external storage APIs MUST encrypt the contents of the SD card if
5153multiuser is enabled using a key stored only on non-removable media accessible
5154only to the system. As this will make the media unreadable by a host PC, device
5155implementations will be required to switch to MTP or a similar system to
5156provide host PCs with access to the current user's data. Accordingly, device
5157implementations MAY but SHOULD NOT enable multi-user if they use removable
5158media [<a href="http://developer.android.com/reference/android/os/Environment.html">Resources, 105</a>] for primary external storage.
5159</ul>
5160
5161<h2 id=9_6_premium_sms_warning>9.6. Premium SMS Warning</h2>
5162
5163
5164<p>Android includes support for warning users of any outgoing premium SMS message
5165[<a href="http://en.wikipedia.org/wiki/Short_code">Resources, 106</a>] . Premium SMS messages are text messages sent to a service registered with a
5166carrier that may incur a charge to the user. Device implementations that
5167declare support for android.hardware.telephony MUST warn users before sending a
5168SMS message to numbers identified by regular expressions defined in
5169/data/misc/sms/codes.xml file in the device. The upstream Android Open Source
5170Project provides an implementation that satisfies this requirement.</p>
5171
5172<h2 id=9_7_kernel_security_features>9.7. Kernel Security Features</h2>
5173
5174
5175<p>The Android Sandbox includes features that can use the Security-Enhanced Linux
5176(SELinux) mandatory access control (MAC) system and other security features in
5177the Linux kernel. SELinux or any other security features, if implemented below
5178the Android framework:</p>
5179
5180<ul>
5181 <li> MUST maintain compatibility with existing applications
5182 <li> MUST NOT have a visible user interface when a security violation is detected
5183and successfully blocked, but MAY have a visible user interface when an
5184unblocked security violation occurs resulting in a successful exploit
5185 <li> SHOULD NOT be user or developer configurable
5186</ul>
5187
5188<p>If any API for configuration of policy is exposed to an application that can
5189affect another application (such as a Device Administration API), the API MUST
5190NOT allow configurations that break compatibility. </p>
5191
5192<p>Devices MUST implement SELinux or an equivalent mandatory access control system
5193if using a kernel other than Linux and meet the following requirements, which
5194are satisfied by the reference implementation in the upstream Android Open
5195Source Project.</p>
5196
5197<p>Device implementations:</p>
5198
5199<ul>
5200 <li> MUST support a SELinux policy that allows the SELinux mode to be set on a
5201per-domain basis, and MUST configure all domains in enforcing mode. No
5202permissive mode domains are allowed, including domains specific to a
5203device/vendor
5204 <li> SHOULD load policy from /sepolicy file on the device
5205 <li> MUST NOT modify, omit, or replace the neverallow rules present within the
5206sepolicy file provided in the upstream Android Open Source Project (AOSP) and
5207the policy MUST compile with all neverallow present, for both AOSP SELinux
5208domains as well as device/vendor specific domains
5209 <li> MUST support dynamic updates of the SELinux policy file without requiring a
5210system image update
5211</ul>
5212
5213<p>Device implementations SHOULD retain the default SELinux policy provided in the
5214upstream Android Open Source Project, until they have first audited their
5215additions to the SELinux policy. Device implementations MUST be compatible with
5216the upstream Android Open Source Project.</p>
5217
5218<h2 id=9_8_privacy>9.8. Privacy</h2>
5219
5220
5221<p>If the device implements functionality in the system that captures the contents
5222displayed on the screen and/or records the audio stream played on the device,
5223it MUST continuously notify the user whenever this functionality is enabled and
5224actively capturing/recording.</p>
5225
5226<h2 id=9_9_full-disk_encryption>9.9. Full-Disk Encryption</h2>
5227
5228<table>
5229 <tr>
5230 <td class="tab2"></td>
5231 <td>
5232<p>Optional for Android device implementations without a lock screen.</p>
5233</td>
5234 </tr>
5235</table>
5236
5237
5238<p>If the device implementation has a lock screen, the device MUST support
5239full-disk encryption of the application private data, (/data partition) as well
5240as the SD card partition if it is a permanent, non-removable part of the device
5241[<a href="http://source.android.com/devices/tech/encryption/index.html">Resources, 107</a>]. For devices supporting full-disk encryption, the full-disk encryption SHOULD
5242be enabled all the time after the user has completed the out-of-box experience.
5243While this requirement is stated as SHOULD for this version of the Android
5244platform, it is <strong>very strongly RECOMMENDED</strong> as we expect this to change to MUST in the future versions of Android.
5245Encryption MUST use AES with a key of 128-bits (or greater) and a mode designed
5246for storage (for example, AES-XTS, AES-CBC-ESSIV). The encryption key MUST NOT
5247be written to storage at any time without being encrypted. Other than when in
5248active use, the encryption key SHOULD be AES encrypted with the lockscreen
5249passcode stretched using a slow stretching algorithm (e.g. PBKDF2 or scrypt).
5250If the user has not specified a lockscreen passcode or has disabled use of the
5251passcode for encryption, the system SHOULD use a default passcode to wrap the
5252encryption key. If the device provides a hardware-backed keystore, the password
5253stretching algorithm MUST be cryptographically bound to that keystore. The
5254encryption key MUST NOT be sent off the device (even when wrapped with the user
5255passcode and/or hardware bound key). The upstream Android Open Source project
5256provides a preferred implementation of this feature based on the linux kernel
5257feature dm-crypt.</p>
5258
5259<h2 id=9_10_verified_boot>9.10. Verified Boot</h2>
5260
5261
5262<p>Device implementations SHOULD support verified boot for device integrity, and
5263if the feature is supported it MUST declare the platform feature flag
5264android.software.verified_boot. While this requirement is stated as SHOULD for
5265this version of the Android platform, it is <strong>very strongly RECOMMENDED</strong> as we expect this to change to MUST in the future versions of Android. The
5266upstream Android Open Source Project provides a preferred implementation of
5267this feature based on the linux kernel feature dm-verity.</p>
5268
5269<h1 id=10_software_compatibility_testing>10. Software Compatibility Testing</h1>
5270
5271
5272<p>Device implementations MUST pass all tests described in this section.</p>
5273
5274<p>However, note that no software test package is fully comprehensive. For this
5275reason, device implementers are <strong>very strongly encouraged</strong> to make the minimum number of changes as possible to the reference and
5276preferred implementation of Android available from the Android Open Source
5277Project. This will minimize the risk of introducing bugs that create
5278incompatibilities requiring rework and potential device updates.</p>
5279
5280<h2 id=10_1_compatibility_test_suite>10.1. Compatibility Test Suite</h2>
5281
5282
5283<p>Device implementations MUST pass the Android Compatibility Test Suite (CTS) [<a href="http://source.android.com/compatibility/index.html">Resources, 108</a>] available from the Android Open Source Project, using the final shipping
5284software on the device. Additionally, device implementers SHOULD use the
5285reference implementation in the Android Open Source tree as much as possible,
5286and MUST ensure compatibility in cases of ambiguity in CTS and for any
5287reimplementations of parts of the reference source code.</p>
5288
5289<p>The CTS is designed to be run on an actual device. Like any software, the CTS
5290may itself contain bugs. The CTS will be versioned independently of this
5291Compatibility Definition, and multiple revisions of the CTS may be released for
5292Android 5.0. Device implementations MUST pass the latest CTS version available
5293at the time the device software is completed.</p>
5294
5295<h2 id=10_2_cts_verifier>10.2. CTS Verifier</h2>
5296
5297
5298<p>Device implementations MUST correctly execute all applicable cases in the CTS
5299Verifier. The CTS Verifier is included with the Compatibility Test Suite, and
5300is intended to be run by a human operator to test functionality that cannot be
5301tested by an automated system, such as correct functioning of a camera and
5302sensors.</p>
5303
5304<p>The CTS Verifier has tests for many kinds of hardware, including some hardware
5305that is optional. Device implementations MUST pass all tests for hardware that
5306they possess; for instance, if a device possesses an accelerometer, it MUST
5307correctly execute the Accelerometer test case in the CTS Verifier. Test cases
5308for features noted as optional by this Compatibility Definition Document MAY be
5309skipped or omitted.</p>
5310
5311<p>Every device and every build MUST correctly run the CTS Verifier, as noted
5312above. However, since many builds are very similar, device implementers are not
5313expected to explicitly run the CTS Verifier on builds that differ only in
5314trivial ways. Specifically, device implementations that differ from an
5315implementation that has passed the CTS Verifier only by the set of included
5316locales, branding, etc. MAY omit the CTS Verifier test.</p>
5317
5318<h1 id=11_updatable_software>11. Updatable Software</h1>
5319
5320
5321<p>Device implementations MUST include a mechanism to replace the entirety of the
5322system software. The mechanism need not perform "live" upgrades—that is, a
5323device restart MAY be required.</p>
5324
5325<p>Any method can be used, provided that it can replace the entirety of the
5326software preinstalled on the device. For instance, any of the following
5327approaches will satisfy this requirement:</p>
5328
5329<ul>
5330 <li> Over-the-air (OTA) downloads with offline update via reboot
5331 <li> "Tethered" updates over USB from a host PC
5332 <li> "Offline" updates via a reboot and update from a file on removable storage
5333</ul>
5334
5335<p>However, if the device implementation includes support for an unmetered data
5336connection such as 802.11 or Bluetooth PAN (Personal Area Network) profile, the
5337device MUST support Over-the-air download with offline update via reboot.</p>
5338
5339<p>The update mechanism used MUST support updates without wiping user data. That
5340is, the update mechanism MUST preserve application private data and application
5341shared data. Note that the upstream Android software includes an update
5342mechanism that satisfies this requirement.</p>
5343
5344<p>For device implementations that are launching with Android 5.0 and later, the
5345update mechanism SHOULD support verifying that the system image is binary
5346identical to expected result following an OTA. The block-based OTA
5347implementation in the upstream Android Open Source Project, added since Android
53485.0, satisfies this requirement.</p>
5349
5350<p>If an error is found in a device implementation after it has been released but
5351within its reasonable product lifetime that is determined in consultation with
5352the Android Compatibility Team to affect the compatibility of third-party
5353applications, the device implementer MUST correct the error via a software
5354update available that can be applied per the mechanism just described.</p>
5355
5356<h1 id=12_document_changelog>12. Document Changelog</h1>
5357
5358
5359<p>The following table contains a summary of the changes to the Compatibility
5360Definition in this release. </p>
5361<table>
5362 <tr>
5363 <td class="tab0">
5364<p><strong>Section(s)</strong></p>
5365</td>
5366 <td class="tab0">
5367<p><strong>Summary of change</strong></p>
5368</td>
5369 </tr>
5370 <tr>
5371 <td>
5372<p>1. Introduction</p>
5373</td>
5374 <td>
5375<p>Updated requirements to refer to SDK documentation as source of truth.</p>
5376</td>
5377 </tr>
5378 <tr>
5379 <td>
5380<p>2. Device Types</p>
5381</td>
5382 <td>
5383<p>Included definitions for device types for handheld, television, and watch
5384devices.</p>
5385</td>
5386 </tr>
5387 <tr>
5388 <td>
5389<p>2.1 Device Configuration</p>
5390</td>
5391 <td>
5392<p>Added non-exhaustive list to illustrate hardware configuration deviation across
5393devices.</p>
5394</td>
5395 </tr>
5396 <tr>
5397 <td>
5398<p>3.1. Managed API Compatibility</p>
5399</td>
5400 <td>
5401<p>MUST also provide complete implementations of APIs with "@SystemApi" marker in
5402the upstream Android source code.</p>
5403</td>
5404 </tr>
5405 <tr>
5406 <td>
5407<p>3.2.2. Build Parameters</p>
5408</td>
5409 <td>
5410<p>Included SUPPORTED_ABIS, SUPPORTED_32_BIT_ABIS, and SUPPORTED_64_BIT_ABIS
5411parameters in list, updated PRODUCT to require unique Product SKUs, and updated
5412TAGS.</p>
5413</td>
5414 </tr>
5415 <tr>
5416 <td>
5417<p>3.2.3.1. Core Application Intents</p>
5418</td>
5419 <td>
5420<p>Clarified language that the compatibility requirement is for mainly the intents
5421pattern </p>
5422</td>
5423 </tr>
5424 <tr>
5425 <td>
5426<p>3.2.3.5. Default App Settings</p>
5427</td>
5428 <td>
5429<p>Included new requirements for home screen, NFC, and default SMS applications.</p>
5430</td>
5431 </tr>
5432 <tr>
5433 <td>
5434<p>3.3.1 Application Binary Interfaces</p>
5435</td>
5436 <td>
5437<p>Added requirements to support equivalent 32-bit ABI if any 64-bit ABI is
5438supported. Updated parameters to reflect this change.</p>
5439</td>
5440 </tr>
5441 <tr>
5442 <td>
5443<p>3.4.1. WebView Compatibility</p>
5444</td>
5445 <td>
5446<p>Webview compatibility required for all devices except Android Watch devices.
5447Removed Locale string requirement.</p>
5448</td>
5449 </tr>
5450 <tr>
5451 <td>
5452<p>3.4.2. Browser compatibility</p>
5453</td>
5454 <td>
5455<p>Android Television and Watch Devices MAY omit a browser application, but all
5456other types of device implementations MUST include one.</p>
5457</td>
5458 </tr>
5459 <tr>
5460 <td>
5461<p>3.7. Runtime compatibility</p>
5462</td>
5463 <td>
5464<p>Updated Minimum application memory requirements</p>
5465</td>
5466 </tr>
5467 <tr>
5468 <td>
5469<p>3.8.2. Widgets</p>
5470</td>
5471 <td>
5472<p>Widget support is optional for all device types, but recommended for Handheld
5473Devices.</p>
5474</td>
5475 </tr>
5476 <tr>
5477 <td>
5478<p>3.8.3. Notifications</p>
5479</td>
5480 <td>
5481<p>Expanded definitions for types of supported notifications. </p>
5482</td>
5483 </tr>
5484 <tr>
5485 <td>
5486<p>3.8.4. Search</p>
5487</td>
5488 <td>
5489<p>Android Television devices MUST include global search. All other device types
5490SHOULD.</p>
5491</td>
5492 </tr>
5493 <tr>
5494 <td>
5495<p>3.8.6. Themes</p>
5496</td>
5497 <td>
5498<p>Devices MUST support material theme.</p>
5499</td>
5500 </tr>
5501 <tr>
5502 <td>
5503<p>3.8.7. Live Wallpapers</p>
5504</td>
5505 <td>
5506<p>Devices that include live wallpaper MUST report the platform feature flag
5507android.software.live_wallpaper.</p>
5508</td>
5509 </tr>
5510 <tr>
5511 <td>
5512<p>3.8.8. Activity Switching</p>
5513</td>
5514 <td>
5515<p>Advised requirement to support new Recents User Interface</p>
5516</td>
5517 </tr>
5518 <tr>
5519 <td>
5520<p>3.8.10. Lock Screen Media Remote Control</p>
5521</td>
5522 <td>
5523<p> Remote Control Client API deprecated in favor of the Media Notification
5524Template</p>
5525</td>
5526 </tr>
5527 <tr>
5528 <td>
5529<p>3.8.11. Dreams</p>
5530</td>
5531 <td>
5532<p>Optional for Android Watch devices. Required for all other device types.</p>
5533</td>
5534 </tr>
5535 <tr>
5536 <td>
5537<p>3.8.13 Unicode and font</p>
5538</td>
5539 <td>
5540<p>MUST support Roboto 2 in addition to existing requirements.</p>
5541</td>
5542 </tr>
5543 <tr>
5544 <td>
5545<p>3.12. TV Input Framework</p>
5546</td>
5547 <td>
5548<p>Android Television device implementations MUST support Television Input
5549Framework.</p>
5550</td>
5551 </tr>
5552 <tr>
5553 <td>
5554<p>5.1. Media Codecs</p>
5555</td>
5556 <td>
5557<p>Added 3 sections for Audio, Image, and Video codecs.</p>
5558</td>
5559 </tr>
5560 <tr>
5561 <td>
5562<p>5.4 Audio Recording</p>
5563</td>
5564 <td>
5565<p>Broken into subsections</p>
5566</td>
5567 </tr>
5568 <tr>
5569 <td>
5570<p>5.4.1. Raw audio capture</p>
5571</td>
5572 <td>
5573<p>Defined characteristics for raw audio capture on devices that declare
5574android.hardware.microphone</p>
5575</td>
5576 </tr>
5577 <tr>
5578 <td>
5579<p>5.5. Audio Playback</p>
5580</td>
5581 <td>
5582<p>Added section 5.5. Audio Playback with 2 subsections: 5.5.1 Audio Effects and
55835.5.2. Audio Output Volume</p>
5584</td>
5585 </tr>
5586 <tr>
5587 <td>
5588<p>5.6 Audio Latency</p>
5589</td>
5590 <td>
5591<p>Added definitions and requirements for cold output jitter, cold input jitter,
5592and continuous round-trip latency.</p>
5593</td>
5594 </tr>
5595 <tr>
5596 <td>
5597<p>5.8 Secure Media</p>
5598</td>
5599 <td>
5600<p>Included secure media requirements from 7.1.8. External Displays and added
5601requirements for Android Television.</p>
5602</td>
5603 </tr>
5604 <tr>
5605 <td>
5606<p>6.1. Developer Tools</p>
5607</td>
5608 <td>
5609<p>Updated resources.</p>
5610</td>
5611 </tr>
5612 <tr>
5613 <td>
5614<p>6.2.1. Experimental</p>
5615</td>
5616 <td>
5617<p>Removed section</p>
5618</td>
5619 </tr>
5620 <tr>
5621 <td>
5622<p>7. Hardware Compatibility</p>
5623</td>
5624 <td>
5625<p>Updated to reflect that device implementations MUST consistently report
5626accurate hardware configuration for the same build fingerprint.</p>
5627</td>
5628 </tr>
5629 <tr>
5630 <td>
5631<p>7.1.1.1. Screen Size</p>
5632</td>
5633 <td>
5634<p>Updated to reflect Android Watch devices screen size and that the value can’t
5635change</p>
5636</td>
5637 </tr>
5638 <tr>
5639 <td>
5640<p>7.1.1.2. Screen Aspect Ratio</p>
5641</td>
5642 <td>
5643<p>Updated to reflect Android Watch devices screen aspect ratio (1:1).</p>
5644</td>
5645 </tr>
5646 <tr>
5647 <td>
5648<p>7.1.3. Screen Orientation</p>
5649</td>
5650 <td>
5651<p>Updated to reflect that devices with a fixed orientation landscape screen
5652SHOULD only report that orientation. </p>
5653</td>
5654 </tr>
5655 <tr>
5656 <td>
5657<p>7.1.4. 2D and 3D Graphics Acceleration</p>
5658</td>
5659 <td>
5660<p>Added that Android devices MAY support the Android extension pack. </p>
5661</td>
5662 </tr>
5663 <tr>
5664 <td>
5665<p>(old) 7.1.6. Screen Types</p>
5666</td>
5667 <td>
5668<p>Section Removed </p>
5669</td>
5670 </tr>
5671 <tr>
5672 <td>
5673<p>7.1.6. Screen Technology</p>
5674</td>
5675 <td>
5676<p>Updated pixel aspect ratio (PAR) to be between 0.9 and 1.15. (~15% tolerance)</p>
5677</td>
5678 </tr>
5679 <tr>
5680 <td>
5681<p>7.1.7. External Displays</p>
5682</td>
5683 <td>
5684<p>Moved part of section to section 5.8. Secure Media.</p>
5685</td>
5686 </tr>
5687 <tr>
5688 <td>
5689<p>7.2.2. Non-touch Navigation</p>
5690</td>
5691 <td>
5692<p>Android Television devices MUST support D-pad. </p>
5693</td>
5694 </tr>
5695 <tr>
5696 <td>
5697<p>7.2.3. Navigation keys</p>
5698</td>
5699 <td>
5700<p>Included language for support across different device types. </p>
5701</td>
5702 </tr>
5703 <tr>
5704 <td>
5705<p>7.2.4. Touchscreen input</p>
5706</td>
5707 <td>
5708<p>Android Watch devices MUST support touchscreen input. </p>
5709</td>
5710 </tr>
5711 <tr>
5712 <td>
5713<p>7.2.6. Game Controller Support</p>
5714</td>
5715 <td>
5716<p>Added section with Android Television requirements.</p>
5717</td>
5718 </tr>
5719 <tr>
5720 <td>
5721<p>7.2.7. Remote Control </p>
5722</td>
5723 <td>
5724<p>Added section with Android Television requirements.</p>
5725</td>
5726 </tr>
5727 <tr>
5728 <td>
5729<p>7.3. Sensors</p>
5730</td>
5731 <td>
5732<p>Redefined synthetic sensors as composite sensors and streaming sensors as
5733continuous sensors. Sensors should report event time in nanoseconds.</p>
5734</td>
5735 </tr>
5736 <tr>
5737 <td>
5738<p>7.3.1. Accelerometer</p>
5739</td>
5740 <td>
5741<p>Clarified required sensor types and revised requirement thresholds. </p>
5742</td>
5743 </tr>
5744 <tr>
5745 <td>
5746<p>7.3.2. Magnetometer</p>
5747</td>
5748 <td>
5749<p>Clarified required sensor types and revised requirement thresholds.</p>
5750</td>
5751 </tr>
5752 <tr>
5753 <td>
5754<p>7.3.4. Gyroscope</p>
5755</td>
5756 <td>
5757<p>Clarified required sensor types and revised requirement thresholds.</p>
5758</td>
5759 </tr>
5760 <tr>
5761 <td>
5762<p>7.3.5. Barometer</p>
5763</td>
5764 <td>
5765<p>Changed from MAY to SHOULD implement barometer. MUST implement and report
5766TYPE_PRESSURE sensor.</p>
5767</td>
5768 </tr>
5769 <tr>
5770 <td>
5771<p>7.3.6. Thermometer</p>
5772</td>
5773 <td>
5774<p>Devices MAY include ambient thermometer. MAY but SHOULD NOT include CPU
5775thermometer.</p>
5776</td>
5777 </tr>
5778 <tr>
5779 <td>
5780<p>7.3.8. Proximity Sensor</p>
5781</td>
5782 <td>
5783<p>Devices that can make a voice call and indicate any value other than
5784PHONE_TYPE_NONE in getPhoneType SHOULD include a proximity sensor.</p>
5785</td>
5786 </tr>
5787 <tr>
5788 <td>
5789<p>7.4.2. IEEE 802.11 (Wi-Fi)</p>
5790</td>
5791 <td>
5792<p>Android Television devices MUST include Wi-Fi support. Devices that DO support
5793wifi must report android.hardware.wifi. </p>
5794</td>
5795 </tr>
5796 <tr>
5797 <td>
5798<p>7.4.2.1. Wi-Fi Direct</p>
5799</td>
5800 <td>
5801<p>MUST report the hardware feature android.hardware.wifi.direct.</p>
5802</td>
5803 </tr>
5804 <tr>
5805 <td>
5806<p>7.4.2.2. Wi-Fi Tunneled Direct Link Setup</p>
5807</td>
5808 <td>
5809<p>Android Television devices MUST include support for Wi-Fi TDLS.</p>
5810</td>
5811 </tr>
5812 <tr>
5813 <td>
5814<p>7.5. Cameras</p>
5815</td>
5816 <td>
5817<p>If a device implementation includes at least one camera, it SHOULD be possible
5818for an application to simultaneously allocate 3 bitmaps equal to the size of
5819the images produced by the largest-resolution camera sensor on the device.</p>
5820</td>
5821 </tr>
5822 <tr>
5823 <td>
5824<p>7.5.3. External Cameras</p>
5825</td>
5826 <td>
5827<p>Added requirements that device implementations with USB host mode MAY include
5828support for an external camera.</p>
5829</td>
5830 </tr>
5831 <tr>
5832 <td>
5833<p>7.5.5. Camera System Features</p>
5834</td>
5835 <td>
5836<p>Added list of camera features and when they should be defined. </p>
5837</td>
5838 </tr>
5839 <tr>
5840 <td>
5841<p>7.6.1. Minimum Memory and Storage</p>
5842</td>
5843 <td>
5844<p>Updated requirements for 32- and 64-bit devices. SVELTE memory requirement
5845removed. Devices MUST have at least 1.5GB of non-volatile storage</p>
5846</td>
5847 </tr>
5848 <tr>
5849 <td>
5850<p>7.6.2. Application Shared Storage</p>
5851</td>
5852 <td>
5853<p>Updated requirements for user-accessible removable storage</p>
5854</td>
5855 </tr>
5856 <tr>
5857 <td>
5858<p>7.7. USB</p>
5859</td>
5860 <td>
5861<p>Removed requirements for non-charging ports being on the same edge as the
5862micro-USB port. Updated requirements for Host and Peripheral mode. </p>
5863</td>
5864 </tr>
5865 <tr>
5866 <td>
5867<p>7.8.1. Audio</p>
5868</td>
5869 <td>
5870<p>Moved microphone section here. Added requirements for Audio Output and Audio
5871Analog ports. </p>
5872</td>
5873 </tr>
5874 <tr>
5875 <td>
5876<p>8. Performance Compatibility</p>
5877</td>
5878 <td>
5879<p>Added requirements for user interface consistency.</p>
5880</td>
5881 </tr>
5882 <tr>
5883 <td>
5884<p>9.5. Multi-User Support</p>
5885</td>
5886 <td>
5887<p>Multi-user support feature is optional for all device types. Detailed
5888requirements by device type in section.</p>
5889</td>
5890 </tr>
5891 <tr>
5892 <td>
5893<p>9.7. Kernel Security Features</p>
5894</td>
5895 <td>
5896<p>MAY have a visible user interface when an unblocked security violation occurs
5897resulting in a successful exploit. No permissive mode domains allowed.</p>
5898</td>
5899 </tr>
5900 <tr>
5901 <td>
5902<p>9.9. Full-Disk Encryption</p>
5903</td>
5904 <td>
5905<p>Devices with a lock screen MUST support full-disk encryption. For new devices,
5906full-disk encryption must be enabled out of box. </p>
5907</td>
5908 </tr>
5909 <tr>
5910 <td>
5911<p>9.10 Verified boot</p>
5912</td>
5913 <td>
5914<p>Added section to recommend that Device implementations support verified boot
5915for device integrity.</p>
5916</td>
5917 </tr>
5918 <tr>
5919 <td>
5920<p>10.3. Reference Applications</p>
5921</td>
5922 <td>
5923<p>Removed section from CDD.</p>
5924</td>
5925 </tr>
5926 <tr>
5927 <td>
5928<p>11. Updatable Software</p>
5929</td>
5930 <td>
5931<p>If a device supports 802.11 or Bluetooth PAN (Personal Area Network) profile,
5932then it MUST support Over-the-air download with offline update via reboot.</p>
5933</td>
5934 </tr>
5935 <tr>
5936 <td>
5937<p>14. Resources</p>
5938</td>
5939 <td>
5940<p>Resources moved from section 2 to section 14</p>
5941</td>
5942 </tr>
5943</table>
5944
5945
5946<h1 id=13_contact_us>13. Contact Us</h1>
5947
5948
5949<p>You can join the android-compatibility forum <a href="https://groups.google.com/forum/#!forum/android-compatibility">[Resources, 109</a>] and ask for clarifications or bring up any issues that you think the document
5950does not cover.</p>
5951
5952<h1 id=14_resources>14. Resources</h1>
5953
5954
5955<p>1. IETF RFC2119 Requirement Levels: <a href="http://www.ietf.org/rfc/rfc2119.txt">http://www.ietf.org/rfc/rfc2119.txt</a></p>
5956
5957<p>2. Android Open Source Project: <a href="http://source.android.com/">http://source.android.com/</a></p>
5958
5959<p>3. Android Television features: <a href="http://developer.android.com/reference/android/content/pm/PackageManager.html#FEATURE_LEANBACK">http://developer.android.com/reference/android/content/pm/PackageManager.html#FEATURE_LEANBACK</a> </p>
5960
5961<p>4. Android Watch feature: <a href="http://developer.android.com/reference/android/content/res/Configuration.html#UI_MODE_TYPE_WATCH">http://developer.android.com/reference/android/content/res/Configuration.html#UI_MODE_TYPE_WATCH</a></p>
5962
5963<p>5. API definitions and documentation: <a href="http://developer.android.com/reference/packages.html">http://developer.android.com/reference/packages.html</a></p>
5964
5965<p>6. Android Permissions reference: <a href="http://developer.android.com/reference/android/Manifest.permission.html">http://developer.android.com/reference/android/Manifest.permission.html</a></p>
5966
5967<p>7. android.os.Build reference: <a href="http://developer.android.com/reference/android/os/Build.html">http://developer.android.com/reference/android/os/Build.html</a></p>
5968
5969<p>8. Android 5.0 allowed version strings: <a href="http://source.android.com/compatibility/5.0/versions.html">http://source.android.com/compatibility/5.0/versions.html</a></p>
5970
5971<p>9. Telephony Provider: <a href="http://developer.android.com/reference/android/provider/Telephony.html">http://developer.android.com/reference/android/provider/Telephony.html</a></p>
5972
5973<p>10. Host-based Card Emulation: <a href="http://developer.android.com/guide/topics/connectivity/nfc/hce.html">http://developer.android.com/guide/topics/connectivity/nfc/hce.html</a></p>
5974
5975<p>11. Android Extension Pack: <a href="http://developer.android.com/guide/topics/graphics/opengl.html#aep">http://developer.android.com/guide/topics/graphics/opengl.html#aep</a> </p>
5976
5977<p>12. android.webkit.WebView class: <a href="http://developer.android.com/reference/android/webkit/WebView.html">http://developer.android.com/reference/android/webkit/WebView.html</a></p>
5978
5979<p>13. WebView compatibility: <a href="http://www.chromium.org/">http://www.chromium.org/</a></p>
5980
5981<p>14. HTML5: <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/">http://www.whatwg.org/specs/web-apps/current-work/multipage/</a></p>
5982
5983<p>15. HTML5 offline capabilities:<a href="http://dev.w3.org/html5/spec/Overview.html#offline"> http://dev.w3.org/html5/spec/Overview.html#offline</a></p>
5984
5985<p>16. HTML5 video tag: <a href="http://dev.w3.org/html5/spec/Overview.html#video">http://dev.w3.org/html5/spec/Overview.html#video</a></p>
5986
5987<p>17. HTML5/W3C geolocation API: <a href="http://www.w3.org/TR/geolocation-API/">http://www.w3.org/TR/geolocation-API/</a></p>
5988
5989<p>18. HTML5/W3C webstorage API: <a href="http://www.w3.org/TR/webstorage/">http://www.w3.org/TR/webstorage/</a></p>
5990
5991<p>19. HTML5/W3C IndexedDB API: <a href="http://www.w3.org/TR/IndexedDB/">http://www.w3.org/TR/IndexedDB/</a></p>
5992
5993<p>20. Dalvik Executable Format and bytecode specification: available in the
5994Android source code, at dalvik/docs</p>
5995
5996<p>21. AppWidgets: <a href="http://developer.android.com/guide/practices/ui_guidelines/widget_design.html">http://developer.android.com/guide/practices/ui_guidelines/widget_design.html</a></p>
5997
5998<p>22. Notifications: <a href="http://developer.android.com/guide/topics/ui/notifiers/notifications.html">http://developer.android.com/guide/topics/ui/notifiers/notifications.html</a></p>
5999
6000<p>23. Application Resources: <a href="https://developer.android.com/guide/topics/resources/available-resources.html">https://developer.android.com/guide/topics/resources/available-resources.html</a></p>
6001
6002<p>24. Status Bar icon style guide: <a href="http://developer.android.com/design/style/iconography.html">http://developer.android.com/design/style/iconography.html</a></p>
6003
6004<p>25. Notifications Resources: <a href="https://developer.android.com/design/patterns/notifications.html">https://developer.android.com/design/patterns/notifications.html</a> </p>
6005
6006<p>26. Search Manager: <a href="http://developer.android.com/reference/android/app/SearchManager.html">http://developer.android.com/reference/android/app/SearchManager.html</a> </p>
6007
6008<p>27. Toasts: <a href="http://developer.android.com/reference/android/widget/Toast.html">http://developer.android.com/reference/android/widget/Toast.html</a></p>
6009
6010<p>28. Themes: <a href="http://developer.android.com/guide/topics/ui/themes.html">http://developer.android.com/guide/topics/ui/themes.html</a></p>
6011
6012<p>29. R.style class: <a href="http://developer.android.com/reference/android/R.style.html">http://developer.android.com/reference/android/R.style.html</a></p>
6013
6014<p>30. Material design: <a href="http://developer.android.com/reference/android/R.style.html#Theme_Material">http://developer.android.com/reference/android/R.style.html#Theme_Material</a> </p>
6015
6016<p>31. Live Wallpapers: <a href="http://developer.android.com/reference/android/service/wallpaper/WallpaperService.html">http://developer.android.com/reference/android/service/wallpaper/WallpaperService.html</a></p>
6017
6018<p>32. Overview screen resources: <a href="http://developer.android.com/guide/components/recents.html">http://developer.android.com/guide/components/recents.html</a> </p>
6019
6020<p>33. Screen pinning: <a href="https://developer.android.com/about/versions/android-5.0.html#ScreenPinning">https://developer.android.com/about/versions/android-5.0.html#ScreenPinning</a> </p>
6021
6022<p>34. Input methods: <a href="http://developer.android.com/guide/topics/text/creating-input-method.html">http://developer.android.com/guide/topics/text/creating-input-method.html</a> </p>
6023
6024<p>35. Media Notification: <a href="https://developer.android.com/reference/android/app/Notification.MediaStyle.html">https://developer.android.com/reference/android/app/Notification.MediaStyle.html</a></p>
6025
6026<p>36. Dreams: <a href="http://developer.android.com/reference/android/service/dreams/DreamService.html">http://developer.android.com/reference/android/service/dreams/DreamService.html</a></p>
6027
6028<p>37. Settings.Secure LOCATION_MODE:</p>
6029
6030<p><a href="http://developer.android.com/reference/android/provider/Settings.Secure.html#LOCATION_MODE">http://developer.android.com/reference/android/provider/Settings.Secure.html#LOCATION_MODE</a></p>
6031
6032<p>38. Unicode 6.1.0: <a href="http://www.unicode.org/versions/Unicode6.1.0/">http://www.unicode.org/versions/Unicode6.1.0/</a></p>
6033
6034<p>39. Android Device Administration: <a href="http://developer.android.com/guide/topics/admin/device-admin.html">http://developer.android.com/guide/topics/admin/device-admin.html</a></p>
6035
6036<p>40. DevicePolicyManager reference: <a href="http://developer.android.com/reference/android/app/admin/DevicePolicyManager.html">http://developer.android.com/reference/android/app/admin/DevicePolicyManager.html</a></p>
6037
6038<p>41. Android Device Owner App:</p>
6039
6040<p><a href="http://developer.android.com/reference/android/app/admin/DevicePolicyManager.html#isDeviceOwnerApp(java.lang.String)">http://developer.android.com/reference/android/app/admin/DevicePolicyManager.html#isDeviceOwnerApp(java.lang.String)</a></p>
6041
6042<p>42. Android Accessibility Service APIs: <a href="http://developer.android.com/reference/android/accessibilityservice/AccessibilityService.html">http://developer.android.com/reference/android/accessibilityservice/AccessibilityService.html</a></p>
6043
6044<p>43. Android Accessibility APIs: <a href="http://developer.android.com/reference/android/view/accessibility/package-summary.html">http://developer.android.com/reference/android/view/accessibility/package-summary.html</a></p>
6045
6046<p>44. Eyes Free project: <a href="http://code.google.com/p/eyes-free">http://code.google.com/p/eyes-free</a></p>
6047
6048<p>45. Text-To-Speech APIs: <a href="http://developer.android.com/reference/android/speech/tts/package-summary.html">http://developer.android.com/reference/android/speech/tts/package-summary.html</a></p>
6049
6050<p>46. Television Input Framework: <a href="https://source.android.com/devices/tv/index.html">https://source.android.com/devices/tv/index.html</a></p>
6051
6052<p>47. Reference tool documentation (for adb, aapt, ddms, systrace): <a href="http://developer.android.com/guide/developing/tools/index.html">http://developer.android.com/guide/developing/tools/index.html</a></p>
6053
6054<p>48. Android apk file description: <a href="http://developer.android.com/guide/components/fundamentals.html">http://developer.android.com/guide/components/fundamentals.html </a></p>
6055
6056<p>49. Manifest files: <a href="http://developer.android.com/guide/topics/manifest/manifest-intro.html">http://developer.android.com/guide/topics/manifest/manifest-intro.html</a></p>
6057
6058<p>50. Android Media Formats: <a href="http://developer.android.com/guide/appendix/media-formats.html">http://developer.android.com/guide/appendix/media-formats.html</a></p>
6059
6060<p>51. RTC Hardware Coding Requirements: <a href="http://www.webmproject.org/hardware/rtc-coding-requirements/">http://www.webmproject.org/hardware/rtc-coding-requirements/</a></p>
6061
6062<p>52. AudioEffect API: <a href="http://developer.android.com/reference/android/media/audiofx/AudioEffect.html">http://developer.android.com/reference/android/media/audiofx/AudioEffect.html</a></p>
6063
6064<p>53. Android android.content.pm.PackageManager class and Hardware Features List:</p>
6065
6066<p><a href="http://developer.android.com/reference/android/content/pm/PackageManager.html">http://developer.android.com/reference/android/content/pm/PackageManager.html</a></p>
6067
6068<p>54. HTTP Live Streaming Draft Protocol: <a href="http://tools.ietf.org/html/draft-pantos-http-live-streaming-03">http://tools.ietf.org/html/draft-pantos-http-live-streaming-03</a></p>
6069
6070<p>55. ADB: <a href="http://developer.android.com/tools/help/adb.html">http://developer.android.com/tools/help/adb.html</a> </p>
6071
6072<p>56. Dumpsys: <a href="https://source.android.com/devices/tech/input/dumpsys.html">https://source.android.com/devices/tech/input/dumpsys.html</a> </p>
6073
6074<p>57. DDMS: <a href="http://developer.android.com/tools/debugging/ddms.html">http://developer.android.com/tools/debugging/ddms.html</a> </p>
6075
6076<p>58. Monkey testing tool: <a href="http://developer.android.com/tools/help/monkey.html">http://developer.android.com/tools/help/monkey.html</a> </p>
6077
6078<p>59. SysyTrace tool: <a href="http://developer.android.com/tools/help/systrace.html">http://developer.android.com/tools/help/systrace.html</a></p>
6079
6080<p>60. Android Application Development-Related Settings:</p>
6081
6082<p><a href="http://developer.android.com/reference/android/provider/Settings.html#ACTION_APPLICATION_DEVELOPMENT_SETTINGS">http://developer.android.com/reference/android/provider/Settings.html#ACTION_APPLICATION_DEVELOPMENT_SETTINGS</a></p>
6083
6084<p>61. Supporting Multiple Screens: <a href="http://developer.android.com/guide/practices/screens_support.html">http://developer.android.com/guide/practices/screens_support.html</a></p>
6085
6086<p>62. android.util.DisplayMetrics: <a href="http://developer.android.com/reference/android/util/DisplayMetrics.html">http://developer.android.com/reference/android/util/DisplayMetrics.html</a></p>
6087
6088<p>63. RenderScript: <a href="http://developer.android.com/guide/topics/renderscript/">http://developer.android.com/guide/topics/renderscript/</a></p>
6089
6090<p>64. Android extension pack for OpenGL ES: <a href="https://developer.android.com/reference/android/opengl/GLES31Ext.html">https://developer.android.com/reference/android/opengl/GLES31Ext.html</a> </p>
6091
6092<p>65. Hardware Acceleration: <a href="http://developer.android.com/guide/topics/graphics/hardware-accel.html">http://developer.android.com/guide/topics/graphics/hardware-accel.html</a></p>
6093
6094<p>66. EGL Extension-EGL_ANDROID_RECORDABLE:</p>
6095
6096<p><a href="http://www.khronos.org/registry/egl/extensions/ANDROID/EGL_ANDROID_recordable.txt">http://www.khronos.org/registry/egl/extensions/ANDROID/EGL_ANDROID_recordable.txt</a></p>
6097
6098<p>67. Display Manager: <a href="http://developer.android.com/reference/android/hardware/display/DisplayManager.html">http://developer.android.com/reference/android/hardware/display/DisplayManager.html</a></p>
6099
6100<p>68. android.content.res.Configuration: <a href="http://developer.android.com/reference/android/content/res/Configuration.html">http://developer.android.com/reference/android/content/res/Configuration.html</a></p>
6101
6102<p>69. Action Assist: <a href="http://developer.android.com/reference/android/content/Intent.html#ACTION_ASSIST">http://developer.android.com/reference/android/content/Intent.html#ACTION_ASSIST</a></p>
6103
6104<p>70. Touch Input Configuration: <a href="http://source.android.com/devices/tech/input/touch-devices.html">http://source.android.com/devices/tech/input/touch-devices.html</a></p>
6105
6106<p>71. Motion Event API: <a href="http://developer.android.com/reference/android/view/MotionEvent.html">http://developer.android.com/reference/android/view/MotionEvent.html</a></p>
6107
6108<p>72. Key Event API: <a href="http://developer.android.com/reference/android/view/KeyEvent.html">http://developer.android.com/reference/android/view/KeyEvent.html</a> </p>
6109
6110<p>73. Android Open Source sensors: <a href="http://source.android.com/devices/sensors/">http://source.android.com/devices/sensors/</a></p>
6111
6112<p>74. android.hardware.SensorEvent: <a href="http://developer.android.com/reference/android/hardware/SensorEvent.html">http://developer.android.com/reference/android/hardware/SensorEvent.html</a></p>
6113
6114<p>75. Timestamp sensor event: <a href="http://developer.android.com/reference/android/hardware/SensorEvent.html#timestamp">http://developer.android.com/reference/android/hardware/SensorEvent.html#timestamp</a></p>
6115
6116<p>76. Android Open Source composite sensors: <a href="http://source.android.com/devices/sensors/composite_sensors.html">http://source.android.com/devices/sensors/composite_sensors.html</a></p>
6117
6118<p>77. Continuous trigger mode: <a href="http://source.android.com/devices/sensors/base_triggers.html#continuous">http://source.android.com/devices/sensors/base_triggers.html#continuous</a></p>
6119
6120<p>78. Accelerometer sensor: <a href="http://developer.android.com/reference/android/hardware/Sensor.html#TYPE_ACCELEROMETER">http://developer.android.com/reference/android/hardware/Sensor.html#TYPE_ACCELEROMETER</a></p>
6121
6122<p>79. Wi-Fi Multicast API: <a href="http://developer.android.com/reference/android/net/wifi/WifiManager.MulticastLock.html">http://developer.android.com/reference/android/net/wifi/WifiManager.MulticastLock.html</a></p>
6123
6124<p>80. Wi-Fi Direct (Wi-Fi P2P): <a href="http://developer.android.com/reference/android/net/wifi/p2p/WifiP2pManager.html">http://developer.android.com/reference/android/net/wifi/p2p/WifiP2pManager.html</a></p>
6125
6126<p>81. WifiManager API: <a href="http://developer.android.com/reference/android/net/wifi/WifiManager.html">http://developer.android.com/reference/android/net/wifi/WifiManager.html</a></p>
6127
6128<p>82. Bluetooth API: <a href="http://developer.android.com/reference/android/bluetooth/package-summary.html">http://developer.android.com/reference/android/bluetooth/package-summary.html</a></p>
6129
6130<p>83. Bluetooth ScanFilter API: <a href="https://developer.android.com/reference/android/bluetooth/le/ScanFilter.html">https://developer.android.com/reference/android/bluetooth/le/ScanFilter.html</a></p>
6131
6132<p>84. NDEF Push Protocol: <a href="http://source.android.com/compatibility/ndef-push-protocol.pdf">http://source.android.com/compatibility/ndef-push-protocol.pdf</a></p>
6133
6134<p>85. Android Beam: <a href="http://developer.android.com/guide/topics/connectivity/nfc/nfc.html">http://developer.android.com/guide/topics/connectivity/nfc/nfc.html</a> </p>
6135
6136<p>86. Android NFC Sharing Settings:</p>
6137
6138<p><a href="http://developer.android.com/reference/android/provider/Settings.html#ACTION_NFCSHARING_SETTINGS">http://developer.android.com/reference/android/provider/Settings.html#ACTION_NFCSHARING_SETTINGS</a></p>
6139
6140<p>87. NFC Connection Handover: <a href="http://www.nfc-forum.org/specs/spec_list/#conn_handover">http://www.nfc-forum.org/specs/spec_list/#conn_handover</a></p>
6141
6142<p>88. Bluetooth Secure Simple Pairing Using NFC: <a href="http://members.nfc-forum.org/apps/group_public/download.php/18688/NFCForum-AD-BTSSP_1_1.pdf">http://members.nfc-forum.org/apps/group_public/download.php/18688/NFCForum-AD-BTSSP_1_1.pdf</a> </p>
6143
6144<p>89. Content Resolver: <a href="http://developer.android.com/reference/android/content/ContentResolver.html">http://developer.android.com/reference/android/content/ContentResolver.html</a></p>
6145
6146<p>90. Camera orientation API: <a href="http://developer.android.com/reference/android/hardware/Camera.html#setDisplayOrientation(int)">http://developer.android.com/reference/android/hardware/Camera.html#setDisplayOrientation(int)</a></p>
6147
6148<p>91. Camera: <a href="http://developer.android.com/reference/android/hardware/Camera.html">http://developer.android.com/reference/android/hardware/Camera.html</a></p>
6149
6150<p>92. Camera: <a href="http://developer.android.com/reference/android/hardware/Camera.Parameters.html">http://developer.android.com/reference/android/hardware/Camera.Parameters.html</a></p>
6151
6152<p>93. Camera hardware level: <a href="https://developer.android.com/reference/android/hardware/camera2/CameraCharacteristics.html#INFO_SUPPORTED_HARDWARE_LEVEL">https://developer.android.com/reference/android/hardware/camera2/CameraCharacteristics.html#INFO_SUPPORTED_HARDWARE_LEVEL</a> </p>
6153
6154<p>94. Camera version support: <a href="http://source.android.com/devices/camera/versioning.html">http://source.android.com/devices/camera/versioning.html</a> </p>
6155
6156<p>95. Android DownloadManager: <a href="http://developer.android.com/reference/android/app/DownloadManager.html">http://developer.android.com/reference/android/app/DownloadManager.html</a></p>
6157
6158<p>96. Android File Transfer: <a href="http://www.android.com/filetransfer">http://www.android.com/filetransfer</a></p>
6159
6160<p>97. Android Open Accessories: <a href="http://developer.android.com/guide/topics/usb/accessory.html">http://developer.android.com/guide/topics/usb/accessory.html</a></p>
6161
6162<p>98. Android USB Audio: <a href="http://developer.android.com/reference/android/hardware/usb/UsbConstants.html#USB_CLASS_AUDIO">http://developer.android.com/reference/android/hardware/usb/UsbConstants.html#USB_CLASS_AUDIO</a></p>
6163
6164<p>99. USB Charging Specification: <a href="http://www.usb.org/developers/docs/devclass_docs/USB_Battery_Charging_1.2.pdf">http://www.usb.org/developers/docs/devclass_docs/USB_Battery_Charging_1.2.pdf</a></p>
6165
6166<p>100. USB Host API:<a href="http://developer.android.com/guide/topics/usb/host.html"> http://developer.android.com/guide/topics/usb/host.html</a></p>
6167
6168<p>101. Wired audio headset: <a href="http://source.android.com/accessories/headset-spec.html">http://source.android.com/accessories/headset-spec.html</a> </p>
6169
6170<p>102. Android Security and Permissions reference: <a href="http://developer.android.com/guide/topics/security/permissions.html">http://developer.android.com/guide/topics/security/permissions.html</a></p>
6171
6172<p>103. UserManager reference: <a href="http://developer.android.com/reference/android/os/UserManager.html">http://developer.android.com/reference/android/os/UserManager.html</a></p>
6173
6174<p>104. External Storage reference: <a href="http://source.android.com/devices/tech/storage">http://source.android.com/devices/tech/storage</a></p>
6175
6176<p>105. External Storage APIs: <a href="http://developer.android.com/reference/android/os/Environment.html">http://developer.android.com/reference/android/os/Environment.html</a></p>
6177
6178<p>106. SMS Short Code: <a href="http://en.wikipedia.org/wiki/Short_code">http://en.wikipedia.org/wiki/Short_code</a></p>
6179
6180<p>107. Android Open Source Encryption: <a href="http://source.android.com/devices/tech/encryption/index.html">http://source.android.com/devices/tech/encryption/index.html</a></p>
6181
6182<p>108. Android Compatibility Program Overview: <a href="http://source.android.com/compatibility/index.html">http://source.android.com/compatibility/index.html</a></p>
6183
6184<p>109. Android Compatibility forum: <a href="https://groups.google.com/forum/#!forum/android-compatibility">https://groups.google.com/forum/#!forum/android-compatibility</a></p>
6185
6186<p>110. WebM project: <a href="http://www.webmproject.org/">http://www.webmproject.org/</a> </p>
6187
6188<p>Many of these resources are derived directly or indirectly from the Android
6189SDK, and will be functionally identical to the information in that SDK's
6190documentation. In any cases where this Compatibility Definition or the
6191Compatibility Test Suite disagrees with the SDK documentation, the SDK
6192documentation is considered authoritative. Any technical details provided in
6193the references included above are considered by inclusion to be part of this
6194Compatibility Definition.</p>
6195<div style="page-break-before: always;"></div>
6196
6197<div id="footerContent" xmlns:pdf="https://source.android.com">
6198<pdf:pagenumber/>
6199</div>
6200</body>
6201</html>