blob: 5f9cc356420dd381341172f706cd4bf303565802 [file] [log] [blame]
Unsuk Jung5bc81142015-07-16 22:27:20 -07001<!DOCTYPE html>
2<head>
3<title>Android ANDROID_VERSION Compatibility Definition</title>
Clay Murphyb6581772015-08-26 11:11:06 -07004<link rel="stylesheet" type="text/css" href="source/android-cdd.css"/>
Unsuk Jung5bc81142015-07-16 22:27:20 -07005</head>
6
7<body>
8
9<h6>Table of Contents</h6>
10
11<div id="toc">
12
13<div id="toc_left">
14
15<p class="toc_h1"><a href="#1_introduction">1. Introduction</a></p>
16
17<p class="toc_h1"><a href="#2_device_types">2. Device Types</a></p>
18
19<p class="toc_h2"><a href="#2_1_device_configurations">2.1 Device Configurations</a></p>
20
21<p class="toc_h1"><a href="#3_software">3. Software</a></p>
22
23<p class="toc_h2"><a href="#3_1_managed_api_compatibility">3.1. Managed API Compatibility</a></p>
24
25<p class="toc_h2"><a href="#3_2_soft_api_compatibility">3.2. Soft API Compatibility</a></p>
26
27<p class="toc_h3"><a href="#3_2_1_permissions">3.2.1. Permissions</a></p>
28
29<p class="toc_h3"><a href="#3_2_2_build_parameters">3.2.2. Build Parameters</a></p>
30
31<p class="toc_h3"><a href="#3_2_3_intent_compatibility">3.2.3. Intent Compatibility</a></p>
32
33<p class="toc_h4"><a href="#3_2_3_1_core_application_intents">3.2.3.1. Core Application Intents</a></p>
34
35<p class="toc_h4"><a href="#3_2_3_2_intent_overrides">3.2.3.2. Intent Overrides</a></p>
36
37<p class="toc_h4"><a href="#3_2_3_3_intent_namespaces">3.2.3.3. Intent Namespaces</a></p>
38
39<p class="toc_h4"><a href="#3_2_3_4_broadcast_intents">3.2.3.4. Broadcast Intents</a></p>
40
41<p class="toc_h4"><a href="#3_2_3_5_default_app_settings">3.2.3.5. Default App Settings</a></p>
42
43<p class="toc_h2"><a href="#3_3_native_api_compatibility">3.3. Native API Compatibility</a></p>
44
45<p class="toc_h3"><a href="#3_3_1_application_binary_interfaces">3.3.1. Application Binary Interfaces</a></p>
46
47<p class="toc_h3"><a href="#3_3_2_32-bit_arm_native_code_compatibility">3.3.2. 32-bit ARM Native Code Compatibility</a></p>
48
49<p class="toc_h2"><a href="#3_4_web_compatibility">3.4. Web Compatibility</a></p>
50
51<p class="toc_h3"><a href="#3_4_1_webview_compatibility">3.4.1. WebView Compatibility</a></p>
52
53<p class="toc_h3"><a href="#3_4_2_browser_compatibility">3.4.2. Browser Compatibility</a></p>
54
55<p class="toc_h2"><a href="#3_5_api_behavioral_compatibility">3.5. API Behavioral Compatibility</a></p>
56
57<p class="toc_h2"><a href="#3_6_api_namespaces">3.6. API Namespaces</a></p>
58
59<p class="toc_h2"><a href="#3_7_runtime_compatibility">3.7. Runtime Compatibility</a></p>
60
61<p class="toc_h2"><a href="#3_8_user_interface_compatibility">3.8. User Interface Compatibility</a></p>
62
63<p class="toc_h3"><a href="#3_8_1_launcher_home_screen">3.8.1. Launcher (Home Screen)</a></p>
64
65<p class="toc_h3"><a href="#3_8_2_widgets">3.8.2. Widgets</a></p>
66
67<p class="toc_h3"><a href="#3_8_3_notifications">3.8.3. Notifications</a></p>
68
69<p class="toc_h3"><a href="#3_8_4_search">3.8.4. Search</a></p>
70
71<p class="toc_h3"><a href="#3_8_5_toasts">3.8.5. Toasts</a></p>
72
73<p class="toc_h3"><a href="#3_8_6_themes">3.8.6. Themes</a></p>
74
75<p class="toc_h3"><a href="#3_8_7_live_wallpapers">3.8.7. Live Wallpapers</a></p>
76
77<p class="toc_h3"><a href="#3_8_8_activity_switching">3.8.8. Activity Switching</a></p>
78
79<p class="toc_h3"><a href="#3_8_9_input_management">3.8.9. Input Management</a></p>
80
81<p class="toc_h3"><a href="#3_8_10_lock_screen_media_control">3.8.10. Lock Screen Media Control</a></p>
82
83<p class="toc_h3"><a href="#3_8_11_dreams">3.8.11. Dreams</a></p>
84
85<p class="toc_h3"><a href="#3_8_12_location">3.8.12. Location</a></p>
86
87<p class="toc_h3"><a href="#3_8_13_unicode_and_font">3.8.13. Unicode and Font</a></p>
88
89
90
91</div>
92
93<div id="toc_right"><br>
94
95
96
97<p class="toc_h2"><a href="#3_9_device_administration">3.9. Device Administration</a></p>
98
Andy Dyer-smith3d24bbe2015-09-11 15:35:23 +010099<p class="toc_h3"><a href="#3_9_1_device_provisioning">3.9.1 Device Provisioning</a></p>
100
101<p class="toc_h4"><a href="#3_9_1_2_device_owner_provisioning">3.9.1.1 Device Owner provisioning</a></p>
102
103<p class="toc_h4"><a href="#3_9_1_2_managed_profile_provisioning">3.9.1.2 Managed profile provisioning</a></p>
104
Unsuk Jung5bc81142015-07-16 22:27:20 -0700105<p class="toc_h2"><a href="#3_10_accessibility">3.10. Accessibility</a></p>
106
107<p class="toc_h2"><a href="#3_11_text-to-speech">3.11. Text-to-Speech</a></p>
108
109<p class="toc_h2"><a href="#3_12_tv_input_framework">3.12. TV Input Framework</a></p>
110
111<p class="toc_h1"><a href="#4_application_packaging_compatibility">4. Application Packaging Compatibility</a></p>
112
113<p class="toc_h1"><a href="#5_multimedia_compatibility">5. Multimedia Compatibility</a></p>
114
115<p class="toc_h2"><a href="#5_1_media_codecs">5.1. Media Codecs</a></p>
116
117<p class="toc_h3"><a href="#5_1_1_audio_codecs">5.1.1. Audio Codecs</a></p>
118
119<p class="toc_h3"><a href="#5_1_2_image_codecs">5.1.2. Image Codecs</a></p>
120
121<p class="toc_h3"><a href="#5_1_3_video_codecs">5.1.3. Video Codecs</a></p>
122
123<p class="toc_h2"><a href="#5_2_video_encoding">5.2. Video Encoding</a></p>
124
125<p class="toc_h2"><a href="#5_3_video_decoding">5.3. Video Decoding</a></p>
126
127<p class="toc_h2"><a href="#5_4_audio_recording">5.4. Audio Recording</a></p>
128
129<p class="toc_h3"><a href="#5_4_1_raw_audio_capture">5.4.1. Raw Audio Capture</a></p>
130
131<p class="toc_h3"><a href="#5_4_2_capture_for_voice_recognition">5.4.2. Capture for Voice Recognition</a></p>
132
133<p class="toc_h3"><a href="#5_4_3_capture_for_rerouting_of_playback">5.4.3. Capture for Rerouting of Playback</a></p>
134
135<p class="toc_h2"><a href="#5_5_audio_playback">5.5. Audio Playback</a></p>
136
137<p class="toc_h3"><a href="#5_5_1_raw_audio_playback">5.5.1. Raw Audio Playback</a></p>
138
139<p class="toc_h3"><a href="#5_5_2_audio_effects">5.5.2. Audio Effects</a></p>
140
141<p class="toc_h3"><a href="#5_5_3_audio_output_volume">5.5.3. Audio Output Volume</a></p>
142
143<p class="toc_h2"><a href="#5_6_audio_latency">5.6. Audio Latency</a></p>
144
145<p class="toc_h2"><a href="#5_7_network_protocols">5.7. Network Protocols</a></p>
146
147<p class="toc_h2"><a href="#5_8_secure_media">5.8. Secure Media</a></p>
148
Glenn Kasten87ef61d2015-07-29 09:01:36 -0700149<p class="toc_h2"><a href="#5_9_midi">5.9. Musical Instrument Digital Interface (MIDI)</a></p>
150
Glenn Kasten78eccbd2015-08-12 10:18:22 -0700151<p class="toc_h2"><a href="#5_10_pro_audio">5.10. Professional Audio</a></p>
152
Unsuk Jung5bc81142015-07-16 22:27:20 -0700153<p class="toc_h1"><a href="#6_developer_tools_and_options_compatibility">6. Developer Tools and Options Compatibility</a></p>
154
155<p class="toc_h2"><a href="#6_1_developer_tools">6.1. Developer Tools</a></p>
156
157<p class="toc_h2"><a href="#6_2_developer_options">6.2. Developer Options</a></p>
158
159<p class="toc_h1"><a href="#7_hardware_compatibility">7. Hardware Compatibility</a></p>
160
161<p class="toc_h2"><a href="#7_1_display_and_graphics">7.1. Display and Graphics</a></p>
162
163<p class="toc_h3"><a href="#7_1_1_screen_configuration">7.1.1. Screen Configuration</a></p>
164
165<p class="toc_h4"><a href="#7_1_1_1_screen_size">7.1.1.1. Screen Size</a></p>
166
167<p class="toc_h4"><a href="#7_1_1_2_screen_aspect_ratio">7.1.1.2. Screen Aspect Ratio</a></p>
168
169<p class="toc_h4"><a href="#7_1_1_3_screen_density">7.1.1.3. Screen Density</a></p>
170
171
172</div>
173
174<div style="clear: both; page-break-after:always; height:1px"></div>
175
176
177<div id="toc_left_2">
178
179<p class="toc_h3"><a href="#7_1_2_display_metrics">7.1.2. Display Metrics</a></p>
180
181<p class="toc_h3"><a href="#7_1_3_screen_orientation">7.1.3. Screen Orientation</a></p>
182
183<p class="toc_h3"><a href="#7_1_4_2d_and_3d_graphics_acceleration">7.1.4. 2D and 3D Graphics Acceleration</a></p>
184
185<p class="toc_h3"><a href="#7_1_5_legacy_application_compatibility_mode">7.1.5. Legacy Application Compatibility Mode</a></p>
186
187<p class="toc_h3"><a href="#7_1_6_screen_technology">7.1.6. Screen Technology</a></p>
188
189<p class="toc_h3"><a href="#7_1_7_external_displays">7.1.7. Secondary Displays</a></p>
190
191<p class="toc_h2"><a href="#7_2_input_devices">7.2. Input Devices</a></p>
192
193<p class="toc_h3"><a href="#7_2_1_keyboard">7.2.1. Keyboard</a></p>
194
195<p class="toc_h3"><a href="#7_2_2_non-touch_navigation">7.2.2. Non-touch Navigation</a></p>
196
197<p class="toc_h3"><a href="#7_2_3_navigation_keys">7.2.3. Navigation Keys</a></p>
198
199<p class="toc_h3"><a href="#7_2_4_touchscreen_input">7.2.4. Touchscreen Input</a></p>
200
201<p class="toc_h3"><a href="#7_2_5_fake_touch_input">7.2.5. Fake Touch Input</a></p>
202
203<p class="toc_h3"><a href="#7_2_6_game_controller_support">7.2.6. Game Controller Support</a></p>
204
205<p class="toc_h4"><a href="#7_2_6_1_button_mapping">7.2.6.1. Button Mappings</a></p>
206
207<p class="toc_h3"><a href="#7_2_7_remote_control">7.2.7. Remote Control</a></p>
208
209<p class="toc_h2"><a href="#7_3_sensors">7.3. Sensors</a></p>
210
211<p class="toc_h3"><a href="#7_3_1_accelerometer">7.3.1. Accelerometer</a></p>
212
213<p class="toc_h3"><a href="#7_3_2_magnetometer">7.3.2. Magnetometer</a></p>
214
215<p class="toc_h3"><a href="#7_3_3_gps">7.3.3. GPS</a></p>
216
217<p class="toc_h3"><a href="#7_3_4_gyroscope">7.3.4. Gyroscope</a></p>
218
219<p class="toc_h3"><a href="#7_3_5_barometer">7.3.5. Barometer</a></p>
220
221<p class="toc_h3"><a href="#7_3_6_thermometer">7.3.6. Thermometer</a></p>
222
223<p class="toc_h3"><a href="#7_3_7_photometer">7.3.7. Photometer</a></p>
224
225<p class="toc_h3"><a href="#7_3_8_proximity_sensor">7.3.8. Proximity Sensor</a></p>
226
Unsuk Jung5b08df22015-09-29 18:50:14 -0700227<p class="toc_h3"><a href="#7_3_10_fingerprint">7.3.10. Fingerprint Sensor</a></p>
228
Unsuk Jung5bc81142015-07-16 22:27:20 -0700229<p class="toc_h2"><a href="#7_4_data_connectivity">7.4. Data Connectivity</a></p>
230
231<p class="toc_h3"><a href="#7_4_1_telephony">7.4.1. Telephony</a></p>
232
233<p class="toc_h3"><a href="#7_4_2_ieee_80211_wi-fi">7.4.2. IEEE 802.11 (Wi-Fi)</a></p>
234
235<p class="toc_h4"><a href="#7_4_2_1_wi-fi_direct">7.4.2.1. Wi-Fi Direct</a></p>
236
237<p class="toc_h4"><a href="#7_4_2_2_wi-fi-tunneled-direct-link-setup">7.4.2.2. Wi-Fi Tunneled Direct Link Setup</a></p>
238
239<p class="toc_h3"><a href="#7_4_3_bluetooth">7.4.3. Bluetooth</a></p>
240
241<p class="toc_h3"><a href="#7_4_4_near-field_communications">7.4.4. Near-Field Communications</a></p>
242
243<p class="toc_h3"><a href="#7_4_5_minimum_network_capability">7.4.5. Minimum Network Capability</a></p>
244
245<p class="toc_h3"><a href="#7_4_6_sync_settings">7.4.6. Sync Settings</a></p>
246
247<p class="toc_h2"><a href="#7_5_cameras">7.5. Cameras</a></p>
248
249<p class="toc_h3"><a href="#7_5_1_rear-facing_camera">7.5.1. Rear-Facing Camera</a></p>
250
251<p class="toc_h3"><a href="#7_5_2_front-facing_camera">7.5.2. Front-Facing Camera</a></p>
252
253<p class="toc_h3"><a href="#7_5_3_external_camera">7.5.3. External Camera</a></p>
254
255<p class="toc_h3"><a href="#7_5_4_camera_api_behavior">7.5.4. Camera API Behavior</a></p>
256
257
258
259
260
261</div>
262
263<div id="toc_right_2">
264
265<p class="toc_h3"><a href="#7_5_5_camera_orientation">7.5.5. Camera Orientation</a></p>
266
267<p class="toc_h2"><a href="#7_6_memory_and_storage">7.6. Memory and Storage</a></p>
268
269<p class="toc_h3"><a href="#7_6_1_minimum_memory_and_storage">7.6.1. Minimum Memory and Storage</a></p>
270
271<p class="toc_h3"><a href="#7_6_2_application_shared_storage">7.6.2. Application Shared Storage</a></p>
272
273<p class="toc_h2"><a href="#7_7_usb">7.7. USB</a></p>
274
275<p class="toc_h2"><a href="#7_8_audio">7.8. Audio</a></p>
276
277<p class="toc_h3"><a href="#7_8_1_microphone">7.8.1. Microphone</a></p>
278
279<p class="toc_h3"><a href="#7_8_2_audio_output">7.8.2. Audio Output</a></p>
280
281<p class="toc_h4"><a href="#7_8_2_1_analog_audio_ports">7.8.2.1. Analog Audio Ports</a></p>
282
283<p class="toc_h1"><a href="#8_performance_compatibility">8. Performance Compatibility</a></p>
284
285<p class="toc_h2"><a href="#8_1_user_experience_consistency">8.1. User Experience Consistency</a></p>
286
287<p class="toc_h2"><a href="#8_2_memory_performance">8.2. Memory Performance</a></p>
288
289<p class="toc_h1"><a href="#9_security_model_compatibility">9. Security Model Compatibility</a></p>
290
291<p class="toc_h2"><a href="#9_1_permissions">9.1. Permissions</a></p>
292
293<p class="toc_h2"><a href="#9_2_uid_and_process_isolation">9.2. UID and Process Isolation</a></p>
294
295<p class="toc_h2"><a href="#9_3_filesystem_permissions">9.3. Filesystem Permissions</a></p>
296
297<p class="toc_h2"><a href="#9_4_alternate_execution_environments">9.4. Alternate Execution Environments</a></p>
298
299<p class="toc_h2"><a href="#9_5_multi-user_support">9.5. Multi-User Support</a></p>
300
301<p class="toc_h2"><a href="#9_6_premium_sms_warning">9.6. Premium SMS Warning</a></p>
302
303<p class="toc_h2"><a href="#9_7_kernel_security_features">9.7. Kernel Security Features</a></p>
304
305<p class="toc_h2"><a href="#9_8_privacy">9.8. Privacy</a></p>
306
307<p class="toc_h2"><a href="#9_9_full-disk-encryption">9.9. Full-Disk Encryption</a></p>
308
309<p class="toc_h2"><a href="#9_10_verified_boot">9.10. Verified Boot</a></p>
310
311<p class="toc_h1"><a href="#10_software_compatibility_testing">10. Software Compatibility Testing</a></p>
312
313<p class="toc_h2"><a href="#10_1_compatibility_test_suite">10.1. Compatibility Test Suite</a></p>
314
315<p class="toc_h2"><a href="#10_2_cts_verifier">10.2. CTS Verifier</a></p>
316
317<p class="toc_h1"><a href="#11_updatable_software">11. Updatable Software</a></p>
318
319<p class="toc_h1"><a href="#12_document_changelog">12. Document Changelog</a></p>
320
321<p class="toc_h1"><a href="#13_contact_us">13. Contact Us</a></p>
322
323<p class="toc_h1"><a href="#14_resources">14. Resources</a></p>
324
325</div>
326
327</div>
328
329<div style="clear: both"></div>
330
331<div id="main">
332
333<h1 id="1_introduction">1. Introduction</h1>
334
335
336<p>This document enumerates the requirements that must be met in order for devices
337to be compatible with Android ANDROID_VERSION.</p>
338
339<p>The use of &ldquo;MUST&rdquo;, &ldquo;MUST NOT&rdquo;, &ldquo;REQUIRED&rdquo;, &ldquo;SHALL&rdquo;, &ldquo;SHALL NOT&rdquo;, &ldquo;SHOULD&rdquo;,&ldquo;SHOULD NOT&rdquo;, &ldquo;RECOMMENDED&rdquo;, &ldquo;MAY&rdquo;, and &ldquo;OPTIONAL&rdquo; is per the IETF standard
340defined in RFC2119 [<a href="http://www.ietf.org/rfc/rfc2119.txt">Resources, 1</a>].</p>
341
342<p>As used in this document, a &ldquo;device implementer&rdquo; or &ldquo;implementer&rdquo; is a person
343or organization developing a hardware/software solution running Android ANDROID_VERSION. A
344&ldquo;device implementation&rdquo; or &ldquo;implementation is the hardware/software solution
345so developed.</p>
346
347<p>To be considered compatible with Android ANDROID_VERSION, device implementations MUST meet
348the requirements presented in this Compatibility Definition, including any
349documents incorporated via reference.</p>
350
351<p>Where this definition or the software tests described in <a href="#10_software_compatibility_testing">section 10</a> is silent, ambiguous, or incomplete, it is the responsibility of the device
352implementer to ensure compatibility with existing implementations.</p>
353
354<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
355implementers are strongly encouraged to base their implementations to the
356greatest extent possible on the &ldquo;upstream&rdquo; source code available from the
357Android Open Source Project. While some components can hypothetically be
358replaced with alternate implementations this practice is strongly discouraged,
359as passing the software tests will become substantially more difficult. It is
360the implementer&rsquo;s responsibility to ensure full behavioral compatibility with
361the standard Android implementation, including and beyond the Compatibility
362Test Suite. Finally, note that certain component substitutions and
363modifications are explicitly forbidden by this document.</p>
364
365<p>Many of the resources listed in <a href="#14_resources">section 14</a> are derived directly or indirectly from the Android SDK, and will be
366functionally identical to the information in that SDK&rsquo;s documentation. For any
367case where this Compatibility Definition or the Compatibility Test Suite
368disagrees with the SDK documentation, the SDK documentation is considered
369authoritative. Any technical details provided in the references included in <a href="#14_resources">section 14</a> are considered by inclusion to be part of this Compatibility Definition. </p>
370
371<h1 id="2_device_types">2. Device Types</h1>
372
373
374<p>While the Android Open Source Project has been used in the implementation of a
375variety of device types and form factors, many aspects of the architecture and
376compatibility requirements were optimized for handheld devices. Starting from
377Android 5.0, the Android Open Source Project aims to embrace a wider variety of
378device types as described in this section.</p>
379
380<p><strong>Android Handheld device</strong> refers to an Android device implementation that is typically used by holding
381it in the hand, such as mp3 players, phones, and tablets. Android Handheld
382device implementations:</p>
383
384<ul>
385 <li>MUST have a touchscreen embedded in the device.</li>
386 <li>MUST have a power source that provides mobility, such as a battery.</li>
387</ul>
388
389<p><strong>Android Television device</strong> refers to an Android device implementation that is an entertainment interface
390for consuming digital media, movies, games, apps, and/or live TV for users
391sitting about ten feet away (a &ldquo;lean back&rdquo; or &ldquo;10-foot user interface&rdquo;).
392Android Television devices:</p>
393
394<ul>
395 <li>MUST have an embedded screen OR include a video output port, such as VGA, HDMI,
396or a wireless port for display.</li>
397 <li>MUST declare the features android.software.leanback and
398android.hardware.type.television [<a href="http://developer.android.com/reference/android/content/pm/PackageManager.html#FEATURE_LEANBACK">Resources, 3</a>].</li>
399</ul>
400
401<p><strong>Android Watch device</strong> refers to an Android device implementation intended to be worn on the body,
402perhaps on the wrist, and:</p>
403
404<ul>
405 <li>MUST have a screen with the physical diagonal length in the range from 1.1 to
4062.5 inches.</li>
407 <li>MUST declare the feature android.hardware.type.watch.</li>
408 <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>].</li>
409</ul>
410
411<p><strong>Android Automotive implementation</strong> refers to a vehicle head
412unit running Android as an operating system for part or all of the system and/or
413infotainment functionality. Android Automotive implementations MUST support
414uiMode = UI_MODE_TYPE_CAR [<a href="http://developer.android.com/reference/android/content/res/Configuration.html#UI_MODE_TYPE_CAR">Resources, 111</a>].</p>
415
416<p>All Android device implementations that do not fit into any of the above device
417types still MUST meet all requirements in this document to be Android ANDROID_VERSION
418compatible, unless the requirement is explicitly described to be only
419applicable to a specific Android device type from above.</p>
420
421<h2 id="2_1_device_configurations">2.1 Device Configurations</h2>
422
423
424<p>This is a summary of major differences in hardware configuration by device
425type. (Empty cells denote a &ldquo;MAY&rdquo;). Not all configurations are covered in this
426table; see relevant hardware sections for more detail.</p>
427<table>
428 <tr>
429 <th>Category</th>
430 <th>Feature</th>
431 <th>Section</th>
432 <th>Handheld</th>
433 <th>Television</th>
434 <th>Watch</th>
435 <th>Automotive</th>
436 <th>Other</th>
437 </tr>
438 <tr>
439 <td rowspan="3">Input</td>
440 <td>D-pad</td>
441 <td><a href="#7_2_2_non-touch-navigation">7.2.2. Non-touch Navigation</a></td>
442 <td></td>
443 <td>MUST</td>
444 <td></td>
445 <td></td>
446 <td></td>
447 </tr>
448 <tr>
449 <td>Touchscreen </td>
450 <td><a href="#7_2_4_touchscreen_input">7.2.4. Touchscreen input</a></td>
451 <td>MUST</td>
452 <td></td>
453 <td>MUST</td>
454 <td></td>
455 <td>SHOULD</td>
456 </tr>
457 <tr>
458 <td>Microphone </td>
459 <td><a href="#7_8_1_microphone">7.8.1. Microphone</a></td>
460 <td>MUST</td>
461 <td>SHOULD </td>
462 <td>MUST</td>
463 <td>MUST</td>
464 <td>SHOULD</td>
465 </tr>
466 <tr>
467 <td rowspan="2">Sensors</td>
468 <td>Accelerometer </td>
469 <td><a href="#7_3_1_accelerometer">7.3.1 Accelerometer</a></td>
470 <td>SHOULD</td>
471 <td></td>
472 <td>SHOULD</td>
473 <td></td>
474 <td>SHOULD</td>
475 </tr>
476 <tr>
477 <td>GPS</td>
478 <td><a href="#7_3_3_gps">7.3.3. GPS</a></td>
479 <td>SHOULD</td>
480 <td></td>
481 <td></td>
482 <td>SHOULD</td>
483 <td></td>
484 </tr>
485 <tr>
486 <td rowspan="5">Connectivity</td>
487 <td>Wi-Fi</td>
488 <td><a href="#7_4_2_ieee_802.11">7.4.2. IEEE 802.11</a></td>
489 <td>SHOULD</td>
490 <td> MUST</td>
491 <td></td>
492 <td>SHOULD</td>
493 <td>SHOULD</td>
494 </tr>
495 <tr>
496 <td>Wi-Fi Direct</td>
497 <td><a href="#7_4_2_1_wi-fi-direct">7.4.2.1. Wi-Fi Direct</a></td>
498 <td>SHOULD</td>
499 <td>SHOULD</td>
500 <td></td>
501 <td></td>
502 <td>SHOULD</td>
503 </tr>
504 <tr>
505 <td>Bluetooth</td>
506 <td><a href="#7_4_3_bluetooth">7.4.3. Bluetooth</a></td>
507 <td>SHOULD</td>
508 <td>MUST</td>
509 <td>MUST</td>
510 <td>MUST</td>
511 <td>SHOULD</td>
512 </tr>
513 <tr>
514 <td>Bluetooth Low Energy</td>
515 <td><a href="#7_4_3_bluetooth">7.4.3. Bluetooth</a></td>
516 <td>SHOULD</td>
517 <td>MUST</td>
518 <td>SHOULD</td>
519 <td>SHOULD</td>
520 <td>SHOULD</td>
521 </tr>
522 <tr>
523 <td>USB peripheral/host mode</td>
524 <td><a href="#7_7_usb">7.7. USB</a></td>
525 <td>SHOULD</td>
526 <td></td>
527 <td></td>
528 <td>SHOULD</td>
529 <td>SHOULD</td>
530 </tr>
531 <tr>
532 <td>Output</td>
533 <td>Speaker and/or Audio output ports</td>
534 <td><a href="#7_8_2_audio_output">7.8.2. Audio Output</a></td>
535 <td>MUST</td>
536 <td>MUST</td>
537 <td></td>
538 <td>MUST</td>
539 <td>MUST</td>
540 </tr>
541</table>
542
543
544<h1 id="3_software">3. Software</h1>
545
546
547<h2 id="3_1_managed_api_compatibility">3.1. Managed API Compatibility</h2>
548
549
550<p>The managed Dalvik bytecode execution environment is the primary vehicle for
551Android applications. The Android application programming interface (API) is
552the set of Android platform interfaces exposed to applications running in the
553managed runtime environment. Device implementations MUST provide complete
554implementations, including all documented behaviors, of any documented API
555exposed by the Android SDK [<a href="http://developer.android.com/reference/packages.html">Resources, 5</a>] or any API decorated with the &ldquo;@SystemApi&rdquo; marker in the upstream Android
556source code. </p>
557
558<p>Device implementations MUST NOT omit any managed APIs, alter API interfaces or
559signatures, deviate from the documented behavior, or include no-ops, except
560where specifically allowed by this Compatibility Definition.</p>
561
562<p>This Compatibility Definition permits some types of hardware for which Android
563includes APIs to be omitted by device implementations. In such cases, the APIs
564MUST still be present and behave in a reasonable way. See <a href="#7_hardware_compatibility">section 7</a> for specific requirements for this scenario.</p>
565
566<h2 id="3_2_soft_api_compatibility">3.2. Soft API Compatibility</h2>
567
568
569<p>In addition to the managed APIs from <a href="#3_1_managed_api_compatibility">section 3.1</a>, Android also includes a significant runtime-only &ldquo;soft&rdquo; API, in the form of
570such things as intents, permissions, and similar aspects of Android
571applications that cannot be enforced at application compile time.</p>
572
573<h3 id="3_2_1_permissions">3.2.1. Permissions</h3>
574
575
576<p>Device implementers MUST support and enforce all permission constants as
577documented by the Permission reference page [<a href="http://developer.android.com/reference/android/Manifest.permission.html">Resources, 6]</a>. Note that <a href="#9_security_model_compatibility">section 9</a> lists additional requirements related to the Android security model.</p>
578
579<h3 id="3_2_2_build_parameters">3.2.2. Build Parameters</h3>
580
581
582<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,
583meaningful values across device implementations, the table below includes
584additional restrictions on the formats of these values to which device
585implementations MUST conform.</p>
586<table>
587 <tr>
588 <th>Parameter</th>
589 <th>Details</th>
590 </tr>
591 <tr>
592 <td>VERSION.RELEASE</td>
593 <td>The version of the currently-executing Android system, in human-readable
594format. This field MUST have one of the string values defined in [<a href="http://source.android.com/compatibility/ANDROID_VERSION/versions.html">Resources, 8]</a>.</td>
595 </tr>
596 <tr>
597 <td>VERSION.SDK</td>
598 <td>The version of the currently-executing Android system, in a format accessible
599to third-party application code. For Android ANDROID_VERSION, this field MUST have the
600integer value 22.</td>
601 </tr>
602 <tr>
603 <td>VERSION.SDK_INT</td>
604 <td>The version of the currently-executing Android system, in a format accessible
605to third-party application code. For Android ANDROID_VERSION, this field MUST have the
606integer value 22.</td>
607 </tr>
608 <tr>
609 <td>VERSION.INCREMENTAL</td>
610 <td>A value chosen by the device implementer designating the specific build of the
611currently-executing Android system, in human-readable format. This value MUST
612NOT be reused for different builds made available to end users. A typical use
613of this field is to indicate which build number or source-control change
614identifier was used to generate the build. There are no requirements on the
615specific format of this field, except that it MUST NOT be null or the empty
616string ("").</td>
617 </tr>
618 <tr>
619 <td>BOARD</td>
620 <td>A value chosen by the device implementer identifying the specific internal
621hardware used by the device, in human-readable format. A possible use of this
622field is to indicate the specific revision of the board powering the device.
623The value of this field MUST be encodable as 7-bit ASCII and match the regular
624expression &ldquo;^[a-zA-Z0-9_-]+$&rdquo;.</td>
625 </tr>
626 <tr>
627 <td>BRAND</td>
628 <td>A value reflecting the brand name associated with the device as known to the
629end users. MUST be in human-readable format and SHOULD represent the
630manufacturer of the device or the company brand under which the device is
631marketed. The value of this field MUST be encodable as 7-bit ASCII and match
632the regular expression &ldquo;^[a-zA-Z0-9_-]+$&rdquo;.</td>
633 </tr>
634 <tr>
635 <td>SUPPORTED_ABIS</td>
636 <td>The name of the instruction set (CPU type + ABI convention) of native code. See <a href="#3_3_native_api_compatibility">section 3.3. Native API Compatibility</a>.</td>
637 </tr>
638 <tr>
639 <td>SUPPORTED_32_BIT_ABIS</td>
640 <td>The name of the instruction set (CPU type + ABI convention) of native code. See <a href="#3_3_native_api_compatibility">section 3.3. Native API Compatibility</a>.</td>
641 </tr>
642 <tr>
643 <td>SUPPORTED_64_BIT_ABIS</td>
644 <td>The name of the second instruction set (CPU type + ABI convention) of native
645code. See <a href="#3_3_native_api_compatibility">section 3.3. Native API Compatibility</a>.</td>
646 </tr>
647 <tr>
648 <td>CPU_ABI</td>
649 <td>The name of the instruction set (CPU type + ABI convention) of native code. See <a href="#3_3_native_api_compatibility">section 3.3. Native API Compatibility</a>.</td>
650 </tr>
651 <tr>
652 <td>CPU_ABI2</td>
653 <td>The name of the second instruction set (CPU type + ABI convention) of native
654code. See <a href="#3_3_native_api_compatibility">section 3.3. Native API Compatibility</a>.</td>
655 </tr>
656 <tr>
657 <td>DEVICE</td>
658 <td>A value chosen by the device implementer containing the development name or
659code name identifying the configuration of the hardware features and industrial
660design of the device. The value of this field MUST be encodable as 7-bit ASCII
661and match the regular expression &ldquo;^[a-zA-Z0-9_-]+$&rdquo;.</td>
662 </tr>
663 <tr>
664 <td>FINGERPRINT</td>
665 <td>A string that uniquely identifies this build. It SHOULD be reasonably
666human-readable. It MUST follow this template:</p>
667
668<p class="small">$(BRAND)/$(PRODUCT)/$(DEVICE):$(VERSION.RELEASE)/$(ID)/$(VERSION.INCREMENTAL):$(TYPE)/$(TAGS)</p>
669
670<p>For example: acme/myproduct/mydevice:ANDROID_VERSION/LMYXX/3359:userdebug/test-keys</p>
671
672<p>The fingerprint MUST NOT include whitespace characters. If other fields
673included in the template above have whitespace characters, they MUST be
674replaced in the build fingerprint with another character, such as the
675underscore ("_") character. The value of this field MUST be encodable as 7-bit
676ASCII.</td>
677 </tr>
678 <tr>
679 <td>HARDWARE</td>
680 <td>The name of the hardware (from the kernel command line or /proc). It SHOULD be
681reasonably human-readable. The value of this field MUST be encodable as 7-bit
682ASCII and match the regular expression &ldquo;^[a-zA-Z0-9_-]+$&rdquo;. </td>
683 </tr>
684 <tr>
685 <td>HOST</td>
686 <td>A string that uniquely identifies the host the build was built on, in
687human-readable format. There are no requirements on the specific format of this
688field, except that it MUST NOT be null or the empty string ("").</td>
689 </tr>
690 <tr>
691 <td>ID</td>
692 <td>An identifier chosen by the device implementer to refer to a specific release,
693in human-readable format. This field can be the same as
694android.os.Build.VERSION.INCREMENTAL, but SHOULD be a value sufficiently
695meaningful for end users to distinguish between software builds. The value of
696this field MUST be encodable as 7-bit ASCII and match the regular expression &ldquo;^[a-zA-Z0-9._-]+$&rdquo;.</td>
697 </tr>
698 <tr>
699 <td>MANUFACTURER</td>
700 <td>The trade name of the Original Equipment Manufacturer (OEM) of the product.
701There are no requirements on the specific format of this field, except that it
702MUST NOT be null or the empty string ("").</td>
703 </tr>
704 <tr>
705 <td>MODEL</td>
706 <td>A value chosen by the device implementer containing the name of the device as
707known to the end user. This SHOULD be the same name under which the device is
708marketed and sold to end users. There are no requirements on the specific
709format of this field, except that it MUST NOT be null or the empty string ("").</td>
710 </tr>
711 <tr>
712 <td>PRODUCT</td>
713 <td>A value chosen by the device implementer containing the development name or
714code name of the specific product (SKU) that MUST be unique within the same
715brand. MUST be human-readable, but is not necessarily intended for view by end
716users. The value of this field MUST be encodable as 7-bit ASCII and match the
717regular expression &ldquo;^[a-zA-Z0-9_-]+$&rdquo;.</td>
718 </tr>
719 <tr>
720 <td>SERIAL</td>
Owain Davies4f8796e2015-09-24 14:01:26 +0100721 <td>A hardware serial number, which MUST be available and unique across
722devices with the same MODEL and MANUFACTURER. The value of this field MUST
Unsuk Jung5bc81142015-07-16 22:27:20 -0700723be encodable as 7-bit ASCII and match the regular expression &ldquo;^([a-zA-Z0-9]{6,20})$&rdquo;.</td>
724 </tr>
725 <tr>
726 <td>TAGS</td>
727 <td>A comma-separated list of tags chosen by the device implementer that further
728distinguishes the build. This field MUST have one of the values corresponding
729to the three typical Android platform signing configurations: release-keys,
730dev-keys, test-keys. </td>
731 </tr>
732 <tr>
733 <td>TIME</td>
734 <td>A value representing the timestamp of when the build occurred.</td>
735 </tr>
736 <tr>
737 <td>TYPE</td>
738 <td>A value chosen by the device implementer specifying the runtime configuration
739of the build. This field MUST have one of the values corresponding to the three
740typical Android runtime configurations: user, userdebug, or eng.</td>
741 </tr>
742 <tr>
743 <td>USER</td>
744 <td>A name or user ID of the user (or automated user) that generated the build.
745There are no requirements on the specific format of this field, except that it
746MUST NOT be null or the empty string ("").</td>
747 </tr>
748</table>
749
750
751<h3 id="3_2_3_intent_compatibility">3.2.3. Intent Compatibility</h3>
752
753
754<p>Device implementations MUST honor Android&rsquo;s loose-coupling intent system, as
755described in the sections below. By&ldquo;honored &rdquo; it is meant that the device
756implementer MUST provide an Android Activity or Service that specifies a
757matching intent filter that binds to and implements correct behavior for each
758specified intent pattern.</p>
759
760<h4 id="3_2_3_1_core_application_intents">3.2.3.1. Core Application Intents</h4>
761
762
763<p>Android intents allow application components to request functionality from
764other Android components. The Android upstream project includes a list of
765applications considered core Android applications, which implements several
766intent patterns to perform common actions. The core Android applications are:</p>
767
768<ul>
769 <li>Desk Clock</li>
770 <li>Browser</li>
771 <li>Calendar</li>
772 <li>Contacts</li>
773 <li>Gallery</li>
774 <li>GlobalSearch</li>
775 <li>Launcher</li>
776 <li>Music</li>
777 <li>Settings</li>
778</ul>
779
780<p>Device implementations SHOULD include the core Android applications as
781appropriate but MUST include a component implementing the same intent patterns
782defined by all the &ldquo;public&rdquo; Activity or Service components of these core
783Android applications. Note that Activity or Service components are considered
784&ldquo;public&rdquo; when the attribute android:exported is absent or has the value true.</p>
785
786<h4 id="3_2_3_2_intent_overrides">3.2.3.2. Intent Overrides</h4>
787
788
789<p>As Android is an extensible platform, device implementations MUST allow each
790intent pattern referenced in <a href="#3_2_3_1_core_application_intents">section 3.2.3.1</a> to be overridden by third-party applications. The upstream Android open source
791implementation allows this by default; device implementers MUST NOT attach
792special privileges to system applications' use of these intent patterns, or
793prevent third-party applications from binding to and assuming control of these
794patterns. This prohibition specifically includes but is not limited to
795disabling the&ldquo;Chooser&rdquo; user interface that allows the user to select between
796multiple applications that all handle the same intent pattern.</p>
797
798<p>However, device implementations MAY provide default activities for specific URI
799patterns (eg. http://play.google.com) if the default activity provides a more
800specific filter for the data URI. For example, an intent filter specifying the
801data URI &ldquo;http://www.android.com&rdquo; is more specific than the browser filter for&ldquo;http://&rdquo;. Device implementations MUST provide a user interface for users to
802modify the default activity for intents.</p>
803
804<h4 id="3_2_3_3_intent_namespaces">3.2.3.3. Intent Namespaces</h4>
805
806
807<p>Device implementations MUST NOT include any Android component that honors any
808new intent or broadcast intent patterns using an ACTION, CATEGORY, or other key
809string in the android.* or com.android.* namespace. Device implementers MUST
810NOT include any Android components that honor any new intent or broadcast
811intent patterns using an ACTION, CATEGORY, or other key string in a package
812space belonging to another organization. Device implementers MUST NOT alter or
813extend any of the intent patterns used by the core apps listed in <a href="#3_2_3_1_core_application_intents">section 3.2.3.1</a>. Device implementations MAY include intent patterns using namespaces clearly
814and obviously associated with their own organization. This prohibition is
815analogous to that specified for Java language classes in <a href="#3_6_api_namespaces">section 3.6</a>.</p>
816
817<h4 id="3_2_3_4_broadcast_intents">3.2.3.4. Broadcast Intents</h4>
818
819
820<p>Third-party applications rely on the platform to broadcast certain intents to
821notify them of changes in the hardware or software environment.
822Android-compatible devices MUST broadcast the public broadcast intents in
823response to appropriate system events. Broadcast intents are described in the
824SDK documentation.</p>
825
826<h4 id="3_2_3_5_default_app_settings">3.2.3.5. Default App Settings</h4>
827
828
829<p>Android includes settings that provide users an easy way to select their
830default applications, for example for Home screen or SMS. Where it makes sense,
831device implementations MUST provide a similar settings menu and be compatible
832with the intent filter pattern and API methods described in the SDK
833documentation as below.</p>
834
835<p>Device implementations:</p>
836
837<ul>
838 <li>MUST honor the android.settings.HOME_SETTINGS intent to show a default app
839settings menu for Home Screen, if the device implementation reports
840android.software.home_screen [<a href="http://developer.android.com/reference/android/provider/Settings.html">Resources, 10]</a></li>
841 <li>MUST provide a settings menu that will call the
842android.provider.Telephony.ACTION_CHANGE_DEFAULT intent to show a dialog to
843change the default SMS application, if the device implementation reports
844android.hardware.telephony [<a href="http://developer.android.com/reference/android/provider/Telephony.Sms.Intents.html">Resources, 9</a>]</li>
845 <li>MUST honor the android.settings.NFC_PAYMENT_SETTINGS intent to show a default
846app settings menu for Tap and Pay, if the device implementation reports
847android.hardware.nfc.hce [<a href="http://developer.android.com/reference/android/provider/Settings.html">Resources, 10]</a></li>
848</ul>
849
850<h2 id="3_3_native_api_compatibility">3.3. Native API Compatibility</h2>
851
852
853<h3 id="3_3_1_application_binary_interfaces">3.3.1. Application Binary Interfaces</h3>
854
855
856<p>Managed Dalvik bytecode can call into native code provided in the application
857.apk file as an ELF .so file compiled for the appropriate device hardware
858architecture. As native code is highly dependent on the underlying processor
859technology, Android defines a number of Application Binary Interfaces (ABIs) in
860the Android NDK. Device implementations MUST be compatible with one or more
861defined ABIs, and MUST implement compatibility with the Android NDK, as below.</p>
862
863<p>If a device implementation includes support for an Android ABI, it:</p>
864
865<ul>
866 <li>MUST include support for code running in the managed environment to call into
867native code, using the standard Java Native Interface (JNI) semantics</li>
868 <li>MUST be source-compatible (i.e. header compatible) and binary-compatible (for
869the ABI) with each required library in the list below</li>
870 <li>MUST support the equivalent 32-bit ABI if any 64-bit ABI is supported</li>
871 <li>MUST accurately report the native Application Binary Interface (ABI) supported
872by the device, via the android.os.Build.SUPPORTED_ABIS,
873android.os.Build.SUPPORTED_32_BIT_ABIS, and
874android.os.Build.SUPPORTED_64_BIT_ABIS parameters, each a comma separated list
875of ABIs ordered from the most to the least preferred one</li>
Unsuk Jung06706432015-08-31 11:26:13 -0700876 <li>MUST report, via the above parameters, only those ABIs documented and
877described in the latest version of the Android NDK ABI Management documentation
878[<a href="https://developer.android.com/ndk/guides/abis.html">Resources, XX</a>],
879and MUST include support for the Advanced SIMD (a.k.a. NEON)
880[<a href="http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0388f/Beijfcja.html">Resources,XX</a>]
881extension
882 </li>
Unsuk Jung5bc81142015-07-16 22:27:20 -0700883 <li>SHOULD be built using the source code and header files available in the
884upstream Android Open Source Project</li>
885</ul>
886
887<p>The following native code APIs MUST be available to apps that include native
888code:</p>
889
890<ul>
891 <li>libc (C library)</li>
892 <li>libm (math library)</li>
893 <li>Minimal support for C++</li>
894 <li>JNI interface</li>
895 <li>liblog (Android logging)</li>
896 <li>libz (Zlib compression)</li>
897 <li>libdl (dynamic linker)</li>
898 <li>libGLESv1_CM.so (OpenGL ES 1.x)</li>
899 <li>libGLESv2.so (OpenGL ES 2.0)</li>
900 <li>libGLESv3.so (OpenGL ES 3.x)</li>
901 <li>libEGL.so (native OpenGL surface management)</li>
902 <li>libjnigraphics.so</li>
903 <li>libOpenSLES.so (OpenSL ES 1.0.1 audio support)</li>
904 <li>libOpenMAXAL.so (OpenMAX AL 1.0.1 support)</li>
905 <li>libandroid.so (native Android activity support)</li>
906 <li>libmediandk.so (native media APIs support)</li>
907 <li>Support for OpenGL, as described below</li>
908</ul>
909
910<p>Note that future releases of the Android NDK may introduce support for
911additional ABIs. If a device implementation is not compatible with an existing
912predefined ABI, it MUST NOT report support for any ABIs at all.</p>
913
914<p>Note that device implementations MUST include libGLESv3.so and it MUST symlink
915(symbolic link) to libGLESv2.so. in turn, MUST export all the OpenGL ES 3.1 and
916Android 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
917symbols must be present, only the corresponding functions for OpenGL ES
918versions and extensions actually supported by the device must be fully
919implemented.</p>
920
921<p>Native code compatibility is challenging. For this reason, device implementers
922are <strong>very strongly encouraged</strong> to use the implementations of the libraries listed above from the upstream
923Android Open Source Project. </p>
924
925<h3 id="3_3_2_32-bit_arm_native_code_compatibility">
9263.3.2. 32-bit ARM Native Code Compatibility
927</h3>
928
929<p>The ARMv8 architecture deprecates several CPU operations, including some
930operations used in existing native code. On 64-bit ARM devices, the following
931deprecated operations MUST remain available to 32-bit native ARM code, either
932through native CPU support or through software emulation:</p>
933
934<ul>
935<li>SWP and SWPB instructions</li>
936<li>SETEND instruction</li>
937<li>CP15ISB, CP15DSB, and CP15DMB barrier operations</li>
938</ul>
939
940<p>Legacy versions of the Android NDK used /proc/cpuinfo to discover CPU features
941from 32-bit ARM native code. For compatibility with applications built using this
942NDK, devices MUST include the following lines in /proc/cpuinfo when it is read
943by 32-bit ARM applications:</p>
944
945<ul>
946<li>&quot;Features: &quot;, followed by a list of any optional ARMv7 CPU features
947supported by the device</li>
948<li>&quot;CPU architecture: &quot;, followed by an integer describing the device's
949highest supported ARM architecture (e.g., &quot;8&quot; for ARMv8 devices)</li>
950</ul>
951
952<p>These requirements only apply when /proc/cpuinfo is read by 32-bit ARM
953applications. Devices SHOULD not alter /proc/cpuinfo when read by 64-bit ARM or
954non-ARM applications.</p>
955
956<h2 id="3_4_web_compatibility">3.4. Web Compatibility</h2>
957
958
959<h3 id="3_4_1_webview_compatibility">3.4.1. WebView Compatibility</h3>
960
961<div class="note">
962<p>Android Watch devices MAY, but all other device implementations MUST provide
963a complete implementation of the android.webkit.Webview API.</p>
964</div>
965
966
967<p>The platform feature android.software.webview MUST be reported on any device
968that provides a complete implementation of the android.webkit.WebView API, and
969MUST NOT be reported on devices without a complete implementation of the API.
970The Android Open Source implementation uses code from the Chromium Project to
971implement 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
972rendering system, device implementers MUST use the specific upstream build of
973Chromium in the WebView implementation. Specifically:</p>
974
975<ul>
976 <li>Device android.webkit.WebView implementations MUST be based on the Chromium
977build from the upstream Android Open Source Project for Android ANDROID_VERSION. This build
978includes a specific set of functionality and security fixes for the WebView [<a href="http://www.chromium.org/">Resources, 13</a>].</li>
979 <li>The user agent string reported by the WebView MUST be in this format:
Unsuk Jung34d4dcb2015-09-28 15:41:27 -0700980<p>Mozilla/5.0 (Linux; Android $(VERSION); $(MODEL) Build/$(BUILD); wv)
Unsuk Jung5bc81142015-07-16 22:27:20 -0700981AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 $(CHROMIUM_VER) Mobile
982Safari/537.36</p>
983 <ul>
984 <li>The value of the $(VERSION) string MUST be the same as the value for
985android.os.Build.VERSION.RELEASE.</li>
Unsuk Jung5bc81142015-07-16 22:27:20 -0700986 <li>The value of the $(MODEL) string MUST be the same as the value for
987android.os.Build.MODEL.</li>
988 <li>The value of the $(BUILD) string MUST be the same as the value for
989android.os.Build.ID.</li>
990 <li>The value of the $(CHROMIUM_VER) string MUST be the version of Chromium in the
991upstream Android Open Source Project.</li>
992 <li>Device implementations MAY omit Mobile in the user agent string.</li>
993 </ul></li></ul>
994
995<p>The WebView component SHOULD include support for as many HTML5 features as
996possible and if it supports the feature SHOULD conform to the HTML5
997specification [<a href="http://html.spec.whatwg.org/multipage/">Resources, 14</a>].</p>
998
999<h3 id="3_4_2_browser_compatibility">3.4.2. Browser Compatibility</h3>
1000
1001<div class="note">
1002<p>Android Television, Watch, and Android Automotive implementations MAY omit a
1003browser application, but MUST support the public intent patterns as described in
1004<a href="#3_2_3_1_core_application_intents">section 3.2.3.1</a>. All other types
1005of device implementations MUST include a standalone Browser application for
1006general user web browsing.</p>
1007</div>
1008
1009<p>The standalone Browser MAY be based on a browser technology other than WebKit.
1010However, even if an alternate Browser application is used, the
1011android.webkit.WebView component provided to third-party applications MUST be
1012based on WebKit, as described in <a href="#3_4_1_webview_compatibility">section 3.4.1</a>.</p>
1013
1014<p>Implementations MAY ship a custom user agent string in the standalone Browser
1015application.</p>
1016
1017<p>The standalone Browser application (whether based on the upstream WebKit
1018Browser application or a third-party replacement) SHOULD include support for as
1019much of HTML5 [<a href="http://html.spec.whatwg.org/multipage/">Resources, 14</a>] as possible. Minimally, device implementations MUST support each of these
1020APIs associated with HTML5:</p>
1021
1022<ul>
1023 <li>application cache/offline operation [<a href="http://www.w3.org/html/wg/drafts/html/master/browsers.html#offline">Resources, 15</a>]</li>
1024 <li>the &#60;video&#62; tag [<a href="http://www.w3.org/html/wg/drafts/html/master/semantics.html#video">Resources, 16</a>]</li>
1025 <li>geolocation [<a href="http://www.w3.org/TR/geolocation-API/">Resources, 17</a>]</li>
1026</ul>
1027
1028<p>Additionally, device implementations MUST support the HTML5/W3C webstorage API
1029[<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
1030IndexedDB over webstorage, IndexedDB is expected to become a required component
1031in a future version of Android.</p>
1032
1033<h2 id="3_5_api_behavioral_compatibility">3.5. API Behavioral Compatibility</h2>
1034
1035
1036<p>The behaviors of each of the API types (managed, soft, native, and web) must be
1037consistent with the preferred implementation of the upstream Android Open
1038Source Project [<a href="http://source.android.com/">Resources, 2</a>]. Some specific areas of compatibility are:</p>
1039
1040<ul>
1041 <li>Devices MUST NOT change the behavior or semantics of a standard intent.</li>
1042 <li>Devices MUST NOT alter the lifecycle or lifecycle semantics of a particular
1043type of system component (such as Service, Activity, ContentProvider, etc.).</li>
1044 <li>Devices MUST NOT change the semantics of a standard permission.</li>
1045</ul>
1046
1047<p>The above list is not comprehensive. The Compatibility Test Suite (CTS) tests
1048significant portions of the platform for behavioral compatibility, but not all.
1049It is the responsibility of the implementer to ensure behavioral compatibility
1050with the Android Open Source Project. For this reason, device implementers
1051SHOULD use the source code available via the Android Open Source Project where
1052possible, rather than re-implement significant parts of the system.</p>
1053
1054<h2 id="3_6_api_namespaces">3.6. API Namespaces</h2>
1055
1056
1057<p>Android follows the package and class namespace conventions defined by the Java
1058programming language. To ensure compatibility with third-party applications,
1059device implementers MUST NOT make any prohibited modifications (see below) to
1060these package namespaces:</p>
1061
1062<ul>
1063 <li>java.*</li>
1064 <li>javax.*</li>
1065 <li>sun.*</li>
1066 <li>android.*</li>
1067 <li>com.android.*</li>
1068</ul>
1069
1070<p><strong>Prohibited modifications include</strong>:</p>
1071
1072<ul>
1073 <li>Device implementations MUST NOT modify the publicly exposed APIs on the Android
1074platform by changing any method or class signatures, or by removing classes or
1075class fields.</li>
1076 <li>Device implementers MAY modify the underlying implementation of the APIs, but
1077such modifications MUST NOT impact the stated behavior and Java-language
1078signature of any publicly exposed APIs.</li>
1079 <li>Device implementers MUST NOT add any publicly exposed elements (such as classes
1080or interfaces, or fields or methods to existing classes or interfaces) to the
1081APIs above.</li>
1082</ul>
1083
1084<p>A &ldquo;publicly exposed element&rdquo; is any construct which is not decorated with the&ldquo;@hide&rdquo; marker as used in the upstream Android source code. In other words,
1085device implementers MUST NOT expose new APIs or alter existing APIs in the
1086namespaces noted above. Device implementers MAY make internal-only
1087modifications, but those modifications MUST NOT be advertised or otherwise
1088exposed to developers.</p>
1089
1090<p>Device implementers MAY add custom APIs, but any such APIs MUST NOT be in a
1091namespace owned by or referring to another organization. For instance, device
1092implementers MUST NOT add APIs to the com.google.* or similar namespace: only
1093Google may do so. Similarly, Google MUST NOT add APIs to other companies'
1094namespaces. Additionally, if a device implementation includes custom APIs
1095outside the standard Android namespace, those APIs MUST be packaged in an
1096Android shared library so that only apps that explicitly use them (via the
Unsuk Jung2e62f9a2015-07-16 23:01:44 -07001097lt;uses-librarygt; mechanism) are affected by the increased memory usage of such
Unsuk Jung5bc81142015-07-16 22:27:20 -07001098APIs.</p>
1099
1100<p>If a device implementer proposes to improve one of the package namespaces above
1101(such as by adding useful new functionality to an existing API, or adding a new
1102API), the implementer SHOULD visit <a href="http://source.android.com/">source.android.com</a> and begin the process for contributing changes and code, according to the
1103information on that site.</p>
1104
1105<p>Note that the restrictions above correspond to standard conventions for naming
1106APIs in the Java programming language; this section simply aims to reinforce
1107those conventions and make them binding through inclusion in this Compatibility
1108Definition.</p>
1109
1110<h2 id="3_7_runtime_compatibility">3.7. Runtime Compatibility</h2>
1111
1112
1113<p>Device implementations MUST support the full Dalvik Executable (DEX) format and
1114Dalvik 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
1115the Dalvik Executable Format, and the reference implementation&rsquo;s package
1116management system.</p>
1117
1118<p>Device implementations MUST configure Dalvik runtimes to allocate memory in
1119accordance with the upstream Android platform, and as specified by the
1120following table. (See <a href="#7_1_1_screen_configuration">section 7.1.1</a> for screen size and screen density definitions.)</p>
1121
1122<p>Note that memory values specified below are considered minimum values and
1123device implementations MAY allocate more memory per application.</p>
1124
1125<table>
1126 <tr>
1127 <th>Screen Layout</th>
1128 <th>Screen Density</th>
1129 <th>Minimum Application Memory</th>
1130 </tr>
1131 <tr>
1132 <td rowspan="10">small/normal</td>
1133 <td>120 dpi (ldpi)</td>
1134 <td rowspan="2">32MB</td>
1135 </tr>
1136 <tr>
1137 <td>160 dpi (mdpi)</td>
1138 </tr>
1139 <tr>
1140 <td>213 dpi (tvdpi)</td>
1141 <td rowspan="3">48MB</td>
1142 </tr>
1143 <tr>
1144 <td>240 dpi (hdpi)</td>
1145 </tr>
1146 <tr>
1147 <td>280 dpi (280dpi)</td>
1148 </tr>
1149 <tr>
1150 <td>320 dpi (xhdpi)</td>
1151 <td>80MB</td>
1152 </tr>
1153 <tr>
1154 <td>400 dpi (400dpi)</td>
1155 <td>96MB</td>
1156 </tr>
1157 <tr>
1158 <td>480 dpi (xxhdpi)</td>
1159 <td>128MB</td>
1160 </tr>
1161 <tr>
1162 <td>560 dpi (560dpi)</td>
1163 <td>192MB</td>
1164 </tr>
1165 <tr>
1166 <td>640 dpi (xxxhdpi)</td>
1167 <td>256MB</td>
1168 </tr>
1169 <tr>
1170 <td rowspan="10">large</td>
1171 <td>120 dpi (ldpi)</td>
1172 <td>32MB</td>
1173 </tr>
1174 <tr>
1175 <td>160 dpi (mdpi)</td>
1176 <td>48MB</td>
1177 </tr>
1178 <tr>
1179 <td>213 dpi (tvdpi)</td>
1180 <td rowspan="2">80MB</td>
1181 </tr>
1182 <tr>
1183 <td>240 dpi (hdpi)</td>
1184 </tr>
1185 <tr>
1186 <td>280 dpi (280dpi)</td>
1187 <td>96MB</td>
1188 </tr>
1189 <tr>
1190 <td>320 dpi (xhdpi)</td>
1191 <td>128MB</td>
1192 </tr>
1193 <tr>
1194 <td>400 dpi (400dpi)</td>
1195 <td>192MB</td>
1196 </tr>
1197 <tr>
1198 <td>480 dpi (xxhdpi)</td>
1199 <td>256MB</td>
1200 </tr>
1201 <tr>
1202 <td>560 dpi (560dpi)</td>
1203 <td>384MB</td>
1204 </tr>
1205 <tr>
1206 <td>640 dpi (xxxhdpi)</td>
1207 <td>512MB</td>
1208 </tr>
1209 <tr>
1210 <td rowspan="10">xlarge</td>
1211 <td>120 dpi (ldpi)</td>
1212 <td>48MB</td>
1213 </tr>
1214 <tr>
1215 <td>160 dpi (mdpi)</td>
1216 <td>80MB</td>
1217 </tr>
1218 <tr>
1219 <td>213 dpi (tvdpi)</td>
1220 <td rowspan="2">96MB</td>
1221 </tr>
1222 <tr>
1223 <td>240 dpi (hdpi)</td>
1224 </tr>
1225 <tr>
1226 <td>280 dpi (280dpi)</td>
1227 <td>144MB</td>
1228 </tr>
1229 <tr>
1230 <td>320 dpi (xhdpi)</td>
1231 <td>192MB</td>
1232 </tr>
1233 <tr>
1234 <td>400 dpi (400dpi)</td>
1235 <td>288MB</td>
1236 </tr>
1237 <tr>
1238 <td>480 dpi (xxhdpi)</td>
1239 <td>384MB</td>
1240 </tr>
1241 <tr>
1242 <td>560 dpi (560dpi)</td>
1243 <td>576MB</td>
1244 </tr>
1245 <tr>
1246 <td>640 dpi (xxxhdpi)</td>
1247 <td>768MB</td>
1248 </tr>
1249</table>
1250
1251
1252<h2 id="3_8_user_interface_compatibility">3.8. User Interface Compatibility</h2>
1253
1254
1255<h3 id="3_8_1_launcher_home_screen">3.8.1. Launcher (Home Screen)</h3>
1256
1257
1258<p>Android includes a launcher application (home screen) and support for
1259third-party applications to replace the device launcher (home screen). Device
1260implementations that allow third-party applications to replace the device home
1261screen MUST declare the platform feature android.software.home_screen.</p>
1262
1263<h3 id="3_8_2_widgets">3.8.2. Widgets</h3>
1264
1265<div class="note">
1266<p>Widgets are optional for all Android device implementations, but SHOULD be
1267supported on Android Handheld devices.</p>
1268</div>
1269
1270
1271<p>Android defines a component type and corresponding API and lifecycle that
1272allows applications to expose an &ldquo;AppWidget&rdquo; 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
1273implementations. Device implementations that support embedding widgets on the
1274home screen MUST meet the following requirements and declare support for
1275platform feature android.software.app_widgets.</p>
1276
1277<ul>
1278 <li>Device launchers MUST include built-in support for AppWidgets, and expose user
1279interface affordances to add, configure, view, and remove AppWidgets directly
1280within the Launcher.</li>
1281 <li>Device implementations MUST be capable of rendering widgets that are 4 x 4 in
1282the standard grid size. See the App Widget Design Guidelines in the Android SDK
1283documentation [<a href="http://developer.android.com/guide/practices/ui_guidelines/widget_design.html">Resources, 21</a>] for details.</li>
1284 <li>Device implementations that include support for lock screen MAY support
1285application widgets on the lock screen.</li>
1286</ul>
1287
1288<h3 id="3_8_3_notifications">3.8.3. Notifications</h3>
1289
1290
1291<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>
1292
1293<p>Some APIs allow applications to perform notifications or attract attention
1294using hardware&#8212;specifically sound, vibration, and light. Device implementations
1295MUST support notifications that use hardware features, as described in the SDK
1296documentation, and to the extent possible with the device implementation
1297hardware. For instance, if a device implementation includes a vibrator, it MUST
1298correctly implement the vibration APIs. If a device implementation lacks
1299hardware, the corresponding APIs MUST be implemented as no-ops. This behavior
1300is further detailed in <a href="#7_hardware_compatibility">section 7</a>.</p>
1301
1302<p>Additionally, the implementation MUST correctly render all resources (icons, animation files
1303etc.) provided for in the APIs
1304[<a href="https://developer.android.com/guide/topics/resources/available-resources.html">Resources, 23</a>],
1305or in the Status/System Bar icon style guide
1306[<a href="http://developer.android.com/design/style/iconography.html">Resources, 24</a>],
1307which in the case of an Android Television device includes the possibility to not display the
1308notifications. Device implementers MAY provide an alternative user experience for
1309notifications than that provided by the reference Android Open Source
1310implementation; however, such alternative notification systems MUST support
1311existing notification resources, as above. </p>
1312
1313<p>Android includes support for various notifications, such as:</p>
1314
1315<ul>
1316 <li><strong>Rich notifications</strong>. Interactive Views for ongoing notifications.</li>
1317 <li><strong>Heads-up notifications</strong>. Interactive Views users can act on or dismiss without leaving the current app.</li>
1318 <li><strong>Lockscreen notifications</strong>. Notifications shown over a lock screen with granular control on visibility.</li>
1319</ul>
1320
1321<p>Android device implementations, when such notifications are made visible, MUST properly execute
1322Rich and Heads-up notifications and include the title/name, icon, text as documented in the Android
1323APIs <a href="https://developer.android.com/design/patterns/notifications.html">[Resources, 25]</a>.
1324</p>
1325
1326<p>Android includes Notification Listener Service APIs that allow apps (once
1327explicitly enabled by the user) to receive a copy of all notifications as they
1328are posted or updated. Device implementations MUST correctly and promptly send
1329notifications in their entirety to all such installed and user-enabled listener
1330services, including any and all metadata attached to the Notification object.</p>
1331
1332<h3 id="3_8_4_search">3.8.4. Search</h3>
1333
1334
1335<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
1336expose their application&rsquo;s data into the global system search. Generally
1337speaking, this functionality consists of a single, system-wide user interface
1338that allows users to enter queries, displays suggestions as users type, and
1339displays results. The Android APIs allow developers to reuse this interface to
1340provide search within their own apps, and allow developers to supply results to
1341the common global search user interface.</p>
1342
1343<p>Android device implementations SHOULD include global search, a single, shared,
1344system-wide search user interface capable of real-time suggestions in response
1345to user input. Device implementations SHOULD implement the APIs that allow
1346developers to reuse this user interface to provide search within their own
1347applications. Device implementations that implement the global search interface
1348MUST implement the APIs that allow third-party applications to add suggestions
1349to the search box when it is run in global search mode. If no third-party
1350applications are installed that make use of this functionality, the default
1351behavior SHOULD be to display web search engine results and suggestions.</p>
1352
1353<h3 id="3_8_5_toasts">3.8.5. Toasts</h3>
1354
1355
1356<p>Applications can use the &ldquo;Toast&rdquo; API to display short non-modal strings to the
1357end 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
1358some high-visibility manner.</p>
1359
1360<h3 id="3_8_6_themes">3.8.6. Themes</h3>
1361
1362
1363<p>Android provides &ldquo;themes&rdquo; as a mechanism for applications to apply styles
1364across an entire Activity or application.</p>
1365
1366<p>Android includes a &ldquo;Holo&rdquo; theme family as a set of defined styles for
1367application developers to use if they want to match the Holo theme look and
1368feel 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
1369exposed to applications [<a href="http://developer.android.com/reference/android/R.style.html">Resources, 29</a>].</p>
1370
1371<p>Android includes a &ldquo;Material&rdquo; theme family as a set of defined styles for
1372application developers to use if they want to match the design theme&rsquo;s look and
1373feel across the wide variety of different Android device types. Device
1374implementations MUST support the &ldquo;Material&rdquo; theme family and MUST NOT alter any
1375of 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>
1376
1377<p>Android also includes a &ldquo;Device Default&rdquo; theme family as a set of defined
1378styles for application developers to use if they want to match the look and
1379feel of the device theme as defined by the device implementer. Device
1380implementations MAY modify the Device Default theme attributes exposed to
1381applications [<a href="http://developer.android.com/reference/android/R.style.html">Resources, 29</a>].</p>
1382
1383<p>Android supports a new variant theme with translucent system bars, which allows
1384application developers to fill the area behind the status and navigation bar
1385with their app content. To enable a consistent developer experience in this
1386configuration, it is important the status bar icon style is maintained across
1387different device implementations. Therefore, Android device implementations
1388MUST use white for system status icons (such as signal strength and battery
1389level) and notifications issued by the system, unless the icon is indicating a
1390problematic status [<a href="http://developer.android.com/reference/android/R.style.html">Resources, 29</a>].</p>
1391
1392<h3 id="3_8_7_live_wallpapers">3.8.7. Live Wallpapers</h3>
1393
1394
1395<p>Android defines a component type and corresponding API and lifecycle that
1396allows applications to expose one or more &ldquo;Live Wallpapers&rdquo; 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
1397input capabilities that display as a wallpaper, behind other applications.</p>
1398
1399<p>Hardware is considered capable of reliably running live wallpapers if it can
1400run all live wallpapers, with no limitations on functionality, at a reasonable
1401frame rate with no adverse effects on other applications. If limitations in the
1402hardware cause wallpapers and/or applications to crash, malfunction, consume
1403excessive CPU or battery power, or run at unacceptably low frame rates, the
1404hardware is considered incapable of running live wallpaper. As an example, some
1405live wallpapers may use an OpenGL 2.0 or 3.x context to render their content.
1406Live wallpaper will not run reliably on hardware that does not support multiple
1407OpenGL contexts because the live wallpaper use of an OpenGL context may
1408conflict with other applications that also use an OpenGL context.</p>
1409
1410<p>Device implementations capable of running live wallpapers reliably as described
1411above SHOULD implement live wallpapers, and when implemented MUST report the
1412platform feature flag android.software.live_wallpaper.</p>
1413
1414<h3 id="3_8_8_activity_switching">3.8.8. Activity Switching</h3>
1415
1416<div class="note">
1417<p>As the Recent function navigation key is OPTIONAL, the requirements to
1418implement the overview screen is OPTIONAL for Android Television devices and
1419Android Watch devices.</p>
1420</div>
1421
1422
1423<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
1424accessed activities and tasks using a thumbnail image of the application&rsquo;s
1425graphical state at the moment the user last left the application. Device
1426implementations including the recents function navigation key as detailed in <a href="#7_2_3_navigation_keys">section 7.2.3</a>, MAY alter the interface but MUST meet the following requirements:</p>
1427
1428<ul>
1429 <li>MUST display affiliated recents as a group that moves together.</li>
1430 <li>MUST support at least up to 20 displayed activities.</li>
1431 <li>MUST at least display the title of 4 activities at a time.</li>
1432 <li>SHOULD display highlight color, icon, screen title in recents.</li>
1433 <li>MUST implement the screen pinning behavior [<a href="http://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.</li>
1434 <li>SHOULD display a closing affordance ("x") but MAY delay this until user
1435interacts with screens.</li>
1436</ul>
1437
1438<p>Device implementations are STRONGLY ENCOURAGED to use the upstream Android user
1439interface (or a similar thumbnail-based interface) for the overview screen.</p>
1440
1441<h3 id="3_8_9_input_management">3.8.9. Input Management</h3>
1442
1443
1444<p>Android includes support for Input Management and support for third-party input
1445method 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
1446the device MUST declare the platform feature android.software.input_methods and
1447support IME APIs as defined in the Android SDK documentation.</p>
1448
1449<p>Device implementations that declare the android.software.input_methods feature
1450MUST provide a user-accessible mechanism to add and configure third-party input
1451methods. Device implementations MUST display the settings interface in response
1452to the android.settings.INPUT_METHOD_SETTINGS intent.</p>
1453
1454<h3 id="3_8_10_lock_screen_media_control">3.8.10. Lock Screen Media Control</h3>
1455
1456
1457<p>The Remote Control Client API is deprecated from Android 5.0 in favor of the
1458Media Notification Template that allows media applications to integrate with
1459playback controls that are displayed on the lock screen [<a href="http://developer.android.com/reference/android/app/Notification.MediaStyle.html">Resources, 35</a>].
1460Device implementations that support a lock screen, unless an Android Automotive or Watch
1461implementation, MUST display the Lockscreen Notifications including the Media Notification
1462Template.</p>
1463
1464<h3 id="3_8_11_dreams">3.8.11. Dreams</h3>
1465
1466
1467<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
1468a power source is idle or docked in a desk dock. Android Watch devices MAY
1469implement Dreams, but other types of device implementations SHOULD include
1470support for Dreams and provide a settings option for users to configure Dreams
1471in response to the android.settings.DREAM_SETTINGS intent.</p>
1472
1473<h3 id="3_8_12_location">3.8.12. Location</h3>
1474
1475
1476<p>When a device has a hardware sensor (e.g. GPS) that is capable of providing the
1477location coordinates, location modes MUST be displayed in the Location menu
1478within Settings [<a href="http://developer.android.com/reference/android/provider/Settings.Secure.html#LOCATION_MODE">Resources, 37</a>].</p>
1479
1480<h3 id="3_8_13_unicode_and_font">3.8.13. Unicode and Font</h3>
1481
1482
1483<p>Android includes support for color emoji characters. When Android device
1484implementations include an IME, devices SHOULD provide an input method to the
1485user 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 glyph.</p>
1486
1487<p>Android includes support for Roboto 2 font with different
1488weights&mdash;sans-serif-thin, sans-serif-light, sans-serif-medium, sans-serif-black,
1489sans-serif-condensed, sans-serif-condensed-light&mdash;which MUST all be included for
1490the languages available on the device and full Unicode 7.0 coverage of Latin,
1491Greek, and Cyrillic, including the Latin Extended A, B, C, and D ranges, and
1492all glyphs in the currency symbols block of Unicode 7.0.</p>
1493
1494<h2 id="3_9_device_administration">3.9. Device Administration</h2>
1495
Unsuk Jung5bc81142015-07-16 22:27:20 -07001496<p>Android includes features that allow security-aware applications to perform
1497device administration functions at the system level, such as enforcing password
1498policies or performing remote wipe, through the Android Device Administration
1499API [<a href="http://developer.android.com/guide/topics/admin/device-admin.html">Resources, 39</a>].
1500Device implementations MUST provide an implementation of the DevicePolicyManager class
1501[<a href="http://developer.android.com/reference/android/app/admin/DevicePolicyManager.html">Resources, 40</a>].
1502Device implementations that include support for PIN (numeric) or PASSWORD
1503(alphanumeric) based lock screens MUST support the full range of device
1504administration policies defined in the Android SDK documentation
1505[<a href="http://developer.android.com/guide/topics/admin/device-admin.html">Resources, 39</a>]
1506and report the platform feature android.software.device_admin.</p>
1507
Andy Dyer-smith3d24bbe2015-09-11 15:35:23 +01001508<h3 id="3_9_1_device_provisioning">3.9.1 Device Provisioning</h3>
1509<h4 id="3_9_1_1_device_owner_provisioning">3.9.1.1 Device owner provisioning</h4>
1510<p>If a device implementation declares the android.software.device_admin feature,
1511the out of box setup flow MUST make it possible to enroll a Device Policy
1512Controller (DPC) application as the Device Owner app
1513[<a href="http://developer.android.com/reference/android/app/admin/DevicePolicyManager.html#isDeviceOwnerApp(java.lang.String)">
1514Resources, XX</a>]. Device implementations MAY have a preinstalled application
1515performing device administration functions but this application MUST NOT be set
1516as the Device Owner app without explicit consent or action from the user or the
1517administrator of the device.</p>
1518
1519<p>The device owner provisioning process (the flow initiated by
1520android.app.action.PROVISION_MANAGED_DEVICE
1521[<a href="http://developer.android.com/reference/android/app/admin/DevicePolicyManager.html#ACTION_PROVISION_MANAGED_DEVICE">
1522Resources, XX</a>]) user experience MUST align with the AOSP implementation</p>
1523
1524<p>If the device implementation reports android.hardware.nfc, it MUST have NFC
1525enabled, even during the out-of-box setup flow, in order to allow for NFC
1526provisioning of Device owners
1527<a href="https://source.android.com/devices/tech/admin/provision.html#device_owner_provisioning_via_nfc">[Resources, XX]</a>.
1528</p>
1529
1530<h4 id="3_9_1_2_managed_profile_provisioning">3.9.1.2 Managed profile provisioning</h4>
1531<p>If a device implementation declares the android.software.managed_users,
1532it MUST be possible to enroll a Device Policy Controller (DPC) application
1533as the owner of a new Managed Profile
1534[<a href="http://developer.android.com/reference/android/app/admin/DevicePolicyManager.html#isProfileOwnerApp(java.lang.String)">
1535Resources, XX</a>]</p>
1536
1537<p>The managed profile provisioning process (the flow initiated by
1538android.app.action.PROVISION_MANAGED_PROFILE
1539[<a href="http://developer.android.com/reference/android/app/admin/DevicePolicyManager.html#ACTION_PROVISION_MANAGED_PROFILE">
1540Resources, XX</a>]) user experience MUST align with the AOSP implementation
1541</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07001542
1543<h2 id="3_10_accessibility">3.10. Accessibility</h2>
1544
1545
1546<p>Android provides an accessibility layer that helps users with disabilities to
1547navigate their devices more easily. In addition, Android provides platform APIs
1548that enable accessibility service implementations to receive callbacks for user
1549and system events and generate alternate feedback mechanisms, such as
1550text-to-speech, haptic feedback, and trackball/d-pad navigation [<a href="http://developer.android.com/reference/android/accessibilityservice/AccessibilityService.html">Resources, 42</a>].</p>
1551
1552<p>Device implementations include the following requirements:</p>
1553
1554<ul>
1555<li>Android Automotive implementations SHOULD provide an implementation of the
1556Android accessibility framework consistent with the default Android
1557implementation.</li>
1558<li>Device implementations (Android Automotive excluded) MUST provide an
1559implementation of the Android accessibility framework consistent with the
1560default Android implementation.</li>
1561<li>Device implementations (Android Automotive excluded) MUST support
1562third-party accessibility service implementations through the
1563android.accessibilityservice APIs
1564[<a href="http://developer.android.com/reference/android/view/accessibility/package-summary.html">Resources, 43</a>]</li>
1565<li>Device implementations (Android Automotive excluded) MUST generate
1566AccessibilityEvents and deliver these events to all registered
1567AccessibilityService implementations in a manner consistent with the default
1568Android implementation</li>
1569<li> Device implementations (Android Automotive and Android Watch devices with
1570no audio output excluded), MUST provide a user-accessible mechanism to enable
1571and disable accessibility services, and MUST display this interface in response
1572to the android.provider.Settings.ACTION_ACCESSIBILITY_SETTINGS intent.</li>
1573</ul>
1574
1575<p>Additionally, device implementations SHOULD provide an implementation of an
1576accessibility service on the device, and SHOULD provide a mechanism for users
1577to enable the accessibility service during device setup. An open source
1578implementation of an accessibility service is available from the Eyes Free
1579project [<a href="http://code.google.com/p/eyes-free/">Resources, 44</a>].</p>
1580
1581<h2 id="3_11_text-to-speech">3.11. Text-to-Speech</h2>
1582
1583
1584<p>Android includes APIs that allow applications to make use of text-to-speech
1585(TTS) services and allows service providers to provide implementations of TTS
1586services [<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
1587MUST meet these requirements related to the Android TTS framework. </p>
1588
1589<p>Android Automotive implementations:</p>
1590<ul>
1591<li>MUST support the Android TTS framework APIs.</li>
1592<li>MAY support installation of third-party TTS engines. If supported, partners
1593MUST provide a user-accessible interface that allows the user to select a TTS
1594engine for use at system level.</li>
1595</ul>
1596
1597<p>All other device implementations:</p>
1598
1599<ul>
1600 <li> MUST support the Android TTS framework APIs and SHOULD include a TTS engine
1601supporting the languages available on the device. Note that the upstream
1602Android open source software includes a full-featured TTS engine
1603implementation.
1604 <li> MUST support installation of third-party TTS engines
1605 <li> MUST provide a user-accessible interface that allows users to select a TTS
1606engine for use at the system level
1607</ul>
1608
1609<h2 id="3_12_tv_input_framework">3.12. TV Input Framework</h2>
1610
1611
1612<p>The Android Television Input Framework (TIF) simplifies the delivery of live
1613content to Android Television devices. TIF provides a standard API to create
1614input modules that control Android Television devices. Android Television
1615device implementations MUST support Television Input Framework [<a href="http://source.android.com/devices/tv/index.html">Resources, 46</a>].</p>
1616
1617<p>Device implementations that support TIF MUST declare the platform feature
1618android.software.live_tv.</p>
1619
1620<h1 id="4_application_packaging_compatibility">4. Application Packaging Compatibility</h1>
1621
1622
1623<p>Device implementations MUST install and run Android &ldquo;.apk&rdquo; files as generated
1624by the &ldquo;aapt&rdquo; tool included in the official Android SDK [<a href="http://developer.android.com/tools/help/index.html">Resources, 47</a>].</p>
1625
1626<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
1627files from installing and running correctly on other compatible devices.</p>
1628
1629<h1 id="5_multimedia_compatibility">5. Multimedia Compatibility</h1>
1630
1631
1632<h2 id="5_1_media_codecs">5.1. Media Codecs</h2>
1633
1634
1635<p>Device implementations MUST support the core media formats specified in the
1636Android 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
1637implementations MUST support the media formats, encoders, decoders, file types,
1638and container formats defined in the tables below and reported via MediaCodecList
1639[<a href="http://developer.android.com/reference/android/media/MediaCodecList.html">Resources,112</a>].
1640Device implementations MUST also be able to decode all profiles reported in its CamcorderProfile
1641[<a href="http://developer.android.com/reference/android/media/CamcorderProfile.html">Resources,
1642113</a>].
1643
1644All of these codecs are
1645provided as software implementations in the preferred Android implementation
1646from the Android Open Source Project.</p>
1647
1648<p>Please note that neither Google nor the Open Handset Alliance make any
1649representation that these codecs are free from third-party patents. Those
1650intending to use this source code in hardware or software products are advised
1651that implementations of this code, including in open source software or
1652shareware, may require patent licenses from the relevant patent holders.</p>
1653
1654<h3 id="5_1_1_audio_codecs">5.1.1. Audio Codecs</h3>
1655
1656<table>
1657 <tr>
1658 <th>Format/Codec</th>
1659 <th>Encoder</th>
1660 <th>Decoder</th>
1661 <th>Details</th>
1662 <th>Supported File Types/Container Formats</th>
1663 </tr>
1664 <tr>
1665 <td>MPEG-4 AAC Profile</p>
1666
1667<p>(AAC LC)</td>
1668 <td>REQUIRED<sup>1</sup></td>
1669 <td>REQUIRED</td>
Unsuk Jung2e62f9a2015-07-16 23:01:44 -07001670 <td>Support for mono/stereo/5.0/5.1<sup>2</sup> content with standard sampling rates from 8 to
Unsuk Jung5bc81142015-07-16 22:27:20 -0700167148 kHz.</td>
1672 <td>
1673 <ul>
1674 <li class="table_list">3GPP (.3gp)</li>
1675 <li class="table_list">MPEG-4 (.mp4, .m4a)</li>
1676 <li class="table_list">ADTS raw AAC (.aac, decode in Android 3.1+, encode in Android 4.0+, ADIF not
1677supported)</li>
1678 <li class="table_list">MPEG-TS (.ts, not seekable, Android 3.0+)</li></ul></td>
1679 </tr>
1680 <tr>
1681 <td>MPEG-4 HE AAC Profile (AAC+)</td>
1682 <td>REQUIRED<sup>1</sup><br>(Android 4.1+)</td>
1683 <td>REQUIRED</td>
Unsuk Jung2e62f9a2015-07-16 23:01:44 -07001684 <td>Support for mono/stereo/5.0/5.1<sup>2</sup> content with standard sampling rates from 16
Unsuk Jung5bc81142015-07-16 22:27:20 -07001685to 48 kHz.</td>
1686 <td></td>
1687 </tr>
1688 <tr>
1689 <td>MPEG-4 HE AACv2</p>
1690
1691<p>Profile (enhanced AAC+)</td>
1692 <td> </td>
1693 <td>REQUIRED</td>
Unsuk Jung2e62f9a2015-07-16 23:01:44 -07001694 <td>Support for mono/stereo/5.0/5.1<sup>2</sup> content with standard sampling rates from 16
Unsuk Jung5bc81142015-07-16 22:27:20 -07001695to 48 kHz.</td>
1696 <td></td>
1697 </tr>
1698 <tr>
1699 <td>AAC ELD (enhanced low delay AAC)</td>
1700 <td>REQUIRED<sup>1</sup> </p>
1701
1702<p>(Android 4.1+)</td>
1703 <td>REQUIRED</p>
1704
1705<p>(Android 4.1+)</td>
1706 <td>Support for mono/stereo content with standard sampling rates from 16 to 48 kHz.</td>
1707 <td></td>
1708 </tr>
1709 <tr>
1710 <td>AMR-NB</td>
1711 <td>REQUIRED<sup>3</sup></td>
1712 <td>REQUIRED<sup>3</sup></td>
1713 <td>4.75 to 12.2 kbps sampled @ 8kHz</td>
1714 <td>3GPP (.3gp)</td>
1715 </tr>
1716 <tr>
1717 <td>AMR-WB</td>
1718 <td>REQUIRED<sup>3</sup></td>
1719 <td>REQUIRED<sup>3</sup></td>
1720 <td>9 rates from 6.60 kbit/s to 23.85 kbit/s sampled @ 16kHz</td>
1721 <td></td>
1722 </tr>
1723 <tr>
1724 <td>FLAC</td>
1725 <td></td>
1726 <td>REQUIRED <br>(Android 3.1+)</td>
1727 <td>Mono/Stereo (no multichannel). Sample rates up to 48 kHz (but up to 44.1 kHz is
1728recommended on devices with 44.1 kHz output, as the 48 to 44.1 kHz downsampler
1729does not include a low-pass filter). 16-bit recommended; no dither applied for
173024-bit.</td>
1731 <td>FLAC (.flac) only</td>
1732 </tr>
1733 <tr>
1734 <td>MP3</td>
1735 <td></td>
1736 <td>REQUIRED</td>
1737 <td>Mono/Stereo 8-320Kbps constant (CBR) or variable bitrate (VBR)</td>
1738 <td>MP3 (.mp3)</td>
1739 </tr>
1740 <tr>
1741 <td>MIDI</td>
1742 <td></td>
1743 <td>REQUIRED</td>
1744 <td>MIDI Type 0 and 1. DLS Version 1 and 2. XMF and Mobile XMF. Support for
1745ringtone formats RTTTL/RTX, OTA, and iMelody</td>
1746 <td><ul>
1747 <li class="table_list">Type 0 and 1 (.mid, .xmf, .mxmf)</li>
1748 <li class="table_list">RTTTL/RTX (.rtttl, .rtx)</li>
1749 <li class="table_list">OTA (.ota)</li>
1750 <li class="table_list">iMelody (.imy)</li></ul></td>
1751 </tr>
1752 <tr>
1753 <td>Vorbis</td>
1754 <td></td>
1755 <td>REQUIRED</td>
1756 <td></td>
1757 <td><ul>
1758 <li class="table_list">Ogg (.ogg)</li>
1759 <li class="table_list">Matroska (.mkv, Android 4.0+)</li></ul></td>
1760 </tr>
1761 <tr>
1762 <td>PCM/WAVE</td>
1763 <td>REQUIRED<sup>4</sup><br> (Android 4.1+)</td>
1764 <td>REQUIRED</td>
1765 <td>16-bit linear PCM (rates up to limit of hardware). Devices MUST support
1766sampling rates for raw PCM recording at 8000, 11025, 16000, and 44100 Hz
1767frequencies.</td>
1768 <td>WAVE (.wav)</td>
1769 </tr>
1770 <tr>
1771 <td>Opus</td>
1772 <td></td>
1773 <td>REQUIRED<br> (Android 5.0+)</td>
1774 <td></td>
1775 <td>Matroska (.mkv)</td>
1776 </tr>
1777</table>
1778
1779
1780<p class="table_footnote"> 1 Required for device implementations that define android.hardware.microphone
1781but optional for Android Watch device implementations.</p>
1782
1783<p class="table_footnote">2 Only downmix of 5.0/5.1 content is required; recording or rendering more than
17842 channels is optional.</p>
1785
1786<p class="table_footnote">3 Required for Android Handheld device implementations. </p>
1787
1788<p class="table_footnote">4 Required for device implementations that define android.hardware.microphone,
1789including Android Watch device implementations.</p>
1790
1791<h3 id="5_1_2_image_codecs">5.1.2. Image Codecs</h3>
1792
1793<table>
1794 <tr>
1795 <th>Format/Codec</th>
1796 <th>Encoder</th>
1797 <th>Decoder</th>
1798 <th>Details</th>
1799 <th>Supported File Types/Container Formats</th>
1800 </tr>
1801 <tr>
1802 <td>JPEG</td>
1803 <td>REQUIRED</td>
1804 <td>REQUIRED</td>
1805 <td>Base+progressive</td>
1806 <td>JPEG (.jpg)</td>
1807 </tr>
1808 <tr>
1809 <td>GIF</td>
1810 <td></td>
1811 <td>REQUIRED</td>
1812 <td></td>
1813 <td>GIF (.gif)</td>
1814 </tr>
1815 <tr>
1816 <td>PNG</td>
1817 <td>REQUIRED</td>
1818 <td>REQUIRED</td>
1819 <td></td>
1820 <td>PNG (.png)</td>
1821 </tr>
1822 <tr>
1823 <td>BMP</td>
1824 <td></td>
1825 <td>REQUIRED</td>
1826 <td></td>
1827 <td>BMP (.bmp)</td>
1828 </tr>
1829 <tr>
1830 <td>WebP</td>
1831 <td>REQUIRED</td>
1832 <td>REQUIRED</td>
1833 <td></td>
1834 <td>WebP (.webp)</td>
1835 </tr>
1836</table>
1837
1838
1839<h3 id="5_1_3_video_codecs">5.1.3. Video Codecs</h3>
1840
1841<p>Video codecs are optional for Android Watch device implementations.</p>
1842
1843<table>
1844 <tr>
1845 <th>Format/Codec</th>
1846 <th>Encoder</th>
1847 <th>Decoder</th>
1848 <th>Details</th>
1849 <th>Supported File Types/<br>Container Formats</th>
1850 </tr>
1851 <tr>
1852 <td>H.263</td>
1853 <td>REQUIRED<sup>1</sup></td>
1854 <td>REQUIRED<sup>2</sup></td>
1855 <td></td>
1856 <td><ul>
1857 <li class="table_list">3GPP (.3gp)</li>
1858 <li class="table_list">MPEG-4 (.mp4)</li></ul></td>
1859 </tr>
1860 <tr>
1861 <td>H.264 AVC</td>
1862 <td>REQUIRED<sup>2</sup></td>
1863 <td>REQUIRED<sup>2</sup></td>
1864 <td>See <a href="#5_2_video_encoding">section 5.2 </a>and <a href="#5_3_video_decoding">5.3</a> for details</td>
1865 <td><ul>
1866 <li class="table_list">3GPP (.3gp)</li>
1867 <li class="table_list">MPEG-4 (.mp4)</li>
1868 <li class="table_list">MPEG-TS (.ts, AAC audio only, not seekable, Android 3.0+)</li></ul></td>
1869 </tr>
1870 <tr>
1871 <td>H.265 HEVC</td>
1872 <td></td>
1873 <td>REQUIRED<sup>5</sup></td>
1874 <td>See <a href="#5_3_video_decoding">section 5.3</a> for details</td>
1875 <td>MPEG-4 (.mp4)</td>
1876 </tr>
1877 <tr>
1878 <td>MPEG-4 SP</td>
1879 <td></td>
1880 <td>REQUIRED<sup>2</sup></td>
1881 <td></td>
1882 <td>3GPP (.3gp)</td>
1883 </tr>
1884 <tr>
Unsuk Jung2e62f9a2015-07-16 23:01:44 -07001885 <td>VP8<sup>3</sup></td>
Unsuk Jung5bc81142015-07-16 22:27:20 -07001886 <td>REQUIRED<sup>2</sup></p>
1887
1888<p>(Android 4.3+)</td>
1889 <td>REQUIRED<sup>2</sup></p>
1890
1891<p>(Android 2.3.3+)</td>
1892 <td>See <a href="#5_2_video_encoding">section 5.2</a> and <a href="#5_3_video_decoding">5.3</a> for details</td>
1893 <td><ul>
1894 <li class="table_list">WebM (.webm) [<a href="http://www.webmproject.org/">Resources, 110</a></li>
Unsuk Jung2e62f9a2015-07-16 23:01:44 -07001895 <li class="table_list">Matroska (.mkv, Android 4.0+)<sup>4</sup></li></ul></td>
Unsuk Jung5bc81142015-07-16 22:27:20 -07001896 </tr>
1897 <tr>
1898 <td>VP9</td>
1899 <td></td>
1900 <td>REQUIRED<sup>2</sup><br> (Android 4.4+)</td>
1901 <td>See <a href="#5_3_video_decoding">section 5.3</a> for details</td>
1902 <td><ul>
1903 <li class="table_list">WebM (.webm) [<a href="http://www.webmproject.org/">Resources, 110</a>]</li>
Unsuk Jung2e62f9a2015-07-16 23:01:44 -07001904 <li class="table_list">Matroska (.mkv, Android 4.0+)<sup>4</sup></li></ul></td>
Unsuk Jung5bc81142015-07-16 22:27:20 -07001905 </tr>
1906</table>
1907
1908
1909<p class="table_footnote">1 Required for device implementations that include camera hardware and define
1910android.hardware.camera or android.hardware.camera.front.</p>
1911
1912<p class="table_footnote">2 Required for device implementations except Android Watch devices. </p>
1913
1914<p class="table_footnote">3 For acceptable quality of web video streaming and video-conference services,
1915device implementations SHOULD use a hardware VP8 codec that meets the
1916requirements in [<a href="http://www.webmproject.org/hardware/rtc-coding-requirements/">Resources, 51</a>].</p>
1917
1918<p class="table_footnote">4 Device implementations SHOULD support writing Matroska WebM files.</p>
1919
1920<p class="table_footnote">5 Strongly recommended for Android Automotive, optional for Android Watch, and required for all other device types.</p>
1921
1922<h2 id="5_2_video_encoding">5.2. Video Encoding</h2>
1923
1924<div class="note">
1925<p>Video codecs are optional for Android Watch device implementations.</p>
1926</div>
1927
1928
1929<p>Android device implementations with H.264 codec support, MUST support Baseline
1930Profile Level 3 and the following SD (Standard Definition) video encoding
1931profiles and SHOULD support Main Profile Level 4 and the following HD (High
1932Definition) video encoding profiles. Android Television devices are STRONGLY
1933RECOMMENDED to encode HD 1080p video at 30 fps.</p>
1934<table>
1935 <tr>
1936 <th></th>
1937 <th>SD (Low quality)</th>
1938 <th>SD (High quality)</th>
1939 <th>HD 720p1</th>
1940 <th>HD 1080p1</th>
1941 </tr>
1942 <tr>
1943 <th>Video resolution</th>
1944 <td>320 x 240 px</td>
1945 <td>720 x 480 px</td>
1946 <td>1280 x 720 px</td>
1947 <td>1920 x 1080 px</td>
1948 </tr>
1949 <tr>
1950 <th>Video frame rate</th>
1951 <td>20 fps</td>
1952 <td>30 fps</td>
1953 <td>30 fps</td>
1954 <td>30 fps</td>
1955 </tr>
1956 <tr>
1957 <th>Video bitrate</th>
1958 <td>384 Kbps</td>
1959 <td>2 Mbps</td>
1960 <td>4 Mbps</td>
1961 <td>10 Mbps</td>
1962 </tr>
1963</table>
1964
1965
1966<p class="table_footnote">1 When supported by hardware, but STRONGLY RECOMMENDED for Android Television
1967devices.</p>
1968
1969<p>Android device implementations with VP8 codec support MUST support the SD video
1970encoding profiles and SHOULD support the following HD (High Definition) video
1971encoding profiles.</p>
1972<table>
1973 <tr>
1974 <th></th>
1975 <th>SD (Low quality)</th>
1976 <th>SD (High quality)</th>
1977 <th>HD 720p1</th>
1978 <th>HD 1080p1</th>
1979 </tr>
1980 <tr>
1981 <th>Video resolution</th>
1982 <td>320 x 180 px</td>
1983 <td>640 x 360 px</td>
1984 <td>1280 x 720 px</td>
1985 <td>1920 x 1080 px</td>
1986 </tr>
1987 <tr>
1988 <th>Video frame rate</th>
1989 <td>30 fps</td>
1990 <td>30 fps</td>
1991 <td>30 fps</td>
1992 <td>30 fps</td>
1993 </tr>
1994 <tr>
1995 <th>Video bitrate</th>
1996 <td>800 Kbps </td>
1997 <td>2 Mbps</td>
1998 <td>4 Mbps</td>
1999 <td>10 Mbps</td>
2000 </tr>
2001</table>
2002
2003<p class="table_footnote">1 When supported by hardware.</p>
2004
2005<h2 id="5_3_video_decoding">5.3. Video Decoding</h2>
2006
2007<div class="note">
2008<p>Video codecs are optional for Android Watch device implementations.</p>
2009</div>
2010
2011
2012<p>Device implementations MUST support dynamic video resolution switching within
Unsuk Jung2e62f9a2015-07-16 23:01:44 -07002013the same stream for all VP8, VP9, H.264, and H.265 codecs exposed through the
2014standard Android APIs.</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07002015
2016<p>Android device implementations with H.264 decoders, MUST support Baseline
2017Profile Level 3 and the following SD video decoding profiles and SHOULD support
2018the HD decoding profiles. Android Television devices MUST support High Profile
2019Level 4.2 and the HD 1080p decoding profile.</p>
2020<table>
2021 <tr>
2022 <th></th>
2023 <th>SD (Low quality)</th>
2024 <th>SD (High quality)</th>
2025 <th>HD 720p1</th>
2026 <th>HD 1080p1</th>
2027 </tr>
2028 <tr>
2029 <th>Video resolution</th>
2030 <td>320 x 240 px</td>
2031 <td>720 x 480 px</td>
2032 <td>1280 x 720 px</td>
2033 <td>1920 x 1080 px</td>
2034 </tr>
2035 <tr>
2036 <th>Video frame rate</th>
2037 <td>30 fps</td>
2038 <td>30 fps</td>
2039 <td>30 fps / 60 fps2</td>
2040 <td>30 fps / 60 fps2</td>
2041 </tr>
2042 <tr>
2043 <th>Video bitrate</th>
2044 <td>800 Kbps </td>
2045 <td>2 Mbps</td>
2046 <td>8 Mbps</td>
2047 <td>20 Mbps</td>
2048 </tr>
2049</table>
2050
2051
2052<p class="table_footnote">1 Required for Android Television device implementations, but for other device
2053types only when supported by hardware.</p>
2054
2055<p class="table_footnote">2 Required for Android Television device implementations.</p>
2056
2057<p>Android device implementations when supporting VP8 codec as described in <a href="#5_1_3_video_codecs">section 5.1.3</a>, MUST support the following SD decoding profiles and SHOULD support the HD
2058decoding profiles. Android Television devices MUST support the HD 1080p
2059decoding profile. </p>
2060<table>
2061 <tr>
2062 <th></th>
2063 <th>SD (Low quality)</th>
2064 <th>SD (High quality)</th>
2065 <th>HD 720p1</th>
2066 <th>HD 1080p1</th>
2067 </tr>
2068 <tr>
2069 <th>Video resolution</th>
2070 <td>320 x 180 px</td>
2071 <td>640 x 360 px</td>
2072 <td>1280 x 720 px</td>
2073 <td>1920 x 1080 px</td>
2074 </tr>
2075 <tr>
2076 <th>Video frame rate</th>
2077 <td>30 fps</td>
2078 <td>30 fps</td>
2079 <td>30 fps / 60 fps2</td>
2080 <td>30 / 60 fps2</td>
2081 </tr>
2082 <tr>
2083 <th>Video bitrate</th>
2084 <td>800 Kbps </td>
2085 <td>2 Mbps</td>
2086 <td>8 Mbps</td>
2087 <td>20 Mbps</td>
2088 </tr>
2089</table>
2090
2091
2092<p class="table_footnote">1 Required for Android Television device implementations, but for other type of
2093devices only when supported by hardware.</p>
2094
2095<p class="table_footnote">2 Required for Android Television device implementations.</p>
2096
2097<p>Android device implementations, when supporting VP9 codec as described in <a href="#5_1_3_video_codecs">section 5.1.3</a>, MUST support the following SD video decoding profiles and SHOULD support the
2098HD decoding profiles. Android Television devices are STRONGLY RECOMMENDED to
2099support the HD 1080p decoding profile and SHOULD support the UHD decoding
2100profile. When the UHD video decoding profile is supported, it MUST support 8
2101bit color depth.</p>
2102<table>
2103 <tr>
2104 <th></th>
2105 <th>SD (Low quality)</th>
2106 <th>SD (High quality)</th>
2107 <th>HD 720p 1</th>
2108 <th>HD 1080p 2</th>
2109 <th>UHD 2</th>
2110 </tr>
2111 <tr>
2112 <th>Video resolution</th>
2113 <td>320 x 180 px</td>
2114 <td>640 x 360 px</td>
2115 <td>1280 x 720 px</td>
2116 <td>1920 x 1080 px</td>
2117 <td>3840 x 2160 px</td>
2118 </tr>
2119 <tr>
2120 <th>Video frame rate</th>
2121 <td>30 fps</td>
2122 <td>30 fps</td>
2123 <td>30 fps</td>
2124 <td>30 fps</td>
2125 <td>30 fps</td>
2126 </tr>
2127 <tr>
2128 <th>Video bitrate</th>
2129 <td>600 Kbps </td>
2130 <td>1.6 Mbps</td>
2131 <td>4 Mbps</td>
2132 <td>10 Mbps</td>
2133 <td>20 Mbps</td>
2134 </tr>
2135</table>
2136
2137
2138<p class="table_footnote">1 Required for Android Television device implementations, but for other type of
2139devices only when supported by hardware.</p>
2140
2141<p class="table_footnote">2 STRONGLY RECOMMENDED for Android Television device implementations when
2142supported by hardware.</p>
2143
2144<p>Android device implementations, when supporting H.265 codec as described in <a href="#5_1_3_video_codecs">section 5.1.3</a>, MUST support the Main Profile Level 3 Main tier and the following SD video
2145decoding profiles and SHOULD support the HD decoding profiles. Android
2146Television devices MUST support the Main Profile Level 4.1 Main tier and the HD
21471080p decoding profile and SHOULD support Main10 Level 5 Main Tier profile and
2148the UHD decoding profile.</p>
2149<table>
2150 <tr>
2151 <th></th>
2152 <th>SD (Low quality)</th>
2153 <th>SD (High quality)</th>
2154 <th>HD 720p </strong>1 </td>
2155 <th>HD 1080p </strong>1 </td>
2156 <th>UHD </strong>2</td>
2157 </tr>
2158 <tr>
2159 <th>Video resolution</th>
2160 <td>352 x 288 px</td>
2161 <td>640 x 360 px</td>
2162 <td>1280 x 720 px</td>
2163 <td>1920 x 1080 px</td>
2164 <td>3840 x 2160 px</td>
2165 </tr>
2166 <tr>
2167 <th>Video frame rate</th>
2168 <td>30 fps</td>
2169 <td>30 fps</td>
2170 <td>30 fps</td>
2171 <td>30 fps</td>
2172 <td>30 fps</td>
2173 </tr>
2174 <tr>
2175 <th>Video bitrate</th>
2176 <td>600 Kbps </td>
2177 <td>1.6 Mbps</td>
2178 <td>4 Mbps</td>
2179 <td>10 Mbps</td>
2180 <td>20 Mbps</td>
2181 </tr>
2182</table>
2183
2184
2185<p class="table_footnote">1 Required for Android Television device implementation, but for other type of
2186devices only when supported by hardware.</p>
2187
2188<p class="table_footnote">2 Required for Android Television device implementations when supported by
2189hardware.</p>
2190
2191<h2 id="5_4_audio_recording">5.4. Audio Recording</h2>
2192
2193
2194<p>While some of the requirements outlined in this section are stated as SHOULD
2195since Android 4.3, the Compatibility Definition for a future version is planned
2196to 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
2197compatibility when upgraded to the future version.</p>
2198
2199<h3 id="5_4_1_raw_audio_capture">5.4.1. Raw Audio Capture</h3>
2200
2201
2202<p>Device implementations that declare android.hardware.microphone MUST allow
2203capture of raw audio content with the following characteristics:</p>
2204
2205<ul>
2206 <li><strong>Format</strong>: Linear PCM, 16-bit
2207 <li><strong>Sampling rates</strong>: 8000, 11025, 16000, 44100
2208 <li><strong>Channels</strong>: Mono
2209</ul>
2210
2211<p>Device implementations that declare android.hardware.microphone SHOULD allow
2212capture of raw audio content with the following characteristics:</p>
2213
2214<ul>
2215 <li><strong>Format</strong>: Linear PCM, 16-bit
2216 <li><strong>Sampling rates</strong>: 22050, 48000
2217 <li><strong>Channels</strong>: Stereo
2218</ul>
2219
2220<h3 id="5_4_2_capture_for_voice_recognition">5.4.2. Capture for Voice Recognition</h3>
2221
2222
2223<p>In addition to the above recording specifications, when an application has
2224started recording an audio stream using the
2225android.media.MediaRecorder.AudioSource.VOICE_RECOGNITION audio source:</p>
2226
2227<ul>
2228 <li>The device SHOULD exhibit approximately flat amplitude versus frequency
2229characteristics: specifically, ±3 dB, from 100 Hz to 4000 Hz.
2230 <li>Audio input sensitivity SHOULD be set such that a 90 dB sound power level (SPL)
2231source at 1000 Hz yields RMS of 2500 for 16-bit samples.
2232 <li>PCM amplitude levels SHOULD linearly track input SPL changes over at least a 30
2233dB range from -18 dB to +12 dB re 90 dB SPL at the microphone.
2234 <li>Total harmonic distortion SHOULD be less than 1% for 1Khz at 90 dB SPL input
2235level at the microphone.
2236 <li>Noise reduction processing, if present, MUST be disabled.
2237 <li>Automatic gain control, if present, MUST be disabled
2238</ul>
2239
2240<p>If the platform supports noise suppression technologies tuned for speech
2241recognition, the effect MUST be controllable from the
2242android.media.audiofx.NoiseSuppressor API. Moreover, the UUID field for the
2243noise suppressor&rsquo;s effect descriptor MUST uniquely identify each implementation
2244of the noise suppression technology.</p>
2245
2246<h3 id="5_4_3_capture_for_rerouting_of_playback">5.4.3. Capture for Rerouting of Playback</h3>
2247
2248
2249<p>The android.media.MediaRecorder.AudioSource class includes the REMOTE_SUBMIX
2250audio source. Devices that declare android.hardware.audio.output MUST properly
2251implement the REMOTE_SUBMIX audio source so that when an application uses the
2252android.media.AudioRecord API to record from this audio source, it can capture
2253a mix of all audio streams except for the following:</p>
2254
2255<ul>
2256 <li>STREAM_RING
2257 <li>STREAM_ALARM
2258 <li>STREAM_NOTIFICATION
2259</ul>
2260
2261<h2 id="5_5_audio_playback">5.5. Audio Playback</h2>
2262
2263
2264<p>Device implementations that declare android.hardware.audio.output MUST conform
2265to the requirements in this section.</p>
2266
2267<h3 id="5_5_1_raw_audio_playback">5.5.1. Raw Audio Playback</h3>
2268
2269
2270<p>The device MUST allow playback of raw audio content with the following
2271characteristics:</p>
2272
2273<ul>
2274 <li><strong>Format</strong>: Linear PCM, 16-bit</li>
2275 <li><strong>Sampling rates</strong>: 8000, 11025, 16000, 22050, 32000, 44100</li>
2276 <li><strong>Channels</strong>: Mono, Stereo</li>
2277</ul>
2278
2279<p>The device SHOULD allow playback of raw audio content with the following
2280characteristics:</p>
2281
2282<ul>
2283 <li><strong>Sampling rates</strong>: 24000, 48000</li>
2284</ul>
2285
2286<h3 id="5_5_2_audio_effects">5.5.2. Audio Effects</h3>
2287
2288
2289<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
2290android.hardware.audio.output:</p>
2291
2292<ul>
2293 <li>MUST support the EFFECT_TYPE_EQUALIZER and EFFECT_TYPE_LOUDNESS_ENHANCER
2294implementations controllable through the AudioEffect subclasses Equalizer,
2295LoudnessEnhancer.</li>
2296 <li>MUST support the visualizer API implementation, controllable through the
2297Visualizer class.</li>
2298 <li>SHOULD support the EFFECT_TYPE_BASS_BOOST, EFFECT_TYPE_ENV_REVERB,
2299EFFECT_TYPE_PRESET_REVERB, and EFFECT_TYPE_VIRTUALIZER implementations
2300controllable through the AudioEffect sub-classes BassBoost,
2301EnvironmentalReverb, PresetReverb, and Virtualizer.</li>
2302</ul>
2303
2304<h3 id="5_5_3_audio_output_volume">5.5.3. Audio Output Volume</h3>
2305
2306
2307<p>Android Television device implementations MUST include support for system
2308Master Volume and digital audio output volume attenuation on supported outputs,
2309except for compressed audio passthrough output (where no audio decoding is done
2310on the device).</p>
2311
2312<h2 id="5_6_audio_latency">5.6. Audio Latency</h2>
2313
2314
2315<p>Audio latency is the time delay as an audio signal passes through a system.
2316Many classes of applications rely on short latencies, to achieve real-time
2317sound effects.</p>
2318
2319<p>For the purposes of this section, use the following definitions:</p>
2320
2321<ul>
2322 <li><strong>output latency</strong>. The interval between when an application writes a frame of PCM-coded data and
2323when the corresponding sound can be heard by an external listener or observed
2324by a transducer.</li>
2325 <li><strong>cold output latency</strong>. The output latency for the first frame, when the audio output system has been
2326idle and powered down prior to the request.</li>
2327 <li><strong>continuous output latency</strong>. The output latency for subsequent frames, after the device is playing audio.</li>
2328 <li><strong>input latency</strong>. The interval between when an external sound is presented to the device and
2329when an application reads the corresponding frame of PCM-coded data.</li>
2330 <li><strong>cold input latency</strong>. The sum of lost input time and the input latency for the first frame, when the
2331audio input system has been idle and powered down prior to the request.</li>
2332 <li><strong>continuous input latency</strong>. The input latency for subsequent frames, while the device is capturing audio.</li>
2333 <li><strong>cold output jitter</strong>. The variance among separate measurements of cold output latency values.</li>
2334 <li><strong>cold input jitter</strong>. The variance among separate measurements of cold input latency values.</li>
Glenn Kasten78eccbd2015-08-12 10:18:22 -07002335 <li><strong>continuous round-trip latency</strong>. The sum of continuous input latency plus continuous output latency plus
2336 one buffer period.
2337 The buffer period term allows processing time for the app and for the app to
2338 mitigate phase difference between input and output streams.
2339 </li>
Unsuk Jung5bc81142015-07-16 22:27:20 -07002340 <li><strong>OpenSL ES PCM buffer queue API</strong>. The set of PCM-related OpenSL ES APIs within Android NDK; see
2341NDK_root/docs/opensles/index.html.</li>
2342</ul>
2343
Glenn Kasten1578ece2015-09-15 13:44:17 -07002344<p>Device implementations that declare android.hardware.audio.output are STRONGLY ENCOURAGED to meet
Unsuk Jung5bc81142015-07-16 22:27:20 -07002345or exceed these audio output requirements:</p>
2346
2347<ul>
2348 <li>cold output latency of 100 milliseconds or less</li>
2349 <li>continuous output latency of 45 milliseconds or less</li>
2350 <li>minimize the cold output jitter</li>
2351</ul>
2352
2353<p>If a device implementation meets the requirements of this section after any
2354initial calibration when using the OpenSL ES PCM buffer queue API, for
2355continuous output latency and cold output latency over at least one supported
2356audio output device, it MAY report support for low-latency audio, by reporting
2357the feature android.hardware.audio.low_latency via the
2358android.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
2359MUST NOT report support for low-latency audio.</p>
2360
Glenn Kasten1578ece2015-09-15 13:44:17 -07002361<p>Device implementations that include android.hardware.microphone are STRONGLY ENCOURAGED to meet
Unsuk Jung5bc81142015-07-16 22:27:20 -07002362these input audio requirements:</p>
2363
2364<ul>
2365 <li>cold input latency of 100 milliseconds or less</li>
2366 <li>continuous input latency of 30 milliseconds or less</li>
2367 <li>continuous round-trip latency of 50 milliseconds or less</li>
2368 <li>minimize the cold input jitter</li>
2369</ul>
2370
2371<h2 id="5_7_network_protocols">5.7. Network Protocols</h2>
2372
2373
2374<p>Devices MUST support the media network protocols for audio and video playback
2375as 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>
2376
2377<ul>
2378 <li>RTSP (RTP, SDP)</li>
2379 <li>HTTP(S) progressive streaming</li>
2380 <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>]</li>
2381</ul>
2382
2383<h2 id="5_8_secure_media">5.8. Secure Media</h2>
2384
2385
2386<p>Device implementations that support secure video output and are capable of
2387supporting secure surfaces MUST declare support for Display.FLAG_SECURE. Device
2388implementations that declare support for Display.FLAG_SECURE, if they support a
2389wireless display protocol, MUST secure the link with a cryptographically strong
2390mechanism such as HDCP 2.x or higher for Miracast wireless displays. Similarly
2391if they support a wired external display, the device implementations MUST
2392support HDCP 1.2 or higher. Android Television device implementations MUST
2393support HDCP 2.2 for devices supporting 4K resolution and HDCP 1.4 or above for
2394lower resolutions. The upstream Android open source implementation includes
2395support for wireless (Miracast) and wired (HDMI) displays that satisfies this
2396requirement.</p>
2397
Glenn Kasten87ef61d2015-07-29 09:01:36 -07002398<h2 id="5_9_midi">5.9. Musical Instrument Digital Interface (MIDI)</h2>
2399
2400<p>
2401If a device implementation supports the inter-app MIDI software transport
2402(virtual MIDI devices), and it supports MIDI over
2403<em>all</em> of the following MIDI-capable hardware transports
2404for which it provides generic non-MIDI connectivity, it MAY report
2405support for feature android.software.midi via the
2406android.content.pm.PackageManager class
2407[<a href="http://developer.android.com/reference/android/content/pm/PackageManager.html">Resources, 53</a>].
2408</p>
2409
2410<p>The MIDI-capable hardware transports are:</p>
2411<ul>
2412 <li>USB host mode (section 7.7 USB)</li>
2413 <li>USB peripheral mode (section 7.7 USB)</li>
2414</ul>
2415
2416<p>
2417Conversely, if the device implementation provides generic non-MIDI connectivity over a particular
2418MIDI-capable hardware transport listed above, but does not support MIDI over that hardware transport,
2419it MUST NOT report support for feature android.software.midi.
2420</p>
2421
2422<p>
2423MIDI over Bluetooth LE acting in central role (section 7.4.3 Bluetooth)
2424is in trial use status. A device implementation that reports
2425feature android.software.midi, and which provides generic non-MIDI connectivity
2426over Bluetooth LE, SHOULD support MIDI over Bluetooth LE.
2427</p>
2428
Glenn Kasten78eccbd2015-08-12 10:18:22 -07002429<h2 id="5_10_pro_audio">5.10. Professional Audio</h2>
2430
2431<p>
2432If a device implementation meets <em>all</em> of the following requirements,
2433it MAY report support for feature android.hardware.audio.pro via the
2434android.content.pm.PackageManager class
2435[<a href="http://developer.android.com/reference/android/content/pm/PackageManager.html">Resources, 53</a>].
2436</p>
2437
2438<ul>
2439
2440<li>
Glenn Kasten1578ece2015-09-15 13:44:17 -07002441The device implementation MUST report support for feature android.hardware.audio.low_latency.
Glenn Kasten78eccbd2015-08-12 10:18:22 -07002442</li>
2443
2444<li> The continuous round-trip audio latency, as defined in section 5.6 Audio Latency,
2445MUST be 20 milliseconds or less and SHOULD be 10 milliseconds or less over at least one
2446supported path.
2447</li>
2448
2449<li>
Glenn Kasten1578ece2015-09-15 13:44:17 -07002450If the device includes a 4 conductor 3.5mm audio jack,
Glenn Kasten78eccbd2015-08-12 10:18:22 -07002451the continuous round-trip audio latency MUST be 20 milliseconds or less over the audio jack path,
2452and SHOULD be 10 milliseconds or less over at the audio jack path.
2453</li>
2454
2455<li>
2456The device implementation MUST include a USB port(s) supporting USB host mode and
2457USB peripheral mode.
2458</li>
2459
2460<li>
Glenn Kasten755f4b22015-09-25 16:04:23 -07002461The USB host mode MUST implement the USB audio class.
Glenn Kasten78eccbd2015-08-12 10:18:22 -07002462</li>
2463
2464<li>
2465If the device includes an HDMI port, the device implementation
Glenn Kasten1578ece2015-09-15 13:44:17 -07002466MUST support output in stereo and eight channels
Glenn Kasten78eccbd2015-08-12 10:18:22 -07002467at 20-bit or 24-bit depth and 192 kHz without bit-depth loss or resampling.
2468</li>
2469
2470<li>
2471The device implementation MUST report support for feature android.software.midi.
2472</li>
2473
Glenn Kasten1578ece2015-09-15 13:44:17 -07002474<li>
2475If the device includes a 4 conductor 3.5mm audio jack,
2476the device implementation is STRONGLY ENCOURAGED to comply with section
2477<a href="https://source.android.com/accessories/headset/specification.html#mobile_device_jack_specifications">Mobile device (jack) specifications</a>
2478of the
2479<a href="https://source.android.com/accessories/headset/specification.html">Wired Audio Headset Specification (v1.1)</a>.
2480</li>
2481
Glenn Kasten78eccbd2015-08-12 10:18:22 -07002482</ul>
2483
Unsuk Jung5bc81142015-07-16 22:27:20 -07002484<h1 id="6_developer_tools_and_options_compatibility">6. Developer Tools and Options Compatibility</h1>
2485
Unsuk Jung5bc81142015-07-16 22:27:20 -07002486<h2 id="6_1_developer_tools">6.1. Developer Tools</h2>
2487
Unsuk Jung5bc81142015-07-16 22:27:20 -07002488<p>Device implementations MUST support the Android Developer Tools provided in the
2489Android SDK. Android compatible devices MUST be compatible with:</p>
2490
2491<ul>
2492 <li><strong>Android Debug Bridge (adb)</strong> [<a href="http://developer.android.com/tools/help/adb.html">Resources, 55</a>]</li>
2493</ul>
2494
2495<p>Device implementations MUST support all adb functions as documented in the
2496Android SDK including dumpsys [<a href="https://source.android.com/devices/input/diagnostics.html">Resources, 56</a>]. The device-side adb daemon MUST be inactive by default and there MUST be a
2497user-accessible mechanism to turn on the Android Debug Bridge. If a device
2498implementation omits USB peripheral mode, it MUST implement the Android Debug
2499Bridge via local-area network (such as Ethernet or 802.11). </p>
2500
2501<p>Android includes support for secure adb. Secure adb enables adb on known
2502authenticated hosts. Device implementations MUST support secure adb.</p>
2503
2504<ul>
2505 <li><strong>Dalvik Debug Monitor Service (ddms)</strong> [<a href="http://developer.android.com/tools/debugging/ddms.html">Resources, 57</a>]</li>
2506</ul>
2507
2508<p>Device implementations MUST support all ddms features as documented in the
2509Android SDK. As ddms uses adb, support for ddms SHOULD be inactive by default,
2510but MUST be supported whenever the user has activated the Android Debug Bridge,
2511as above.</p>
2512
2513<ul>
2514 <li><strong>Monkey</strong> [<a href="http://developer.android.com/tools/help/monkey.html">Resources, 58</a>]</li>
2515</ul>
2516
2517<p>Device implementations MUST include the Monkey framework, and make it available
2518for applications to use.</p>
2519
2520<ul>
2521 <li><strong>SysTrace</strong> [<a href="http://developer.android.com/tools/help/systrace.html">Resources, 59</a>]</li>
2522</ul>
2523
2524<p>Device implementations MUST support systrace tool as documented in the Android
2525SDK. Systrace must be inactive by default, and there MUST be a user-accessible
2526mechanism to turn on Systrace.</p>
2527
2528<p>Most Linux-based systems and Apple Macintosh systems recognize Android devices
2529using the standard Android SDK tools, without additional support; however
2530Microsoft Windows systems typically require a driver for new Android devices.
2531(For instance, new vendor IDs and sometimes new device IDs require custom USB
2532drivers for Windows systems.) If a device implementation is unrecognized by the
2533adb tool as provided in the standard Android SDK, device implementers MUST
2534provide Windows drivers allowing developers to connect to the device using the
2535adb protocol. These drivers MUST be provided for Windows XP, Windows Vista,
2536Windows 7, Windows 8, and Windows 9 in both 32-bit and 64-bit versions.</p>
2537
2538<h2 id="6_2_developer_options">6.2. Developer Options</h2>
2539
2540
2541<p>Android includes support for developers to configure application
2542development-related settings. Device implementations MUST honor the
2543android.settings.APPLICATION_DEVELOPMENT_SETTINGS intent to show application
2544development-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
2545default and enables users to launch Developer Options after pressing seven (7)
2546times on the <strong>Settings</strong> > <strong>About Device</strong> > <strong>Build Number</strong> menu item. Device implementations MUST provide a consistent experience for
2547Developer Options. Specifically, device implementations MUST hide Developer
2548Options by default and MUST provide a mechanism to enable Developer Options
2549that is consistent with the upstream Android implementation.</p>
2550
2551<h1 id="7_hardware_compatibility">7. Hardware Compatibility</h1>
2552
2553
2554<p>If a device includes a particular hardware component that has a corresponding
2555API for third-party developers, the device implementation MUST implement that
2556API as described in the Android SDK documentation. If an API in the SDK
2557interacts with a hardware component that is stated to be optional and the
2558device implementation does not possess that component:</p>
2559
2560<ul>
2561 <li>Complete class definitions (as documented by the SDK) for the component APIs
2562MUST still be presented.
2563 <li>The API&rsquo;s behaviors MUST be implemented as no-ops in some reasonable fashion.
2564 <li>API methods MUST return null values where permitted by the SDK documentation.
2565 <li>API methods MUST return no-op implementations of classes where null values are
2566not permitted by the SDK documentation.
2567 <li>API methods MUST NOT throw exceptions not documented by the SDK documentation.
2568</ul>
2569
2570<p>A typical example of a scenario where these requirements apply is the telephony
2571API: even on non-phone devices, these APIs must be implemented as reasonable
2572no-ops.</p>
2573
2574<p>Device implementations MUST consistently report accurate hardware configuration
2575information via the getSystemAvailableFeatures() and hasSystemFeature(String)
2576methods on the android.content.pm.PackageManager class for the same build
2577fingerprint. [<a href="http://developer.android.com/reference/android/content/pm/PackageManager.html">Resources, 53]</a></p>
2578
2579<h2 id="7_1_display_and_graphics">7.1. Display and Graphics</h2>
2580
2581
2582<p>Android includes facilities that automatically adjust application assets and UI
2583layouts appropriately for the device, to ensure that third-party applications
2584run 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
2585this section.</p>
2586
2587<p>The units referenced by the requirements in this section are defined as
2588follows:</p>
2589
2590<ul>
2591 <li><strong>physical diagonal size</strong>. The distance in inches between two opposing corners of the illuminated portion
2592of the display.</li>
2593 <li><strong>dots per inch (dpi)</strong>. The number of pixels encompassed by a linear horizontal or vertical span of
25941&rdquo;. Where dpi values are listed, both horizontal and vertical dpi must fall
2595within the range.</li>
2596 <li><strong>aspect ratio</strong>. The ratio of the pixels of the longer dimension
2597 to the shorter dimension of the screen. For example, a display of 480x854 pixels
2598 would be 854/480 = 1.779, or roughly &ldquo;16:9&rdquo;.</li>
2599 <li><strong>density-independent pixel (dp)</strong> The virtual pixel unit normalized to a 160 dpi screen, calculated as: pixels =
2600dps * (density/160).</li>
2601</ul>
2602
2603<h3 id="7_1_1_screen_configuration">7.1.1. Screen Configuration</h3>
2604
2605
2606<h4 id="7_1_1_1_screen_size">7.1.1.1. Screen Size</h4>
2607
2608<div class="note">
2609<p>Android Watch devices (detailed in <a href="#2_device_types">section 2</a>) MAY have smaller screen sizes as described in this section.</p>
2610</div>
2611
2612<p>The Android UI framework supports a variety of different screen sizes, and
2613allows applications to query the device screen size (aka &ldquo;screen layout") via
2614android.content.res.Configuration.screenLayout with the SCREENLAYOUT_SIZE_MASK.
2615Device implementations MUST report the correct screen size as defined in the
2616Android 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
2617implementations MUST report the correct screen size according to the following
2618logical density-independent pixel (dp) screen dimensions.</p>
2619
2620<ul>
2621 <li>Devices MUST have screen sizes of at least 426 dp x 320 dp (&lsquo;small&rsquo;), unless it
2622is an Android Watch device.</li>
2623 <li>Devices that report screen size &lsquo;normal&rsquo; MUST have screen sizes of at least 480
2624dp x 320 dp.</li>
2625 <li>Devices that report screen size &lsquo;large&rsquo; MUST have screen sizes of at least 640
2626dp x 480 dp.</li>
2627 <li>Devices that report screen size &lsquo;xlarge&rsquo; MUST have screen sizes of at least 960
2628dp x 720 dp.</li>
2629</ul>
2630
2631<p>In addition, </p>
2632
2633<ul>
2634 <li>Android Watch devices MUST have a screen with the physical diagonal size in the
2635range from 1.1 to 2.5 inches.</li>
2636 <li>Other types of Android device implementations, with a physically integrated
2637screen, MUST have a screen at least 2.5 inches in physical diagonal size.</li>
2638</ul>
2639
2640<p>Devices MUST NOT change their reported screen size at any time.</p>
2641
2642<p>Applications optionally indicate which screen sizes they support via the
Unsuk Jung2e62f9a2015-07-16 23:01:44 -07002643&lt;supports-screens&gt; attribute in the AndroidManifest.xml file. Device
Unsuk Jung5bc81142015-07-16 22:27:20 -07002644implementations MUST correctly honor applications' stated support for small,
2645normal, large, and xlarge screens, as described in the Android SDK
2646documentation.</p>
2647
2648<h4 id="7_1_1_2_screen_aspect_ratio">7.1.1.2. Screen Aspect Ratio</h4>
2649
2650<div class="note">
2651<p>Android Watch devices MAY have an aspect ratio of 1.0 (1:1).</p>
2652</div>
2653
2654
2655<p>The screen aspect ratio MUST be a value from 1.3333 (4:3) to 1.86 (roughly
265616:9), but Android Watch devices MAY have an aspect ratio of 1.0 (1:1) because
2657such a device implementation will use a UI_MODE_TYPE_WATCH as the
2658android.content.res.Configuration.uiMode.</p>
2659
2660<h4 id="7_1_1_3_screen_density">7.1.1.3. Screen Density</h4>
2661
2662
2663<p>The Android UI framework defines a set of standard logical densities to help
2664application developers target application resources. Device implementations
2665MUST report only one of the following logical Android framework densities
2666through the android.util.DisplayMetrics APIs, and MUST execute applications at
2667this standard density and MUST NOT change the value at at any time for the
2668default display.</p>
2669
2670<ul>
2671 <li>120 dpi (ldpi)</li>
2672 <li>160 dpi (mdpi)</li>
2673 <li>213 dpi (tvdpi)</li>
2674 <li>240 dpi (hdpi)</li>
2675 <li>280 dpi (280dpi)</li>
2676 <li>320 dpi (xhdpi)</li>
2677 <li>400 dpi (400dpi)</li>
2678 <li>480 dpi (xxhdpi)</li>
2679 <li>560 dpi (560dpi)</li>
2680 <li>640 dpi (xxxhdpi)</li>
2681</ul>
2682
2683<p>Device implementations SHOULD define the standard Android framework density
2684that is numerically closest to the physical density of the screen, unless that
2685logical density pushes the reported screen size below the minimum supported. If
2686the standard Android framework density that is numerically closest to the
2687physical density results in a screen size that is smaller than the smallest
2688supported compatible screen size (320 dp width), device implementations SHOULD
2689report the next lowest standard Android framework density.</p>
2690
2691<h3 id="7_1_2_display_metrics">7.1.2. Display Metrics</h3>
2692
2693
2694<p>Device implementations MUST report correct values for all display metrics
2695defined 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
2696external screen is used as the default display.</p>
2697
2698<h3 id="7_1_3_screen_orientation">7.1.3. Screen Orientation</h3>
2699
2700
2701<p>Devices MUST report which screen orientations they support
2702(android.hardware.screen.portrait and/or android.hardware.screen.landscape) and
2703MUST report at least one supported orientation. For example, a device with a
2704fixed orientation landscape screen, such as a television or laptop, SHOULD only
2705report android.hardware.screen.landscape.</p>
2706
2707<p>Devices that report both screen orientations MUST support dynamic orientation
2708by applications to either portrait or landscape screen orientation. That is,
2709the device must respect the application&rsquo;s request for a specific screen
2710orientation. Device implementations MAY select either portrait or landscape
2711orientation as the default.</p>
2712
2713<p>Devices MUST report the correct value for the device&rsquo;s current orientation,
2714whenever queried via the android.content.res.Configuration.orientation,
2715android.view.Display.getOrientation(), or other APIs.</p>
2716
2717<p>Devices MUST NOT change the reported screen size or density when changing
2718orientation.</p>
2719
2720<h3 id="7_1_4_2d_and_3d_graphics_acceleration">7.1.4. 2D and 3D Graphics Acceleration</h3>
2721
2722
2723<p>Device implementations MUST support both OpenGL ES 1.0 and 2.0, as embodied and
2724detailed in the Android SDK documentations. Device implementations SHOULD
2725support OpenGL ES 3.0 or 3.1 on devices capable of supporting it. Device
2726implementations MUST also support Android RenderScript, as detailed in the
2727Android SDK documentation [<a href="http://developer.android.com/guide/topics/renderscript/">Resources, 63</a>].</p>
2728
2729<p>Device implementations MUST also correctly identify themselves as supporting
2730OpenGL ES 1.0, OpenGL ES 2.0, OpenGL ES 3.0 or OpenGL 3.1. That is:</p>
2731
2732<ul>
Unsuk Jung2e62f9a2015-07-16 23:01:44 -07002733 <li>The managed APIs (such as via the GLES10.getString() method) MUST report support
Unsuk Jung5bc81142015-07-16 22:27:20 -07002734for OpenGL ES 1.0 and OpenGL ES 2.0.</li>
2735 <li>The native C/C++ OpenGL APIs (APIs available to apps via libGLES_v1CM.so,
2736libGLES_v2.so, or libEGL.so) MUST report support for OpenGL ES 1.0 and OpenGL
2737ES 2.0.</li>
2738 <li>Device implementations that declare support for OpenGL ES 3.0 or 3.1 MUST
2739support the corresponding managed APIs and include support for native C/C++
2740APIs. On device implementations that declare support for OpenGL ES 3.0 or 3.1,
2741libGLESv2.so MUST export the corresponding function symbols in addition to the
2742OpenGL ES 2.0 function symbols.</li>
2743</ul>
2744
2745<p>In addition to OpenGL ES 3.1, Android provides an extension pack with Java
2746interfaces [<a href="https://developer.android.com/reference/android/opengl/GLES31Ext.html">Resources, 64</a>] and native support for advanced graphics functionality such as tessellation
2747and the ASTC texture compression format. Android device implementations MAY
2748support this extension pack, and&mdash;only if fully implemented&mdash;MUST identify the
2749support through the android.hardware.opengles.aep feature flag.</p>
2750
2751<p>Also, device implementations MAY implement any desired OpenGL ES extensions.
2752However, device implementations MUST report via the OpenGL ES managed and
2753native APIs all extension strings that they do support, and conversely MUST NOT
2754report extension strings that they do not support.</p>
2755
2756<p>Note that Android includes support for applications to optionally specify that
2757they require specific OpenGL texture compression formats. These formats are
2758typically vendor-specific. Device implementations are not required by Android
2759to implement any specific texture compression format. However, they SHOULD
2760accurately report any texture compression formats that they do support, via the
2761getString() method in the OpenGL API.</p>
2762
2763<p>Android includes a mechanism for applications to declare that they want to
2764enable hardware acceleration for 2D graphics at the Application, Activity,
2765Window, or View level through the use of a manifest tag
2766android:hardwareAccelerated or direct API calls [<a href="http://developer.android.com/guide/topics/graphics/hardware-accel.html">Resources, 65</a>].</p>
2767
2768<p>Device implementations MUST enable hardware acceleration by default, and MUST
2769disable hardware acceleration if the developer so requests by setting
2770android:hardwareAccelerated="false&rdquo; or disabling hardware acceleration directly
2771through the Android View APIs.</p>
2772
2773<p>In addition, device implementations MUST exhibit behavior consistent with the
2774Android SDK documentation on hardware acceleration [<a href="http://developer.android.com/guide/topics/graphics/hardware-accel.html">Resources, 65</a>].</p>
2775
2776<p>Android includes a TextureView object that lets developers directly integrate
2777hardware-accelerated OpenGL ES textures as rendering targets in a UI hierarchy.
2778Device implementations MUST support the TextureView API, and MUST exhibit
2779consistent behavior with the upstream Android implementation.</p>
2780
2781<p>Android includes support for EGL_ANDROID_RECORDABLE, an EGLConfig attribute
2782that indicates whether the EGLConfig supports rendering to an ANativeWindow
2783that records images to a video. Device implementations MUST support
2784EGL_ANDROID_RECORDABLE extension [<a href="https://www.khronos.org/registry/egl/extensions/ANDROID/EGL_ANDROID_recordable.txt">Resources, 66</a>].</p>
2785
2786<h3 id="7_1_5_legacy_application_compatibility_mode">7.1.5. Legacy Application Compatibility Mode</h3>
2787
2788
2789<p>Android specifies a &ldquo;compatibility mode&rdquo; in which the framework operates in a
2790'normal' screen size equivalent (320dp width) mode for the benefit of legacy
2791applications not developed for old versions of Android that pre-date
2792screen-size independence.</p>
2793
2794<ul>
2795<li>Android Automotive does not support legacy compatibility mode.</li>
2796<li>All other device implementations MUST include support for legacy application
2797compatibility mode as implemented by the upstream Android open source code. That
2798is, device implementations MUST NOT alter the triggers or thresholds at which
2799compatibility mode is activated, and MUST NOT alter the behavior of the
2800compatibility mode itself.</li>
2801</ul>
2802
2803<h3 id="7_1_6_screen_technology">7.1.6. Screen Technology</h3>
2804
2805
2806<p>The Android platform includes APIs that allow applications to render rich
2807graphics to the display. Devices MUST support all of these APIs as defined by
2808the Android SDK unless specifically allowed in this document. </p>
2809
2810<ul>
2811 <li>Devices MUST support displays capable of rendering 16-bit color graphics and
2812SHOULD support displays capable of 24-bit color graphics.</li>
2813 <li>Devices MUST support displays capable of rendering animations.</li>
2814 <li>The display technology used MUST have a pixel aspect ratio (PAR) between 0.9
2815and 1.15. That is, the pixel aspect ratio MUST be near square (1.0) with a 10 ~
281615% tolerance.</li>
2817</ul>
2818
2819<h3 id="7_1_7_external_displays">7.1.7. Secondary Displays</h3>
2820
2821
2822<p>Android includes support for secondary display to enable media sharing
2823capabilities and developer APIs for accessing external displays. If a device
2824supports an external display either via a wired, wireless, or an embedded
2825additional display connection then the device implementation MUST implement the
2826display 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>
2827
2828<h2 id="7_2_input_devices">7.2. Input Devices</h2>
2829
2830<p>Devices MUST support a touchscreen or meet the requirements listed in 7.2.2
2831for non-touch navigation.</p>
2832
2833<h3 id="7_2_1_keyboard">7.2.1. Keyboard</h3>
2834
2835<div class="note">
2836<p>Android Watch and Android Automotive implementations MAY implement a soft
2837keyboard. All other device implementations MUST implement a soft keyboard and:</p>
2838</div>
2839
2840
2841<p>Device implementations:</p>
2842
2843<ul>
2844 <li>MUST include support for the Input Management Framework (which allows
2845third-party developers to create Input Method Editors&mdash;i.e. soft keyboard) as
2846detailed at <a href="http://developer.android.com">http://developer.android.com</a>.</li>
2847 <li>MUST provide at least one soft keyboard implementation (regardless of whether a
2848hard keyboard is present) except for Android Watch devices where the screen
2849size makes it less reasonable to have a soft keyboard.</li>
2850 <li>MAY include additional soft keyboard implementations.</li>
2851 <li>MAY include a hardware keyboard.</li>
2852 <li>MUST NOT include a hardware keyboard that does not match one of the formats
2853specified 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).</li>
2854</ul>
2855
2856<h3 id="7_2_2_non-touch_navigation">7.2.2. Non-touch Navigation</h3>
2857
2858<div class="note">
2859<p>Android Television devices MUST support D-pad.</p>
2860</div>
2861
2862<p>Device implementations:</p>
2863
2864<ul>
2865 <li>MAY omit a non-touch navigation option (trackball, d-pad, or wheel) if the
2866device implementation is not an Android Television device.</li>
2867 <li>MUST report the correct value for android.content.res.Configuration.navigation
2868[<a href="http://developer.android.com/reference/android/content/res/Configuration.html">Resources, 68</a>].</li>
2869 <li>MUST provide a reasonable alternative user interface mechanism for the
2870selection and editing of text, compatible with Input Management Engines. The
2871upstream Android open source implementation includes a selection mechanism
2872suitable for use with devices that lack non-touch navigation inputs.</li>
2873</ul>
2874
2875<h3 id="7_2_3_navigation_keys">7.2.3. Navigation Keys</h3>
2876
2877<div class="note">
2878<p>The availability and visibility requirement of the Home, Recents, and Back
2879functions differ between device types as described in this section.</p>
2880</div>
2881
2882<p>The Home, Recents, and Back functions (mapped to the key events KEYCODE_HOME,
2883KEYCODE_APP_SWITCH, KEYCODE_BACK, respectively) are essential to the Android
2884navigation paradigm and therefore:</p>
2885
2886<ul>
2887 <li>Android Handheld device implementations MUST provide the Home, Recents, and
2888Back functions.</li>
2889 <li>Android Television device implementations MUST provide the Home and Back
2890functions.</li>
2891 <li>Android Watch device implementations MUST have the Home function available to
2892the user, and the Back function except for when it is in UI_MODE_TYPE_WATCH.</li>
2893 <li>Android Automotive implementations MUST provide the Home function and MAY
2894provide Back and Recent functions.</li>
2895 <li>All other types of device implementations MUST provide the Home and Back
2896functions.</li>
2897</ul>
2898
2899<p>These functions MAY be implemented via dedicated physical buttons (such as
2900mechanical or capacitive touch buttons), or MAY be implemented using dedicated
2901software keys on a distinct portion of the screen, gestures, touch panel, etc.
2902Android supports both implementations. All of these functions MUST be
2903accessible with a single action (e.g. tap, double-click or gesture) when
2904visible.</p>
2905
2906<p>Recents function, if provided, MUST have a visible button or icon unless hidden
2907together with other navigation functions in full-screen mode. This does not
2908apply to devices upgrading from earlier Android versions that have physical
2909buttons for navigation and no recents key.</p>
2910
2911<p> The Home and Back functions, if provided, MUST each have a visible button or
2912icon unless hidden together with other navigation functions in full-screen mode
2913or when the uiMode UI_MODE_TYPE_MASK is set to UI_MODE_TYPE_WATCH.</p>
2914
2915<p>The Menu function is deprecated in favor of action bar since Android 4.0.
2916Therefore the new device implementations shipping with Android ANDROID_VERSION and later MUST NOT
2917implement a dedicated physical button for the Menu function. Older device
2918implementations SHOULD NOT implement a dedicated physical button for the Menu
2919function, but if the physical Menu button is implemented and the device is
2920running applications with targetSdkVersion > 10, the device implementation:</p>
2921
2922<ul>
2923 <li>MUST display the action overflow button on the action bar when it is visible
2924and the resulting action overflow menu popup is not empty. For a device
2925implementation launched before Android 4.4 but upgrading to Android ANDROID_VERSION, this
2926is RECOMMENDED.</li>
2927 <li>MUST NOT modify the position of the action overflow popup displayed by
2928selecting the overflow button in the action bar.</li>
2929 <li>MAY render the action overflow popup at a modified position on the screen when
2930it is displayed by selecting the physical menu button.</li>
2931</ul>
2932
2933<p>For backwards compatibility, device implementations MUST make the Menu function
2934available to applications when targetSdkVersion is less than 10, either by a physical
2935button, a software key, or gestures. This Menu function should be presented
2936unless hidden together with other navigation functions.</p>
2937
2938<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
2939the Assist action available to the user at all times when running applications.
2940The Assist action SHOULD be implemented as a long-press on the Home button or a
2941swipe-up gesture on the software Home key. This function MAY be implemented via
2942another physical button, software key, or gesture, but MUST be accessible with
2943a single action (e.g. tap, double-click, or gesture) when other navigation keys
2944are visible.</p>
2945
2946<p>Device implementations MAY use a distinct portion of the screen to display the
2947navigation keys, but if so, MUST meet these requirements:</p>
2948
2949<ul>
2950 <li>Device implementation navigation keys MUST use a distinct portion of the
2951screen, not available to applications, and MUST NOT obscure or otherwise
2952interfere with the portion of the screen available to applications.</li>
2953 <li>Device implementations MUST make available a portion of the display to
2954applications that meets the requirements defined in <a href="#7_1_1_screen_configuration">section 7.1.1</a>.</li>
2955 <li>Device implementations MUST display the navigation keys when applications do
2956not specify a system UI mode, or specify SYSTEM_UI_FLAG_VISIBLE.</li>
2957 <li>Device implementations MUST present the navigation keys in an unobtrusive &ldquo;low
2958profile&rdquo; (eg. dimmed) mode when applications specify
2959SYSTEM_UI_FLAG_LOW_PROFILE.</li>
2960 <li>Device implementations MUST hide the navigation keys when applications specify
2961SYSTEM_UI_FLAG_HIDE_NAVIGATION.</li>
2962</ul>
2963
2964<h3 id="7_2_4_touchscreen_input">7.2.4. Touchscreen Input</h3>
2965
2966<div class="note">
2967<p>Android Handhelds and Watch Devices MUST support touchscreen input.</p>
2968</div>
2969
2970
2971<p>Device implementations SHOULD have a pointer input system of some kind (either
2972mouse-like or touch). However, if a device implementation does not support a
2973pointer input system, it MUST NOT report the android.hardware.touchscreen or
2974android.hardware.faketouch feature constant. Device implementations that do
2975include a pointer input system:</p>
2976
2977<ul>
2978 <li>SHOULD support fully independently tracked pointers, if the device input system
2979supports multiple pointers.</li>
2980 <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.</li>
2981</ul>
2982
2983<p>Android includes support for a variety of touchscreens, touch pads, and fake
2984touch input devices. Touchscreen based device implementations are associated
2985with 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
2986screen. Since the user is directly touching the screen, the system does not
2987require any additional affordances to indicate the objects being manipulated.
2988In contrast, a fake touch interface provides a user input system that
2989approximates a subset of touchscreen capabilities. For example, a mouse or
2990remote control that drives an on-screen cursor approximates touch, but requires
2991the user to first point or focus then click. Numerous input devices like the
2992mouse, trackpad, gyro-based air mouse, gyro-pointer, joystick, and multi-touch
2993trackpad can support fake touch interactions. Android includes the feature
2994constant android.hardware.faketouch, which corresponds to a high-fidelity
2995non-touch (pointer-based) input device such as a mouse or trackpad that can
2996adequately emulate touch-based input (including basic gesture support), and
2997indicates that the device supports an emulated subset of touchscreen
2998functionality. Device implementations that declare the fake touch feature MUST
2999meet the fake touch requirements in <a href="#7_2_5_fake_touch_input">section 7.2.5</a>.</p>
3000
3001<p>Device implementations MUST report the correct feature corresponding to the
3002type of input used. Device implementations that include a touchscreen
3003(single-touch or better) MUST report the platform feature constant
3004android.hardware.touchscreen. Device implementations that report the platform
3005feature constant android.hardware.touchscreen MUST also report the platform
3006feature constant android.hardware.faketouch. Device implementations that do not
3007include a touchscreen (and rely on a pointer device only) MUST NOT report any
3008touchscreen feature, and MUST report only android.hardware.faketouch if they
3009meet the fake touch requirements in <a href="#7_2_5_fake_touch_input">section 7.2.5</a>.</p>
3010
3011<h3 id="7_2_5_fake_touch_input">7.2.5. Fake Touch Input</h3>
3012
3013
3014<p>Device implementations that declare support for android.hardware.faketouch:</p>
3015
3016<ul>
3017 <li>MUST report the absolute X and Y screen positions of the pointer location and
3018display a visual pointer on the screen [<a href="http://developer.android.com/reference/android/view/MotionEvent.html">Resources, 71</a>].</li>
3019 <li>MUST report touch event with the action code that specifies the state change
3020that 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>].</li>
3021 <li>MUST support pointer down and up on an object on the screen, which allows users
3022to emulate tap on an object on the screen.</li>
3023 <li>MUST support pointer down, pointer up, pointer down then pointer up in the same
3024place on an object on the screen within a time threshold, which allows users to
3025emulate double tap on an object on the screen [<a href="http://developer.android.com/reference/android/view/MotionEvent.html">Resources, 71</a>].</li>
3026 <li>MUST support pointer down on an arbitrary point on the screen, pointer move to
3027any other arbitrary point on the screen, followed by a pointer up, which allows
3028users to emulate a touch drag.</li>
3029 <li>MUST support pointer down then allow users to quickly move the object to a
3030different position on the screen and then pointer up on the screen, which
3031allows users to fling an object on the screen.</li>
3032</ul>
3033
3034<p>Devices that declare support for android.hardware.faketouch.multitouch.distinct
3035MUST meet the requirements for faketouch above, and MUST also support distinct
3036tracking of two or more independent pointer inputs.</p>
3037
3038<h3 id="7_2_6_game_controller_support">7.2.6. Game Controller Support</h3>
3039
3040
3041<p>Android Television device implementations MUST support button mappings for game
3042controllers as listed below. The upstream Android implementation includes
3043implementation for game controllers that satisfies this requirement. </p>
3044
3045<h4 id="7_2_6_1_button_mappings">7.2.6.1. Button Mappings</h4>
3046
3047
3048<p>Android Television device implementations MUST support the following key
3049mappings:</p>
3050<table>
3051 <tr>
3052 <th>Button</th>
3053 <th>HID Usage</strong><sup>2</sup></td>
3054 <th>Android Button</th>
3055 </tr>
3056 <tr>
3057 <td><a href="http://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_BUTTON_A">A</a><sup>1</sup></td>
3058 <td>0x09 0x0001</td>
3059 <td>KEYCODE_BUTTON_A (96)</td>
3060 </tr>
3061 <tr>
3062 <td><a href="http://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_BUTTON_B">B</a><sup>1</sup></td>
3063 <td>0x09 0x0002</td>
3064 <td>KEYCODE_BUTTON_B (97)</td>
3065 </tr>
3066 <tr>
3067 <td><a href="http://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_BUTTON_X">X</a><sup>1</sup></td>
3068 <td>0x09 0x0004</td>
3069 <td>KEYCODE_BUTTON_X (99)</td>
3070 </tr>
3071 <tr>
3072 <td><a href="http://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_BUTTON_Y">Y</a><sup>1</sup></td>
3073 <td>0x09 0x0005</td>
3074 <td>KEYCODE_BUTTON_Y (100)</td>
3075 </tr>
3076 <tr>
3077 <td><a href="http://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_DPAD_UP">D-pad up</a><sup>1</sup></p>
3078
3079<p><a href="http://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_DPAD_DOWN">D-pad down</a><sup>1</sup></td>
Unsuk Jung2e62f9a2015-07-16 23:01:44 -07003080 <td>0x01 0x0039<sup>3</sup></td>
Unsuk Jung5bc81142015-07-16 22:27:20 -07003081 <td><a href="http://developer.android.com/reference/android/view/MotionEvent.html#AXIS_HAT_Y">AXIS_HAT_Y</a><sup>4</sup></td>
3082 </tr>
3083 <tr>
3084 <td><a href="http://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_DPAD_LEFT">D-pad left</a>1</p>
3085
3086<p><a href="http://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_DPAD_RIGHT">D-pad right</a><sup>1</sup></td>
Unsuk Jung2e62f9a2015-07-16 23:01:44 -07003087 <td>0x01 0x0039<sup>3</sup></td>
Unsuk Jung5bc81142015-07-16 22:27:20 -07003088 <td><a href="http://developer.android.com/reference/android/view/MotionEvent.html#AXIS_HAT_X">AXIS_HAT_X</a><sup>4</sup></td>
3089 </tr>
3090 <tr>
3091 <td><a href="http://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_BUTTON_L1">Left shoulder button</a><sup>1</sup></td>
3092 <td>0x09 0x0007</td>
3093 <td>KEYCODE_BUTTON_L1 (102)</td>
3094 </tr>
3095 <tr>
3096 <td><a href="http://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_BUTTON_R1">Right shoulder button</a><sup>1</sup></td>
3097 <td>0x09 0x0008</td>
3098 <td>KEYCODE_BUTTON_R1 (103)</td>
3099 </tr>
3100 <tr>
3101 <td><a href="http://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_BUTTON_THUMBL">Left stick click</a><sup>1</sup></td>
3102 <td>0x09 0x000E</td>
3103 <td>KEYCODE_BUTTON_THUMBL (106)</td>
3104 </tr>
3105 <tr>
3106 <td><a href="http://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_BUTTON_THUMBR">Right stick click</a><sup>1</sup></td>
3107 <td>0x09 0x000F</td>
3108 <td>KEYCODE_BUTTON_THUMBR (107)</td>
3109 </tr>
3110 <tr>
3111 <td><a href="http://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_HOME">Home</a><sup>1</sup></td>
3112 <td>0x0c 0x0223</td>
3113 <td>KEYCODE_HOME (3)</td>
3114 </tr>
3115 <tr>
3116 <td><a href="http://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_BACK">Back</a><sup>1</sup></td>
3117 <td>0x0c 0x0224</td>
3118 <td>KEYCODE_BACK (4)</td>
3119 </tr>
3120</table>
3121
3122
3123<p class="table_footnote">1 [<a href="http://developer.android.com/reference/android/view/KeyEvent.html">Resources, 72</a>]</p>
3124
3125<p class="table_footnote">2 The above HID usages must be declared within a Game pad CA (0x01 0x0005).</p>
3126
3127<p class="table_footnote">3 This usage must have a Logical Minimum of 0, a Logical Maximum of 7, a
3128Physical Minimum of 0, a Physical Maximum of 315, Units in Degrees, and a
3129Report Size of 4. The logical value is defined to be the clockwise rotation
3130away from the vertical axis; for example, a logical value of 0 represents no
3131rotation and the up button being pressed, while a logical value of 1 represents
3132a rotation of 45 degrees and both the up and left keys being pressed.</p>
3133
3134<p class="table_footnote">4 [<a href="http://developer.android.com/reference/android/view/MotionEvent.html">Resources, 71</a>]</p>
3135
3136<table>
3137 <tr>
3138 <th>Analog Controls</strong><sup>1</sup></td>
3139 <th>HID Usage</th>
3140 <th>Android Button</th>
3141 </tr>
3142 <tr>
3143 <td><a href="http://developer.android.com/reference/android/view/MotionEvent.html#AXIS_LTRIGGER">Left Trigger</a></td>
3144 <td>0x02 0x00C5</td>
3145 <td>AXIS_LTRIGGER </td>
3146 </tr>
3147 <tr>
3148 <td><a href="http://developer.android.com/reference/android/view/MotionEvent.html#AXIS_THROTTLE">Right Trigger</a></td>
3149 <td>0x02 0x00C4</td>
3150 <td>AXIS_RTRIGGER </td>
3151 </tr>
3152 <tr>
3153 <td><a href="http://developer.android.com/reference/android/view/MotionEvent.html#AXIS_Y">Left Joystick</a></td>
3154 <td>0x01 0x0030</p>
3155
3156<p>0x01 0x0031</td>
3157 <td>AXIS_X</p>
3158
3159<p>AXIS_Y</td>
3160 </tr>
3161 <tr>
3162 <td><a href="http://developer.android.com/reference/android/view/MotionEvent.html#AXIS_Z">Right Joystick</a></td>
3163 <td>0x01 0x0032</p>
3164
3165<p>0x01 0x0035</td>
3166 <td>AXIS_Z</p>
3167
3168<p>AXIS_RZ</td>
3169 </tr>
3170</table>
3171
3172
3173<p class="table_footnote">1 [<a href="http://developer.android.com/reference/android/view/MotionEvent.html">Resources, 71</a>]</p>
3174
3175<h3 id="7_2_7_remote_control">7.2.7. Remote Control</h3>
3176
3177
3178<p>Android Television device implementations SHOULD provide a remote control to
3179allow users to access the TV interface. The remote control MAY be a physical
3180remote or can be a software-based remote that is accessible from a mobile phone
3181or tablet. The remote control MUST meet the requirements defined below.</p>
3182
3183<ul>
3184 <li><strong>Search affordance</strong>. Device implementations MUST fire KEYCODE_SEARCH when the user invokes voice search either on the physical or software-based remote.</li>
3185 <li><strong>Navigation</strong>. All Android Television remotes MUST include Back, Home, and Select buttons and
3186support for D-pad events [<a href="http://developer.android.com/reference/android/view/KeyEvent.html">Resources, 72</a>].</li>
3187</ul>
3188
3189<h2 id="7_3_sensors">7.3. Sensors</h2>
3190
3191
3192<p>Android includes APIs for accessing a variety of sensor types. Devices
3193implementations generally MAY omit these sensors, as provided for in the
3194following subsections. If a device includes a particular sensor type that has a
3195corresponding API for third-party developers, the device implementation MUST
3196implement that API as described in the Android SDK documentation and the
3197Android Open Source documentation on sensors [<a href="http://source.android.com/devices/sensors/">Resources, 73</a>]. For example, device implementations:</p>
3198
3199<ul>
3200 <li>MUST accurately report the presence or absence of sensors per the
3201android.content.pm.PackageManager class [<a href="http://developer.android.com/reference/android/content/pm/PackageManager.html">Resources, 53]</a>.</li>
3202 <li>MUST return an accurate list of supported sensors via the
3203SensorManager.getSensorList() and similar methods.</li>
3204 <li>MUST behave reasonably for all other sensor APIs (for example, by returning
3205true or false as appropriate when applications attempt to register listeners,
3206not calling sensor listeners when the corresponding sensors are not present;
3207etc.).</li>
3208 <li>MUST report all sensor measurements using the relevant International System of
3209Units (metric) values for each sensor type as defined in the Android SDK
3210documentation [<a href="http://developer.android.com/reference/android/hardware/SensorEvent.html">Resources, 74</a>].</li>
3211 <li>SHOULD report the event time in nanoseconds as defined in the Android SDK
3212documentation, representing the time the event happened and synchronized with
3213the SystemClock.elapsedRealtimeNano() clock. Existing and new Android devices
3214are <strong>very strongly encouraged</strong> to meet these requirement so they will be able to upgrade to the future
3215platform releases where this might become a REQUIRED component. The
3216synchronization error SHOULD be below 100 milliseconds [<a href="http://developer.android.com/reference/android/hardware/SensorEvent.html#timestamp">Resources, 75</a>].</li>
3217</ul>
3218
3219<p>The list above is not comprehensive; the documented behavior of the Android SDK
3220and the Android Open Source Documentations on Sensors [<a href="http://source.android.com/devices/sensors/">Resources, 73</a>] is to be considered authoritative.</p>
3221
3222<p>Some sensor types are composite, meaning they can be derived from data provided
3223by one or more other sensors. (Examples include the orientation sensor, and the
3224linear acceleration sensor.) Device implementations SHOULD implement these
3225sensor types, when they include the prerequisite physical sensors as described
3226in [<a href="https://source.android.com/devices/sensors/sensor-types.html">Resources, 76</a>].
3227If a device implementation includes a composite sensor it MUST implement the
3228sensor as described in the Android Open Source documentation on composite
3229sensors [<a href="https://source.android.com/devices/sensors/sensor-types.html#composite_sensor_type_summary">Resources, 76</a>].</p>
3230
3231<p>Some Android sensors support a &ldquo;continuous&rdquo; trigger mode, which returns data
3232continuously [<a href="https://source.android.com/devices/sensors/report-modes.html#continuous">Resources, 77</a>]. For any API indicated by the Android SDK documentation to be a continuous
3233sensor, device implementations MUST continuously provide periodic data samples
3234that SHOULD have a jitter below 3%, where jitter is defined as the standard
3235deviation of the difference of the reported timestamp values between
3236consecutive events.</p>
3237
3238<p>Note that the device implementations MUST ensure that the sensor event stream
3239MUST NOT prevent the device CPU from entering a suspend state or waking up from
3240a suspend state.</p>
3241
3242<p>Finally, when several sensors are activated, the power consumption SHOULD NOT
3243exceed the sum of the individual sensor&rsquo;s reported power consumption.</p>
3244
3245<h3 id="7_3_1_accelerometer">7.3.1. Accelerometer</h3>
3246
3247
3248<p>Device implementations SHOULD include a 3-axis accelerometer. Android Handheld
3249devices and Android Watch devices are strongly encouraged to include this
3250sensor. If a device implementation does include a 3-axis accelerometer, it:</p>
3251
3252<ul>
3253 <li>MUST implement and report TYPE_ACCELEROMETER sensor [<a href="http://developer.android.com/reference/android/hardware/Sensor.html#TYPE_ACCELEROMETER">Resources, 78</a>].</li>
3254 <li>MUST be able to report events up to a frequency of at least 50 Hz for
3255 Android Watch devices as such devices have a stricter power constraint and
3256 100 Hz for all other device types.</li>
3257 <li>SHOULD report events up to at least 200 Hz.</li>
3258 <li>MUST comply with the Android sensor coordinate system as detailed in the
3259Android APIs [<a href="http://developer.android.com/reference/android/hardware/SensorEvent.html">Resources, 74</a>].</li>
3260 <li>MUST be capable of measuring from freefall up to four times the gravity (4g) or
3261more on any axis.</li>
3262 <li>MUST have a resolution of at least 8-bits and SHOULD have a resolution of at
3263least 16-bits.</li>
3264 <li>SHOULD be calibrated while in use if the characteristics changes over the life
3265cycle and compensated, and preserve the compensation parameters between device
3266reboots.</li>
3267 <li>SHOULD be temperature compensated.</li>
3268 <li>MUST have a standard deviation no greater than 0.05 m/s^, where the standard
3269deviation should be calculated on a per axis basis on samples collected over a
3270period of at least 3 seconds at the fastest sampling rate.</li>
3271 <li>SHOULD implement the TYPE_SIGNIFICANT_MOTION, TYPE_TILT_DETECTOR,
3272TYPE_STEP_DETECTOR, TYPE_STEP_COUNTER composite sensors as described in the
3273Android 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
3274sensors are implemented, the sum of their power consumption MUST always be less
3275than 4 mW and SHOULD each be below 2 mW and 0.5 mW for when the device is in a
3276dynamic or static condition.</li>
3277 <li>If a gyroscope sensor is included, MUST implement the TYPE_GRAVITY and
3278TYPE_LINEAR_ACCELERATION composite sensors and SHOULD implement the
3279TYPE_GAME_ROTATION_VECTOR composite sensor. Existing and new Android devices
3280are strongly encouraged to implement the TYPE_GAME_ROTATION_VECTOR sensor.</li>
3281 <li>SHOULD implement a TYPE_ROTATION_VECTOR composite sensor, if a gyroscope sensor
3282and a magnetometer sensor is also included.</li>
3283</ul>
3284
3285<h3 id="7_3_2_magnetometer">7.3.2. Magnetometer</h3>
3286
3287
3288<p>Device implementations SHOULD include a 3-axis magnetometer (compass). If a
3289device does include a 3-axis magnetometer, it:</p>
3290
3291<ul>
3292 <li>MUST implement the TYPE_MAGNETIC_FIELD sensor and SHOULD also implement
3293TYPE_MAGNETIC_FIELD_UNCALIBRATED sensor. Existing and new Android devices are
3294strongly encouraged to implement the TYPE_MAGNETIC_FIELD_UNCALIBRATED sensor.</li>
3295 <li>MUST be able to report events up to a frequency of at least 10 Hz and SHOULD
3296report events up to at least 50 Hz.</li>
3297 <li>MUST comply with the Android sensor coordinate system as detailed in the
3298Android APIs [<a href="http://developer.android.com/reference/android/hardware/SensorEvent.html">Resources, 74</a>].</li>
3299 <li>MUST be capable of measuring between -900 &micro;T and +900 &micro;T on each axis before
3300saturating.</li>
3301 <li>MUST have a hard iron offset value less than 700 &micro;T and SHOULD have a value
3302below 200 &micro;T, by placing the magnetometer far from dynamic (current-induced)
3303and static (magnet-induced) magnetic fields.</li>
3304 <li>MUST have a resolution equal or denser than 0.6 &micro;T and SHOULD have a resolution
3305equal or denser than 0.2 &micro;.</li>
3306 <li>SHOULD be temperature compensated.</li>
3307 <li>MUST support online calibration and compensation of the hard iron bias, and
3308preserve the compensation parameters between device reboots.</li>
3309 <li>MUST have the soft iron compensation applied&mdash;the calibration can be done either
3310while in use or during the production of the device.</li>
3311 <li>SHOULD have a standard deviation, calculated on a per axis basis on samples
3312collected over a period of at least 3 seconds at the fastest sampling rate, no
3313greater than 0.5 &micro;T.</li>
3314 <li>SHOULD implement a TYPE_ROTATION_VECTOR composite sensor, if an accelerometer
3315sensor and a gyroscope sensor is also included.</li>
3316 <li>MAY implement the TYPE_GEOMAGNETIC_ROTATION_VECTOR sensor if an accelerometer
3317sensor is also implemented. However if implemented, it MUST consume less than
331810 mW and SHOULD consume less than 3 mW when the sensor is registered for batch
3319mode at 10 Hz.</li>
3320</ul>
3321
3322<h3 id="7_3_3_gps">7.3.3. GPS</h3>
3323
3324
3325<p>Device implementations SHOULD include a GPS receiver. If a device
3326implementation does include a GPS receiver, it SHOULD include some form of&ldquo;assisted GPS&rdquo; technique to minimize GPS lock-on time.</p>
3327
3328<h3 id="7_3_4_gyroscope">7.3.4. Gyroscope</h3>
3329
3330
3331<p>Device implementations SHOULD include a gyroscope (angular change sensor).
3332Devices SHOULD NOT include a gyroscope sensor unless a 3-axis accelerometer is
3333also included. If a device implementation includes a gyroscope, it:</p>
3334
3335<ul>
3336 <li>MUST implement the TYPE_GYROSCOPE sensor and SHOULD also implement
3337TYPE_GYROSCOPE_UNCALIBRATED sensor. Existing and new Android devices are
3338strongly encouraged to implement the SENSOR_TYPE_GYROSCOPE_UNCALIBRATED sensor.</li>
3339 <li>MUST be capable of measuring orientation changes up to 1,000 degrees per second.</li>
3340 <li>MUST be able to report events up to a frequency of at least 50 Hz for
3341 Android Watch devices as such devices have a stricter power constraint and
3342 100 Hz for all other device types.</li>
3343 <li>SHOULD report events up to at least 200 Hz.</li>
3344 <li>MUST have a resolution of 12-bits or more and SHOULD have a resolution of
334516-bits or more.</li>
3346 <li>MUST be temperature compensated.</li>
3347 <li>MUST be calibrated and compensated while in use, and preserve the compensation
3348parameters between device reboots.</li>
3349 <li>MUST have a variance no greater than 1e-7 rad^2 / s^2 per Hz (variance per Hz,
3350or rad^2 / s). The variance is allowed to vary with the sampling rate, but must
3351be constrained by this value. In other words, if you measure the variance of
3352the gyro at 1 Hz sampling rate it should be no greater than 1e-7 rad^2/s^2.</li>
3353 <li>SHOULD implement a TYPE_ROTATION_VECTOR composite sensor, if an accelerometer
3354sensor and a magnetometer sensor is also included.</li>
3355 <li>If an accelerometer sensor is included, MUST implement the TYPE_GRAVITY and
3356TYPE_LINEAR_ACCELERATION composite sensors and SHOULD implement the
3357TYPE_GAME_ROTATION_VECTOR composite sensor. Existing and new Android devices
3358are strongly encouraged to implement the TYPE_GAME_ROTATION_VECTOR sensor.</li>
3359</ul>
3360
3361<h3 id="7_3_5_barometer">7.3.5. Barometer</h3>
3362
3363
3364<p>Device implementations SHOULD include a barometer (ambient air pressure
3365sensor). If a device implementation includes a barometer, it:</p>
3366
3367<ul>
3368 <li>MUST implement and report TYPE_PRESSURE sensor.</li>
3369 <li>MUST be able to deliver events at 5 Hz or greater.</li>
3370 <li>MUST have adequate precision to enable estimating altitude.</li>
3371 <li>MUST be temperature compensated.</li>
3372</ul>
3373
3374<h3 id="7_3_6_thermometer">7.3.6. Thermometer</h3>
3375
3376
3377<p>Device implementations MAY include an ambient thermometer (temperature sensor).
3378If present, it MUST be defined as SENSOR_TYPE_AMBIENT_TEMPERATURE and it MUST
3379measure the ambient (room) temperature in degrees Celsius.</p>
3380
3381<p>Device implementations MAY but SHOULD NOT include a CPU temperature sensor. If
3382present, it MUST be defined as SENSOR_TYPE_TEMPERATURE, it MUST measure the
3383temperature of the device CPU, and it MUST NOT measure any other temperature.
3384Note the SENSOR_TYPE_TEMPERATURE sensor type was deprecated in Android 4.0.</p>
3385
3386<h3 id="7_3_7_photometer">7.3.7. Photometer</h3>
3387
3388
3389<p>Device implementations MAY include a photometer (ambient light sensor).</p>
3390
3391<h3 id="7_3_8_proximity_sensor">7.3.8. Proximity Sensor</h3>
3392
3393
3394<p>Device implementations MAY include a proximity sensor. Devices that can make a
3395voice call and indicate any value other than PHONE_TYPE_NONE in getPhoneType
3396SHOULD include a proximity sensor. If a device implementation does include a
3397proximity sensor, it:</p>
3398
3399<ul>
3400 <li>MUST measure the proximity of an object in the same direction as the screen.
3401That is, the proximity sensor MUST be oriented to detect objects close to the
3402screen, as the primary intent of this sensor type is to detect a phone in use
3403by the user. If a device implementation includes a proximity sensor with any
3404other orientation, it MUST NOT be accessible through this API.</li>
3405 <li>MUST have 1-bit of accuracy or more.</li>
3406</ul>
3407
Unsuk Jung5b08df22015-09-29 18:50:14 -07003408<h3 id="7_3_10_fingeprint">7.3.10. Fingerprint Sensor</h3>
3409
3410<p>Device implementations with a secure lock screen SHOULD include a fingerprint sensor.
3411If a device implementation includes a fingerprint sensor and has a corresponding API for
3412third-party developers, it:</p>
3413
3414<ul>
3415 <li>MUST declare support for the android.hardware.fingerprint feature.</li>
3416 <li>MUST fully implement the corresponding API as described in the Android SDK documentation
3417[<a href="https://developer.android.com/reference/android/hardware/fingerprint/package-summary.html">Resources, XX</a>].
3418 </li>
3419 <li>MUST have a false acceptance rate not higher than 0.002%.</li>
3420 <li>Is STRONGLY RECOMMENDED to have a false rejection rate not higher than 10%, and a
3421 latency from when the fingerprint sensor is touched until the screen is unlocked below
3422 1 second, for 1 enrolled finger.</li>
3423 <li>MUST rate limit attempts for at least 30 seconds after 5 false trials for fingerprint
3424 verification.</li>
3425 <li>MUST have a hardware-backed keystore implementation, and perform the fingerprint matching
3426 in a Trusted Execution Environment (TEE) or on a chip with a secure channel to the TEE.
3427 </li>
3428 <li>MUST have all identifiable fingerprint data encrypted and cryptographically
3429 authenticated such that they cannot be acquired, read or altered outside of the
3430 Trusted Execution Environment (TEE) as documented in the implementation guidelines
3431 on the Android Open Source Project site
3432 [<a href="https://source.android.com/devices/tech/security/authentication/fingerprint-hal.html">Resources, XX</a>].
3433 </li>
3434 <li>MUST prevent adding a fingerprint without first establishing a chain of trust by
3435 having the user confirm existing or add a new device credential (PIN/pattern/password)
3436 using the TEE as implemented in the Android Open Source project.</li>
3437 <li>MUST NOT enable 3rd-party applications to distinguish between individual fingerprints.
3438 </li>
3439 <li>MUST honor the DevicePolicyManager.KEYGUARD_DISABLE_FINGERPRINT flag.</li>
3440 <li>MUST, when upgraded from a version earlier than Android 6.0, have the fingerprint
3441 data securely migrated to meet the above requirements or removed.</li>
3442 <li>SHOULD use the Android Fingerprint icon provided in the Android Open Source Project.</li>
3443</ul>
3444
Unsuk Jung5bc81142015-07-16 22:27:20 -07003445<h2 id="7_4_data_connectivity">7.4. Data Connectivity</h2>
3446
3447
3448<h3 id="7_4_1_telephony">7.4.1. Telephony</h3>
3449
3450
3451<p>&ldquo;Telephony&rdquo; as used by the Android APIs and this document refers specifically
3452to hardware related to placing voice calls and sending SMS messages via a GSM
3453or CDMA network. While these voice calls may or may not be packet-switched,
3454they are for the purposes of Android considered independent of any data
3455connectivity that may be implemented using the same network. In other words,
3456the Android &ldquo;telephony&rdquo; functionality and APIs refer specifically to voice
3457calls and SMS. For instance, device implementations that cannot place calls or
3458send/receive SMS messages MUST NOT report the android.hardware.telephony
3459feature or any subfeatures, regardless of whether they use a cellular network
3460for data connectivity.</p>
3461
3462<p>Android MAY be used on devices that do not include telephony hardware. That is,
3463Android is compatible with devices that are not phones. However, if a device
3464implementation does include GSM or CDMA telephony, it MUST implement full
3465support for the API for that technology. Device implementations that do not
3466include telephony hardware MUST implement the full APIs as no-ops.</p>
3467
3468<h3 id="7_4_2_ieee_802_11_wi-fi">7.4.2. IEEE 802.11 (Wi-Fi)</h3>
3469
3470<div class="note">
3471<p>Android Television device implementations MUST include Wi-Fi support.</p>
3472</div>
3473
3474
3475<p>Android Television device implementations MUST include support for one or more
3476forms of 802.11 (b/g/a/n, etc.) and other types of Android device
3477implementation SHOULD include support for one or more forms of 802.11. If a
3478device implementation does include support for 802.11 and exposes the
3479functionality to a third-party application, it MUST implement the corresponding
3480Android API and:</p>
3481
3482<ul>
3483 <li>MUST report the hardware feature flag android.hardware.wifi.</li>
3484 <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>].</li>
3485 <li>MUST support multicast DNS (mDNS) and MUST NOT filter mDNS packets
3486(224.0.0.251) at any time of operation including when the screen is not in an
3487active state.</li>
3488</ul>
3489
3490<h4 id="7_4_2_1_wi-fi_direct">7.4.2.1. Wi-Fi Direct</h4>
3491
3492
3493<p>Device implementations SHOULD include support for Wi-Fi Direct (Wi-Fi
3494peer-to-peer). If a device implementation does include support for Wi-Fi
3495Direct, it MUST implement the corresponding Android API as described in the SDK
3496documentation [<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>
3497
3498<ul>
3499 <li>MUST report the hardware feature android.hardware.wifi.direct.</li>
3500 <li>MUST support regular Wi-Fi operation.</li>
3501 <li>SHOULD support concurrent Wi-Fi and Wi-Fi Direct operation.</li>
3502</ul>
3503
3504<h4 id="7_4_2_2_wi-fi_tunneled_direct_link_setup">7.4.2.2. Wi-Fi Tunneled Direct Link Setup</h4>
3505
3506<div class="note">
3507<p>Android Television device implementations MUST include support for Wi-Fi
3508Tunneled Direct Link Setup (TDLS).</p>
3509</div>
3510
3511
3512<p>Android Television device implementations MUST include support for Wi-Fi
3513Tunneled Direct Link Setup (TDLS) and other types of Android device
3514implementations SHOULD include support for Wi-Fi TDLS as described in the
3515Android 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
3516by the WiFiManager API, the device:</p>
3517
3518<ul>
3519 <li>SHOULD use TDLS only when it is possible AND beneficial.</li>
3520 <li>SHOULD have some heuristic and NOT use TDLS when its performance might be worse
3521than going through the Wi-Fi access point.</li>
3522</ul>
3523
3524<h3 id="7_4_3_bluetooth">7.4.3. Bluetooth</h3>
3525
3526<div class="note">
3527<p>Android Watch and Automotive implementations MUST support Bluetooth. Android
3528Television implementations MUST support Bluetooth and Bluetooth LE.</p>
3529</div>
3530
3531
3532<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
3533Energy MUST declare the relevant platform features (android.hardware.bluetooth
3534and android.hardware.bluetooth_le respectively) and implement the platform
3535APIs. Device implementations SHOULD implement relevant Bluetooth profiles such
3536as A2DP, AVCP, OBEX, etc. as appropriate for the device. Android Television
3537device implementations MUST support Bluetooth and Bluetooth LE. </p>
3538
3539<p>Device implementations including support for Bluetooth Low Energy:</p>
3540
3541<ul>
3542 <li>MUST declare the hardware feature android.hardware.bluetooth_le.</li>
3543 <li>MUST enable the GATT (generic attribute profile) based Bluetooth APIs as
3544described in the SDK documentation and [<a href="http://developer.android.com/reference/android/bluetooth/package-summary.html">Resources, 82</a>].</li>
3545 <li>SHOULD support offloading of the filtering logic to the bluetooth chipset when
3546implementing 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 implemented whenever queried via the
3547android.bluetooth.BluetoothAdapter.isOffloadedFilteringSupported() method.</li>
3548 <li>SHOULD support offloading of the batched scanning to the bluetooth chipset, but
3549if not supported, MUST report &lsquo;false&rsquo; whenever queried via the
3550android.bluetooth.BluetoothAdapater.isOffloadedScanBatchingSupported() method.</li>
3551 <li>SHOULD support multi advertisement with at least 4 slots, but if not supported,
3552MUST report &lsquo;false&rsquo; whenever queried via the
3553android.bluetooth.BluetoothAdapter.isMultipleAdvertisementSupported() method.</li>
3554</ul>
3555
3556<h3 id="7_4_4_near-field_communications">7.4.4. Near-Field Communications</h3>
3557
3558
3559<p>Device implementations SHOULD include a transceiver and related hardware for
3560Near-Field Communications (NFC). If a device implementation does include NFC
3561hardware and plans to make it available to third-party apps, then it:</p>
3562
3563<ul>
3564 <li>MUST report the android.hardware.nfc feature from the
3565android.content.pm.PackageManager.hasSystemFeature() method [<a href="http://developer.android.com/reference/android/content/pm/PackageManager.html">Resources, 53</a>].</li>
3566 <li>MUST be capable of reading and writing NDEF messages via the following NFC
3567standards:
3568 <ul>
3569 <li>MUST be capable of acting as an NFC Forum reader/writer (as defined by the NFC
3570Forum technical specification NFCForum-TS-DigitalProtocol-1.0) via the
3571following NFC standards:
3572 <ul>
3573 <li>NfcA (ISO14443-3A)</li>
3574 <li>NfcB (ISO14443-3B)</li>
Martijn Coenen048f4aa2015-09-17 14:24:55 +02003575 <li>NfcF (JIS X 6319-4)</li>
Unsuk Jung5bc81142015-07-16 22:27:20 -07003576 <li>IsoDep (ISO 14443-4)</li>
3577 <li>NFC Forum Tag Types 1, 2, 3, 4 (defined by the NFC Forum)</li>
3578 </ul>
Martijn Coenen048f4aa2015-09-17 14:24:55 +02003579 <li>MUST be capable of reading and writing NDEF messages as well as raw
3580 data via the following NFC standards:</li>
Unsuk Jung5bc81142015-07-16 22:27:20 -07003581 <ul>
3582 <li>NfcV (ISO 15693)</li>
3583 </ul></li>
Martijn Coenen048f4aa2015-09-17 14:24:55 +02003584 <li>SHOULD be capable of reading the barcode and URL (if encoded) of
3585 Thinfilm NFC Barcode
3586 [<a href="http://developer.android.com/reference/android/nfc/tech/NfcBarcode.html">Resources, XX</a>] products.
3587 </li>
Unsuk Jung5bc81142015-07-16 22:27:20 -07003588 <li>MUST be capable of transmitting and receiving data via the following
3589peer-to-peer standards and protocols:
3590 <ul>
3591 <li>ISO 18092</li>
Martijn Coenen048f4aa2015-09-17 14:24:55 +02003592 <li>LLCP 1.2 (defined by the NFC Forum)</li>
Unsuk Jung5bc81142015-07-16 22:27:20 -07003593 <li>SDP 1.0 (defined by the NFC Forum)</li>
3594 <li>NDEF Push Protocol [<a href="http://static.googleusercontent.com/media/source.android.com/en/us/compatibility/ndef-push-protocol.pdf">Resources, 84</a>]</li>
3595 <li>SNEP 1.0 (defined by the NFC Forum)</li>
3596 </ul></li>
3597 <li>MUST include support for Android Beam [<a href="http://developer.android.com/guide/topics/connectivity/nfc/nfc.html">Resources, 85</a>]:
3598 <ul>
3599 <li>MUST implement the SNEP default server. Valid NDEF messages received by the
3600default SNEP server MUST be dispatched to applications using the
3601android.nfc.ACTION_NDEF_DISCOVERED intent. Disabling Android Beam in settings
3602MUST NOT disable dispatch of incoming NDEF message.</li>
3603 <li>MUST honor the android.settings.NFCSHARING_SETTINGS intent to show NFC sharing
3604settings [<a href="http://developer.android.com/reference/android/provider/Settings.html#ACTION_NFCSHARING_SETTINGS">Resources, 86</a>].</li>
3605 <li>MUST implement the NPP server. Messages received by the NPP server MUST be
3606processed the same way as the SNEP default server.</li>
3607 <li>MUST implement a SNEP client and attempt to send outbound P2P NDEF to the
3608default SNEP server when Android Beam is enabled. If no default SNEP server is
3609found then the client MUST attempt to send to an NPP server.</li>
3610 <li>MUST allow foreground activities to set the outbound P2P NDEF message using
3611android.nfc.NfcAdapter.setNdefPushMessage, and
3612android.nfc.NfcAdapter.setNdefPushMessageCallback, and
3613android.nfc.NfcAdapter.enableForegroundNdefPush.</li>
3614 <li>SHOULD use a gesture or on-screen confirmation, such as 'Touch to Beam', before
3615sending outbound P2P NDEF messages.</li>
3616 <li>SHOULD enable Android Beam by default and MUST be able to send and receive
3617using Android Beam, even when another proprietary NFC P2p mode is turned on.</li>
3618 <li>MUST support NFC Connection handover to Bluetooth when the device supports
3619Bluetooth Object Push Profile. Device implementations MUST support connection
3620handover to Bluetooth when using android.nfc.NfcAdapter.setBeamPushUris, by
3621implementing the &ldquo;Connection Handover version 1.2&rdquo; [<a href="http://members.nfc-forum.org/specs/spec_list/#conn_handover">Resources, 87</a>] and &ldquo;Bluetooth Secure Simple Pairing Using NFC version 1.0&rdquo; [<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
3622LLCP service with service name &ldquo;urn:nfc:sn:handover&rdquo; for exchanging the
3623handover request/select records over NFC, and it MUST use the Bluetooth Object
3624Push Profile for the actual Bluetooth data transfer. For legacy reasons (to
3625remain compatible with Android 4.1 devices), the implementation SHOULD still
3626accept SNEP GET requests for exchanging the handover request/select records
3627over NFC. However an implementation itself SHOULD NOT send SNEP GET requests
3628for performing connection handover.</li>
3629 </ul></li>
3630 <li>MUST poll for all supported technologies while in NFC discovery mode.</li>
3631 <li>SHOULD be in NFC discovery mode while the device is awake with the screen
3632active and the lock-screen unlocked.</li>
3633</ul>
3634</ul>
3635
3636<p>(Note that publicly available links are not available for the JIS, ISO, and NFC
3637Forum specifications cited above.)</p>
3638
3639<p>Android includes support for NFC Host Card Emulation (HCE) mode. If a
3640device implementation does include an NFC controller chipset capable of HCE and
3641Application ID (AID) routing, then it:</p>
3642
3643<ul>
3644 <li>MUST report the android.hardware.nfc.hce feature constant.</li>
3645 <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>].</li>
3646</ul>
3647
3648<p>Additionally, device implementations MAY include reader/writer support for the
3649following MIFARE technologies.</p>
3650
3651<ul>
3652 <li>MIFARE Classic</li>
3653 <li>MIFARE Ultralight</li>
3654 <li>NDEF on MIFARE Classic</li>
3655</ul>
3656
3657<p>Note that Android includes APIs for these MIFARE types. If a device
3658implementation supports MIFARE in the reader/writer role, it:</p>
3659
3660<ul>
3661 <li>MUST implement the corresponding Android APIs as documented by the Android SDK.</li>
3662 <li>MUST report the feature com.nxp.mifare from the
Martijn Coenen048f4aa2015-09-17 14:24:55 +02003663android.content.pm.PackageManager.hasSystemFeature() method <a href="http://developer.android.com/reference/android/content/pm/PackageManager.html">[Resources, 53]</a>. Note that this is not a standard Android feature and as such does not appear
3664as a constant in the android.content.pm.PackageManager class.</li>
Unsuk Jung5bc81142015-07-16 22:27:20 -07003665 <li>MUST NOT implement the corresponding Android APIs nor report the com.nxp.mifare
3666feature unless it also implements general NFC support as described in this
3667section.</li>
3668</ul>
3669
3670<p>If a device implementation does not include NFC hardware, it MUST NOT declare
3671the android.hardware.nfc feature from the
3672android.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>
3673
3674<p>As the classes android.nfc.NdefMessage and android.nfc.NdefRecord represent a
3675protocol-independent data representation format, device implementations MUST
3676implement these APIs even if they do not include support for NFC or declare the
3677android.hardware.nfc feature.</p>
3678
3679<h3 id="7_4_5_minimum_network_capability">7.4.5. Minimum Network Capability</h3>
3680
3681
3682<p>Device implementations MUST include support for one or more forms of data
3683networking. Specifically, device implementations MUST include support for at
3684least one data standard capable of 200Kbit/sec or greater. Examples of
3685technologies that satisfy this requirement include EDGE, HSPA, EV-DO, 802.11g,
3686Ethernet, Bluetooth PAN, etc.</p>
3687
3688<p>Device implementations where a physical networking standard (such as Ethernet)
3689is the primary data connection SHOULD also include support for at least one
3690common wireless data standard, such as 802.11 (Wi-Fi).</p>
3691
3692<p>Devices MAY implement more than one form of data connectivity.</p>
3693
3694<h3 id="7_4_6_sync_settings">7.4.6. Sync Settings</h3>
3695
3696
3697<p>Device implementations MUST have the master auto-sync setting on by default so
3698that the method getMasterSyncAutomatically() returns &ldquo;true&rdquo; [<a href="http://developer.android.com/reference/android/content/ContentResolver.html">Resources, 89</a>].</p>
3699
3700<h2 id="7_5_cameras">7.5. Cameras</h2>
3701
3702
3703<p>Device implementations SHOULD include a rear-facing camera and MAY include a
3704front-facing camera. A rear-facing camera is a camera located on the side of
3705the device opposite the display; that is, it images scenes on the far side of
3706the device, like a traditional camera. A front-facing camera is a camera
3707located on the same side of the device as the display; that is, a camera
3708typically used to image the user, such as for video conferencing and similar
3709applications.</p>
3710
3711<p>If a device implementation includes at least one camera, it SHOULD be possible
3712for an application to simultaneously allocate 3 bitmaps equal to the size of
3713the images produced by the largest-resolution camera sensor on the device.</p>
3714
3715<h3 id="7_5_1_rear-facing_camera">7.5.1. Rear-Facing Camera</h3>
3716
3717
3718<p>Device implementations SHOULD include a rear-facing camera. If a device
3719implementation includes at least one rear-facing camera, it:</p>
3720
3721<ul>
3722 <li>MUST report the feature flag android.hardware.camera and
3723android.hardware.camera.any.</li>
3724 <li>MUST have a resolution of at least 2 megapixels.</li>
3725 <li>SHOULD have either hardware auto-focus or software auto-focus implemented in
3726the camera driver (transparent to application software).</li>
3727 <li>MAY have fixed-focus or EDOF (extended depth of field) hardware.</li>
3728 <li>MAY include a flash. If the Camera includes a flash, the flash lamp MUST NOT be
3729lit while an android.hardware.Camera.PreviewCallback instance has been
3730registered on a Camera preview surface, unless the application has explicitly
3731enabled the flash by enabling the FLASH_MODE_AUTO or FLASH_MODE_ON attributes
3732of a Camera.Parameters object. Note that this constraint does not apply to the
3733device&rsquo;s built-in system camera application, but only to third-party
3734applications using Camera.PreviewCallback.</li>
3735</ul>
3736
3737<h3 id="7_5_2_front-facing_camera">7.5.2. Front-Facing Camera</h3>
3738
3739
3740<p>Device implementations MAY include a front-facing camera. If a device
3741implementation includes at least one front-facing camera, it:</p>
3742
3743<ul>
3744 <li>MUST report the feature flag android.hardware.camera.any and
3745android.hardware.camera.front.</li>
3746 <li>MUST have a resolution of at least VGA (640x480 pixels).</li>
3747 <li>MUST NOT use a front-facing camera as the default for the Camera API. The
3748camera API in Android has specific support for front-facing cameras and device
3749implementations MUST NOT configure the API to to treat a front-facing camera as
3750the default rear-facing camera, even if it is the only camera on the device.</li>
3751 <li>MAY include features (such as auto-focus, flash, etc.) available to rear-facing
3752cameras as described in <a href="#7_5_1_rear-facing_camera">section 7.5.1</a>.</li>
3753 <li>MUST horizontally reflect (i.e. mirror) the stream displayed by an app in a
3754CameraPreview, as follows:
3755 <ul>
3756 <li>If the device implementation is capable of being rotated by user (such as
3757automatically via an accelerometer or manually via user input), the camera
3758preview MUST be mirrored horizontally relative to the device&rsquo;s current
3759orientation.</li>
3760 <li>If the current application has explicitly requested that the Camera display be
3761rotated 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
3762orientation specified by the application.</li>
3763 <li>Otherwise, the preview MUST be mirrored along the device&rsquo;s default horizontal
3764axis.</li>
3765 </ul></li>
3766 <li>MUST mirror the image displayed by the postview in the same manner as the
3767camera preview image stream. If the device implementation does not support
3768postview, this requirement obviously does not apply.</li>
3769 <li>MUST NOT mirror the final captured still image or video streams returned to
3770application callbacks or committed to media storage.</li>
3771</ul>
3772
3773<h3 id="7_5_3_external_camera">7.5.3. External Camera</h3>
3774
3775
3776<p>Device implementations with USB host mode MAY include support for an external
3777camera that connects to the USB port. If a device includes support for an
3778external camera, it:</p>
3779
3780<ul>
3781 <li>MUST declare the platform feature android.hardware.camera.external and
3782android.hardware camera.any.</li>
3783 <li>MUST support USB Video Class (UVC 1.0 or higher).</li>
3784 <li>MAY support multiple cameras.</li>
3785</ul>
3786
3787<p>Video compression (such as MJPEG) support is RECOMMENDED to enable transfer of
3788high-quality unencoded streams (i.e. raw or independently compressed picture
3789streams). Camera-based video encoding MAY be supported. If so, a simultaneous
3790unencoded/ MJPEG stream (QVGA or greater resolution) MUST be accessible to the
3791device implementation.</p>
3792
3793<h3 id="7_5_4_camera_api_behavior">7.5.4. Camera API Behavior</h3>
3794
3795
3796<p>Android includes two API packages to access the camera, the newer
3797android.hardware.camera2 API expose lower-level camera control to the app,
3798including efficient zero-copy burst/streaming flows and per-frame controls of
3799exposure, gain, white balance gains, color conversion, denoising, sharpening,
3800and more.</p>
3801
3802<p>The older API package, android.hardware.Camera, is marked as deprecated in
3803Android 5.0 but as it should still be available for apps to use Android device
3804implementations MUST ensure the continued support of the API as described in
3805this section and in the Android SDK.</p>
3806
3807<p>Device implementations MUST implement the following behaviors for the
3808camera-related APIs, for all available cameras:</p>
3809
3810<ul>
3811 <li>If an application has never called
3812android.hardware.Camera.Parameters.setPreviewFormat(int), then the device MUST
3813use android.hardware.PixelFormat.YCbCr_420_SP for preview data provided to
3814application callbacks.</li>
3815 <li>If an application registers an android.hardware.Camera.PreviewCallback instance
3816and the system calls the onPreviewFrame() method when the preview format is
3817YCbCr_420_SP, the data in the byte[] passed into onPreviewFrame() must further
3818be in the NV21 encoding format. That is, NV21 MUST be the default.</li>
3819 <li>For android.hardware.Camera, device implementations MUST support the YV12
3820format (as denoted by the android.graphics.ImageFormat.YV12 constant) for
3821camera previews for both front- and rear-facing cameras. (The hardware video
3822encoder and camera may use any native pixel format, but the device
3823implementation MUST support conversion to YV12.)</li>
3824 <li>For android.hardware.camera2, device implementations must support the
3825android.hardware.ImageFormat.YUV_420_888 and android.hardware.ImageFormat.JPEG
3826formats as outputs through the android.media.ImageReader API.</li>
3827</ul>
3828
3829<p>Device implementations MUST still implement the full Camera API included in the
3830Android 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
3831capabilities. For instance, cameras that lack autofocus MUST still call any
3832registered android.hardware.Camera.AutoFocusCallback instances (even though
3833this has no relevance to a non-autofocus camera.) Note that this does apply to
3834front-facing cameras; for instance, even though most front-facing cameras do
3835not support autofocus, the API callbacks must still be &ldquo;faked&rdquo; as described.</p>
3836
3837<p>Device implementations MUST recognize and honor each parameter name defined as
3838a constant on the android.hardware.Camera.Parameters class, if the underlying
3839hardware supports the feature. If the device hardware does not support a
3840feature, the API must behave as documented. Conversely, device implementations
3841MUST NOT honor or recognize string constants passed to the
3842android.hardware.Camera.setParameters() method other than those documented as
3843constants on the android.hardware.Camera.Parameters. That is, device
3844implementations MUST support all standard Camera parameters if the hardware
3845allows, and MUST NOT support custom Camera parameter types. For instance,
3846device implementations that support image capture using high dynamic range
3847(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>
3848
3849<p>Because not all device implementations can fully support all the features of
3850the android.hardware.camera2 API, device implementations MUST report the proper
3851level of support with the android.info.supportedHardwareLevel property as
3852described 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>
3853
3854<p>Device implementations MUST also declare its Individual camera capabilities of
3855android.hardware.camera2 via the android.request.availableCapabilities property
3856and 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 supports the feature.</p>
3857
3858<p>Device implementations MUST broadcast the Camera.ACTION_NEW_PICTURE intent
3859whenever a new picture is taken by the camera and the entry of the picture has
3860been added to the media store.</p>
3861
3862<p>Device implementations MUST broadcast the Camera.ACTION_NEW_VIDEO intent
3863whenever a new video is recorded by the camera and the entry of the picture has
3864been added to the media store.</p>
3865
3866<h3 id="7_5_5_camera_orientation">7.5.5. Camera Orientation</h3>
3867
3868
3869<p>Both front- and rear-facing cameras, if present, MUST be oriented so that the
3870long dimension of the camera aligns with the screen&rsquo;s long dimension. That is,
3871when the device is held in the landscape orientation, cameras MUST capture
3872images in the landscape orientation. This applies regardless of the device&rsquo;s
3873natural orientation; that is, it applies to landscape-primary devices as well
3874as portrait-primary devices.</p>
3875
3876<h2 id="7_6_memory_and_storage">7.6. Memory and Storage</h2>
3877
3878
3879<h3 id="7_6_1_minimum_memory_and_storage">7.6.1. Minimum Memory and Storage</h3>
3880
3881<div class="note">
3882<p>Android Television devices MUST have at least 5GB of non-volatile storage
3883available for application private data.</p>
3884</div>
3885
3886
3887<p>The memory available to the kernel and userspace on device implementations MUST
3888be at least equal or larger than the minimum values specified by the following
3889table. (See <a href="#7_1_1_screen_configuration">section 7.1.1</a> for screen size and density definitions.)</p>
3890<table>
3891 <tr>
3892 <th>Density and screen size</th>
3893 <th>32-bit device</th>
3894 <th>64-bit device</th>
3895 </tr>
3896 <tr>
3897 <td>Android Watch devices (due to smaller screens)</td>
3898 <td>416MB</td>
3899 <td>Not applicable</td>
3900 </tr>
3901 <tr>
3902 <td><ul>
Unsuk Jung2e62f9a2015-07-16 23:01:44 -07003903 <li class="table_list">280dpi or lower on small/normal screens</li>
Unsuk Jung5bc81142015-07-16 22:27:20 -07003904 <li class="table_list">mdpi or lower on large screens</li>
3905 <li class="table_list">ldpi or lower on extra large screens</li>
3906 </ul></td>
3907 <td>424MB</td>
Unsuk Jung2e62f9a2015-07-16 23:01:44 -07003908 <td>704MB</td>
Unsuk Jung5bc81142015-07-16 22:27:20 -07003909 </tr>
3910 <tr>
3911 <td><ul>
3912 <li class="table_list">xhdpi or higher on small/normal screens</li>
3913 <li class="table_list">hdpi or higher on large screens</li>
3914 <li class="table_list">mdpi or higher on extra large screens</li></ul></td>
3915 <td>512MB</td>
3916 <td>832MB</td>
3917 </tr>
3918 <tr>
3919 <td><ul>
3920 <li class="table_list">400dpi or higher on small/normal screens</li>
3921 <li class="table_list">xhdpi or higher on large screens</li>
3922 <li class="table_list">tvdpi or higher on extra large screens</li></ul></td>
3923 <td>896MB</td>
3924 <td>1280MB</td>
3925 </tr>
3926 <tr>
3927 <td><ul>
3928 <li class="table_list">560dpi or higher on small/normal screens</li>
3929 <li class="table_list">400dpi or higher on large screens</li>
3930 <li class="table_list">xhdpi or higher on extra large screens</li></ul></td>
3931 <td>1344MB</td>
3932 <td>1824MB</td>
3933 </tr>
3934</table>
3935
3936
3937<p>The minimum memory values MUST be in addition to any memory space already
3938dedicated to hardware components such as radio, video, and so on that is not
3939under the kernel&rsquo;s control.</p>
3940
3941<p>Device implementations with less than 512MB of memory available to the kernel
3942and userspace, unless an Android Watch, MUST return the value "true" for
3943ActivityManager.isLowRamDevice().</p>
3944
3945<p>Android Television devices MUST have at least 5GB and other device
3946implementations MUST have at least 1.5GB of non-volatile storage available for
3947application private data. That is, the /data partition MUST be at least 5GB for
3948Android Television devices and at least 1.5GB for other device implementations.
3949Device implementations that run Android are <strong>very strongly encouraged</strong> to have at least 3GB of non-volatile storage for application private data so
3950they will be able to upgrade to the future platform releases.</p>
3951
3952<p>The Android APIs include a Download Manager that applications MAY use to
3953download 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
3954downloading individual files of at least 100MB in size to the default &ldquo;cache"
3955location.</p>
3956
3957<h3 id="7_6_2_application_shared_storage">7.6.2. Application Shared Storage</h3>
3958
3959
3960<p>Device implementations MUST offer shared storage for applications also often
3961referred as &ldquo;shared external storage&rdquo;. </p>
3962
3963<p>Device implementations MUST be configured with shared storage mounted by
3964default, &ldquo;out of the box&rdquo;. If the shared storage is not mounted on the Linux
3965path /sdcard, then the device MUST include a Linux symbolic link from /sdcard
3966to the actual mount point.</p>
3967
3968<p>Device implementations MAY have hardware for user-accessible removable storage,
3969such as a Secure Digital (SD) card slot. If this slot is used to satisfy the
3970shared storage requirement, the device implementation:</p>
3971
3972<ul>
3973 <li>MUST implement a toast or pop-up user interface warning the user when there is
3974no SD card.</li>
3975 <li>MUST include a FAT-formatted SD card 1GB in size or larger OR show on the box
3976and other material available at time of purchase that the SD card has to be
3977separately purchased.</li>
3978 <li>MUST mount the SD card by default.</li>
3979</ul>
3980
3981<p>Alternatively, device implementations MAY allocate internal (non-removable)
3982storage as shared storage for apps as included in the upstream Android Open
3983Source Project; device implementations SHOULD use this configuration and
3984software implementation. If a device implementation uses internal
3985(non-removable) storage to satisfy the shared storage requirement, that storage
3986MUST be 1GB in size or larger and mounted on /sdcard (or /sdcard MUST be a
3987symbolic link to the physical location if it is mounted elsewhere).</p>
3988
3989<p>Device implementations MUST enforce as documented the
3990android.permission.WRITE_EXTERNAL_STORAGE permission on this shared storage.
3991Shared storage MUST otherwise be writable by any application that obtains that
3992permission.</p>
3993
3994<p>Device implementations that include multiple shared storage paths (such as both
3995an SD card slot and shared internal storage) MUST NOT allow Android
3996applications to write to the secondary external storage, except for their
3997package-specific directories on the secondary external storage, but SHOULD
3998expose content from both storage paths transparently through Android&rsquo;s media
3999scanner service and android.provider.MediaStore.</p>
4000
4001<p>Regardless of the form of shared storage used, if the device implementation
4002has a USB port with USB peripheral mode support, it MUST provide some mechanism
4003to access the contents of shared storage from a host computer. Device
4004implementations MAY use USB mass storage, but SHOULD use Media Transfer Protocol
4005to satisfy this requirement. If the device implementation supports Media
4006Transfer Protocol, it:</p>
4007
4008<ul>
4009 <li>SHOULD be compatible with the reference Android MTP host, Android File Transfer
4010[<a href="http://www.android.com/filetransfer">Resources, 96</a>].</li>
4011 <li>SHOULD report a USB device class of 0x00.</li>
4012 <li>SHOULD report a USB interface name of 'MTP'.</li>
4013</ul>
4014
4015<h2 id="7_7_usb">7.7. USB</h2>
4016
4017
4018<p>Device implementations SHOULD support USB peripheral mode and SHOULD support
4019USB host mode.</p>
4020
4021<p>If a device implementation includes a USB port supporting peripheral mode:</p>
4022
4023<ul>
4024 <li>The port MUST be connectable to a USB host that has a standard type-A or type
4025-C USB port.</li>
4026 <li>The port SHOULD use micro-A, micro-AB or type-C USB form factor. Existing and
4027new Android devices are <strong>very strongly encouraged to meet these requirements</strong> so they will be able to upgrade to the future platform releases.</li>
4028 <li>The port SHOULD be centered in the middle of an edge. Device implementations
4029SHOULD either locate the port on the bottom of the device (according to natural
4030orientation) or enable software screen rotation for all apps (including home
4031screen), so that the display draws correctly when the device is oriented with
4032the 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.</li>
4033 <li>It MUST allow a USB host connected with the Android device to access the
4034contents of the shared storage volume using either USB mass storage or Media
4035Transfer Protocol.</li>
4036 <li>It SHOULD implement the Android Open Accessory (AOA) API and specification as
4037documented in the Android SDK documentation, and if it is an Android Handheld
4038device it MUST implement the AOA API. Device implementations implementing the
4039AOA specification:
4040 <ul>
4041 <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>].</li>
4042 <li>MUST implement the USB audio class as documented in the Android SDK
4043documentation [<a href="http://developer.android.com/reference/android/hardware/usb/UsbConstants.html#USB_CLASS_AUDIO">Resources, 98</a>].</li>
4044 </ul></li>
4045 <li>It SHOULD implement support to draw 1.5 A current during HS chirp and traffic
4046as 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.</li>
4047 <li>The value of iSerialNumber in USB standard device descriptor MUST be equal to
4048the value of android.os.Build.SERIAL.</li>
4049</ul>
4050
4051<p>If a device implementation includes a USB port supporting host mode, it:</p>
4052
4053<ul>
4054 <li>SHOULD use a type-C USB port, if the device implementation supports USB 3.1.</li>
4055 <li>MAY use a non-standard port form factor, but if so MUST ship with a cable or
4056cables adapting the port to a standard type-A or type-C USB port.</li>
4057 <li>MAY use a micro-AB USB port, but if so SHOULD ship with a cable or cables
4058adapting the port to a standard type-A or type-C USB port.</li>
4059 <li>is <strong>very strongly RECOMMENDED</strong> to implement the USB audio class as documented in the Android SDK
4060documentation [<a href="http://developer.android.com/reference/android/hardware/usb/UsbConstants.html#USB_CLASS_AUDIO">Resources, 98</a>].</li>
4061 <li>MUST implement the Android USB host API as documented in the Android SDK, and
4062MUST 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>].</li>
4063 <li>SHOULD support the Charging Downstream Port output current range of 1.5 A ~ 5 A
4064as 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>].</li>
4065</ul>
4066
4067<h2 id="7_8_audio">7.8. Audio</h2>
4068
4069
4070<h3 id="7_8_1_microphone">7.8.1. Microphone</h3>
4071
4072<div class="note">
4073<p>Android Handheld, Watch, and Automotive implementations MUST include a
4074microphone.</p>
4075</div>
4076
4077
4078<p>Device implementations MAY omit a microphone. However, if a device
4079implementation omits a microphone, it MUST NOT report the
4080android.hardware.microphone feature constant, and MUST implement the audio
4081recording API at least as no-ops, per <a href="#7_hardware_compatibility">section 7</a>. Conversely, device implementations that do possess a microphone:</p>
4082
4083<ul>
4084 <li>MUST report the android.hardware.microphone feature constant
4085 <li>MUST meet the audio recording requirements in <a href="#5_4_audio_recording">section 5.4</a>
4086 <li>MUST meet the audio latency requirements in <a href="#5_6_audio_latency">section 5.6</a>
4087</ul>
4088
4089<h3 id="7_8_2_audio_output">7.8.2. Audio Output</h3>
4090
4091<div class="note">
4092<p>Android Watch devices MAY include an audio output.</p>
4093</div>
4094
4095<p>Device implementations including a speaker or with an audio/multimedia output
4096port for an audio output peripheral as a headset or an external speaker:</p>
4097
4098<ul>
4099 <li>MUST report the android.hardware.audio.output feature constant.</li>
4100 <li>MUST meet the audio playback requirements in <a href="#5_5_audio_playback">section 5.5</a>.</li>
4101 <li>MUST meet the audio latency requirements in <a href="#5_6_audio_latency">section 5.6</a>.</li>
4102</ul>
4103
4104<p>Conversely, if a device implementation does not include a speaker or audio
4105output port, it MUST NOT report the android.hardware.audio output feature, and
4106MUST implement the Audio Output related APIs as no-ops at least. </p>
4107
4108<p>Android Watch device implementation MAY but SHOULD NOT have audio output, but
4109other types of Android device implementations MUST have an audio output and
4110declare android.hardware.audio.output.</p>
4111
4112<h4 id="7_8_2_1_analog_audio_ports">7.8.2.1. Analog Audio Ports</h4>
4113
4114
4115<p>In order to be compatible with the headsets and other audio accessories using
4116the 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
4117one of the audio port(s) SHOULD be a 4 conductor 3.5mm audio jack. If a device
4118implementation has a 4 conductor 3.5mm audio jack, it:</p>
4119
4120<ul>
4121 <li>MUST support audio playback to stereo headphones and stereo headsets with a
4122microphone, and SHOULD support audio recording from stereo headsets with a
4123microphone.</li>
4124 <li>MUST support TRRS audio plugs with the CTIA pin-out order, and SHOULD support
4125audio plugs with the OMTP pin-out order.</li>
4126 <li>MUST support the detection of microphone on the plugged in audio accessory, if
4127the device implementation supports a microphone, and broadcast the
4128android.intent.action.HEADSET_PLUG with the extra value microphone set as 1.</li>
4129 <li>SHOULD support the detection and mapping to the keycodes for the following 3
4130ranges of equivalent impedance between the microphone and ground conductors on
4131the audio plug:
4132 <ul>
4133 <li><strong>70 ohm or less</strong>: KEYCODE_HEADSETHOOK</li>
Glenn Kasten54e6ac12015-08-12 09:07:12 -07004134 <li><strong>210&#45;290 Ohm</strong>: KEYCODE_VOLUME_UP</li>
Unsuk Jung5bc81142015-07-16 22:27:20 -07004135 <li><strong>360&#45;680 Ohm</strong>: KEYCODE_VOLUME_DOWN</li>
4136 </ul></li>
4137 <li>SHOULD support the detection and mapping to the keycode for the following range
4138of equivalent impedance between the microphone and ground conductors on the
4139audio plug:
4140 <ul>
4141 <li><strong>110&#45;180 Ohm: </strong>KEYCODE_VOICE_ASSIST</li>
4142 </ul></li>
4143 <li>MUST trigger ACTION_HEADSET_PLUG upon a plug insert, but only after all
4144contacts on plug are touching their relevant segments on the jack.</li>
4145 <li>MUST be capable of driving at least 150mV +/- 10% of output voltage on a 32 Ohm
4146speaker impedance.</li>
4147 <li>MUST have a microphone bias voltage between 1.8V ~ 2.9V.</li>
4148</ul>
4149
4150<h1 id="8_performance_compatibility">8. Performance Compatibility</h1>
4151
4152
4153<p>Some minimum performance criterias are critical to the user experience and
4154impacts the baseline assumptions developers would have when developing an app.
4155Android Watch devices SHOULD and other type of device implementations MUST meet
4156the following criteria:</p>
4157
4158<h2 id="8_1_user_experience_consistency">8.1. User Experience Consistency</h2>
4159
4160
4161<p>Device implementations MUST provide a smooth user interface by ensuring a
4162consistent frame rate and response times for applications and games. Device
4163implementations MUST meet the following requirements: </p>
4164
4165<ul>
4166 <li><strong>Consistent frame latency</strong>. Inconsistent frame latency or a delay to render frames MUST NOT happen more
4167often than 5 frames in a second, and SHOULD be below 1 frames in a second.</li>
4168 <li><strong>User interface latency</strong>. Device implementations MUST ensure low latency user experience by scrolling a
4169list of 10K list entries as defined by the Android Compatibility Test Suite
4170(CTS) in less than 36 secs.</li>
4171 <li><strong>Task switching</strong>. When multiple applications have been launched, re-launching an already-running
4172application after it has been launched MUST take less than 1 second.</li>
4173</ul>
4174
4175<h2 id="8_2_file_i_o_access_performance">8.2. File I/O Access Performance</h2>
4176
4177
4178<p>Device implementations MUST ensure internal storage file access performance consistency for read
4179and write operations. </p>
4180
4181<ul>
4182 <li><strong>Sequential write</strong>. Device implementations MUST ensure a sequential write performance of at least 5MB/s
4183for a 256MB file using 10MB write buffer.</li>
4184 <li><strong>Random write</strong>. Device implementations MUST ensure a random write performance of at least 0.5MB/s for a
4185256MB file using 4KB write buffer.</li>
4186 <li><strong>Sequential read</strong>. Device implementations MUST ensure a sequential read performance of at least 15MB/s for
4187a 256MB file using 10MB write buffer.</li>
4188 <li><strong>Random read</strong>. Device implementations MUST ensure a random read performance of at least 3.5MB/s for a
4189256MB file using 4KB write buffer.</li>
4190</ul>
4191
4192<h1 id="9_security_model_compatibility">9. Security Model Compatibility</h1>
4193
4194
4195<p>Device implementations MUST implement a security model consistent with the
4196Android platform security model as defined in Security and Permissions
4197reference 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
4198installation of self-signed applications without requiring any additional
4199permissions/certificates from any third parties/authorities. Specifically,
4200compatible devices MUST support the security mechanisms described in the follow
4201subsections.</p>
4202
4203<h2 id="9_1_permissions">9.1. Permissions</h2>
4204
4205
4206<p>Device implementations MUST support the Android permissions model as defined in
4207the 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
4208described in the SDK documentation; no permissions may be omitted, altered, or
4209ignored. Implementations MAY add additional permissions, provided the new
4210permission ID strings are not in the android.* namespace.</p>
4211
Svetoslav4bbf7402015-09-11 14:45:48 -07004212<p>Permissions with a protection level of dangerous are runtime permissions. Applications
4213with targetSdkVersion > 22 request them at runtime. The system MUST show a dedicated UI for the
4214user to decide whether to grant the requested runtime permissions and also provide a UI for the
4215user to manage runtime permissions. On the system there MUST be one and only one
4216implementation of both the UI for the user to accept runtime permissions and the UI for
4217the user to manage runtime permissions.</p>
4218
Unsuk Jung5bc81142015-07-16 22:27:20 -07004219<h2 id="9_2_uid_and_process_isolation">9.2. UID and Process Isolation</h2>
4220
4221
4222<p>Device implementations MUST support the Android application sandbox model, in
4223which each application runs as a unique Unixstyle UID and in a separate
4224process. Device implementations MUST support running multiple applications as
4225the same Linux user ID, provided that the applications are properly signed and
4226constructed, as defined in the Security and Permissions reference [<a href="http://developer.android.com/guide/topics/security/permissions.html">Resources, 102</a>].</p>
4227
4228<h2 id="9_3_filesystem_permissions">9.3. Filesystem Permissions</h2>
4229
4230
4231<p>Device implementations MUST support the Android file access permissions model
4232as defined in the Security and Permissions reference [<a href="http://developer.android.com/guide/topics/security/permissions.html">Resources, 102</a>].</p>
4233
4234<h2 id="9_4_alternate_execution_environments">9.4. Alternate Execution Environments</h2>
4235
4236
4237<p>Device implementations MAY include runtime environments that execute
4238applications using some other software or technology than the Dalvik Executable
4239Format or native code. However, such alternate execution environments MUST NOT
4240compromise the Android security model or the security of installed Android
4241applications, as described in this section.</p>
4242
4243<p>Alternate runtimes MUST themselves be Android applications, and abide by the
4244standard Android security model, as described elsewhere in <a href="#9_security_model_compatibility">section 9</a>.</p>
4245
4246<p>Alternate runtimes MUST NOT be granted access to resources protected by
4247permissions not requested in the runtime&rsquo;s AndroidManifest.xml file via the
Unsuk Jung2e62f9a2015-07-16 23:01:44 -07004248&lt;uses-permission&gt; mechanism.</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07004249
4250<p>Alternate runtimes MUST NOT permit applications to make use of features
4251protected by Android permissions restricted to system applications.</p>
4252
4253<p>Alternate runtimes MUST abide by the Android sandbox model. Specifically,
4254alternate runtimes:</p>
4255
4256<ul>
4257 <li>SHOULD install apps via the PackageManager into separate Android sandboxes (
4258Linux user IDs, etc.).</li>
4259 <li>MAY provide a single Android sandbox shared by all applications using the
4260alternate runtime.</li>
4261 <li>and installed applications using an alternate runtime, MUST NOT reuse the
4262sandbox of any other app installed on the device, except through the standard
4263Android mechanisms of shared user ID and signing certificate.</li>
4264 <li>MUST NOT launch with, grant, or be granted access to the sandboxes
4265corresponding to other Android applications.</li>
4266 <li>MUST NOT be launched with, be granted, or grant to other applications any
4267privileges of the superuser (root), or of any other user ID.</li>
4268</ul>
4269
4270<p>The .apk files of alternate runtimes MAY be included in the system image of a
4271device implementation, but MUST be signed with a key distinct from the key used
4272to sign other applications included with the device implementation.</p>
4273
4274<p>When installing applications, alternate runtimes MUST obtain user consent for
4275the Android permissions used by the application. If an application needs to
4276make use of a device resource for which there is a corresponding Android
4277permission (such as Camera, GPS, etc.), the alternate runtime MUST inform the
4278user that the application will be able to access that resource. If the runtime
4279environment does not record application capabilities in this manner, the
4280runtime environment MUST list all permissions held by the runtime itself when
4281installing any application using that runtime.</p>
4282
4283<h2 id="9_5_multi-user_support">9.5. Multi-User Support</h2>
4284
4285<div class="note">
4286<p>This feature is optional for all device types.</p>
4287</div>
4288
4289
4290<p>Android includes support for multiple users and provides support for full user
4291isolation [<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
4292the following requirements related to multi-user support [<a href="http://source.android.com/devices/storage/">Resources, 104</a>]:</p>
4293
4294<ul>
4295 <li>Device implementations that do not declare the android.hardware.telephony
4296feature flag MUST support restricted profiles, a feature that allows device
4297owners to manage additional users and their capabilities on the device. With
4298restricted profiles, device owners can quickly set up separate environments for
4299additional users to work in, with the ability to manage finer-grained
4300restrictions in the apps that are available in those environments.</li>
4301 <li>Conversely device implementations that declare the android.hardware.telephony
4302feature flag MUST NOT support restricted profiles but MUST align with the AOSP
4303implementation of controls to enable /disable other users from accessing the
4304voice calls and SMS.</li>
4305 <li>Device implementations MUST, for each user, implement a security model
4306consistent with the Android platform security model as defined in Security and
4307Permissions reference document in the APIs [<a href="http://developer.android.com/guide/topics/security/permissions.html">Resources, 102</a>].</li>
4308 <li>Device implementations MAY support creating users and managed profiles via the
4309android.app.admin.DevicePolicyManager APIs, and if supported, MUST declare the
4310platform feature flag android.software.managed_users.
4311 <li>Device implementations that declare the feature flag
4312android.software.managed_users MUST use the upstream AOSP icon badge to
Glenn Kasten54e6ac12015-08-12 09:07:12 -07004313represent the managed applications and other badge UI elements like Recents &amp;
Unsuk Jung5bc81142015-07-16 22:27:20 -07004314Notifications.</li>
4315 <li>Each user instance on an Android device MUST have separate and isolated
4316external storage directories. Device implementations MAY store multiple users'
4317data on the same volume or filesystem. However, the device implementation MUST
4318ensure that applications owned by and running on behalf a given user cannot
4319list, read, or write to data owned by any other user. Note that removable
4320media, such as SD card slots, can allow one user to access another&rsquo;s data by
4321means of a host PC. For this reason, device implementations that use removable
4322media for the external storage APIs MUST encrypt the contents of the SD card if
4323multiuser is enabled using a key stored only on non-removable media accessible
4324only to the system. As this will make the media unreadable by a host PC, device
4325implementations will be required to switch to MTP or a similar system to
4326provide host PCs with access to the current user&rsquo;s data. Accordingly, device
4327implementations MAY but SHOULD NOT enable multi-user if they use removable
4328media [<a href="http://developer.android.com/reference/android/os/Environment.html">Resources, 105</a>] for primary external storage.</li>
4329</ul>
4330
4331<h2 id="9_6_premium_sms_warning">9.6. Premium SMS Warning</h2>
4332
4333
4334<p>Android includes support for warning users of any outgoing premium SMS message
4335[<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
4336carrier that may incur a charge to the user. Device implementations that
4337declare support for android.hardware.telephony MUST warn users before sending a
4338SMS message to numbers identified by regular expressions defined in
4339/data/misc/sms/codes.xml file in the device. The upstream Android Open Source
4340Project provides an implementation that satisfies this requirement.</p>
4341
4342<h2 id="9_7_kernel_security_features">9.7. Kernel Security Features</h2>
4343
4344
4345<p>The Android Sandbox includes features that can use the Security-Enhanced Linux
4346(SELinux) mandatory access control (MAC) system and other security features in
4347the Linux kernel. SELinux or any other security features, if implemented below
4348the Android framework:</p>
4349
4350<ul>
4351 <li>MUST maintain compatibility with existing applications.</li>
4352 <li>MUST NOT have a visible user interface when a security violation is detected
4353and successfully blocked, but MAY have a visible user interface when an
4354unblocked security violation occurs resulting in a successful exploit.</li>
4355 <li>SHOULD NOT be user or developer configurable.</li>
4356</ul>
4357
4358<p>If any API for configuration of policy is exposed to an application that can
4359affect another application (such as a Device Administration API), the API MUST
4360NOT allow configurations that break compatibility.</p>
4361
4362<p>Devices MUST implement SELinux or an equivalent mandatory access control system
4363if using a kernel other than Linux and meet the following requirements, which
4364are satisfied by the reference implementation in the upstream Android Open
4365Source Project.</p>
4366
4367<p>Device implementations:</p>
4368
4369<ul>
4370 <li>MUST support a SELinux policy that allows the SELinux mode to be set on a
4371per-domain basis, and MUST configure all domains in enforcing mode. No
4372permissive mode domains are allowed, including domains specific to a
4373device/vendor.</li>
4374 <li>SHOULD load policy from /sepolicy file on the device.</li>
4375 <li>MUST NOT modify, omit, or replace the neverallow rules present within the
4376sepolicy file provided in the upstream Android Open Source Project (AOSP) and
4377the policy MUST compile with all neverallow present, for both AOSP SELinux
4378domains as well as device/vendor specific domains.</li>
4379 <li>MUST support dynamic updates of the SELinux policy file without requiring a
4380system image update.</li>
4381</ul>
4382
4383<p>Device implementations SHOULD retain the default SELinux policy provided in the
4384upstream Android Open Source Project, until they have first audited their
4385additions to the SELinux policy. Device implementations MUST be compatible with
4386the upstream Android Open Source Project.</p>
4387
4388<h2 id="9_8_privacy">9.8. Privacy</h2>
4389
4390<p>If the device implements functionality in the system that captures the contents
4391displayed on the screen and/or records the audio stream played on the device,
4392it MUST continuously notify the user whenever this functionality is enabled and
4393actively capturing/recording.</p>
4394
4395<p>If a device implementation has a mechanism that routes network data traffic
4396through a proxy server or VPN gateway by default (for example, preloading a VPN
4397service with android.permission.CONTROL_VPN granted), the device implementation
4398MUST ask for the user's consent before enabling that mechanism.</p>
4399
4400<h2 id="9_9_full-disk_encryption">9.9. Full-Disk Encryption</h2>
4401
4402<div class="note">
4403<p>Optional for Android device implementations without a lock screen.</p>
4404</div>
4405
4406
4407<p>If the device implementation supports a lock screen with PIN (numeric) or
4408PASSWORD (alphanumeric), the device MUST support full-disk encryption of the
4409application private data (/data partition), as well
4410as the SD card partition if it is a permanent, non-removable part of the device
4411[<a href="http://source.android.com/devices/tech/security/encryption/index.html">Resources, 107</a>]. For devices supporting full-disk encryption, the full-disk encryption SHOULD
4412be enabled all the time after the user has completed the out-of-box experience.
4413While this requirement is stated as SHOULD for this version of the Android
4414platform, it is <strong>very strongly RECOMMENDED</strong> as we expect this to change to MUST in the future versions of Android.
4415Encryption MUST use AES with a key of 128-bits (or greater) and a mode designed
4416for storage (for example, AES-XTS, AES-CBC-ESSIV). The encryption key MUST NOT
4417be written to storage at any time without being encrypted. Other than when in
4418active use, the encryption key SHOULD be AES encrypted with the lockscreen
4419passcode stretched using a slow stretching algorithm (e.g. PBKDF2 or scrypt).
4420If the user has not specified a lockscreen passcode or has disabled use of the
4421passcode for encryption, the system SHOULD use a default passcode to wrap the
4422encryption key. If the device provides a hardware-backed keystore, the password
4423stretching algorithm MUST be cryptographically bound to that keystore. The
4424encryption key MUST NOT be sent off the device (even when wrapped with the user
4425passcode and/or hardware bound key). The upstream Android Open Source project
Clay Murphyf4fa6bc2015-08-28 17:20:31 -07004426provides a preferred implementation of this feature based on the Linux kernel
Unsuk Jung5bc81142015-07-16 22:27:20 -07004427feature dm-crypt.</p>
4428
4429<h2 id="9_10_verified_boot">9.10. Verified Boot</h2>
4430
4431<p>
4432Verified boot is a feature that guarantees the integrity of the device software.
4433If a device implementation supports the feature, it MUST:
Glenn Kasten54e6ac12015-08-12 09:07:12 -07004434</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07004435<ul>
4436<li>Declare the platform feature flag android.software.verified_boot</li>
4437<li>Perform verification on every boot sequence</li>
Clay Murphyf4fa6bc2015-08-28 17:20:31 -07004438<li>Start verification from an immutable hardware key that is the root of trust,
4439and go all the way up to the system partition</li>
Unsuk Jung5bc81142015-07-16 22:27:20 -07004440<li>Implement each stage of verification to check the integrity and authenticity
4441of all the bytes in the next stage before executing the code in the next stage</li>
4442<li>Use verification algorithms as strong as current recommendations
4443from NIST for hashing algorithms (SHA-256) and public key sizes (RSA-2048)</li>
4444</ul>
Unsuk Jung5bc81142015-07-16 22:27:20 -07004445
Clay Murphyf4fa6bc2015-08-28 17:20:31 -07004446<p>The upstream Android Open Source Project provides a preferred implementation of this
4447feature based on the Linux kernel feature dm-verity.</p>
4448
4449<p>Starting from Android 6.0, device implementations with Advanced Encryption Standard (AES)
4450crypto perfomance above 50MiB/seconds MUST support verified boot for device integrity.
4451If a device implementation is already launched without supporting verified boot on an earlier
4452version of Android, such a device can not add support for this feature with a system software
4453update and thus are exempted from the requirement.</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07004454
4455<h1 id="10_software_compatibility_testing">10. Software Compatibility Testing</h1>
4456
4457
4458<p>Device implementations MUST pass all tests described in this section.</p>
4459
4460<p>However, note that no software test package is fully comprehensive. For this
4461reason, device implementers are <strong>very strongly encouraged</strong> to make the minimum number of changes as possible to the reference and
4462preferred implementation of Android available from the Android Open Source
4463Project. This will minimize the risk of introducing bugs that create
4464incompatibilities requiring rework and potential device updates.</p>
4465
4466<h2 id="10_1_compatibility_test_suite">10.1. Compatibility Test Suite</h2>
4467
4468
4469<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
4470software on the device. Additionally, device implementers SHOULD use the
4471reference implementation in the Android Open Source tree as much as possible,
4472and MUST ensure compatibility in cases of ambiguity in CTS and for any
4473reimplementations of parts of the reference source code.</p>
4474
4475<p>The CTS is designed to be run on an actual device. Like any software, the CTS
4476may itself contain bugs. The CTS will be versioned independently of this
4477Compatibility Definition, and multiple revisions of the CTS may be released for
4478Android ANDROID_VERSION. Device implementations MUST pass the latest CTS version available
4479at the time the device software is completed.</p>
4480
4481<h2 id="10_2_cts_verifier">10.2. CTS Verifier</h2>
4482
4483
4484<p>Device implementations MUST correctly execute all applicable cases in the CTS
4485Verifier. The CTS Verifier is included with the Compatibility Test Suite, and
4486is intended to be run by a human operator to test functionality that cannot be
4487tested by an automated system, such as correct functioning of a camera and
4488sensors.</p>
4489
4490<p>The CTS Verifier has tests for many kinds of hardware, including some hardware
4491that is optional. Device implementations MUST pass all tests for hardware that
4492they possess; for instance, if a device possesses an accelerometer, it MUST
4493correctly execute the Accelerometer test case in the CTS Verifier. Test cases
4494for features noted as optional by this Compatibility Definition Document MAY be
4495skipped or omitted.</p>
4496
4497<p>Every device and every build MUST correctly run the CTS Verifier, as noted
4498above. However, since many builds are very similar, device implementers are not
4499expected to explicitly run the CTS Verifier on builds that differ only in
4500trivial ways. Specifically, device implementations that differ from an
4501implementation that has passed the CTS Verifier only by the set of included
4502locales, branding, etc. MAY omit the CTS Verifier test.</p>
4503
4504<h1 id="11_updatable_software">11. Updatable Software</h1>
4505
4506
4507<p>Device implementations MUST include a mechanism to replace the entirety of the
4508system software. The mechanism need not perform &ldquo;live&rdquo; upgrades&mdash;that is, a
4509device restart MAY be required.</p>
4510
4511<p>Any method can be used, provided that it can replace the entirety of the
4512software preinstalled on the device. For instance, any of the following
4513approaches will satisfy this requirement:</p>
4514
4515<ul>
4516 <li>&ldquo;Over-the-air (OTA)&rdquo; downloads with offline update via reboot</li>
4517 <li>&ldquo;Tethered&rdquo; updates over USB from a host PC</li>
4518 <li>&ldquo;Offline&rdquo; updates via a reboot and update from a file on removable storage</li>
4519</ul>
4520
4521<p>However, if the device implementation includes support for an unmetered data
4522connection such as 802.11 or Bluetooth PAN (Personal Area Network) profile:</p>
4523
4524<ul>
4525<li>Android Automotive implementations SHOULD support OTA downloads with offline
4526update via reboot.</li>
4527<li>All other device implementations MUST support OTA downloads with offline
4528update via reboot.</li>
4529</ul>
4530
4531<p>The update mechanism used MUST support updates without wiping user data. That
4532is, the update mechanism MUST preserve application private data and application
4533shared data. Note that the upstream Android software includes an update
4534mechanism that satisfies this requirement.</p>
4535
4536<p>For device implementations that are launching with Android ANDROID_VERSION and later, the
4537update mechanism SHOULD support verifying that the system image is binary
4538identical to expected result following an OTA. The block-based OTA
4539implementation in the upstream Android Open Source Project, added since Android
45405.1, satisfies this requirement.</p>
4541
4542<p>If an error is found in a device implementation after it has been released but
4543within its reasonable product lifetime that is determined in consultation with
4544the Android Compatibility Team to affect the compatibility of third-party
4545applications, the device implementer MUST correct the error via a software
4546update available that can be applied per the mechanism just described.</p>
4547
4548<h1 id="12_document_changelog">12. Document Changelog</h1>
4549
4550
4551<p>The following table contains a summary of the changes to the Compatibility
4552Definition in this release. </p>
4553<table>
4554 <tr>
4555 <th>Section</th>
4556 <th>Summary of change</th>
4557 </tr>
4558 <tr>
4559 <td>2. Device Types</td>
4560 <td>Added definition for Android automotive implementation.</td>
4561 </tr>
4562 <tr>
4563 <td>2.1 Device Configurations</td>
4564 <td>Added column for Android automotive implementation.</td>
4565 </tr>
4566 <tr>
4567 <td>3.3.2. 32-bit ARM Native Code Compatibility</td>
4568 <td>New section added.</td>
4569 </tr>
4570 <tr>
4571 <td>3.4.1. WebView Compatibility</td>
4572 <td>Updated webview user agent string requirement to accomodate upstream
4573 implementation change.</td>
4574 </tr>
4575 <tr>
4576 <td>3.4.2. Browser compatibility</td>
4577 <td>Added Android automotive implementations as another case that MAY omit a
4578 browser application.</td>
4579 </tr>
4580 <tr>
4581 <td>3.7. Runtime Compatibility</td>
4582 <td>Updated required runtime heap size for smaller screens and added requirement
4583 for the new dpi bucket (280dpi).</td>
4584 </tr>
4585 <tr>
4586 <td>3.8.3. Notifications</td>
4587 <td>Clarified notification requirement for Android Watch, Television and
4588 Automotive implementations.</td>
4589 </tr>
4590 <tr>
4591 <td>3.8.10. Lock Screen Media Control<</td>
4592 <td>Clarified requirement for Android Watch and Automotive implementations.</td>
4593 </tr>
4594 <tr>
4595 <td>3.8.13. Unicode and font</td>
4596 <td>Relaxed Emoji character input method requirement.</td>
4597 </tr>
4598 <tr>
4599 <td>3.9. Device Administration</td>
4600 <td>Clarified condition when the full range of device administration policies
4601 has to be supported.</td>
4602 </tr>
4603 <tr>
4604 <td>3.10. Accessibility</td>
4605 <td>Added Android automotive requirements.</td>
4606 </tr>
4607 <tr>
4608 <td>3.11. Text-To-Speech</td>
4609 <td>Added Android automotive requirements.</td>
4610 </tr>
4611 <tr>
4612 <td>5.1. Media Codecs</td>
4613 <td>Mandated decoding support for codecs reported by CamcorderProfile.</td>
4614 </tr>
4615 <tr>
4616 <td>5.1.3 Video Codecs</td>
4617 <td>Added Android automotive requirements.</td>
4618 </tr>
4619 <tr>
4620 <td>7.1.1.3. Screen Density</td>
4621 <td>Added a new screen dpi (280dpi).</td>
4622 </tr>
4623 <tr>
4624 <td>7.1.5. Legacy Application Compatibility Mode</td>
4625 <td>Added Android automotive requirements.</td>
4626 </tr>
4627 <tr>
4628 <td>7.2 Input Devices</td>
4629 <td>Added general introduction statement.</td>
4630 </tr>
4631 <tr>
4632 <td>7.2.1. Keyboard</td>
4633 <td>Added Android Automotive requirements.</td>
4634 </tr>
4635 <tr>
4636 <td>7.2.3. Navigation Keys</td>
4637 <td>Added Android Automotive requirements.</td>
4638 </tr>
4639 <tr>
4640 <td>7.3.1. Accelerometer</td>
4641 <td>Relaxed requirement for reporting frequency on Android Watch.</td>
4642 </tr>
4643 <tr>
4644 <td>7.3.4. Gyroscope</td>
4645 <td>Relaxed requirement for reporting frequency on Android Watch.</td>
4646 </tr>
4647 <tr>
4648 <td>7.4.3 Bluetooth</td>
4649 <td>Added Android Automotive requirements.</td>
4650 </tr>
4651 <tr>
4652 <td>7.4.4. Near-Field Communications</td>
4653 <td>Clarified condition for when Host Card Emulation is a requirement.</td>
4654 </tr>
4655 <tr>
4656 <td>7.6.1. Minimum Memory and Storage</td>
4657 <td>Updated minimum memory requirements for lower resulution screen devices
4658 and added hard-limit requirement isLowRamDevice().</td>
4659 </tr>
4660 <tr>
4661 <td>7.6.2. Application Shared Storage</td>
4662 <td>Updated requirements when support for host machine access is mandatory.</td>
4663 </tr>
4664 <tr>
4665 <td>7.8.1. Microphone</td>
4666 <td>Added Android Automotive requirements.</td>
4667 </tr>
4668 <tr>
4669 <td>8.2. File I/O Access Performance</td>
4670 <td>Clarified requirements.</td>
4671 </tr>
4672 <tr>
4673 <td>9.8. Privacy</td>
4674 <td>Added privacy requirement for preloaded VPNs.</td>
4675 </tr>
4676 <tr>
4677 <td>9.9. Full-Disk Encryption</td>
4678 <td>Clarified condition when Full-Disk encryption support is mandatory.</td>
4679 </tr>
4680 <tr>
4681 <td>9.10. Verified Boot</td>
4682 <td>Clarified definition of verified boot.</td>
4683 </tr>
4684 <tr>
4685 <td>11. Updatable Software</td>
4686 <td>Clarified the OTA download requirement is allowed but not mandatory for
4687 Android Automotive implementations.</td>
4688 </tr>
4689</table>
4690
4691
4692<h1 id="13_contact_us">13. Contact Us</h1>
4693
4694
4695<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
4696does not cover.</p>
4697
4698<h1 id="14_resources">14. Resources</h1>
4699
4700
4701<p>1. IETF RFC2119 Requirement Levels: <a href="http://www.ietf.org/rfc/rfc2119.txt">http://www.ietf.org/rfc/rfc2119.txt</a></p>
4702
4703<p>2. Android Open Source Project: <a href="http://source.android.com/">http://source.android.com/</a></p>
4704
4705<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>
4706
4707<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>
4708
4709<p>5. API definitions and documentation: <a href="http://developer.android.com/reference/packages.html">http://developer.android.com/reference/packages.html</a></p>
4710
4711<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>
4712
4713<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>
4714
4715<p>8. Android ANDROID_VERSION allowed version strings: <a href="http://source.android.com/compatibility/ANDROID_VERSION/versions.html">http://source.android.com/compatibility/ANDROID_VERSION/versions.html</a></p>
4716
4717<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>
4718
4719<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>
4720
4721<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>
4722
4723<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>
4724
4725<p>13. WebView compatibility: <a href="http://www.chromium.org/">http://www.chromium.org/</a></p>
4726
4727<p>14. HTML5: <a href="http://html.spec.whatwg.org/multipage/">http://html.spec.whatwg.org/multipage/</a></p>
4728
4729<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>
4730
4731<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>
4732
4733<p>17. HTML5/W3C geolocation API: <a href="http://www.w3.org/TR/geolocation-API/">http://www.w3.org/TR/geolocation-API/</a></p>
4734
4735<p>18. HTML5/W3C webstorage API: <a href="http://www.w3.org/TR/webstorage/">http://www.w3.org/TR/webstorage/</a></p>
4736
4737<p>19. HTML5/W3C IndexedDB API: <a href="http://www.w3.org/TR/IndexedDB/">http://www.w3.org/TR/IndexedDB/</a></p>
4738
4739<p>20. Dalvik Executable Format and bytecode specification: available in the
4740Android source code, at dalvik/docs</p>
4741
4742<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>
4743
4744<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>
4745
4746<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>
4747
4748<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>
4749
4750<p>25. Notifications Resources: <a href="https://developer.android.com/design/patterns/notifications.html">https://developer.android.com/design/patterns/notifications.html</a> </p>
4751
4752<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>
4753
4754<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>
4755
4756<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>
4757
4758<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>
4759
4760<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>
4761
4762<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>
4763
4764<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>
4765
4766<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>
4767
4768<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>
4769
4770<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>
4771
4772<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>
4773
4774<p>37. Settings.Secure LOCATION_MODE:</p>
4775
4776<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>
4777
4778<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>
4779
4780<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>
4781
4782<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>
4783
4784<p>41. Android Device Owner App:</p>
4785
4786<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>
Andy Dyer-smith3d24bbe2015-09-11 15:35:23 +01004787<p>XX. Android Device Owner Provisioning Flow:</p>
4788
4789<p><a href="http://developer.android.com/reference/android/app/admin/DevicePolicyManager.html#ACTION_PROVISION_MANAGED_DEVICE">http://developer.android.com/reference/android/app/admin/DevicePolicyManager.html#ACTION_PROVISION_MANAGED_DEVICE</a></p>
4790<p>XX. Device Owner Provisioning via NFC:</p>
4791
4792<p><a href="https://source.android.com/devices/tech/admin/provision.html#device_owner_provisioning_via_nfc">https://source.android.com/devices/tech/admin/provision.html#device_owner_provisioning_via_nfc</a></p>
4793<p>XX. Android Managed Profile Provisioning flow:</p>
4794
4795<p><a href="http://developer.android.com/reference/android/app/admin/DevicePolicyManager.html#ACTION_PROVISION_MANAGED_PROFILE">http://developer.android.com/reference/android/app/admin/DevicePolicyManager.html#ACTION_PROVISION_MANAGED_PROFILE</a></p>
4796
4797<p>XX. Android Profile Owner App:</p>
4798
4799<p><a href="http://developer.android.com/reference/android/app/admin/DevicePolicyManager.html#isProfileOwnerApp(java.lang.String)">http://developer.android.com/reference/android/app/admin/DevicePolicyManager.html#isProfileOwnerApp(java.lang.String)</a></p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07004800
4801<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>
4802
4803<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>
4804
4805<p>44. Eyes Free project: <a href="http://code.google.com/p/eyes-free/">http://code.google.com/p/eyes-free</a></p>
4806
4807<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>
4808
4809<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>
4810
4811<p>47. Reference tool documentation (for adb, aapt, ddms, systrace): <a href="http://developer.android.com/tools/help/index.html">http://developer.android.com/tools/help/index.html</a></p>
4812
4813<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>
4814
4815<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>
4816
4817<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>
4818
4819<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>
4820
4821<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>
4822
4823<p>53. Android android.content.pm.PackageManager class and Hardware Features List:</p>
4824
4825<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>
4826
4827<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>
4828
4829<p>55. ADB: <a href="http://developer.android.com/tools/help/adb.html">http://developer.android.com/tools/help/adb.html</a> </p>
4830
4831<p>56. Dumpsys: <a href="https://source.android.com/devices/input/diagnostics.html">https://source.android.com/devices/input/diagnostics.html</a> </p>
4832
4833<p>57. DDMS: <a href="http://developer.android.com/tools/debugging/ddms.html">http://developer.android.com/tools/debugging/ddms.html</a> </p>
4834
4835<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>
4836
4837<p>59. SysyTrace tool: <a href="http://developer.android.com/tools/help/systrace.html">http://developer.android.com/tools/help/systrace.html</a></p>
4838
4839<p>60. Android Application Development-Related Settings:</p>
4840
4841<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>
4842
4843<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>
4844
4845<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>
4846
4847<p>63. RenderScript: <a href="http://developer.android.com/guide/topics/renderscript/">http://developer.android.com/guide/topics/renderscript/</a></p>
4848
4849<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>
4850
4851<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>
4852
4853<p>66. EGL Extension-EGL_ANDROID_RECORDABLE:</p>
4854
4855<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>
4856
4857<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>
4858
4859<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>
4860
4861<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>
4862
4863<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>
4864
4865<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>
4866
4867<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>
4868
4869<p>73. Android Open Source sensors: <a href="http://source.android.com/devices/sensors/">http://source.android.com/devices/sensors</a></p>
4870
4871<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>
4872
4873<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>
4874
4875<p>76. Android Open Source composite sensors: <a href="http://source.android.com/devices/sensors/sensor-types.html#composite_sensor_type_summary">https://source.android.com/devices/sensors/sensor-types.html#composite_sensor_type_summary</a></p>
4876
4877<p>77. Continuous trigger mode: <a href="http://source.android.com/devices/sensors/report-modes.html#continuous">https://source.android.com/devices/sensors/report-modes.html#continuous</a></p>
4878
4879<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>
4880
4881<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>
4882
4883<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>
4884
4885<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>
4886
4887<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>
4888
4889<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>
4890
4891<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>
4892
4893<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>
4894
4895<p>86. Android NFC Sharing Settings:</p>
4896
4897<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>
4898
4899<p>87. NFC Connection Handover: <a href="http://members.nfc-forum.org/specs/spec_list/#conn_handover">http://members.nfc-forum.org/specs/spec_list/#conn_handover</a></p>
4900
4901<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>
4902
4903<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>
4904
4905<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>
4906
4907<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>
4908
4909<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>
4910
4911<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>
4912
4913<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>
4914
4915<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>
4916
4917<p>96. Android File Transfer: <a href="http://www.android.com/filetransfer">http://www.android.com/filetransfer</a></p>
4918
4919<p>97. Android Open Accessories: <a href="http://developer.android.com/guide/topics/connectivity/usb/accessory.html">http://developer.android.com/guide/topics/connectivity/usb/accessory.html</a></p>
4920
4921<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>
4922
4923<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>
4924
4925<p>100. USB Host API:<a href="http://developer.android.com/guide/topics/connectivity/usb/host.html"> http://developer.android.com/guide/topics/connectivity/usb/host.html</a></p>
4926
4927<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>
4928
4929<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>
4930
4931<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>
4932
4933<p>104. External Storage reference: <a href="http://source.android.com/devices/storage">http://source.android.com/devices/storage</a></p>
4934
4935<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>
4936
4937<p>106. SMS Short Code: <a href="http://en.wikipedia.org/wiki/Short_code">http://en.wikipedia.org/wiki/Short_code</a></p>
4938
4939<p>107. Android Open Source Encryption: <a href="http://source.android.com/devices/tech/security/encryption/index.html">http://source.android.com/devices/tech/security/encryption/index.html</a></p>
4940
4941<p>108. Android Compatibility Program Overview: <a href="http://source.android.com/compatibility/index.html">http://source.android.com/compatibility/index.html</a></p>
4942
4943<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>
4944
4945<p>110. WebM project: <a href="http://www.webmproject.org/">http://www.webmproject.org/</a> </p>
4946
4947<p>111. Android UI_MODE_TYPE_CAR API: <a href="http://developer.android.com/reference/android/content/res/Configuration.html#UI_MODE_TYPE_CAR">http://developer.android.com/reference/android/content/res/Configuration.html#UI_MODE_TYPE_CAR</a></p>
4948
4949<p>112. Android MediaCodecList API: <a href="http://developer.android.com/reference/android/media/MediaCodecList.html">http://developer.android.com/reference/android/media/MediaCodecList.html</a></p>
4950
4951<p>113. Android CamcorderProfile API: <a href="http://developer.android.com/reference/android/media/CamcorderProfile.html">http://developer.android.com/reference/android/media/CamcorderProfile.html</a></p>
4952
4953<p>Many of these resources are derived directly or indirectly from the Android
4954SDK, and will be functionally identical to the information in that SDK&rsquo;s
4955documentation. In any cases where this Compatibility Definition or the
4956Compatibility Test Suite disagrees with the SDK documentation, the SDK
4957documentation is considered authoritative. Any technical details provided in
4958the references included above are considered by inclusion to be part of this
4959Compatibility Definition.</p>
4960
4961</div>
4962</body>
4963</html>