blob: 63db045ba83c2ae7cc915ff19f5ce91dfc761833 [file] [log] [blame]
Unsuk Jung5bc81142015-07-16 22:27:20 -07001<!DOCTYPE html>
2<head>
3<title>Android ANDROID_VERSION Compatibility Definition</title>
4<link rel="stylesheet" type="text/css" href="android-cdd.css"/>
5</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
Unsuk Jung903634a2015-10-15 10:44:03 -070035<p class="toc_h4"><a href="#3_2_3_2_intent_resolution">3.2.3.2. Intent Resolution</a></p>
Unsuk Jung5bc81142015-07-16 22:27:20 -070036
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
Bert McMeen7e1c3b12015-10-08 15:57:20 -070083<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
Bert McMeen15ecb402015-10-01 13:17:55 -070087</div>
88
89<div id="toc_right">
90
Unsuk Jung5bc81142015-07-16 22:27:20 -070091
92<p class="toc_h3"><a href="#3_8_13_unicode_and_font">3.8.13. Unicode and Font</a></p>
93
Unsuk Jung5bc81142015-07-16 22:27:20 -070094<p class="toc_h2"><a href="#3_9_device_administration">3.9. Device Administration</a></p>
95
Andy Dyer-smith3d24bbe2015-09-11 15:35:23 +010096<p class="toc_h3"><a href="#3_9_1_device_provisioning">3.9.1 Device Provisioning</a></p>
97
98<p class="toc_h4"><a href="#3_9_1_2_device_owner_provisioning">3.9.1.1 Device Owner provisioning</a></p>
99
100<p class="toc_h4"><a href="#3_9_1_2_managed_profile_provisioning">3.9.1.2 Managed profile provisioning</a></p>
101
Andy Dyer-smith63b28782015-09-10 17:06:24 +0100102<p class="toc_h3"><a href="#3_9_2_managed_profile_support">3.9.2. Managed Profile Support</a></p>
103
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
Danielle Roberts239d2c72015-09-28 13:38:45 -0700111<p class="toc_h3"><a href="#3_12_1_tv_app">3.12.1. TV App</a></p>
112
113<p class="toc_h4"><a href="#3_12_1_1_electronic_program_guide">3.12.1.1. Electronic Program Guide</a></p>
114
115<p class="toc_h4"><a href="#3_12_1_2_navigation">3.12.1.2. Navigation</a></p>
116
117<p class="toc_h4"><a href="#3_12_1_3_tv_input_app_linking">3.12.1.3. TV input app linking</a></p>
118
Unsuk Jung5bc81142015-07-16 22:27:20 -0700119<p class="toc_h1"><a href="#4_application_packaging_compatibility">4. Application Packaging Compatibility</a></p>
120
121<p class="toc_h1"><a href="#5_multimedia_compatibility">5. Multimedia Compatibility</a></p>
122
123<p class="toc_h2"><a href="#5_1_media_codecs">5.1. Media Codecs</a></p>
124
125<p class="toc_h3"><a href="#5_1_1_audio_codecs">5.1.1. Audio Codecs</a></p>
126
127<p class="toc_h3"><a href="#5_1_2_image_codecs">5.1.2. Image Codecs</a></p>
128
129<p class="toc_h3"><a href="#5_1_3_video_codecs">5.1.3. Video Codecs</a></p>
130
131<p class="toc_h2"><a href="#5_2_video_encoding">5.2. Video Encoding</a></p>
132
133<p class="toc_h2"><a href="#5_3_video_decoding">5.3. Video Decoding</a></p>
134
135<p class="toc_h2"><a href="#5_4_audio_recording">5.4. Audio Recording</a></p>
136
137<p class="toc_h3"><a href="#5_4_1_raw_audio_capture">5.4.1. Raw Audio Capture</a></p>
138
139<p class="toc_h3"><a href="#5_4_2_capture_for_voice_recognition">5.4.2. Capture for Voice Recognition</a></p>
140
141<p class="toc_h3"><a href="#5_4_3_capture_for_rerouting_of_playback">5.4.3. Capture for Rerouting of Playback</a></p>
142
143<p class="toc_h2"><a href="#5_5_audio_playback">5.5. Audio Playback</a></p>
144
145<p class="toc_h3"><a href="#5_5_1_raw_audio_playback">5.5.1. Raw Audio Playback</a></p>
146
147<p class="toc_h3"><a href="#5_5_2_audio_effects">5.5.2. Audio Effects</a></p>
148
149<p class="toc_h3"><a href="#5_5_3_audio_output_volume">5.5.3. Audio Output Volume</a></p>
150
151<p class="toc_h2"><a href="#5_6_audio_latency">5.6. Audio Latency</a></p>
152
153<p class="toc_h2"><a href="#5_7_network_protocols">5.7. Network Protocols</a></p>
154
155<p class="toc_h2"><a href="#5_8_secure_media">5.8. Secure Media</a></p>
156
Glenn Kasten87ef61d2015-07-29 09:01:36 -0700157<p class="toc_h2"><a href="#5_9_midi">5.9. Musical Instrument Digital Interface (MIDI)</a></p>
158
Glenn Kasten78eccbd2015-08-12 10:18:22 -0700159<p class="toc_h2"><a href="#5_10_pro_audio">5.10. Professional Audio</a></p>
160
Bert McMeen15ecb402015-10-01 13:17:55 -0700161</div>
162
163<div style="clear: both; page-break-after:always; height:1px"></div>
164
165<div id="toc_left">
166
Unsuk Jung5bc81142015-07-16 22:27:20 -0700167<p class="toc_h1"><a href="#6_developer_tools_and_options_compatibility">6. Developer Tools and Options Compatibility</a></p>
168
169<p class="toc_h2"><a href="#6_1_developer_tools">6.1. Developer Tools</a></p>
170
171<p class="toc_h2"><a href="#6_2_developer_options">6.2. Developer Options</a></p>
172
173<p class="toc_h1"><a href="#7_hardware_compatibility">7. Hardware Compatibility</a></p>
174
175<p class="toc_h2"><a href="#7_1_display_and_graphics">7.1. Display and Graphics</a></p>
176
177<p class="toc_h3"><a href="#7_1_1_screen_configuration">7.1.1. Screen Configuration</a></p>
178
179<p class="toc_h4"><a href="#7_1_1_1_screen_size">7.1.1.1. Screen Size</a></p>
180
181<p class="toc_h4"><a href="#7_1_1_2_screen_aspect_ratio">7.1.1.2. Screen Aspect Ratio</a></p>
182
183<p class="toc_h4"><a href="#7_1_1_3_screen_density">7.1.1.3. Screen Density</a></p>
184
Unsuk Jung5bc81142015-07-16 22:27:20 -0700185<p class="toc_h3"><a href="#7_1_2_display_metrics">7.1.2. Display Metrics</a></p>
186
187<p class="toc_h3"><a href="#7_1_3_screen_orientation">7.1.3. Screen Orientation</a></p>
188
189<p class="toc_h3"><a href="#7_1_4_2d_and_3d_graphics_acceleration">7.1.4. 2D and 3D Graphics Acceleration</a></p>
190
191<p class="toc_h3"><a href="#7_1_5_legacy_application_compatibility_mode">7.1.5. Legacy Application Compatibility Mode</a></p>
192
193<p class="toc_h3"><a href="#7_1_6_screen_technology">7.1.6. Screen Technology</a></p>
194
195<p class="toc_h3"><a href="#7_1_7_external_displays">7.1.7. Secondary Displays</a></p>
196
197<p class="toc_h2"><a href="#7_2_input_devices">7.2. Input Devices</a></p>
198
199<p class="toc_h3"><a href="#7_2_1_keyboard">7.2.1. Keyboard</a></p>
200
201<p class="toc_h3"><a href="#7_2_2_non-touch_navigation">7.2.2. Non-touch Navigation</a></p>
202
203<p class="toc_h3"><a href="#7_2_3_navigation_keys">7.2.3. Navigation Keys</a></p>
204
205<p class="toc_h3"><a href="#7_2_4_touchscreen_input">7.2.4. Touchscreen Input</a></p>
206
207<p class="toc_h3"><a href="#7_2_5_fake_touch_input">7.2.5. Fake Touch Input</a></p>
208
209<p class="toc_h3"><a href="#7_2_6_game_controller_support">7.2.6. Game Controller Support</a></p>
210
211<p class="toc_h4"><a href="#7_2_6_1_button_mapping">7.2.6.1. Button Mappings</a></p>
212
213<p class="toc_h3"><a href="#7_2_7_remote_control">7.2.7. Remote Control</a></p>
214
215<p class="toc_h2"><a href="#7_3_sensors">7.3. Sensors</a></p>
216
217<p class="toc_h3"><a href="#7_3_1_accelerometer">7.3.1. Accelerometer</a></p>
218
219<p class="toc_h3"><a href="#7_3_2_magnetometer">7.3.2. Magnetometer</a></p>
220
221<p class="toc_h3"><a href="#7_3_3_gps">7.3.3. GPS</a></p>
222
Bert McMeen15ecb402015-10-01 13:17:55 -0700223</div>
224
225<div id="toc_right">
226
Unsuk Jung5bc81142015-07-16 22:27:20 -0700227<p class="toc_h3"><a href="#7_3_4_gyroscope">7.3.4. Gyroscope</a></p>
228
229<p class="toc_h3"><a href="#7_3_5_barometer">7.3.5. Barometer</a></p>
230
231<p class="toc_h3"><a href="#7_3_6_thermometer">7.3.6. Thermometer</a></p>
232
233<p class="toc_h3"><a href="#7_3_7_photometer">7.3.7. Photometer</a></p>
234
235<p class="toc_h3"><a href="#7_3_8_proximity_sensor">7.3.8. Proximity Sensor</a></p>
236
Unsuk Jung66ef8472015-09-30 04:00:08 -0700237<p class="toc_h3"><a href="#7_3_9_hifi_sensors">7.3.9. High Fidelity Sensors</a></p>
238
Unsuk Jung5b08df22015-09-29 18:50:14 -0700239<p class="toc_h3"><a href="#7_3_10_fingerprint">7.3.10. Fingerprint Sensor</a></p>
240
Unsuk Jung5bc81142015-07-16 22:27:20 -0700241<p class="toc_h2"><a href="#7_4_data_connectivity">7.4. Data Connectivity</a></p>
242
243<p class="toc_h3"><a href="#7_4_1_telephony">7.4.1. Telephony</a></p>
244
245<p class="toc_h3"><a href="#7_4_2_ieee_80211_wi-fi">7.4.2. IEEE 802.11 (Wi-Fi)</a></p>
246
247<p class="toc_h4"><a href="#7_4_2_1_wi-fi_direct">7.4.2.1. Wi-Fi Direct</a></p>
248
249<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>
250
251<p class="toc_h3"><a href="#7_4_3_bluetooth">7.4.3. Bluetooth</a></p>
252
253<p class="toc_h3"><a href="#7_4_4_near-field_communications">7.4.4. Near-Field Communications</a></p>
254
255<p class="toc_h3"><a href="#7_4_5_minimum_network_capability">7.4.5. Minimum Network Capability</a></p>
256
257<p class="toc_h3"><a href="#7_4_6_sync_settings">7.4.6. Sync Settings</a></p>
258
259<p class="toc_h2"><a href="#7_5_cameras">7.5. Cameras</a></p>
260
261<p class="toc_h3"><a href="#7_5_1_rear-facing_camera">7.5.1. Rear-Facing Camera</a></p>
262
263<p class="toc_h3"><a href="#7_5_2_front-facing_camera">7.5.2. Front-Facing Camera</a></p>
264
265<p class="toc_h3"><a href="#7_5_3_external_camera">7.5.3. External Camera</a></p>
266
267<p class="toc_h3"><a href="#7_5_4_camera_api_behavior">7.5.4. Camera API Behavior</a></p>
268
Unsuk Jung5bc81142015-07-16 22:27:20 -0700269<p class="toc_h3"><a href="#7_5_5_camera_orientation">7.5.5. Camera Orientation</a></p>
270
271<p class="toc_h2"><a href="#7_6_memory_and_storage">7.6. Memory and Storage</a></p>
272
273<p class="toc_h3"><a href="#7_6_1_minimum_memory_and_storage">7.6.1. Minimum Memory and Storage</a></p>
274
275<p class="toc_h3"><a href="#7_6_2_application_shared_storage">7.6.2. Application Shared Storage</a></p>
276
Clay Murphy0b2d3c22015-10-06 23:22:35 -0700277<p class="toc_h3"><a href="#7_6_3_adoptable_storage">7.6.3. Adoptable Storage</a></p>
278
Unsuk Jung5bc81142015-07-16 22:27:20 -0700279<p class="toc_h2"><a href="#7_7_usb">7.7. USB</a></p>
280
281<p class="toc_h2"><a href="#7_8_audio">7.8. Audio</a></p>
282
283<p class="toc_h3"><a href="#7_8_1_microphone">7.8.1. Microphone</a></p>
284
285<p class="toc_h3"><a href="#7_8_2_audio_output">7.8.2. Audio Output</a></p>
286
287<p class="toc_h4"><a href="#7_8_2_1_analog_audio_ports">7.8.2.1. Analog Audio Ports</a></p>
288
Glenn Kasten20cdbb72015-09-24 11:56:42 -0700289<p class="toc_h3"><a href="#7_8_3_near_ultrasound">7.8.3. Near-Ultrasound</a></p>
290
Danielle Roberts727f7d72015-10-09 15:29:36 -0700291<p class="toc_h1"><a href="#8_performance_power">8. Performance and Power</a></p>
Unsuk Jung5bc81142015-07-16 22:27:20 -0700292
293<p class="toc_h2"><a href="#8_1_user_experience_consistency">8.1. User Experience Consistency</a></p>
294
Bert McMeene0c79462015-10-07 14:26:16 -0700295<p class="toc_h2"><a href="#8_2_file_i_o_access_performance">8.2. File I/O Access Performance</a></p>
Unsuk Jung5bc81142015-07-16 22:27:20 -0700296
Clay Murphye97c9232015-10-07 00:28:32 -0700297<p class="toc_h2"><a href="#8_3_power_saving_modes">8.3. Power-Saving Modes</a></p>
298
299<p class="toc_h2"><a href="#8_4_power_consumption_accounting">8.4. Power Consumption Accounting</a></p>
300
Bert McMeen15ecb402015-10-01 13:17:55 -0700301</div>
302
303<div style="clear: both; page-break-after:always; height:1px"></div>
304
305<div id="toc_left">
306
Unsuk Jung5bc81142015-07-16 22:27:20 -0700307<p class="toc_h1"><a href="#9_security_model_compatibility">9. Security Model Compatibility</a></p>
308
309<p class="toc_h2"><a href="#9_1_permissions">9.1. Permissions</a></p>
310
311<p class="toc_h2"><a href="#9_2_uid_and_process_isolation">9.2. UID and Process Isolation</a></p>
312
313<p class="toc_h2"><a href="#9_3_filesystem_permissions">9.3. Filesystem Permissions</a></p>
314
315<p class="toc_h2"><a href="#9_4_alternate_execution_environments">9.4. Alternate Execution Environments</a></p>
316
317<p class="toc_h2"><a href="#9_5_multi-user_support">9.5. Multi-User Support</a></p>
318
319<p class="toc_h2"><a href="#9_6_premium_sms_warning">9.6. Premium SMS Warning</a></p>
320
321<p class="toc_h2"><a href="#9_7_kernel_security_features">9.7. Kernel Security Features</a></p>
322
323<p class="toc_h2"><a href="#9_8_privacy">9.8. Privacy</a></p>
324
325<p class="toc_h2"><a href="#9_9_full-disk-encryption">9.9. Full-Disk Encryption</a></p>
326
327<p class="toc_h2"><a href="#9_10_verified_boot">9.10. Verified Boot</a></p>
328
Unsuk Jungb5ef8ac2015-09-29 22:52:29 -0700329<p class="toc_h2"><a href="#9_11_keys_and_credentials">9.11. Keys and Credentials</a></p>
330
Bert McMeen83ceaf22015-10-06 15:34:02 -0700331<p class="toc_h2"><a href="#9_12_data_deletion">9.12. Data Deletion</a></p>
332
Unsuk Jung5bc81142015-07-16 22:27:20 -0700333<p class="toc_h1"><a href="#10_software_compatibility_testing">10. Software Compatibility Testing</a></p>
334
335<p class="toc_h2"><a href="#10_1_compatibility_test_suite">10.1. Compatibility Test Suite</a></p>
336
337<p class="toc_h2"><a href="#10_2_cts_verifier">10.2. CTS Verifier</a></p>
338
339<p class="toc_h1"><a href="#11_updatable_software">11. Updatable Software</a></p>
340
341<p class="toc_h1"><a href="#12_document_changelog">12. Document Changelog</a></p>
342
343<p class="toc_h1"><a href="#13_contact_us">13. Contact Us</a></p>
344
Unsuk Jung5bc81142015-07-16 22:27:20 -0700345</div>
346
347</div>
348
349<div style="clear: both"></div>
350
351<div id="main">
352
353<h1 id="1_introduction">1. Introduction</h1>
354
355
Heidi von Markham84564992016-02-09 10:54:20 -0800356<p>This document enumerates the requirements that must be met in order for
357devices to be compatible with Android ANDROID_VERSION.</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -0700358
Heidi von Markham84564992016-02-09 10:54:20 -0800359<p>The use of &ldquo;MUST&rdquo;, &ldquo;MUST NOT&rdquo;,
360&ldquo;REQUIRED&rdquo;, &ldquo;SHALL&rdquo;, &ldquo;SHALL NOT&rdquo;,
361&ldquo;SHOULD&rdquo;, &ldquo;SHOULD NOT&rdquo;, &ldquo;RECOMMENDED&rdquo;,
362&ldquo;MAY&rdquo;, and &ldquo;OPTIONAL&rdquo; is per the IETF standard
363defined in <a href="http://www.ietf.org/rfc/rfc2119.txt">RFC2119</a>.</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -0700364
Heidi von Markham84564992016-02-09 10:54:20 -0800365<p>As used in this document, a &ldquo;device implementer&rdquo; or
366&ldquo;implementer&rdquo; is a person or organization developing a
367hardware/software solution running Android ANDROID_VERSION. A &ldquo;device
368implementation&rdquo; or &ldquo;implementation is the hardware/software solution
Unsuk Jung5bc81142015-07-16 22:27:20 -0700369so developed.</p>
370
Heidi von Markham84564992016-02-09 10:54:20 -0800371<p>To be considered compatible with Android ANDROID_VERSION, device
372implementations MUST meet the requirements presented in this Compatibility
373Definition, including any documents incorporated via reference.</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -0700374
Heidi von Markham84564992016-02-09 10:54:20 -0800375<p>Where this definition or the software tests described in
376<a href="#10_software_compatibility_testing">section 10</a> is silent,
377ambiguous, or incomplete, it is the responsibility of the device
Unsuk Jung5bc81142015-07-16 22:27:20 -0700378implementer to ensure compatibility with existing implementations.</p>
379
Heidi von Markham84564992016-02-09 10:54:20 -0800380<p>For this reason, the <a href="http://source.android.com/">Android Open Source
381Project</a> is both the reference and preferred implementation of Android.
382Device implementers are STRONGLY RECOMMENDED to base their implementations to
383the greatest extent possible on the &ldquo;upstream&rdquo; source code available
384from the Android Open Source Project. While some components can hypothetically
385be replaced with alternate implementations, it is STRONGLY RECOMMENDED to not
386follow this practice, as passing the software tests will become substantially
387more difficult. It is the implementer&rsquo;s responsibility to ensure full
388behavioral compatibility with the standard Android implementation, including and
389beyond the Compatibility Test Suite. Finally, note that certain component
390substitutions and modifications are explicitly forbidden by this document.</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -0700391
Heidi von Markham84564992016-02-09 10:54:20 -0800392<p>Many of the resources linked to in this document are derived directly or
393indirectly from the Android SDK and will be functionally identical to the
394information in that SDK&rsquo;s documentation. In any cases where this
395Compatibility Definition or the Compatibility Test Suite disagrees with the
396SDK documentation, the SDK documentation is considered authoritative. Any
397technical details provided in the linked resources throughout this document are
398considered by inclusion to be part of this Compatibility Definition.</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -0700399
400<h1 id="2_device_types">2. Device Types</h1>
401
402
Heidi von Markham84564992016-02-09 10:54:20 -0800403<p>While the Android Open Source Project has been used in the implementation of
404a variety of device types and form factors, many aspects of the architecture and
Unsuk Jung5bc81142015-07-16 22:27:20 -0700405compatibility requirements were optimized for handheld devices. Starting from
406Android 5.0, the Android Open Source Project aims to embrace a wider variety of
407device types as described in this section.</p>
408
Heidi von Markham84564992016-02-09 10:54:20 -0800409<p><strong>Android Handheld device</strong> refers to an Android device
410implementation that is typically used by holding it in the hand, such as mp3
411players, phones, and tablets. Android Handheld device implementations:</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -0700412
413<ul>
414 <li>MUST have a touchscreen embedded in the device.</li>
415 <li>MUST have a power source that provides mobility, such as a battery.</li>
416</ul>
417
Heidi von Markham84564992016-02-09 10:54:20 -0800418<p><strong>Android Television device</strong> refers to an Android device
419implementation that is an entertainment interface for consuming digital media,
420movies, games, apps, and/or live TV for users sitting about ten feet away (a
421&ldquo;lean back&rdquo; or &ldquo;10-foot user interface&rdquo;). Android
422Television devices:</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -0700423
424<ul>
Heidi von Markham84564992016-02-09 10:54:20 -0800425 <li>MUST have an embedded screen OR include a video output port, such as VGA,
426 HDMI, or a wireless port for display.</li>
427 <li>MUST declare the features
428 <a href="http://developer.android.com/reference/android/content/pm/PackageManager.html#FEATURE_LEANBACK">android.software.leanback</a>
429 and android.hardware.type.television.</li>
Unsuk Jung5bc81142015-07-16 22:27:20 -0700430</ul>
431
Heidi von Markham84564992016-02-09 10:54:20 -0800432<p><strong>Android Watch device</strong> refers to an Android device
433implementation intended to be worn on the body, perhaps on the wrist, and:</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -0700434
435<ul>
Heidi von Markham84564992016-02-09 10:54:20 -0800436 <li>MUST have a screen with the physical diagonal length in the range from
437 1.1 to 2.5 inches.</li>
Unsuk Jung5bc81142015-07-16 22:27:20 -0700438 <li>MUST declare the feature android.hardware.type.watch.</li>
Heidi von Markham84564992016-02-09 10:54:20 -0800439 <li>MUST support uiMode =
440 <a href="http://developer.android.com/reference/android/content/res/Configuration.html#UI_MODE_TYPE_WATCH">UI_MODE_TYPE_WATCH</a>.
441 </li>
Unsuk Jung5bc81142015-07-16 22:27:20 -0700442</ul>
443
444<p><strong>Android Automotive implementation</strong> refers to a vehicle head
445unit running Android as an operating system for part or all of the system and/or
Clay Murphy6a576662015-10-07 18:35:10 -0700446infotainment functionality. Android Automotive implementations:</p>
447
448<ul>
449 <li>MUST declare the feature android.hardware.type.automotive.</li>
Heidi von Markham84564992016-02-09 10:54:20 -0800450 <li>MUST support uiMode =
451 <a href="http://developer.android.com/reference/android/content/res/Configuration.html#UI_MODE_TYPE_CAR">UI_MODE_TYPE_CAR</a>.
452 </li>
Danielle Roberts727f7d72015-10-09 15:29:36 -0700453</ul>
Unsuk Jung5bc81142015-07-16 22:27:20 -0700454
Heidi von Markham84564992016-02-09 10:54:20 -0800455<p>All Android device implementations that do not fit into any of the above
456device types still MUST meet all requirements in this document to be Android
457ANDROID_VERSION compatible, unless the requirement is explicitly described to be
458only applicable to a specific Android device type from above.</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -0700459
460<h2 id="2_1_device_configurations">2.1 Device Configurations</h2>
461
462
463<p>This is a summary of major differences in hardware configuration by device
Heidi von Markham84564992016-02-09 10:54:20 -0800464type. (Empty cells denote a &ldquo;MAY&rdquo;). Not all configurations are
465covered in this table; see relevant hardware sections for more detail.</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -0700466<table>
467 <tr>
468 <th>Category</th>
469 <th>Feature</th>
470 <th>Section</th>
471 <th>Handheld</th>
472 <th>Television</th>
473 <th>Watch</th>
474 <th>Automotive</th>
475 <th>Other</th>
476 </tr>
477 <tr>
478 <td rowspan="3">Input</td>
479 <td>D-pad</td>
480 <td><a href="#7_2_2_non-touch-navigation">7.2.2. Non-touch Navigation</a></td>
481 <td></td>
482 <td>MUST</td>
483 <td></td>
484 <td></td>
485 <td></td>
486 </tr>
487 <tr>
488 <td>Touchscreen </td>
489 <td><a href="#7_2_4_touchscreen_input">7.2.4. Touchscreen input</a></td>
490 <td>MUST</td>
491 <td></td>
492 <td>MUST</td>
493 <td></td>
494 <td>SHOULD</td>
495 </tr>
496 <tr>
497 <td>Microphone </td>
498 <td><a href="#7_8_1_microphone">7.8.1. Microphone</a></td>
499 <td>MUST</td>
500 <td>SHOULD </td>
501 <td>MUST</td>
502 <td>MUST</td>
503 <td>SHOULD</td>
504 </tr>
505 <tr>
506 <td rowspan="2">Sensors</td>
507 <td>Accelerometer </td>
508 <td><a href="#7_3_1_accelerometer">7.3.1 Accelerometer</a></td>
509 <td>SHOULD</td>
510 <td></td>
511 <td>SHOULD</td>
512 <td></td>
513 <td>SHOULD</td>
514 </tr>
515 <tr>
516 <td>GPS</td>
517 <td><a href="#7_3_3_gps">7.3.3. GPS</a></td>
518 <td>SHOULD</td>
519 <td></td>
520 <td></td>
521 <td>SHOULD</td>
522 <td></td>
523 </tr>
524 <tr>
525 <td rowspan="5">Connectivity</td>
526 <td>Wi-Fi</td>
527 <td><a href="#7_4_2_ieee_802.11">7.4.2. IEEE 802.11</a></td>
528 <td>SHOULD</td>
529 <td> MUST</td>
530 <td></td>
531 <td>SHOULD</td>
532 <td>SHOULD</td>
533 </tr>
534 <tr>
535 <td>Wi-Fi Direct</td>
536 <td><a href="#7_4_2_1_wi-fi-direct">7.4.2.1. Wi-Fi Direct</a></td>
537 <td>SHOULD</td>
538 <td>SHOULD</td>
539 <td></td>
540 <td></td>
541 <td>SHOULD</td>
542 </tr>
543 <tr>
544 <td>Bluetooth</td>
545 <td><a href="#7_4_3_bluetooth">7.4.3. Bluetooth</a></td>
546 <td>SHOULD</td>
547 <td>MUST</td>
548 <td>MUST</td>
549 <td>MUST</td>
550 <td>SHOULD</td>
551 </tr>
552 <tr>
553 <td>Bluetooth Low Energy</td>
554 <td><a href="#7_4_3_bluetooth">7.4.3. Bluetooth</a></td>
555 <td>SHOULD</td>
556 <td>MUST</td>
557 <td>SHOULD</td>
558 <td>SHOULD</td>
559 <td>SHOULD</td>
560 </tr>
561 <tr>
562 <td>USB peripheral/host mode</td>
563 <td><a href="#7_7_usb">7.7. USB</a></td>
564 <td>SHOULD</td>
565 <td></td>
566 <td></td>
567 <td>SHOULD</td>
568 <td>SHOULD</td>
569 </tr>
570 <tr>
571 <td>Output</td>
572 <td>Speaker and/or Audio output ports</td>
573 <td><a href="#7_8_2_audio_output">7.8.2. Audio Output</a></td>
574 <td>MUST</td>
575 <td>MUST</td>
576 <td></td>
577 <td>MUST</td>
578 <td>MUST</td>
579 </tr>
580</table>
581
582
583<h1 id="3_software">3. Software</h1>
584
585
586<h2 id="3_1_managed_api_compatibility">3.1. Managed API Compatibility</h2>
587
588
589<p>The managed Dalvik bytecode execution environment is the primary vehicle for
590Android applications. The Android application programming interface (API) is
591the set of Android platform interfaces exposed to applications running in the
592managed runtime environment. Device implementations MUST provide complete
593implementations, including all documented behaviors, of any documented API
Heidi von Markham84564992016-02-09 10:54:20 -0800594exposed by the
595<a href="http://developer.android.com/reference/packages.html">Android SDK</a>
596or any API decorated with the &ldquo;@SystemApi&rdquo; marker in the upstream
597Android source code.</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -0700598
Heidi von Markham84564992016-02-09 10:54:20 -0800599<p>Device implementations MUST NOT omit any managed APIs, alter API interfaces
600or signatures, deviate from the documented behavior, or include no-ops, except
Unsuk Jung5bc81142015-07-16 22:27:20 -0700601where specifically allowed by this Compatibility Definition.</p>
602
Heidi von Markham84564992016-02-09 10:54:20 -0800603<p>This Compatibility Definition permits some types of hardware for which
604Android includes APIs to be omitted by device implementations. In such cases,
605the APIs MUST still be present and behave in a reasonable way. See
606<a href="#7_hardware_compatibility">section 7</a> for specific requirements for
607this scenario.</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -0700608
609<h2 id="3_2_soft_api_compatibility">3.2. Soft API Compatibility</h2>
610
611
Heidi von Markham84564992016-02-09 10:54:20 -0800612<p>In addition to the managed APIs from
613<a href="#3_1_managed_api_compatibility">section 3.1</a>, Android also includes
614a significant runtime-only &ldquo;soft&rdquo; API, in the form of such things as
615intents, permissions, and similar aspects of Android applications that cannot be
616enforced at application compile time.</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -0700617
618<h3 id="3_2_1_permissions">3.2.1. Permissions</h3>
619
620
621<p>Device implementers MUST support and enforce all permission constants as
Heidi von Markham84564992016-02-09 10:54:20 -0800622documented by the
623<a href="http://developer.android.com/reference/android/Manifest.permission.html">Permission
624reference page</a>. Note that <a href="#9_security_model_compatibility">section
6259</a> lists additional requirements related to the Android security model.</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -0700626
627<h3 id="3_2_2_build_parameters">3.2.2. Build Parameters</h3>
628
629
Heidi von Markham84564992016-02-09 10:54:20 -0800630<p>The Android APIs include a number of constants on the
631<a href="http://developer.android.com/reference/android/os/Build.html">android.os.Build
632class</a> that are intended to describe the current device. To provide
633consistent, meaningful values across device implementations, the table below
634includes additional restrictions on the formats of these values to which device
Unsuk Jung5bc81142015-07-16 22:27:20 -0700635implementations MUST conform.</p>
636<table>
637 <tr>
638 <th>Parameter</th>
639 <th>Details</th>
640 </tr>
641 <tr>
642 <td>VERSION.RELEASE</td>
643 <td>The version of the currently-executing Android system, in human-readable
Heidi von Markham84564992016-02-09 10:54:20 -0800644 format. This field MUST have one of the string values defined in
645 <a href="http://source.android.com/compatibility/ANDROID_VERSION/versions.html">ANDROID_VERSION</a>.</td>
Unsuk Jung5bc81142015-07-16 22:27:20 -0700646 </tr>
647 <tr>
648 <td>VERSION.SDK</td>
Heidi von Markham84564992016-02-09 10:54:20 -0800649 <td>The version of the currently-executing Android system, in a format
650 accessible to third-party application code. For Android ANDROID_VERSION,
651 this field MUST have the integer value ANDROID_VERSION_INT.</td>
Unsuk Jung5bc81142015-07-16 22:27:20 -0700652 </tr>
653 <tr>
654 <td>VERSION.SDK_INT</td>
Heidi von Markham84564992016-02-09 10:54:20 -0800655 <td>The version of the currently-executing Android system, in a format
656 accessible to third-party application code. For Android ANDROID_VERSION,
657 this field MUST have the integer value ANDROID_VERSION_INT.</td>
Unsuk Jung5bc81142015-07-16 22:27:20 -0700658 </tr>
659 <tr>
660 <td>VERSION.INCREMENTAL</td>
Heidi von Markham84564992016-02-09 10:54:20 -0800661 <td>A value chosen by the device implementer designating the specific build
662 of the currently-executing Android system, in human-readable format. This
663 value MUST NOT be reused for different builds made available to end users. A
664 typical use of this field is to indicate which build number or
665 source-control change identifier was used to generate the build. There are
666 no requirements on the specific format of this field, except that it MUST
667 NOT be null or the empty string ("").</td>
Unsuk Jung5bc81142015-07-16 22:27:20 -0700668 </tr>
669 <tr>
670 <td>BOARD</td>
Heidi von Markham84564992016-02-09 10:54:20 -0800671 <td>A value chosen by the device implementer identifying the specific
672 internal hardware used by the device, in human-readable format. A possible
673 use of this field is to indicate the specific revision of the board powering
674 the device. The value of this field MUST be encodable as 7-bit ASCII and
675 match the regular expression &ldquo;^[a-zA-Z0-9_-]+$&rdquo;.</td>
Unsuk Jung5bc81142015-07-16 22:27:20 -0700676 </tr>
677 <tr>
678 <td>BRAND</td>
Heidi von Markham84564992016-02-09 10:54:20 -0800679 <td>A value reflecting the brand name associated with the device as known to
680 the end users. MUST be in human-readable format and SHOULD represent the
681 manufacturer of the device or the company brand under which the device is
682 marketed. The value of this field MUST be encodable as 7-bit ASCII and match
683 the regular expression &ldquo;^[a-zA-Z0-9_-]+$&rdquo;.</td>
Unsuk Jung5bc81142015-07-16 22:27:20 -0700684 </tr>
685 <tr>
686 <td>SUPPORTED_ABIS</td>
Heidi von Markham84564992016-02-09 10:54:20 -0800687 <td>The name of the instruction set (CPU type + ABI convention) of native
688 code. See <a href="#3_3_native_api_compatibility">section 3.3. Native API
689 Compatibility</a>.</td>
Unsuk Jung5bc81142015-07-16 22:27:20 -0700690 </tr>
691 <tr>
692 <td>SUPPORTED_32_BIT_ABIS</td>
Heidi von Markham84564992016-02-09 10:54:20 -0800693 <td>The name of the instruction set (CPU type + ABI convention) of native
694 code. See <a href="#3_3_native_api_compatibility">section 3.3. Native API
695 Compatibility</a>.</td>
Unsuk Jung5bc81142015-07-16 22:27:20 -0700696 </tr>
697 <tr>
698 <td>SUPPORTED_64_BIT_ABIS</td>
Heidi von Markham84564992016-02-09 10:54:20 -0800699 <td>The name of the second instruction set (CPU type + ABI convention) of
700 native code. See <a href="#3_3_native_api_compatibility">section 3.3. Native
701 API Compatibility</a>.</td>
Unsuk Jung5bc81142015-07-16 22:27:20 -0700702 </tr>
703 <tr>
704 <td>CPU_ABI</td>
Heidi von Markham84564992016-02-09 10:54:20 -0800705 <td>The name of the instruction set (CPU type + ABI convention) of native
706 code. See <a href="#3_3_native_api_compatibility">section 3.3. Native API
707 Compatibility</a>.</td>
Unsuk Jung5bc81142015-07-16 22:27:20 -0700708 </tr>
709 <tr>
710 <td>CPU_ABI2</td>
Heidi von Markham84564992016-02-09 10:54:20 -0800711 <td>The name of the second instruction set (CPU type + ABI convention) of
712 native code. See <a href="#3_3_native_api_compatibility">section 3.3. Native
713 API Compatibility</a>.</td>
Unsuk Jung5bc81142015-07-16 22:27:20 -0700714 </tr>
715 <tr>
716 <td>DEVICE</td>
Heidi von Markham84564992016-02-09 10:54:20 -0800717 <td>A value chosen by the device implementer containing the development name
718 or code name identifying the configuration of the hardware features and
719 industrial design of the device. The value of this field MUST be encodable
720 as 7-bit ASCII and match the regular expression
721 &ldquo;^[a-zA-Z0-9_-]+$&rdquo;.</td>
Unsuk Jung5bc81142015-07-16 22:27:20 -0700722 </tr>
723 <tr>
724 <td>FINGERPRINT</td>
725 <td>A string that uniquely identifies this build. It SHOULD be reasonably
Heidi von Markham84564992016-02-09 10:54:20 -0800726 human-readable. It MUST follow this template:
727 <p class="small">$(BRAND)/$(PRODUCT)/<br>
Bert McMeen80b22ba2015-10-02 11:54:59 -0700728 &nbsp;&nbsp;&nbsp;&nbsp;$(DEVICE):$(VERSION.RELEASE)/$(ID)/$(VERSION.INCREMENTAL):$(TYPE)/$(TAGS)</p>
Heidi von Markham84564992016-02-09 10:54:20 -0800729 <p>For example:</p>
730 <p class="small">acme/myproduct/<br>
Bert McMeen80b22ba2015-10-02 11:54:59 -0700731 &nbsp;&nbsp;&nbsp;&nbsp;mydevice:ANDROID_VERSION/LMYXX/3359:userdebug/test-keys</p>
Heidi von Markham84564992016-02-09 10:54:20 -0800732 <p>The fingerprint MUST NOT include whitespace characters. If other fields
733 included in the template above have whitespace characters, they MUST be
734 replaced in the build fingerprint with another character, such as the
735 underscore ("_") character. The value of this field MUST be encodable as
736 7-bit ASCII.</p></td>
Unsuk Jung5bc81142015-07-16 22:27:20 -0700737 </tr>
738 <tr>
739 <td>HARDWARE</td>
Heidi von Markham84564992016-02-09 10:54:20 -0800740 <td>The name of the hardware (from the kernel command line or /proc). It
741 SHOULD be reasonably human-readable. The value of this field MUST be
742 encodable as 7-bit ASCII and match the regular expression
743 &ldquo;^[a-zA-Z0-9_-]+$&rdquo;.</td>
Unsuk Jung5bc81142015-07-16 22:27:20 -0700744 </tr>
745 <tr>
746 <td>HOST</td>
747 <td>A string that uniquely identifies the host the build was built on, in
Heidi von Markham84564992016-02-09 10:54:20 -0800748 human-readable format. There are no requirements on the specific format of
749 this field, except that it MUST NOT be null or the empty string ("").</td>
Unsuk Jung5bc81142015-07-16 22:27:20 -0700750 </tr>
751 <tr>
752 <td>ID</td>
Heidi von Markham84564992016-02-09 10:54:20 -0800753 <td>An identifier chosen by the device implementer to refer to a specific
754 release, in human-readable format. This field can be the same as
755 android.os.Build.VERSION.INCREMENTAL, but SHOULD be a value sufficiently
756 meaningful for end users to distinguish between software builds. The value
757 of this field MUST be encodable as 7-bit ASCII and match the regular
758 expression &ldquo;^[a-zA-Z0-9._-]+$&rdquo;.</td>
Unsuk Jung5bc81142015-07-16 22:27:20 -0700759 </tr>
760 <tr>
761 <td>MANUFACTURER</td>
Heidi von Markham84564992016-02-09 10:54:20 -0800762 <td>The trade name of the Original Equipment Manufacturer (OEM) of the
763 product. There are no requirements on the specific format of this field,
764 except that it MUST NOT be null or the empty string ("").</td>
Unsuk Jung5bc81142015-07-16 22:27:20 -0700765 </tr>
766 <tr>
767 <td>MODEL</td>
Heidi von Markham84564992016-02-09 10:54:20 -0800768 <td>A value chosen by the device implementer containing the name of the
769 device as known to the end user. This SHOULD be the same name under which
770 the device is marketed and sold to end users. There are no requirements on
771 the specific format of this field, except that it MUST NOT be null or the
772 empty string ("").</td>
Unsuk Jung5bc81142015-07-16 22:27:20 -0700773 </tr>
774 <tr>
775 <td>PRODUCT</td>
Heidi von Markham84564992016-02-09 10:54:20 -0800776 <td>A value chosen by the device implementer containing the development name
777 or code name of the specific product (SKU) that MUST be unique within the
778 same brand. MUST be human-readable, but is not necessarily intended for view
779 by end users. The value of this field MUST be encodable as 7-bit ASCII and
780 match the regular expression &ldquo;^[a-zA-Z0-9_-]+$&rdquo;.</td>
Unsuk Jung5bc81142015-07-16 22:27:20 -0700781 </tr>
782 <tr>
783 <td>SERIAL</td>
Owain Davies4f8796e2015-09-24 14:01:26 +0100784 <td>A hardware serial number, which MUST be available and unique across
Heidi von Markham84564992016-02-09 10:54:20 -0800785 devices with the same MODEL and MANUFACTURER. The value of this field MUST
786 be encodable as 7-bit ASCII and match the regular expression
787 &ldquo;^([a-zA-Z0-9]{6,20})$&rdquo;.</td>
Unsuk Jung5bc81142015-07-16 22:27:20 -0700788 </tr>
789 <tr>
790 <td>TAGS</td>
Heidi von Markham84564992016-02-09 10:54:20 -0800791 <td>A comma-separated list of tags chosen by the device implementer that
792 further distinguishes the build. This field MUST have one of the values
793 corresponding to the three typical Android platform signing configurations:
794 release-keys, dev-keys, test-keys.</td>
Unsuk Jung5bc81142015-07-16 22:27:20 -0700795 </tr>
796 <tr>
797 <td>TIME</td>
798 <td>A value representing the timestamp of when the build occurred.</td>
799 </tr>
800 <tr>
801 <td>TYPE</td>
Heidi von Markham84564992016-02-09 10:54:20 -0800802 <td>A value chosen by the device implementer specifying the runtime
803 configuration of the build. This field MUST have one of the values
804 corresponding to the three typical Android runtime configurations: user,
805 userdebug, or eng.</td>
Unsuk Jung5bc81142015-07-16 22:27:20 -0700806 </tr>
807 <tr>
808 <td>USER</td>
Heidi von Markham84564992016-02-09 10:54:20 -0800809 <td>A name or user ID of the user (or automated user) that generated the
810 build. There are no requirements on the specific format of this field,
811 except that it MUST NOT be null or the empty string ("").</td>
Unsuk Jung5bc81142015-07-16 22:27:20 -0700812 </tr>
Clay Murphy18ac4a42015-10-07 00:05:41 -0700813 <tr>
814 <td>SECURITY_PATCH</td>
Heidi von Markham84564992016-02-09 10:54:20 -0800815 <td>An value indicating the security patch level of a build. It MUST signify
816 that the build includes all security patches issued up through the
817 designated Android Public Security Bulletin. It MUST be in the format
818 [YYYY-MM-DD], matching the Public Security Bulletin's broadcast date, for
819 example [2015-10-01].</td>
Clay Murphy18ac4a42015-10-07 00:05:41 -0700820 </tr>
821 <tr>
822 <td>BASE_OS</td>
Heidi von Markham84564992016-02-09 10:54:20 -0800823 <td>An value representing the FINGERPRINT parameter of the build that is
824 otherwise identical to this build except for the patches provided in the
825 Android Public Security Bulletin. It MUST report the correct value and if
826 such a build does not exist, report an empty string ("").</td>
Clay Murphy18ac4a42015-10-07 00:05:41 -0700827 </tr>
Unsuk Jung5bc81142015-07-16 22:27:20 -0700828</table>
829
830
831<h3 id="3_2_3_intent_compatibility">3.2.3. Intent Compatibility</h3>
832
833
Heidi von Markham84564992016-02-09 10:54:20 -0800834<p>Device implementations MUST honor Android&rsquo;s loose-coupling intent
835system, as described in the sections below. By &ldquo;honored&rdquo; it is meant
836that the device implementer MUST provide an Android Activity or Service that
837specifies amatching intent filter that binds to and implements correct behavior
838for each specified intent pattern.</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -0700839
840<h4 id="3_2_3_1_core_application_intents">3.2.3.1. Core Application Intents</h4>
841
842
843<p>Android intents allow application components to request functionality from
844other Android components. The Android upstream project includes a list of
845applications considered core Android applications, which implements several
Heidi von Markham84564992016-02-09 10:54:20 -0800846intent patterns to perform common actions. The core Android applications are:
847</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -0700848
849<ul>
850 <li>Desk Clock</li>
851 <li>Browser</li>
852 <li>Calendar</li>
853 <li>Contacts</li>
854 <li>Gallery</li>
855 <li>GlobalSearch</li>
856 <li>Launcher</li>
857 <li>Music</li>
858 <li>Settings</li>
859</ul>
860
861<p>Device implementations SHOULD include the core Android applications as
862appropriate but MUST include a component implementing the same intent patterns
Heidi von Markham84564992016-02-09 10:54:20 -0800863defined by all the &ldquo;public&rdquo; Activity or Service components of these
864core Android applications. Note that Activity or Service components are
865considered &ldquo;public&rdquo; when the attribute android:exported is absent or
866has the value true.</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -0700867
Unsuk Jung903634a2015-10-15 10:44:03 -0700868<h4 id="3_2_3_2_intent_resolution">3.2.3.2. Intent Resolution</h4>
Unsuk Jung5bc81142015-07-16 22:27:20 -0700869
870
871<p>As Android is an extensible platform, device implementations MUST allow each
Heidi von Markham84564992016-02-09 10:54:20 -0800872intent pattern referenced in <a href="#3_2_3_1_core_application_intents">section
8733.2.3.1</a> to be overridden by third-party applications. The upstream Android
874open source implementation allows this by default; device implementers MUST NOT
875attach special privileges to system applications' use of these intent patterns,
876or prevent third-party applications from binding to and assuming control of
877these patterns. This prohibition specifically includes but is not limited to
878disabling the &ldquo;Chooser&rdquo; user interface that allows the user to
879select between multiple applications that all handle the same intent pattern.
880</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -0700881
Heidi von Markham84564992016-02-09 10:54:20 -0800882<p>Device implementations MUST provide a user interface for users to modify the
883default activity for intents.</p>
Unsuk Jung903634a2015-10-15 10:44:03 -0700884
Heidi von Markham84564992016-02-09 10:54:20 -0800885<p>However, device implementations MAY provide default activities for specific
886URI patterns (e.g. http://play.google.com) when the default activity provides a
887more specific attribute for the data URI. For example, an intent filter pattern
888specifying the data URI &ldquo;http://www.android.com&rdquo; is more specific
889than the browser's core intent pattern for &ldquo;http://&rdquo;.</p>
890
891<p>Android also includes a mechanism for third-party apps to declare an
892authoritative default
893<a href="https://developer.android.com/training/app-links">app linking
894behavior</a> for certain types of web URI intents. When such authoritative
895declarations are defined in an app's intent filter patterns, device
Unsuk Jung903634a2015-10-15 10:44:03 -0700896implementations:</p>
897
898<ul>
Heidi von Markham84564992016-02-09 10:54:20 -0800899 <li>MUST attempt to validate any intent filters by performing the validation
900 steps defined in the
901 <a href="https://developers.google.com/digital-asset-links">Digital Asset
902 Links specification</a> as implemented by the Package Manager in the upstream
903 Android Open Source Project.</li>
904 <li>MUST attempt validation of the intent filters during the installation of
905 the application and set all successfully validated UIR intent filters as
906 default app handlers for their UIRs.</li>
907 <li>MAY set specific URI intent filters as default app handlers for their
908 URIs, if they are successfully verified but other candidate URI filters fail
909 verification. If a device implementation does this, it MUST provide the user
910 appropriate per-URI pattern overrides in the settings menu.</li>
911 <li>MUST provide the user with per-app App Links controls in Settings as
912 follows:
Unsuk Jung903634a2015-10-15 10:44:03 -0700913 <ul>
Heidi von Markham84564992016-02-09 10:54:20 -0800914 <li>The user MUST be able to override holistically the default app links
915 behavior for an app to be: always open, always ask, or never open, which
916 must apply to all candidate URI intent filters equally.</li>
917 <li>The user MUST be able to see a list of the candidate URI intent filters.
918 </li>
919 <li>The device implementation MAY provide the user with the ability to
920 override specific candidate URI intent filters that were successfully
921 verified, on a per-intent filter basis.</li>
922 <li>The device implementation MUST provide users with the ability to view
923 and override specific candidate URI intent filters if the device
924 implementation lets some candidate URI intent filters succeed verification
925 while some others can fail.</li>
Unsuk Jung903634a2015-10-15 10:44:03 -0700926 </ul>
Heidi von Markham84564992016-02-09 10:54:20 -0800927 </li>
Unsuk Jung903634a2015-10-15 10:44:03 -0700928</ul>
Unsuk Jung5bc81142015-07-16 22:27:20 -0700929
930<h4 id="3_2_3_3_intent_namespaces">3.2.3.3. Intent Namespaces</h4>
931
932
933<p>Device implementations MUST NOT include any Android component that honors any
934new intent or broadcast intent patterns using an ACTION, CATEGORY, or other key
Heidi von Markham84564992016-02-09 10:54:20 -0800935string in the android.* or com.android.* namespace. Device implementers MUST NOT
936include any Android components that honor any new intent or broadcast intent
937patterns using an ACTION, CATEGORY, or other key string in a package space
938belonging to another organization. Device implementers MUST NOT alter or extend
939any of the intent patterns used by the core apps listed in
940<a href="#3_2_3_1_core_application_intents">section 3.2.3.1</a>. Device
941implementations MAY include intent patterns using namespaces clearly and
942obviously associated with their own organization. This prohibition is analogous
943to that specified for Java language classes in
944<a href="#3_6_api_namespaces">section 3.6</a>.</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -0700945
946<h4 id="3_2_3_4_broadcast_intents">3.2.3.4. Broadcast Intents</h4>
947
948
949<p>Third-party applications rely on the platform to broadcast certain intents to
950notify them of changes in the hardware or software environment.
951Android-compatible devices MUST broadcast the public broadcast intents in
952response to appropriate system events. Broadcast intents are described in the
953SDK documentation.</p>
954
955<h4 id="3_2_3_5_default_app_settings">3.2.3.5. Default App Settings</h4>
956
957
958<p>Android includes settings that provide users an easy way to select their
959default applications, for example for Home screen or SMS. Where it makes sense,
960device implementations MUST provide a similar settings menu and be compatible
961with the intent filter pattern and API methods described in the SDK
962documentation as below.</p>
963
964<p>Device implementations:</p>
965
966<ul>
Heidi von Markham84564992016-02-09 10:54:20 -0800967 <li>MUST honor the <a href="http://developer.android.com/reference/android/provider/Settings.html#ACTION_HOME_SETTINGS">android.settings.HOME_SETTINGS</a>
968 intent to show a default app settings menu for Home Screen, if the device
969 implementation reports android.software.home_screen.</li>
Unsuk Jung5bc81142015-07-16 22:27:20 -0700970 <li>MUST provide a settings menu that will call the
Heidi von Markham84564992016-02-09 10:54:20 -0800971 <a href="http://developer.android.com/reference/android/provider/Telephony.Sms.Intents.html">android.provider.Telephony.ACTION_CHANGE_DEFAULT</a>
972 intent to show a dialog to change the default SMS application, if the device
973 implementation reports android.hardware.telephony.</li>
974 <li>MUST honor the <a href="http://developer.android.com/reference/android/provider/Settings.html#ACTION_NFC_PAYMENT_SETTINGS">android.settings.NFC_PAYMENT_SETTINGS</a>
975 intent to show a default app settings menu for Tap and Pay, if the device
976 implementation reports android.hardware.nfc.hce.</li>
Unsuk Jung5bc81142015-07-16 22:27:20 -0700977</ul>
978
979<h2 id="3_3_native_api_compatibility">3.3. Native API Compatibility</h2>
980
981
982<h3 id="3_3_1_application_binary_interfaces">3.3.1. Application Binary Interfaces</h3>
983
984
985<p>Managed Dalvik bytecode can call into native code provided in the application
986.apk file as an ELF .so file compiled for the appropriate device hardware
987architecture. As native code is highly dependent on the underlying processor
988technology, Android defines a number of Application Binary Interfaces (ABIs) in
989the Android NDK. Device implementations MUST be compatible with one or more
990defined ABIs, and MUST implement compatibility with the Android NDK, as below.</p>
991
992<p>If a device implementation includes support for an Android ABI, it:</p>
993
994<ul>
Heidi von Markham84564992016-02-09 10:54:20 -0800995 <li>MUST include support for code running in the managed environment to call
996 into native code, using the standard Java Native Interface (JNI) semantics.</li>
997 <li>MUST be source-compatible (i.e. header compatible) and binary-compatible
998 (for the ABI) with each required library in the list below.</li>
999 <li>MUST support the equivalent 32-bit ABI if any 64-bit ABI is supported.</li>
1000 <li>MUST accurately report the native Application Binary Interface (ABI)
1001 supported by the device, via the android.os.Build.SUPPORTED_ABIS,
1002 android.os.Build.SUPPORTED_32_BIT_ABIS, and
1003 android.os.Build.SUPPORTED_64_BIT_ABIS parameters, each a comma separated list
1004 of ABIs ordered from the most to the least preferred one.</li>
Unsuk Jung06706432015-08-31 11:26:13 -07001005 <li>MUST report, via the above parameters, only those ABIs documented and
Heidi von Markham84564992016-02-09 10:54:20 -08001006 described in the latest version of the
1007 <a href="https://developer.android.com/ndk/guides/abis.html">Android NDK ABI
1008 Management documentation</a>, and MUST include support for the
1009 <a href="http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0388f/Beijfcja.html">Advanced
1010 SIMD</a> (a.k.a. NEON) extension.</li>
Unsuk Jung5bc81142015-07-16 22:27:20 -07001011 <li>SHOULD be built using the source code and header files available in the
Heidi von Markham84564992016-02-09 10:54:20 -08001012 upstream Android Open Source Project</li>
Unsuk Jung5bc81142015-07-16 22:27:20 -07001013</ul>
1014
1015<p>The following native code APIs MUST be available to apps that include native
1016code:</p>
1017
1018<ul>
1019 <li>libc (C library)</li>
1020 <li>libm (math library)</li>
1021 <li>Minimal support for C++</li>
1022 <li>JNI interface</li>
1023 <li>liblog (Android logging)</li>
1024 <li>libz (Zlib compression)</li>
1025 <li>libdl (dynamic linker)</li>
1026 <li>libGLESv1_CM.so (OpenGL ES 1.x)</li>
1027 <li>libGLESv2.so (OpenGL ES 2.0)</li>
1028 <li>libGLESv3.so (OpenGL ES 3.x)</li>
1029 <li>libEGL.so (native OpenGL surface management)</li>
1030 <li>libjnigraphics.so</li>
1031 <li>libOpenSLES.so (OpenSL ES 1.0.1 audio support)</li>
1032 <li>libOpenMAXAL.so (OpenMAX AL 1.0.1 support)</li>
1033 <li>libandroid.so (native Android activity support)</li>
1034 <li>libmediandk.so (native media APIs support)</li>
1035 <li>Support for OpenGL, as described below</li>
1036</ul>
1037
1038<p>Note that future releases of the Android NDK may introduce support for
1039additional ABIs. If a device implementation is not compatible with an existing
1040predefined ABI, it MUST NOT report support for any ABIs at all.</p>
1041
1042<p>Note that device implementations MUST include libGLESv3.so and it MUST symlink
1043(symbolic link) to libGLESv2.so. in turn, MUST export all the OpenGL ES 3.1 and
Heidi von Markham84564992016-02-09 10:54:20 -08001044<a href="http://developer.android.com/guide/topics/graphics/opengl.html#aep">Android
1045Extension Pack</a> function symbols as defined in the NDK release android-21.
1046Although all the symbols must be present, only the corresponding functions for
1047OpenGL ES versions and extensions actually supported by the device must be fully
Unsuk Jung5bc81142015-07-16 22:27:20 -07001048implemented.</p>
1049
Unsuk Jung6f6ac762015-09-29 14:28:03 -07001050<p>Device implementations MUST NOT include a native library with the
1051name libvulkan.so.</p>
1052
Heidi von Markham84564992016-02-09 10:54:20 -08001053<p>Native code compatibility is challenging. For this reason, device
1054implementers are <strong>STRONGLY RECOMMENDED</strong> to use the
1055implementations of the libraries listed above from the upstream Android Open
1056Source Project.</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07001057
Heidi von Markham84564992016-02-09 10:54:20 -08001058<h3 id="3_3_2_32-bit_arm_native_code_compatibility">3.3.2.
105932-bit ARM Native Code Compatibility</h3>
Unsuk Jung5bc81142015-07-16 22:27:20 -07001060
1061<p>The ARMv8 architecture deprecates several CPU operations, including some
Heidi von Markham84564992016-02-09 10:54:20 -08001062operations used in existing native code. On 64-bit ARM devices, the following
Unsuk Jung5bc81142015-07-16 22:27:20 -07001063deprecated operations MUST remain available to 32-bit native ARM code, either
1064through native CPU support or through software emulation:</p>
1065
1066<ul>
Heidi von Markham84564992016-02-09 10:54:20 -08001067 <li>SWP and SWPB instructions</li>
1068 <li>SETEND instruction</li>
1069 <li>CP15ISB, CP15DSB, and CP15DMB barrier operations</li>
Unsuk Jung5bc81142015-07-16 22:27:20 -07001070</ul>
1071
Heidi von Markham84564992016-02-09 10:54:20 -08001072<p>Legacy versions of the Android NDK used /proc/cpuinfo to discover CPU
1073features from 32-bit ARM native code. For compatibility with applications built
1074using this NDK, devices MUST include the following lines in /proc/cpuinfo when
1075it is read by 32-bit ARM applications:</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07001076
1077<ul>
Heidi von Markham84564992016-02-09 10:54:20 -08001078 <li>&quot;Features: &quot;, followed by a list of any optional ARMv7 CPU
1079 features supported by the device.</li>
1080 <li>&quot;CPU architecture: &quot;, followed by an integer describing the
1081 device's highest supported ARM architecture (e.g., &quot;8&quot; for ARMv8
1082 devices).</li>
Unsuk Jung5bc81142015-07-16 22:27:20 -07001083</ul>
1084
1085<p>These requirements only apply when /proc/cpuinfo is read by 32-bit ARM
1086applications. Devices SHOULD not alter /proc/cpuinfo when read by 64-bit ARM or
1087non-ARM applications.</p>
1088
1089<h2 id="3_4_web_compatibility">3.4. Web Compatibility</h2>
1090
1091
1092<h3 id="3_4_1_webview_compatibility">3.4.1. WebView Compatibility</h3>
1093
1094<div class="note">
1095<p>Android Watch devices MAY, but all other device implementations MUST provide
1096a complete implementation of the android.webkit.Webview API.</p>
1097</div>
1098
1099
1100<p>The platform feature android.software.webview MUST be reported on any device
1101that provides a complete implementation of the android.webkit.WebView API, and
1102MUST NOT be reported on devices without a complete implementation of the API.
1103The Android Open Source implementation uses code from the Chromium Project to
Heidi von Markham84564992016-02-09 10:54:20 -08001104implement the
1105<a href="http://developer.android.com/reference/android/webkit/WebView.html">android.webkit.WebView</a>.
1106Because it is not feasible to develop a comprehensive test suite for a web
Unsuk Jung5bc81142015-07-16 22:27:20 -07001107rendering system, device implementers MUST use the specific upstream build of
1108Chromium in the WebView implementation. Specifically:</p>
1109
1110<ul>
Heidi von Markham84564992016-02-09 10:54:20 -08001111 <li>Device android.webkit.WebView implementations MUST be based on the
1112 <a href="http://www.chromium.org/">Chromium</a> build from the upstream
1113 Android Open Source Project for Android ANDROID_VERSION. This build includes
1114 a specific set of functionality and security fixes for the WebView.</li>
Unsuk Jung5bc81142015-07-16 22:27:20 -07001115 <li>The user agent string reported by the WebView MUST be in this format:
Heidi von Markham84564992016-02-09 10:54:20 -08001116 <p>Mozilla/5.0 (Linux; Android $(VERSION); $(MODEL) Build/$(BUILD); wv)
1117 AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 $(CHROMIUM_VER) Mobile
1118 Safari/537.36</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07001119 <ul>
1120 <li>The value of the $(VERSION) string MUST be the same as the value for
Heidi von Markham84564992016-02-09 10:54:20 -08001121 android.os.Build.VERSION.RELEASE.</li>
Unsuk Jung5bc81142015-07-16 22:27:20 -07001122 <li>The value of the $(MODEL) string MUST be the same as the value for
Heidi von Markham84564992016-02-09 10:54:20 -08001123 android.os.Build.MODEL.</li>
Unsuk Jung5bc81142015-07-16 22:27:20 -07001124 <li>The value of the $(BUILD) string MUST be the same as the value for
Heidi von Markham84564992016-02-09 10:54:20 -08001125 android.os.Build.ID.</li>
1126 <li>The value of the $(CHROMIUM_VER) string MUST be the version of Chromium
1127 in the upstream Android Open Source Project.</li>
Unsuk Jung5bc81142015-07-16 22:27:20 -07001128 <li>Device implementations MAY omit Mobile in the user agent string.</li>
Heidi von Markham84564992016-02-09 10:54:20 -08001129 </ul>
1130 </li>
1131</ul>
Unsuk Jung5bc81142015-07-16 22:27:20 -07001132
1133<p>The WebView component SHOULD include support for as many HTML5 features as
Heidi von Markham84564992016-02-09 10:54:20 -08001134possible and if it supports the feature SHOULD conform to the
1135<a href="http://html.spec.whatwg.org/multipage/">HTML5 specification</a>.</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07001136
1137<h3 id="3_4_2_browser_compatibility">3.4.2. Browser Compatibility</h3>
1138
1139<div class="note">
1140<p>Android Television, Watch, and Android Automotive implementations MAY omit a
1141browser application, but MUST support the public intent patterns as described in
1142<a href="#3_2_3_1_core_application_intents">section 3.2.3.1</a>. All other types
1143of device implementations MUST include a standalone Browser application for
1144general user web browsing.</p>
1145</div>
1146
1147<p>The standalone Browser MAY be based on a browser technology other than WebKit.
1148However, even if an alternate Browser application is used, the
1149android.webkit.WebView component provided to third-party applications MUST be
Heidi von Markham84564992016-02-09 10:54:20 -08001150based on WebKit, as described in <a href="#3_4_1_webview_compatibility">section
11513.4.1</a>.</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07001152
1153<p>Implementations MAY ship a custom user agent string in the standalone Browser
1154application.</p>
1155
1156<p>The standalone Browser application (whether based on the upstream WebKit
1157Browser application or a third-party replacement) SHOULD include support for as
Heidi von Markham84564992016-02-09 10:54:20 -08001158much of <a href="http://html.spec.whatwg.org/multipage/">HTML5</a> as possible.
1159Minimally, device implementations MUST support each of these APIs associated
1160with HTML5:</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07001161
1162<ul>
Heidi von Markham84564992016-02-09 10:54:20 -08001163 <li><a href="http://www.w3.org/html/wg/drafts/html/master/browsers.html#offline">application
1164 cache/offline operation</a></li>
1165 <li><a href="http://www.w3.org/html/wg/drafts/html/master/semantics.html#video">&#60;video&#62;
1166 tag</a></li>
1167 <li><a href="http://www.w3.org/TR/geolocation-API/">geolocation</a></li>
Unsuk Jung5bc81142015-07-16 22:27:20 -07001168</ul>
1169
Heidi von Markham84564992016-02-09 10:54:20 -08001170<p>Additionally, device implementations MUST support the HTML5/W3C
1171<a href="http://www.w3.org/TR/webstorage/">webstorage API</a> and SHOULD support
1172the HTML5/W3C <a href="http://www.w3.org/TR/IndexedDB/">IndexedDB API</a>. Note
1173that as the web development standards bodies are transitioning to favor
Unsuk Jung5bc81142015-07-16 22:27:20 -07001174IndexedDB over webstorage, IndexedDB is expected to become a required component
1175in a future version of Android.</p>
1176
1177<h2 id="3_5_api_behavioral_compatibility">3.5. API Behavioral Compatibility</h2>
1178
1179
Heidi von Markham84564992016-02-09 10:54:20 -08001180<p>The behaviors of each of the API types (managed, soft, native, and web) must
1181be consistent with the preferred implementation of the upstream
1182<a href="http://source.android.com/">Android Open Source Project</a>. Some
1183specific areas of compatibility are:</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07001184
1185<ul>
Heidi von Markham84564992016-02-09 10:54:20 -08001186 <li>Devices MUST NOT change the behavior or semantics of a standard intent.
1187 </li>
1188 <li>Devices MUST NOT alter the lifecycle or lifecycle semantics of a
1189 particular type of system component (such as Service, Activity,
1190 ContentProvider, etc.).</li>
Unsuk Jung5bc81142015-07-16 22:27:20 -07001191 <li>Devices MUST NOT change the semantics of a standard permission.</li>
1192</ul>
1193
1194<p>The above list is not comprehensive. The Compatibility Test Suite (CTS) tests
1195significant portions of the platform for behavioral compatibility, but not all.
1196It is the responsibility of the implementer to ensure behavioral compatibility
1197with the Android Open Source Project. For this reason, device implementers
1198SHOULD use the source code available via the Android Open Source Project where
1199possible, rather than re-implement significant parts of the system.</p>
1200
1201<h2 id="3_6_api_namespaces">3.6. API Namespaces</h2>
1202
1203
Heidi von Markham84564992016-02-09 10:54:20 -08001204<p>Android follows the package and class namespace conventions defined by the
1205Java programming language. To ensure compatibility with third-party
1206applications, device implementers MUST NOT make any prohibited modifications
1207(see below) to these package namespaces:</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07001208
1209<ul>
1210 <li>java.*</li>
1211 <li>javax.*</li>
1212 <li>sun.*</li>
1213 <li>android.*</li>
1214 <li>com.android.*</li>
1215</ul>
1216
1217<p><strong>Prohibited modifications include</strong>:</p>
1218
1219<ul>
Heidi von Markham84564992016-02-09 10:54:20 -08001220 <li>Device implementations MUST NOT modify the publicly exposed APIs on the
1221 Android platform by changing any method or class signatures, or by removing
1222 classes or class fields.</li>
1223 <li>Device implementers MAY modify the underlying implementation of the APIs,
1224 but such modifications MUST NOT impact the stated behavior and Java-language
1225 signature of any publicly exposed APIs.</li>
1226 <li>Device implementers MUST NOT add any publicly exposed elements (such as
1227 classes or interfaces, or fields or methods to existing classes or interfaces)
1228 to the APIs above.</li>
Unsuk Jung5bc81142015-07-16 22:27:20 -07001229</ul>
1230
Heidi von Markham84564992016-02-09 10:54:20 -08001231<p>A &ldquo;publicly exposed element&rdquo; is any construct that is not
1232decorated with the&ldquo;@hide&rdquo; marker as used in the upstream Android
1233source code. In other words, device implementers MUST NOT expose new APIs or
1234alter existing APIs in the namespaces noted above. Device implementers MAY make
1235internal-only modifications, but those modifications MUST NOT be advertised or
1236otherwise exposed to developers.</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07001237
1238<p>Device implementers MAY add custom APIs, but any such APIs MUST NOT be in a
1239namespace owned by or referring to another organization. For instance, device
1240implementers MUST NOT add APIs to the com.google.* or similar namespace: only
1241Google may do so. Similarly, Google MUST NOT add APIs to other companies'
1242namespaces. Additionally, if a device implementation includes custom APIs
1243outside the standard Android namespace, those APIs MUST be packaged in an
1244Android shared library so that only apps that explicitly use them (via the
Unsuk Jung2e62f9a2015-07-16 23:01:44 -07001245lt;uses-librarygt; mechanism) are affected by the increased memory usage of such
Unsuk Jung5bc81142015-07-16 22:27:20 -07001246APIs.</p>
1247
Heidi von Markham84564992016-02-09 10:54:20 -08001248<p>If a device implementer proposes to improve one of the package namespaces
1249above (such as by adding useful new functionality to an existing API, or adding
1250a new API), the implementer SHOULD visit
1251<a href="http://source.android.com/">source.android.com</a> and begin the
1252process for contributing changes and code, according to the information on that
1253site.</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07001254
Heidi von Markham84564992016-02-09 10:54:20 -08001255<p>Note that the restrictions above correspond to standard conventions for
1256naming APIs in the Java programming language; this section simply aims to
1257reinforce those conventions and make them binding through inclusion in this
1258Compatibility Definition.</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07001259
1260<h2 id="3_7_runtime_compatibility">3.7. Runtime Compatibility</h2>
1261
1262
Heidi von Markham84564992016-02-09 10:54:20 -08001263<p>Device implementations MUST support the full Dalvik Executable (DEX) format
1264and <a href="https://android.googlesource.com/platform/dalvik/">Dalvik bytecode
1265specification and semantics</a>. Device implementers SHOULD use ART, the
1266reference upstream implementation of the Dalvik Executable Format, and the
1267reference implementation&rsquo;s package management system.</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07001268
1269<p>Device implementations MUST configure Dalvik runtimes to allocate memory in
1270accordance with the upstream Android platform, and as specified by the
Heidi von Markham84564992016-02-09 10:54:20 -08001271following table. (See <a href="#7_1_1_screen_configuration">section 7.1.1</a>
1272for screen size and screen density definitions.) Note that memory values
1273specified below are considered minimum values and device implementations MAY
1274allocate more memory per application.</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07001275
1276<table>
1277 <tr>
1278 <th>Screen Layout</th>
1279 <th>Screen Density</th>
1280 <th>Minimum Application Memory</th>
1281 </tr>
1282 <tr>
Unsuk Jung9b2d31a2015-10-06 00:03:01 -07001283 <td rowspan="12">Android Watch</td>
1284 <td>120 dpi (ldpi)</td>
1285 <td rowspan="3">32MB</td>
1286 </tr>
1287 <tr>
1288 <td>160 dpi (mdpi)</td>
1289 </tr>
1290 <tr>
1291 <td>213 dpi (tvdpi)</td>
1292 </tr>
1293 <tr>
1294 <td>240 dpi (hdpi)</td>
1295 <td rowspan="2">36MB</td>
1296 </tr>
1297 <tr>
1298 <td>280 dpi (280dpi)</td>
1299 </tr>
1300 <tr>
1301 <td>320 dpi (xhdpi)</td>
1302 <td rowspan="2">48MB</td>
1303 </tr>
1304 <tr>
1305 <td>360 dpi (360dpi)</td>
1306 </tr>
1307 <tr>
1308 <td>400 dpi (400dpi)</td>
1309 <td>56MB</td>
1310 </tr>
1311 <tr>
1312 <td>420 dpi (420dpi)</td>
1313 <td>64MB</td>
1314 </tr>
1315 <tr>
1316 <td>480 dpi (xxhdpi)</td>
1317 <td>88MB</td>
1318 </tr>
1319 <tr>
1320 <td>560 dpi (560dpi)</td>
1321 <td>112MB</td>
1322 </tr>
1323 <tr>
1324 <td>640 dpi (xxxhdpi)</td>
1325 <td>154MB</td>
1326 </tr>
1327 <tr>
1328 <td rowspan="12">small/normal</td>
Unsuk Jung5bc81142015-07-16 22:27:20 -07001329 <td>120 dpi (ldpi)</td>
1330 <td rowspan="2">32MB</td>
1331 </tr>
1332 <tr>
1333 <td>160 dpi (mdpi)</td>
1334 </tr>
1335 <tr>
1336 <td>213 dpi (tvdpi)</td>
1337 <td rowspan="3">48MB</td>
1338 </tr>
1339 <tr>
1340 <td>240 dpi (hdpi)</td>
1341 </tr>
1342 <tr>
1343 <td>280 dpi (280dpi)</td>
1344 </tr>
1345 <tr>
1346 <td>320 dpi (xhdpi)</td>
Unsuk Jung9b2d31a2015-10-06 00:03:01 -07001347 <td rowspan="2">80MB</td>
1348 </tr>
1349 <tr>
1350 <td>360 dpi (360dpi)</td>
Unsuk Jung5bc81142015-07-16 22:27:20 -07001351 </tr>
1352 <tr>
1353 <td>400 dpi (400dpi)</td>
1354 <td>96MB</td>
1355 </tr>
1356 <tr>
Unsuk Jung9b2d31a2015-10-06 00:03:01 -07001357 <td>420 dpi (420dpi)</td>
1358 <td>112MB</td>
1359 </tr>
1360 <tr>
Unsuk Jung5bc81142015-07-16 22:27:20 -07001361 <td>480 dpi (xxhdpi)</td>
1362 <td>128MB</td>
1363 </tr>
1364 <tr>
1365 <td>560 dpi (560dpi)</td>
1366 <td>192MB</td>
1367 </tr>
1368 <tr>
1369 <td>640 dpi (xxxhdpi)</td>
1370 <td>256MB</td>
1371 </tr>
1372 <tr>
Unsuk Jung9b2d31a2015-10-06 00:03:01 -07001373 <td rowspan="12">large</td>
Unsuk Jung5bc81142015-07-16 22:27:20 -07001374 <td>120 dpi (ldpi)</td>
1375 <td>32MB</td>
1376 </tr>
1377 <tr>
1378 <td>160 dpi (mdpi)</td>
1379 <td>48MB</td>
1380 </tr>
1381 <tr>
1382 <td>213 dpi (tvdpi)</td>
1383 <td rowspan="2">80MB</td>
1384 </tr>
1385 <tr>
1386 <td>240 dpi (hdpi)</td>
1387 </tr>
1388 <tr>
1389 <td>280 dpi (280dpi)</td>
1390 <td>96MB</td>
1391 </tr>
1392 <tr>
1393 <td>320 dpi (xhdpi)</td>
1394 <td>128MB</td>
1395 </tr>
1396 <tr>
Unsuk Jung9b2d31a2015-10-06 00:03:01 -07001397 <td>360 dpi (360dpi)</td>
1398 <td>160MB</td>
1399 </tr>
1400 <tr>
Unsuk Jung5bc81142015-07-16 22:27:20 -07001401 <td>400 dpi (400dpi)</td>
1402 <td>192MB</td>
1403 </tr>
1404 <tr>
Unsuk Jung9b2d31a2015-10-06 00:03:01 -07001405 <td>420 dpi (420dpi)</td>
1406 <td>228MB</td>
1407 </tr>
1408 <tr>
Unsuk Jung5bc81142015-07-16 22:27:20 -07001409 <td>480 dpi (xxhdpi)</td>
1410 <td>256MB</td>
1411 </tr>
1412 <tr>
1413 <td>560 dpi (560dpi)</td>
1414 <td>384MB</td>
1415 </tr>
1416 <tr>
1417 <td>640 dpi (xxxhdpi)</td>
1418 <td>512MB</td>
1419 </tr>
1420 <tr>
Unsuk Jung9b2d31a2015-10-06 00:03:01 -07001421 <td rowspan="12">xlarge</td>
Unsuk Jung5bc81142015-07-16 22:27:20 -07001422 <td>120 dpi (ldpi)</td>
1423 <td>48MB</td>
1424 </tr>
1425 <tr>
1426 <td>160 dpi (mdpi)</td>
1427 <td>80MB</td>
1428 </tr>
1429 <tr>
1430 <td>213 dpi (tvdpi)</td>
1431 <td rowspan="2">96MB</td>
1432 </tr>
1433 <tr>
1434 <td>240 dpi (hdpi)</td>
1435 </tr>
1436 <tr>
1437 <td>280 dpi (280dpi)</td>
1438 <td>144MB</td>
1439 </tr>
1440 <tr>
1441 <td>320 dpi (xhdpi)</td>
1442 <td>192MB</td>
1443 </tr>
1444 <tr>
Unsuk Jung9b2d31a2015-10-06 00:03:01 -07001445 <td>360 dpi (360dpi)</td>
1446 <td>240MB</td>
1447 </tr>
1448 <tr>
Unsuk Jung5bc81142015-07-16 22:27:20 -07001449 <td>400 dpi (400dpi)</td>
1450 <td>288MB</td>
1451 </tr>
1452 <tr>
Unsuk Jung9b2d31a2015-10-06 00:03:01 -07001453 <td>420 dpi (420dpi)</td>
1454 <td>336MB</td>
1455 </tr>
1456 <tr>
Unsuk Jung5bc81142015-07-16 22:27:20 -07001457 <td>480 dpi (xxhdpi)</td>
1458 <td>384MB</td>
1459 </tr>
1460 <tr>
1461 <td>560 dpi (560dpi)</td>
1462 <td>576MB</td>
1463 </tr>
1464 <tr>
1465 <td>640 dpi (xxxhdpi)</td>
1466 <td>768MB</td>
1467 </tr>
1468</table>
1469
1470
1471<h2 id="3_8_user_interface_compatibility">3.8. User Interface Compatibility</h2>
1472
1473
1474<h3 id="3_8_1_launcher_home_screen">3.8.1. Launcher (Home Screen)</h3>
1475
1476
1477<p>Android includes a launcher application (home screen) and support for
1478third-party applications to replace the device launcher (home screen). Device
1479implementations that allow third-party applications to replace the device home
1480screen MUST declare the platform feature android.software.home_screen.</p>
1481
1482<h3 id="3_8_2_widgets">3.8.2. Widgets</h3>
1483
1484<div class="note">
1485<p>Widgets are optional for all Android device implementations, but SHOULD be
1486supported on Android Handheld devices.</p>
1487</div>
1488
1489
1490<p>Android defines a component type and corresponding API and lifecycle that
Heidi von Markham84564992016-02-09 10:54:20 -08001491allows applications to expose an
1492<a href="http://developer.android.com/guide/practices/ui_guidelines/widget_design.html">&ldquo;AppWidget&rdquo;</a>
1493to the end user, a feature that is STRONGLY RECOMMENDED to be supported on
1494Handheld Device implementations. Device implementations that support embedding
1495widgets on the home screen MUST meet the following requirements and declare
1496support for platform feature android.software.app_widgets.</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07001497
1498<ul>
Heidi von Markham84564992016-02-09 10:54:20 -08001499 <li>Device launchers MUST include built-in support for AppWidgets and expose
1500 user interface affordances to add, configure, view, and remove AppWidgets
1501 directly within the Launcher.</li>
1502 <li>Device implementations MUST be capable of rendering widgets that are 4 x 4
1503 in the standard grid size. See the
1504 <a href="http://developer.android.com/guide/practices/ui_guidelines/widget_design.html">App
1505 Widget Design Guidelines</a> in the Android SDK documentation for details.
1506 </li>
Unsuk Jung5bc81142015-07-16 22:27:20 -07001507 <li>Device implementations that include support for lock screen MAY support
Heidi von Markham84564992016-02-09 10:54:20 -08001508 application widgets on the lock screen.</li>
Unsuk Jung5bc81142015-07-16 22:27:20 -07001509</ul>
1510
1511<h3 id="3_8_3_notifications">3.8.3. Notifications</h3>
1512
1513
Heidi von Markham84564992016-02-09 10:54:20 -08001514<p>Android includes APIs that allow developers to
1515<a href="http://developer.android.com/guide/topics/ui/notifiers/notifications.html">notify
1516users of notable events</a> using hardware and software features of the device.</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07001517
1518<p>Some APIs allow applications to perform notifications or attract attention
Heidi von Markham84564992016-02-09 10:54:20 -08001519using hardware&#8212;specifically sound, vibration, and light. Device
1520implementations MUST support notifications that use hardware features, as
1521described in the SDK documentation, and to the extent possible with the device
1522implementation hardware. For instance, if a device implementation includes a
1523vibrator, it MUST correctly implement the vibration APIs. If a device
1524implementation lacks hardware, the corresponding APIs MUST be implemented as
1525no-ops. This behavior is further detailed in
1526<a href="#7_hardware_compatibility">section 7</a>.</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07001527
Heidi von Markham84564992016-02-09 10:54:20 -08001528<p>Additionally, the implementation MUST correctly render all
1529<a href="https://developer.android.com/guide/topics/resources/available-resources.html">resources</a>
1530(icons, animation files etc.) provided for in the APIs, or in the Status/System
1531Bar <a href="http://developer.android.com/design/style/iconography.html">icon
1532style guide</a>, which in the case of an Android Television device includes the
1533possibility to not display the notifications. Device implementers MAY provide an
1534alternative user experience for notifications than that provided by the
1535reference Android Open Source implementation; however, such alternative
1536notification systems MUST support existing notification resources, as above.</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07001537
1538<p>Android includes support for various notifications, such as:</p>
1539
1540<ul>
Heidi von Markham84564992016-02-09 10:54:20 -08001541 <li><strong>Rich notifications</strong>. Interactive Views for ongoing
1542 notifications.</li>
1543 <li><strong>Heads-up notifications</strong>. Interactive Views users can act
1544 on or dismiss without leaving the current app.</li>
1545 <li><strong>Lockscreen notifications</strong>. Notifications shown over a lock
1546 screen with granular control on visibility.</li>
Unsuk Jung5bc81142015-07-16 22:27:20 -07001547</ul>
1548
Heidi von Markham84564992016-02-09 10:54:20 -08001549<p>Android device implementations, when such notifications are made visible,
1550MUST properly execute Rich and Heads-up notifications and include the
1551title/name, icon, text as
1552<a href="https://developer.android.com/design/patterns/notifications.html">documented
1553in the Android APIs</a>.</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07001554
1555<p>Android includes Notification Listener Service APIs that allow apps (once
1556explicitly enabled by the user) to receive a copy of all notifications as they
1557are posted or updated. Device implementations MUST correctly and promptly send
1558notifications in their entirety to all such installed and user-enabled listener
Heidi von Markham84564992016-02-09 10:54:20 -08001559services, including any and all metadata attached to the Notification object.
1560</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07001561
1562<h3 id="3_8_4_search">3.8.4. Search</h3>
1563
1564
Heidi von Markham84564992016-02-09 10:54:20 -08001565<p>Android includes APIs that allow developers to
1566<a href="http://developer.android.com/reference/android/app/SearchManager.html">incorporate
1567search</a> into their applications and expose their application&rsquo;s data
1568into the global system search. Generally speaking, this functionality consists
1569of a single, system-wide user interface that allows users to enter queries,
1570displays suggestions as users type, and displays results. The Android APIs allow
1571developers to reuse this interface to provide search within their own apps and
1572allow developers to supply results to the common global search user interface.
1573</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07001574
Heidi von Markham84564992016-02-09 10:54:20 -08001575<p>Android device implementations SHOULD include global search, a single,
1576shared, system-wide search user interface capable of real-time suggestions in
1577response to user input. Device implementations SHOULD implement the APIs that
1578allow developers to reuse this user interface to provide search within their own
Unsuk Jung5bc81142015-07-16 22:27:20 -07001579applications. Device implementations that implement the global search interface
1580MUST implement the APIs that allow third-party applications to add suggestions
1581to the search box when it is run in global search mode. If no third-party
1582applications are installed that make use of this functionality, the default
1583behavior SHOULD be to display web search engine results and suggestions.</p>
1584
Unsuk Jungf8c93032015-10-05 23:40:54 -07001585<p>Android device implementations SHOULD implement an assistant on the device
Heidi von Markham84564992016-02-09 10:54:20 -08001586to handle the
1587<a href="http://developer.android.com/reference/android/content/Intent.html#ACTION_ASSIST">Assist
1588action</a>.</p>
Unsuk Jungf8c93032015-10-05 23:40:54 -07001589
Heidi von Markham84564992016-02-09 10:54:20 -08001590<p>Android also includes the
1591<a href="https://developer.android.com/reference/android/app/assist/package-summary.html">Assist
1592APIs</a> to allow applications to elect how much information of the current
1593context is shared with the assistant on the device. Device implementations
1594supporting the Assist action MUST indicate clearly to the end user when the the
1595context is shared by displaying a white light around the edges of the screen. To
1596ensure clear visibility to the end user, the indication MUST meet or exceed the
1597duration and brightness of the Android Open Source Project implementation.</p>
Unsuk Jungf8c93032015-10-05 23:40:54 -07001598
Unsuk Jung5bc81142015-07-16 22:27:20 -07001599<h3 id="3_8_5_toasts">3.8.5. Toasts</h3>
1600
1601
Heidi von Markham84564992016-02-09 10:54:20 -08001602<p>Applications can use the <a href="http://developer.android.com/reference/android/widget/Toast.html">&ldquo;Toast&rdquo;
1603API</a> to display short non-modal strings to the end user that disappear after
1604a brief period of time. Device implementations MUST display Toasts from
1605applications to end users in some high-visibility manner.</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07001606
1607<h3 id="3_8_6_themes">3.8.6. Themes</h3>
1608
1609
Heidi von Markham84564992016-02-09 10:54:20 -08001610<p>Android provides &ldquo;themes&rdquo; as a mechanism for applications to
1611apply styles across an entire Activity or application.</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07001612
Heidi von Markham84564992016-02-09 10:54:20 -08001613<p>Android includes a &ldquo;Holo&rdquo; theme family as a set of defined styles
1614for application developers to use if they want to match the
1615<a href="http://developer.android.com/guide/topics/ui/themes.html">Holo theme
1616look and feel</a> as defined by the Android SDK. Device implementations MUST NOT
1617alter any of the
1618<a href="http://developer.android.com/reference/android/R.style.html">Holo
1619theme attributes</a> exposed to applications.</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07001620
Heidi von Markham84564992016-02-09 10:54:20 -08001621<p>Android includes a &ldquo;Material&rdquo; theme family as a set of defined
1622styles for application developers to use if they want to match the design
1623theme&rsquo;s look and feel across the wide variety of different Android device
1624types. Device implementations MUST support the &ldquo;Material&rdquo; theme
1625family and MUST NOT alter any of the
1626<a href="http://developer.android.com/reference/android/R.style.html#Theme_Material">Material
1627theme attributes</a> or their assets exposed to applications.</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07001628
Heidi von Markham84564992016-02-09 10:54:20 -08001629<p>Android also includes a &ldquo;Device Default&rdquo; theme family as a set of
1630defined styles for application developers to use if they want to match the look
1631and feel of the device theme as defined by the device implementer. Device
1632implementations MAY modify the
1633<a href="http://developer.android.com/reference/android/R.style.html">Device
1634Default theme attributes</a> exposed to applications.</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07001635
Danielle Robertsbe0f08c2015-09-29 14:09:34 -07001636<p>Android supports a variant theme with translucent system bars, which allows
Unsuk Jung5bc81142015-07-16 22:27:20 -07001637application developers to fill the area behind the status and navigation bar
1638with their app content. To enable a consistent developer experience in this
1639configuration, it is important the status bar icon style is maintained across
1640different device implementations. Therefore, Android device implementations
1641MUST use white for system status icons (such as signal strength and battery
1642level) and notifications issued by the system, unless the icon is indicating a
Danielle Robertsbe0f08c2015-09-29 14:09:34 -07001643problematic status or an app requests a light status bar using the
1644SYSTEM_UI_FLAG_LIGHT_STATUS_BAR flag. When an app requests a light status bar,
1645Android device implementations MUST change the color of the system status icons
Heidi von Markham84564992016-02-09 10:54:20 -08001646to black (for details, refer to
1647<a href="http://developer.android.com/reference/android/R.style.html">R.style</a>).</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07001648
1649<h3 id="3_8_7_live_wallpapers">3.8.7. Live Wallpapers</h3>
1650
1651
1652<p>Android defines a component type and corresponding API and lifecycle that
Heidi von Markham84564992016-02-09 10:54:20 -08001653allows applications to expose one or more
1654<a href="http://developer.android.com/reference/android/service/wallpaper/WallpaperService.html">&ldquo;Live
1655Wallpapers&rdquo;</a> to the end user. Live wallpapers are animations, patterns,
1656or similar images with limited input capabilities that display as a wallpaper,
1657behind other applications.</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07001658
1659<p>Hardware is considered capable of reliably running live wallpapers if it can
1660run all live wallpapers, with no limitations on functionality, at a reasonable
1661frame rate with no adverse effects on other applications. If limitations in the
1662hardware cause wallpapers and/or applications to crash, malfunction, consume
1663excessive CPU or battery power, or run at unacceptably low frame rates, the
1664hardware is considered incapable of running live wallpaper. As an example, some
1665live wallpapers may use an OpenGL 2.0 or 3.x context to render their content.
1666Live wallpaper will not run reliably on hardware that does not support multiple
1667OpenGL contexts because the live wallpaper use of an OpenGL context may
1668conflict with other applications that also use an OpenGL context.</p>
1669
Heidi von Markham84564992016-02-09 10:54:20 -08001670<p>Device implementations capable of running live wallpapers reliably as
1671described above SHOULD implement live wallpapers, and when implemented MUST
1672report the platform feature flag android.software.live_wallpaper.</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07001673
1674<h3 id="3_8_8_activity_switching">3.8.8. Activity Switching</h3>
1675
1676<div class="note">
1677<p>As the Recent function navigation key is OPTIONAL, the requirements to
1678implement the overview screen is OPTIONAL for Android Television devices and
1679Android Watch devices.</p>
1680</div>
1681
1682
Heidi von Markham84564992016-02-09 10:54:20 -08001683<p>The upstream Android source code includes the
1684<a href="http://developer.android.com/guide/components/recents.html">overview
1685screen</a>, a system-level user interface for task switching and displaying
1686recently accessed activities and tasks using a thumbnail image of the
1687application&rsquo;s graphical state at the moment the user last left the
1688application. Device implementations including the recents function navigation
1689key as detailed in <a href="#7_2_3_navigation_keys">section 7.2.3</a> MAY alter
1690the interface but MUST meet the following requirements:</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07001691
1692<ul>
1693 <li>MUST display affiliated recents as a group that moves together.</li>
1694 <li>MUST support at least up to 20 displayed activities.</li>
1695 <li>MUST at least display the title of 4 activities at a time.</li>
1696 <li>SHOULD display highlight color, icon, screen title in recents.</li>
Heidi von Markham84564992016-02-09 10:54:20 -08001697 <li>MUST implement the
1698 <a href="http://developer.android.com/about/versions/android-5.0.html#ScreenPinning">screen
1699 pinning behavior</a>] and provide the user with a settings menu to toggle the
1700 feature.</li>
Unsuk Jung5bc81142015-07-16 22:27:20 -07001701 <li>SHOULD display a closing affordance ("x") but MAY delay this until user
Heidi von Markham84564992016-02-09 10:54:20 -08001702 interacts with screens.</li>
Unsuk Jung5bc81142015-07-16 22:27:20 -07001703</ul>
1704
Heidi von Markham84564992016-02-09 10:54:20 -08001705<p>Device implementations are STRONGLY RECOMMENDED to use the upstream Android
1706user interface (or a similar thumbnail-based interface) for the overview screen.
1707</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07001708
1709<h3 id="3_8_9_input_management">3.8.9. Input Management</h3>
1710
1711
Heidi von Markham84564992016-02-09 10:54:20 -08001712<p>Android includes support for
1713<a href="http://developer.android.com/guide/topics/text/creating-input-method.html">Input
1714Management</a> and support for third-party input method editors. Device
1715implementations that allow users to use third-party input methods on the device
1716MUST declare the platform feature android.software.input_methods and support IME
1717APIs as defined in the Android SDK documentation.</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07001718
Heidi von Markham84564992016-02-09 10:54:20 -08001719<p>Device implementations that declare the
1720android.software.input_methods feature MUST provide a user-accessible mechanism
1721to add and configure third-party input methods. Device implementations MUST
1722display the settings interface in response to the
1723android.settings.INPUT_METHOD_SETTINGS intent.</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07001724
1725<h3 id="3_8_10_lock_screen_media_control">3.8.10. Lock Screen Media Control</h3>
1726
1727
1728<p>The Remote Control Client API is deprecated from Android 5.0 in favor of the
Heidi von Markham84564992016-02-09 10:54:20 -08001729<a href="http://developer.android.com/reference/android/app/Notification.MediaStyle.html">Media
1730Notification Template</a> that allows media applications to integrate with
1731playback controls that are displayed on the lock screen. Device implementations
1732that support a lock screen, unless an Android Automotive or Watch
1733implementation, MUST display the Lockscreen Notifications including the Media
1734Notification Template.</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07001735
1736<h3 id="3_8_11_dreams">3.8.11. Dreams</h3>
1737
1738
Heidi von Markham84564992016-02-09 10:54:20 -08001739<p>Android includes support for interactive screensavers called
1740<a href="http://developer.android.com/reference/android/service/dreams/DreamService.html">Dreams</a>.
1741Dreams allows users to interact with applications when a device connected to
Unsuk Jung5bc81142015-07-16 22:27:20 -07001742a power source is idle or docked in a desk dock. Android Watch devices MAY
1743implement Dreams, but other types of device implementations SHOULD include
1744support for Dreams and provide a settings option for users to configure Dreams
1745in response to the android.settings.DREAM_SETTINGS intent.</p>
1746
1747<h3 id="3_8_12_location">3.8.12. Location</h3>
1748
1749
Heidi von Markham84564992016-02-09 10:54:20 -08001750<p>When a device has a hardware sensor (e.g. GPS) that is capable of providing
1751the location coordinates,
1752<a href="http://developer.android.com/reference/android/provider/Settings.Secure.html#LOCATION_MODE">location
1753modes</a> MUST be displayed in the Location menu within Settings.</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07001754
1755<h3 id="3_8_13_unicode_and_font">3.8.13. Unicode and Font</h3>
1756
1757
1758<p>Android includes support for color emoji characters. When Android device
1759implementations include an IME, devices SHOULD provide an input method to the
Heidi von Markham84564992016-02-09 10:54:20 -08001760user for the Emoji characters defined in
1761<a href="http://www.unicode.org/versions/Unicode6.1.0/">Unicode 6.1</a>. All
1762devices MUST be capable of rendering these emoji characters in color glyph.</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07001763
1764<p>Android includes support for Roboto 2 font with different
Heidi von Markham84564992016-02-09 10:54:20 -08001765weights&mdash;sans-serif-thin, sans-serif-light, sans-serif-medium,
1766sans-serif-black, sans-serif-condensed, sans-serif-condensed-light&mdash;which
1767MUST all be included for the languages available on the device and full Unicode
17687.0 coverage of Latin, Greek, and Cyrillic, including the Latin Extended A, B,
1769C, and D ranges, and all glyphs in the currency symbols block of Unicode 7.0.
1770</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07001771
1772<h2 id="3_9_device_administration">3.9. Device Administration</h2>
1773
Unsuk Jung5bc81142015-07-16 22:27:20 -07001774<p>Android includes features that allow security-aware applications to perform
1775device administration functions at the system level, such as enforcing password
Heidi von Markham84564992016-02-09 10:54:20 -08001776policies or performing remote wipe, through the
1777<a href="http://developer.android.com/guide/topics/admin/device-admin.html">Android
1778Device Administration API</a>]. Device implementations MUST provide an
1779implementation of the <a href="http://developer.android.com/reference/android/app/admin/DevicePolicyManager.html">DevicePolicyManager</a>
1780class. Device implementations that include support for PIN (numeric) or PASSWORD
1781(alphanumeric) based lock screens MUST support the full range of
1782<a href="http://developer.android.com/guide/topics/admin/device-admin.html">device
1783administration</a> policies defined in the Android SDK documentation and report
1784the platform feature android.software.device_admin.</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07001785
Andy Dyer-smith3d24bbe2015-09-11 15:35:23 +01001786<h3 id="3_9_1_device_provisioning">3.9.1 Device Provisioning</h3>
Heidi von Markham84564992016-02-09 10:54:20 -08001787
Andy Dyer-smith3d24bbe2015-09-11 15:35:23 +01001788<h4 id="3_9_1_1_device_owner_provisioning">3.9.1.1 Device owner provisioning</h4>
Heidi von Markham84564992016-02-09 10:54:20 -08001789<p>If a device implementation declares the android.software.device_admin
1790feature, the out of box setup flow MUST make it possible to enroll a Device
1791Policy Controller (DPC) application as the
1792<a href="http://developer.android.com/reference/android/app/admin/DevicePolicyManager.html#isDeviceOwnerApp(java.lang.String)">Device
1793Owner app</a>. Device implementations MAY have a preinstalled application
Andy Dyer-smith3d24bbe2015-09-11 15:35:23 +01001794performing device administration functions but this application MUST NOT be set
1795as the Device Owner app without explicit consent or action from the user or the
1796administrator of the device.</p>
1797
1798<p>The device owner provisioning process (the flow initiated by
Heidi von Markham84564992016-02-09 10:54:20 -08001799<a href="http://developer.android.com/reference/android/app/admin/DevicePolicyManager.html#ACTION_PROVISION_MANAGED_DEVICE">android.app.action.PROVISION_MANAGED_DEVICE</a>)
1800user experience MUST align with the AOSP implementation.</p>
Andy Dyer-smith3d24bbe2015-09-11 15:35:23 +01001801
1802<p>If the device implementation reports android.hardware.nfc, it MUST have NFC
Heidi von Markham84564992016-02-09 10:54:20 -08001803enabled, even during the out-of-box setup flow, in order to allow for
1804<a href="https://source.android.com/devices/tech/admin/provision.html#device_owner_provisioning_via_nfc">NFC
1805provisioning of Device owners</a>.</p>
Andy Dyer-smith3d24bbe2015-09-11 15:35:23 +01001806
Heidi von Markham84564992016-02-09 10:54:20 -08001807<h4 id="3_9_1_2_managed_profile_provisioning">3.9.1.2 Managed profile
1808provisioning</h4>
Andy Dyer-smith3d24bbe2015-09-11 15:35:23 +01001809<p>If a device implementation declares the android.software.managed_users,
1810it MUST be possible to enroll a Device Policy Controller (DPC) application
Heidi von Markham84564992016-02-09 10:54:20 -08001811as the
1812<a href="http://developer.android.com/reference/android/app/admin/DevicePolicyManager.html#isProfileOwnerApp(java.lang.String)">owner
1813of a new Managed Profile</a>.</p>
Andy Dyer-smith3d24bbe2015-09-11 15:35:23 +01001814
1815<p>The managed profile provisioning process (the flow initiated by
Heidi von Markham84564992016-02-09 10:54:20 -08001816<a href="http://developer.android.com/reference/android/app/admin/DevicePolicyManager.html#ACTION_PROVISION_MANAGED_PROFILE">android.app.action.PROVISION_MANAGED_PROFILE</a>)
1817user experience MUST align with the AOSP implementation.</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07001818
Andy Dyer-smith63b28782015-09-10 17:06:24 +01001819
1820<h2 id="3_9_2_managed_profile_support">3.9.2 Managed Profile Support</h2>
1821
1822<p>Managed profile capable devices are those devices that:</p>
1823<ul>
Heidi von Markham84564992016-02-09 10:54:20 -08001824 <li>Declare android.software.device_admin (see
1825 <a href="#3_9_device_administration">section 3.9 Device Administration</a>).
1826 </li>
1827 <li>Are not low RAM devices (see
1828 <a href="#7_6_1_minimum_memory_and_storage">section 7.6.1</a>).</li>
Andy Dyer-smith63b28782015-09-10 17:06:24 +01001829 <li>Allocate internal (non-removable) storage as shared storage (see
Heidi von Markham84564992016-02-09 10:54:20 -08001830 <a href="#7_6_2_application_shared_storage">section 7.6.2</a>).</li>
Andy Dyer-smith63b28782015-09-10 17:06:24 +01001831</ul>
1832<p>Managed profile capable devices MUST:</p>
1833<ul>
1834 <li>Declare the platform feature flag android.software.managed_users.</li>
Heidi von Markham84564992016-02-09 10:54:20 -08001835 <li>Support managed profiles via the android.app.admin.DevicePolicyManager APIs.</li>
1836 <li>Allow one and only
1837 <a href="http://developer.android.com/reference/android/app/admin/DevicePolicyManager.html#ACTION_PROVISION_MANAGED_PROFILE">one
1838 managed profile to be created</a>.</li>
Andy Dyer-smith63b28782015-09-10 17:06:24 +01001839 <li>Use an icon badge (similar to the AOSP upstream work badge) to represent
Heidi von Markham84564992016-02-09 10:54:20 -08001840 the managed applications and widgets and other badged UI elements like Recents
1841 &amp; Notifications.</li>
Andy Dyer-smith63b28782015-09-10 17:06:24 +01001842 <li>Display a notification icon (similar to the AOSP upstream work badge) to
Heidi von Markham84564992016-02-09 10:54:20 -08001843 indicate when user is within a managed profile application.</li>
1844 <li>Display a toast indicating that the user is in the managed profile if and
1845 when the device wakes up (ACTION_USER_PRESENT) and the foreground application
1846 is within the managed profile.</li>
Andy Dyer-smith63b28782015-09-10 17:06:24 +01001847 <li>Where a managed profile exists, show a visual affordance in the Intent
Heidi von Markham84564992016-02-09 10:54:20 -08001848 'Chooser' to allow the user to forward the intent from the managed profile to
1849 the primary user or vice versa, if enabled by the Device Policy Controller.
1850 </li>
1851 <li>Where a managed profile exists, expose the following user affordances for
1852 both the primary user and the managed profile:
1853 <ul>
1854 <li>Separate accounting for battery, location, mobile data and storage usage
1855 for the primary user and managed profile.</li>
1856 <li>Independent management of VPN Applications installed within the primary
1857 user or managed profile.</li>
1858 <li>Independent management of applications installed within the primary user
1859 or managed profile.</li>
1860 <li>Independent management of accounts within the primary user or managed
1861 profile.</li>
1862 </ul>
Andy Dyer-smith63b28782015-09-10 17:06:24 +01001863 </li>
1864 <li>Ensure the default dialer can look up caller information from the managed
Heidi von Markham84564992016-02-09 10:54:20 -08001865 profile (if one exists) alongside those from the primary profile, if the
1866 Device Policy Controller permits it.</li>
1867 <li>MUST ensure that it satisfies all the security requirements applicable for
1868 a device with multiple users enabled (see
1869 <a href="#9_5_multi-user_support">section 9.5</a>), even though the managed
1870 profile is not counted as another user in addition to the primary user.</li>
Andy Dyer-smith63b28782015-09-10 17:06:24 +01001871</ul>
1872
Unsuk Jung5bc81142015-07-16 22:27:20 -07001873<h2 id="3_10_accessibility">3.10. Accessibility</h2>
1874
1875
1876<p>Android provides an accessibility layer that helps users with disabilities to
1877navigate their devices more easily. In addition, Android provides platform APIs
Heidi von Markham84564992016-02-09 10:54:20 -08001878that enable
1879<a href="http://developer.android.com/reference/android/accessibilityservice/AccessibilityService.html">accessibility
1880service implementations</a> to receive callbacks for user and system events and
1881generate alternate feedback mechanisms, such as text-to-speech, haptic feedback,
1882and trackball/d-pad navigation.</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07001883
1884<p>Device implementations include the following requirements:</p>
1885
1886<ul>
Heidi von Markham84564992016-02-09 10:54:20 -08001887 <li>Android Automotive implementations SHOULD provide an implementation of the
1888 Android accessibility framework consistent with the default Android
1889 implementation.</li>
1890 <li>Device implementations (Android Automotive excluded) MUST provide an
1891 implementation of the Android accessibility framework consistent with the
1892 default Android implementation.</li>
1893 <li>Device implementations (Android Automotive excluded) MUST support
1894 third-party accessibility service implementations through the
1895 <a href="http://developer.android.com/reference/android/view/accessibility/package-summary.html">android.accessibilityservice APIs</a>.
1896 </li>
1897 <li>Device implementations (Android Automotive excluded) MUST generate
1898 AccessibilityEvents and deliver these events to all registered
1899 AccessibilityService implementations in a manner consistent with the default
1900 Android implementation</li>
1901 <li>Device implementations (Android Automotive and Android Watch devices with
1902 no audio output excluded), MUST provide a user-accessible mechanism to enable
1903 and disable accessibility services, and MUST display this interface in
1904 response to the android.provider.Settings.ACTION_ACCESSIBILITY_SETTINGS
1905 intent.</li>
Unsuk Jung5bc81142015-07-16 22:27:20 -07001906</ul>
1907
1908<p>Additionally, device implementations SHOULD provide an implementation of an
1909accessibility service on the device, and SHOULD provide a mechanism for users
1910to enable the accessibility service during device setup. An open source
Heidi von Markham84564992016-02-09 10:54:20 -08001911implementation of an accessibility service is available from the
1912<a href="http://code.google.com/p/eyes-free/">Eyes Free project</a>.</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07001913
1914<h2 id="3_11_text-to-speech">3.11. Text-to-Speech</h2>
1915
1916
1917<p>Android includes APIs that allow applications to make use of text-to-speech
1918(TTS) services and allows service providers to provide implementations of TTS
Heidi von Markham84564992016-02-09 10:54:20 -08001919services. Device implementations reporting the feature
1920android.hardware.audio.output MUST meet these requirements related to the
1921<a href="http://developer.android.com/reference/android/speech/tts/package-summary.html">Android
1922TTS framework</a>.</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07001923
1924<p>Android Automotive implementations:</p>
1925<ul>
Heidi von Markham84564992016-02-09 10:54:20 -08001926 <li>MUST support the Android TTS framework APIs.</li>
1927 <li>MAY support installation of third-party TTS engines. If supported,
1928 partners MUST provide a user-accessible interface that allows the user to
1929 select a TTS engine for use at system level.</li>
Unsuk Jung5bc81142015-07-16 22:27:20 -07001930</ul>
1931
1932<p>All other device implementations:</p>
1933
1934<ul>
Heidi von Markham84564992016-02-09 10:54:20 -08001935 <li>MUST support the Android TTS framework APIs and SHOULD include a TTS
1936 engine supporting the languages available on the device. Note that the
1937 upstream Android open source software includes a full-featured TTS engine
1938 implementation.
1939 <li>MUST support installation of third-party TTS engines.
1940 <li>MUST provide a user-accessible interface that allows users to select a TTS
1941 engine for use at the system level.
Unsuk Jung5bc81142015-07-16 22:27:20 -07001942</ul>
1943
1944<h2 id="3_12_tv_input_framework">3.12. TV Input Framework</h2>
1945
1946
Heidi von Markham84564992016-02-09 10:54:20 -08001947<p>The <a href="http://source.android.com/devices/tv/index.html">Android
1948Television Input Framework (TIF)</a> simplifies the delivery of live content to
1949Android Television devices. TIF provides a standard API to create input modules
1950that control Android Television devices. Android Television device
1951implementations MUST support TV Input Framework.</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07001952
1953<p>Device implementations that support TIF MUST declare the platform feature
1954android.software.live_tv.</p>
1955
Danielle Roberts239d2c72015-09-28 13:38:45 -07001956<h3 id="3_12_1_tv_app">3.12.1. TV App</h3>
1957
1958<p>Any device implementation that declares support for Live TV MUST have an
Heidi von Markham84564992016-02-09 10:54:20 -08001959installed TV application (TV App). The Android Open Source Project provides an
1960implementation of the TV App.</p>
Danielle Roberts239d2c72015-09-28 13:38:45 -07001961
Heidi von Markham84564992016-02-09 10:54:20 -08001962<p>The TV App MUST provide facilities to install and use
1963<a href="http://developer.android.com/reference/android/media/tv/TvContract.Channels.html">TV
1964Channels</a> and meet the following requirements:</p>
Danielle Roberts239d2c72015-09-28 13:38:45 -07001965
1966<ul>
Heidi von Markham84564992016-02-09 10:54:20 -08001967 <li>Device implementations MUST allow third-party TIF-based inputs
1968 (<a href="https://source.android.com/devices/tv/index.html#third-party_input_example">third-party
1969 inputs</a>) to be installed and managed.</li>
Danielle Roberts239d2c72015-09-28 13:38:45 -07001970 <li>Device implementations MAY provide visual separation between pre-installed
Heidi von Markham84564992016-02-09 10:54:20 -08001971 <a href="https://source.android.com/devices/tv/index.html#tv_inputs">TIF-based
1972 inputs</a> (installed inputs) and third-party inputs.</li>
1973 <li>Device implementations MUST NOT display the third-party inputs more than a
1974 single navigation action away from the TV App (i.e. expanding a list of
1975 third-party inputs from the TV App).</li>
Danielle Roberts239d2c72015-09-28 13:38:45 -07001976</ul>
1977
Heidi von Markham84564992016-02-09 10:54:20 -08001978<h4 id="3_12_1_1_electronic_program_guide">3.12.1.1. Electronic Program
1979Guide</h4>
Danielle Roberts239d2c72015-09-28 13:38:45 -07001980
1981<p>Android Television device implementations MUST show an informational and
1982interactive overlay, which MUST include an electronic program guide (EPG)
Heidi von Markham84564992016-02-09 10:54:20 -08001983generated from the values in the
1984<a href="https://developer.android.com/reference/android/media/tv/TvContract.Programs.html">TvContract.Programs</a>
1985fields. The EPG MUST meet the following requirements:</p>
Danielle Roberts239d2c72015-09-28 13:38:45 -07001986
1987<ul>
1988 <li>The EPG MUST display information from all installed inputs and third-party
Heidi von Markham84564992016-02-09 10:54:20 -08001989 inputs.</li>
Danielle Roberts239d2c72015-09-28 13:38:45 -07001990 <li>The EPG MAY provide visual separation between the installed inputs and
Heidi von Markham84564992016-02-09 10:54:20 -08001991 third-party inputs.</li>
1992 <li>The EPG is STRONGLY RECOMMENDED to display installed inputs and
1993 third-party inputs with equal prominence. The EPG MUST NOT display the
1994 third-party inputs more than a single navigation action away from the
1995 installed inputs on the EPG.</li>
Danielle Roberts239d2c72015-09-28 13:38:45 -07001996 <li>On channel change, device implementations MUST display EPG data for the
Heidi von Markham84564992016-02-09 10:54:20 -08001997 currently playing program.</li>
Danielle Roberts239d2c72015-09-28 13:38:45 -07001998</ul>
1999
2000<h4 id="3_12_1_2_navigation">3.12.1.2. Navigation</h4>
2001
2002<p>Android Television device input devices (i.e. remote control, remote control
2003application, or game controller) MUST allow navigation to all actionable
2004sections of the screen via the D-pad. D-pad up and down MUST be used to change
2005live TV channels when there is no actionable section on the screen.</p>
2006
2007<p>The TV App SHOULD pass key events to HDMI inputs through CEC.</p>
2008
2009<h4 id="3_12_1_3_tv_input_app_linking">3.12.1.3. TV input app linking</h4>
2010
Heidi von Markham84564992016-02-09 10:54:20 -08002011<p>Android Television device implementations MUST support
2012<a href="http://developer.android.com/reference/android/media/tv/TvContract.Channels.html#COLUMN_APP_LINK_INTENT_URI">TV
2013input app linking</a>, which allows all inputs to provide activity links from
2014the current activity to another activity (i.e. a link from live programming to
2015related content). The TV App MUST show TV input app linking when it is provided.
2016</p>
Danielle Roberts239d2c72015-09-28 13:38:45 -07002017
Heidi von Markham84564992016-02-09 10:54:20 -08002018<h1 id="4_application_packaging_compatibility">4. Application Packaging
2019Compatibility</h1>
Unsuk Jung5bc81142015-07-16 22:27:20 -07002020
2021
Heidi von Markham84564992016-02-09 10:54:20 -08002022<p>Device implementations MUST install and run Android &ldquo;.apk&rdquo; files
2023as generated by the &ldquo;aapt&rdquo; tool included in the
2024<a href="http://developer.android.com/tools/help/index.html">official Android
2025SDK</a>.</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07002026
Heidi von Markham84564992016-02-09 10:54:20 -08002027<p>Devices implementations MUST NOT extend either the
2028<a href="http://developer.android.com/guide/components/fundamentals.html">.apk</a>,
2029<a href="http://developer.android.com/guide/topics/manifest/manifest-intro.html">Android
2030Manifest</a>, <a href="https://android.googlesource.com/platform/dalvik/">Dalvik
2031bytecode</a>, or RenderScript bytecode formats in such a way that would prevent
2032those files from installing and running correctly on other compatible devices.
2033</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07002034
2035<h1 id="5_multimedia_compatibility">5. Multimedia Compatibility</h1>
2036
2037
2038<h2 id="5_1_media_codecs">5.1. Media Codecs</h2>
2039
2040
Heidi von Markham84564992016-02-09 10:54:20 -08002041<p>Device implementations MUST support the
2042<a href="http://developer.android.com/guide/appendix/media-formats.html">core
2043media formats</a> specified in the Android SDK documentation except where
2044explicitly permitted in this document. Specifically, device implementations MUST
2045support the media formats, encoders, decoders, file types, and container formats
2046defined in the tables below and reported via
2047<a href="http://developer.android.com/reference/android/media/MediaCodecList.html">MediaCodecList</a>.
2048Device implementations MUST also be able to decode all profiles reported in its
2049<a href="http://developer.android.com/reference/android/media/CamcorderProfile.html">CamcorderProfile</a>
2050and MUST be able to decode all formats it can encode. All of these codecs are
Unsuk Jung5bc81142015-07-16 22:27:20 -07002051provided as software implementations in the preferred Android implementation
2052from the Android Open Source Project.</p>
2053
2054<p>Please note that neither Google nor the Open Handset Alliance make any
2055representation that these codecs are free from third-party patents. Those
2056intending to use this source code in hardware or software products are advised
2057that implementations of this code, including in open source software or
2058shareware, may require patent licenses from the relevant patent holders.</p>
2059
2060<h3 id="5_1_1_audio_codecs">5.1.1. Audio Codecs</h3>
2061
2062<table>
2063 <tr>
2064 <th>Format/Codec</th>
2065 <th>Encoder</th>
2066 <th>Decoder</th>
2067 <th>Details</th>
2068 <th>Supported File Types/Container Formats</th>
2069 </tr>
2070 <tr>
Glenn Kastenee7e79a2015-10-06 15:01:45 -07002071 <td>MPEG-4 AAC Profile<br />
Unsuk Jung5bc81142015-07-16 22:27:20 -07002072
Glenn Kastenee7e79a2015-10-06 15:01:45 -07002073(AAC LC)</td>
Unsuk Jung5bc81142015-07-16 22:27:20 -07002074 <td>REQUIRED<sup>1</sup></td>
2075 <td>REQUIRED</td>
Heidi von Markham84564992016-02-09 10:54:20 -08002076 <td>Support for mono/stereo/5.0/5.1<sup>2</sup> content with standard
2077 sampling rates from 8 to 48 kHz.</td>
Unsuk Jung5bc81142015-07-16 22:27:20 -07002078 <td>
2079 <ul>
2080 <li class="table_list">3GPP (.3gp)</li>
2081 <li class="table_list">MPEG-4 (.mp4, .m4a)</li>
Heidi von Markham84564992016-02-09 10:54:20 -08002082 <li class="table_list">ADTS raw AAC (.aac, decode in Android 3.1+, encode in
2083 Android 4.0+, ADIF not supported)</li>
2084 <li class="table_list">MPEG-TS (.ts, not seekable, Android 3.0+)</li></ul>
2085 </td>
Unsuk Jung5bc81142015-07-16 22:27:20 -07002086 </tr>
2087 <tr>
2088 <td>MPEG-4 HE AAC Profile (AAC+)</td>
2089 <td>REQUIRED<sup>1</sup><br>(Android 4.1+)</td>
2090 <td>REQUIRED</td>
Heidi von Markham84564992016-02-09 10:54:20 -08002091 <td>Support for mono/stereo/5.0/5.1<sup>2</sup> content with standard
2092 sampling rates from 16 to 48 kHz.</td>
Unsuk Jung5bc81142015-07-16 22:27:20 -07002093 <td></td>
2094 </tr>
2095 <tr>
Glenn Kastenee7e79a2015-10-06 15:01:45 -07002096 <td>MPEG-4 HE AACv2<br />
Unsuk Jung5bc81142015-07-16 22:27:20 -07002097
Glenn Kastenee7e79a2015-10-06 15:01:45 -07002098Profile (enhanced AAC+)</td>
Unsuk Jung5bc81142015-07-16 22:27:20 -07002099 <td> </td>
2100 <td>REQUIRED</td>
Heidi von Markham84564992016-02-09 10:54:20 -08002101 <td>Support for mono/stereo/5.0/5.1<sup>2</sup> content with standard
2102 sampling rates from 16 to 48 kHz.</td>
Unsuk Jung5bc81142015-07-16 22:27:20 -07002103 <td></td>
2104 </tr>
2105 <tr>
2106 <td>AAC ELD (enhanced low delay AAC)</td>
Glenn Kastenee7e79a2015-10-06 15:01:45 -07002107 <td>REQUIRED<sup>1</sup> <br />
Unsuk Jung5bc81142015-07-16 22:27:20 -07002108
Glenn Kastenee7e79a2015-10-06 15:01:45 -07002109(Android 4.1+)</td>
2110 <td>REQUIRED<br />
Unsuk Jung5bc81142015-07-16 22:27:20 -07002111
Glenn Kastenee7e79a2015-10-06 15:01:45 -07002112(Android 4.1+)</td>
Heidi von Markham84564992016-02-09 10:54:20 -08002113 <td>Support for mono/stereo content with standard sampling rates from 16 to
2114 48 kHz.</td>
Unsuk Jung5bc81142015-07-16 22:27:20 -07002115 <td></td>
2116 </tr>
2117 <tr>
2118 <td>AMR-NB</td>
2119 <td>REQUIRED<sup>3</sup></td>
2120 <td>REQUIRED<sup>3</sup></td>
Glenn Kasten20cdbb72015-09-24 11:56:42 -07002121 <td>4.75 to 12.2 kbps sampled @ 8 kHz</td>
Unsuk Jung5bc81142015-07-16 22:27:20 -07002122 <td>3GPP (.3gp)</td>
2123 </tr>
2124 <tr>
2125 <td>AMR-WB</td>
2126 <td>REQUIRED<sup>3</sup></td>
2127 <td>REQUIRED<sup>3</sup></td>
Glenn Kasten20cdbb72015-09-24 11:56:42 -07002128 <td>9 rates from 6.60 kbit/s to 23.85 kbit/s sampled @ 16 kHz</td>
Unsuk Jung5bc81142015-07-16 22:27:20 -07002129 <td></td>
2130 </tr>
2131 <tr>
2132 <td>FLAC</td>
2133 <td></td>
2134 <td>REQUIRED <br>(Android 3.1+)</td>
Heidi von Markham84564992016-02-09 10:54:20 -08002135 <td>Mono/Stereo (no multichannel). Sample rates up to 48 kHz (but up to 44.1
2136 kHz is RECOMMENDED on devices with 44.1 kHz output, as the 48 to 44.1 kHz
2137 downsampler does not include a low-pass filter). 16-bit RECOMMENDED; no
2138 dither applied for 24-bit.</td>
Unsuk Jung5bc81142015-07-16 22:27:20 -07002139 <td>FLAC (.flac) only</td>
2140 </tr>
2141 <tr>
2142 <td>MP3</td>
2143 <td></td>
2144 <td>REQUIRED</td>
2145 <td>Mono/Stereo 8-320Kbps constant (CBR) or variable bitrate (VBR)</td>
2146 <td>MP3 (.mp3)</td>
2147 </tr>
2148 <tr>
2149 <td>MIDI</td>
2150 <td></td>
2151 <td>REQUIRED</td>
2152 <td>MIDI Type 0 and 1. DLS Version 1 and 2. XMF and Mobile XMF. Support for
Heidi von Markham84564992016-02-09 10:54:20 -08002153 ringtone formats RTTTL/RTX, OTA, and iMelody</td>
Unsuk Jung5bc81142015-07-16 22:27:20 -07002154 <td><ul>
2155 <li class="table_list">Type 0 and 1 (.mid, .xmf, .mxmf)</li>
2156 <li class="table_list">RTTTL/RTX (.rtttl, .rtx)</li>
2157 <li class="table_list">OTA (.ota)</li>
2158 <li class="table_list">iMelody (.imy)</li></ul></td>
2159 </tr>
2160 <tr>
2161 <td>Vorbis</td>
2162 <td></td>
2163 <td>REQUIRED</td>
2164 <td></td>
2165 <td><ul>
2166 <li class="table_list">Ogg (.ogg)</li>
2167 <li class="table_list">Matroska (.mkv, Android 4.0+)</li></ul></td>
2168 </tr>
2169 <tr>
2170 <td>PCM/WAVE</td>
2171 <td>REQUIRED<sup>4</sup><br> (Android 4.1+)</td>
2172 <td>REQUIRED</td>
2173 <td>16-bit linear PCM (rates up to limit of hardware). Devices MUST support
Heidi von Markham84564992016-02-09 10:54:20 -08002174 sampling rates for raw PCM recording at 8000, 11025, 16000, and 44100 Hz
2175 frequencies.</td>
Unsuk Jung5bc81142015-07-16 22:27:20 -07002176 <td>WAVE (.wav)</td>
2177 </tr>
2178 <tr>
2179 <td>Opus</td>
2180 <td></td>
2181 <td>REQUIRED<br> (Android 5.0+)</td>
2182 <td></td>
2183 <td>Matroska (.mkv)</td>
2184 </tr>
2185</table>
2186
2187
Heidi von Markham84564992016-02-09 10:54:20 -08002188<p class="table_footnote"> 1 Required for device implementations that define
2189android.hardware.microphone but optional for Android Watch device
2190implementations.</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07002191
Heidi von Markham84564992016-02-09 10:54:20 -08002192<p class="table_footnote">2 Only downmix of 5.0/5.1 content is required;
2193recording or rendering more than 2 channels is optional.</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07002194
Heidi von Markham84564992016-02-09 10:54:20 -08002195<p class="table_footnote">3 Required for Android Handheld device
2196implementations.</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07002197
Heidi von Markham84564992016-02-09 10:54:20 -08002198<p class="table_footnote">4 Required for device implementations that define
2199android.hardware.microphone, including Android Watch device implementations.</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07002200
2201<h3 id="5_1_2_image_codecs">5.1.2. Image Codecs</h3>
2202
2203<table>
2204 <tr>
2205 <th>Format/Codec</th>
2206 <th>Encoder</th>
2207 <th>Decoder</th>
2208 <th>Details</th>
2209 <th>Supported File Types/Container Formats</th>
2210 </tr>
2211 <tr>
2212 <td>JPEG</td>
2213 <td>REQUIRED</td>
2214 <td>REQUIRED</td>
2215 <td>Base+progressive</td>
2216 <td>JPEG (.jpg)</td>
2217 </tr>
2218 <tr>
2219 <td>GIF</td>
2220 <td></td>
2221 <td>REQUIRED</td>
2222 <td></td>
2223 <td>GIF (.gif)</td>
2224 </tr>
2225 <tr>
2226 <td>PNG</td>
2227 <td>REQUIRED</td>
2228 <td>REQUIRED</td>
2229 <td></td>
2230 <td>PNG (.png)</td>
2231 </tr>
2232 <tr>
2233 <td>BMP</td>
2234 <td></td>
2235 <td>REQUIRED</td>
2236 <td></td>
2237 <td>BMP (.bmp)</td>
2238 </tr>
2239 <tr>
2240 <td>WebP</td>
2241 <td>REQUIRED</td>
2242 <td>REQUIRED</td>
2243 <td></td>
2244 <td>WebP (.webp)</td>
2245 </tr>
2246</table>
2247
2248
2249<h3 id="5_1_3_video_codecs">5.1.3. Video Codecs</h3>
2250
Unsuk Jung5bc81142015-07-16 22:27:20 -07002251<table>
2252 <tr>
2253 <th>Format/Codec</th>
2254 <th>Encoder</th>
2255 <th>Decoder</th>
2256 <th>Details</th>
2257 <th>Supported File Types/<br>Container Formats</th>
2258 </tr>
2259 <tr>
2260 <td>H.263</td>
2261 <td>REQUIRED<sup>1</sup></td>
2262 <td>REQUIRED<sup>2</sup></td>
2263 <td></td>
2264 <td><ul>
2265 <li class="table_list">3GPP (.3gp)</li>
2266 <li class="table_list">MPEG-4 (.mp4)</li></ul></td>
2267 </tr>
2268 <tr>
2269 <td>H.264 AVC</td>
2270 <td>REQUIRED<sup>2</sup></td>
2271 <td>REQUIRED<sup>2</sup></td>
Heidi von Markham84564992016-02-09 10:54:20 -08002272 <td>See <a href="#5_2_video_encoding">section 5.2 </a>and
2273 <a href="#5_3_video_decoding">5.3</a> for details</td>
Unsuk Jung5bc81142015-07-16 22:27:20 -07002274 <td><ul>
2275 <li class="table_list">3GPP (.3gp)</li>
2276 <li class="table_list">MPEG-4 (.mp4)</li>
Heidi von Markham84564992016-02-09 10:54:20 -08002277 <li class="table_list">MPEG-2 TS (.ts, AAC audio only, not seekable, Android
2278 3.0+)</li></ul></td>
Unsuk Jung5bc81142015-07-16 22:27:20 -07002279 </tr>
2280 <tr>
2281 <td>H.265 HEVC</td>
2282 <td></td>
2283 <td>REQUIRED<sup>5</sup></td>
2284 <td>See <a href="#5_3_video_decoding">section 5.3</a> for details</td>
2285 <td>MPEG-4 (.mp4)</td>
2286 </tr>
Danielle Robertsbbe05752015-09-29 16:49:50 -07002287<tr>
2288 <td>MPEG-2</td>
Heidi von Markham84564992016-02-09 10:54:20 -08002289 <td></td>
Danielle Robertsbbe05752015-09-29 16:49:50 -07002290 <td>STRONGLY RECOMMENDED<sup>6</sup></td>
2291 <td>Main Profile</td>
2292 <td>MPEG2-TS</td>
2293</tr>
Unsuk Jung5bc81142015-07-16 22:27:20 -07002294 <tr>
2295 <td>MPEG-4 SP</td>
2296 <td></td>
2297 <td>REQUIRED<sup>2</sup></td>
2298 <td></td>
2299 <td>3GPP (.3gp)</td>
2300 </tr>
2301 <tr>
Unsuk Jung2e62f9a2015-07-16 23:01:44 -07002302 <td>VP8<sup>3</sup></td>
Glenn Kastenee7e79a2015-10-06 15:01:45 -07002303 <td>REQUIRED<sup>2</sup><br />
Unsuk Jung5bc81142015-07-16 22:27:20 -07002304
Glenn Kastenee7e79a2015-10-06 15:01:45 -07002305(Android 4.3+)</td>
2306 <td>REQUIRED<sup>2</sup><br />
Unsuk Jung5bc81142015-07-16 22:27:20 -07002307
Glenn Kastenee7e79a2015-10-06 15:01:45 -07002308(Android 2.3.3+)</td>
Heidi von Markham84564992016-02-09 10:54:20 -08002309 <td>See <a href="#5_2_video_encoding">section 5.2</a> and
2310 <a href="#5_3_video_decoding">5.3</a> for details</td>
Unsuk Jung5bc81142015-07-16 22:27:20 -07002311 <td><ul>
Heidi von Markham84564992016-02-09 10:54:20 -08002312 <li class="table_list"><a href="http://www.webmproject.org/">WebM
2313 (.webm)</a></li>
2314 <li class="table_list">Matroska (.mkv, Android 4.0+)<sup>4</sup></li></ul>
2315 </td>
Unsuk Jung5bc81142015-07-16 22:27:20 -07002316 </tr>
2317 <tr>
2318 <td>VP9</td>
2319 <td></td>
2320 <td>REQUIRED<sup>2</sup><br> (Android 4.4+)</td>
2321 <td>See <a href="#5_3_video_decoding">section 5.3</a> for details</td>
2322 <td><ul>
Heidi von Markham84564992016-02-09 10:54:20 -08002323 <li class="table_list"><a href="http://www.webmproject.org/">WebM
2324 (.webm)</a></li>
2325 <li class="table_list">Matroska (.mkv, Android 4.0+)<sup>4</sup></li></ul>
2326 </td>
Unsuk Jung5bc81142015-07-16 22:27:20 -07002327 </tr>
2328</table>
2329
2330
Heidi von Markham84564992016-02-09 10:54:20 -08002331<p class="table_footnote">1 Required for device implementations that include
2332camera hardware and define android.hardware.camera or
2333android.hardware.camera.front.</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07002334
Heidi von Markham84564992016-02-09 10:54:20 -08002335<p class="table_footnote">2 Required for device implementations except Android
2336Watch devices. </p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07002337
Heidi von Markham84564992016-02-09 10:54:20 -08002338<p class="table_footnote">3 For acceptable quality of web video streaming and
2339video-conference services, device implementations SHOULD use a hardware VP8
2340codec that meets the
2341<a href="http://www.webmproject.org/hardware/rtc-coding-requirements/">requirements</a>.
2342</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07002343
Heidi von Markham84564992016-02-09 10:54:20 -08002344<p class="table_footnote">4 Device implementations SHOULD support writing
2345Matroska WebM files.</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07002346
Heidi von Markham84564992016-02-09 10:54:20 -08002347<p class="table_footnote">5 STRONGLY RECOMMENDED for Android Automotive,
2348optional for Android Watch, and required for all other device types.</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07002349
Heidi von Markham84564992016-02-09 10:54:20 -08002350<p class="table_footnote">6 Applies only to Android Television device
2351implementations.</p>
Danielle Robertsbbe05752015-09-29 16:49:50 -07002352
Unsuk Jung5bc81142015-07-16 22:27:20 -07002353<h2 id="5_2_video_encoding">5.2. Video Encoding</h2>
2354
2355<div class="note">
2356<p>Video codecs are optional for Android Watch device implementations.</p>
2357</div>
2358
Heidi von Markham84564992016-02-09 10:54:20 -08002359<p>Android device implementations with H.263 encoders MUST support Baseline
2360Profile Level 45.</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07002361
Heidi von Markham84564992016-02-09 10:54:20 -08002362<p>Android device implementations with H.264 codec support MUST support Baseline
Unsuk Jung5bc81142015-07-16 22:27:20 -07002363Profile Level 3 and the following SD (Standard Definition) video encoding
2364profiles and SHOULD support Main Profile Level 4 and the following HD (High
Heidi von Markham84564992016-02-09 10:54:20 -08002365Definition) video encoding profiles. Android Television devices are STRONGLY
2366RECOMMENDED to encode HD 1080p video at 30 fps.</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07002367<table>
2368 <tr>
2369 <th></th>
2370 <th>SD (Low quality)</th>
2371 <th>SD (High quality)</th>
Danielle Robertsbbe05752015-09-29 16:49:50 -07002372 <th>HD 720p<sup>1</sup></th>
2373 <th>HD 1080p<sup>1</sup></th>
Unsuk Jung5bc81142015-07-16 22:27:20 -07002374 </tr>
2375 <tr>
2376 <th>Video resolution</th>
2377 <td>320 x 240 px</td>
2378 <td>720 x 480 px</td>
2379 <td>1280 x 720 px</td>
2380 <td>1920 x 1080 px</td>
2381 </tr>
2382 <tr>
2383 <th>Video frame rate</th>
2384 <td>20 fps</td>
2385 <td>30 fps</td>
2386 <td>30 fps</td>
2387 <td>30 fps</td>
2388 </tr>
2389 <tr>
2390 <th>Video bitrate</th>
2391 <td>384 Kbps</td>
2392 <td>2 Mbps</td>
2393 <td>4 Mbps</td>
2394 <td>10 Mbps</td>
2395 </tr>
2396</table>
2397
2398
Heidi von Markham84564992016-02-09 10:54:20 -08002399<p class="table_footnote">1 When supported by hardware, but STRONGLY RECOMMENDED
2400for Android Television devices.</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07002401
Heidi von Markham84564992016-02-09 10:54:20 -08002402<p>Android device implementations with VP8 codec support MUST support the SD
2403video encoding profiles and SHOULD support the following HD (High Definition)
2404video encoding profiles.</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07002405<table>
2406 <tr>
2407 <th></th>
2408 <th>SD (Low quality)</th>
2409 <th>SD (High quality)</th>
Danielle Robertsbbe05752015-09-29 16:49:50 -07002410 <th>HD 720p<sup>1</sup></th>
2411 <th>HD 1080p<sup>1</sup></th>
Unsuk Jung5bc81142015-07-16 22:27:20 -07002412 </tr>
2413 <tr>
2414 <th>Video resolution</th>
2415 <td>320 x 180 px</td>
2416 <td>640 x 360 px</td>
2417 <td>1280 x 720 px</td>
2418 <td>1920 x 1080 px</td>
2419 </tr>
2420 <tr>
2421 <th>Video frame rate</th>
2422 <td>30 fps</td>
2423 <td>30 fps</td>
2424 <td>30 fps</td>
2425 <td>30 fps</td>
2426 </tr>
2427 <tr>
2428 <th>Video bitrate</th>
2429 <td>800 Kbps </td>
2430 <td>2 Mbps</td>
2431 <td>4 Mbps</td>
2432 <td>10 Mbps</td>
2433 </tr>
2434</table>
2435
2436<p class="table_footnote">1 When supported by hardware.</p>
2437
2438<h2 id="5_3_video_decoding">5.3. Video Decoding</h2>
2439
2440<div class="note">
2441<p>Video codecs are optional for Android Watch device implementations.</p>
2442</div>
2443
Unsuk Jung9ddf3832015-09-29 17:16:29 -07002444<p>Device implementations MUST support dynamic video resolution and frame rate
2445switching through the standard Android APIs within the same stream for all VP8,
2446VP9, H.264, and H.265 codecs in real time and up to the maximum resolution
2447supported on the device.</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07002448
Heidi von Markham84564992016-02-09 10:54:20 -08002449<p>Android device implementations with H.263 decoders MUST support Baseline
Unsuk Jung1def5ae2015-09-29 14:53:42 -07002450Profile Level 30.</p>
2451
Heidi von Markham84564992016-02-09 10:54:20 -08002452<p>Android device implementations with MPEG-4 decoders MUST support Simple
Unsuk Jung1def5ae2015-09-29 14:53:42 -07002453Profile Level 3.</p>
2454
Heidi von Markham84564992016-02-09 10:54:20 -08002455<p>Android device implementations with H.264 decoders MUST support Main Profile
Unsuk Jung9ddf3832015-09-29 17:16:29 -07002456Level 3.1 and the following SD video decoding profiles and SHOULD support the
Unsuk Jung1def5ae2015-09-29 14:53:42 -07002457HD decoding profiles. Android Television devices MUST support High Profile
Unsuk Jung5bc81142015-07-16 22:27:20 -07002458Level 4.2 and the HD 1080p decoding profile.</p>
2459<table>
2460 <tr>
2461 <th></th>
2462 <th>SD (Low quality)</th>
2463 <th>SD (High quality)</th>
Danielle Robertsbbe05752015-09-29 16:49:50 -07002464 <th>HD 720p<sup>1</sup></th>
2465 <th>HD 1080p<sup>1</sup></th>
Unsuk Jung5bc81142015-07-16 22:27:20 -07002466 </tr>
2467 <tr>
2468 <th>Video resolution</th>
2469 <td>320 x 240 px</td>
2470 <td>720 x 480 px</td>
2471 <td>1280 x 720 px</td>
2472 <td>1920 x 1080 px</td>
2473 </tr>
2474 <tr>
2475 <th>Video frame rate</th>
2476 <td>30 fps</td>
2477 <td>30 fps</td>
Danielle Robertsbbe05752015-09-29 16:49:50 -07002478 <td>60 fps</td>
2479 <td>30 fps / 60 fps<sup>2</sup></td>
Unsuk Jung5bc81142015-07-16 22:27:20 -07002480 </tr>
2481 <tr>
2482 <th>Video bitrate</th>
2483 <td>800 Kbps </td>
2484 <td>2 Mbps</td>
2485 <td>8 Mbps</td>
2486 <td>20 Mbps</td>
2487 </tr>
2488</table>
2489
2490
Unsuk Jung9ddf3832015-09-29 17:16:29 -07002491<p class="table_footnote">1 REQUIRED for when the height as reported by the
2492Display.getSupportedModes() method is not smaller than the video resolution.</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07002493
Heidi von Markham84564992016-02-09 10:54:20 -08002494<p class="table_footnote">2 REQUIRED for Android Television device
2495implementations.</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07002496
Heidi von Markham84564992016-02-09 10:54:20 -08002497<p>Android device implementations, when supporting VP8 codec as described in
2498<a href="#5_1_3_video_codecs">section 5.1.3</a>, MUST support the following SD
2499decoding profiles and SHOULD support the HD decoding profiles. Android
2500Television devices MUST support the HD 1080p decoding profile.</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07002501<table>
2502 <tr>
2503 <th></th>
2504 <th>SD (Low quality)</th>
2505 <th>SD (High quality)</th>
Danielle Robertsbbe05752015-09-29 16:49:50 -07002506 <th>HD 720p<sup>1</sup></th>
2507 <th>HD 1080p<sup>1</sup></th>
Unsuk Jung5bc81142015-07-16 22:27:20 -07002508 </tr>
2509 <tr>
2510 <th>Video resolution</th>
2511 <td>320 x 180 px</td>
2512 <td>640 x 360 px</td>
2513 <td>1280 x 720 px</td>
2514 <td>1920 x 1080 px</td>
2515 </tr>
2516 <tr>
2517 <th>Video frame rate</th>
2518 <td>30 fps</td>
2519 <td>30 fps</td>
Danielle Robertsbbe05752015-09-29 16:49:50 -07002520 <td>30 fps / 60 fps<sup>2</sup></td>
2521 <td>30 / 60 fps<sup>2</sup></td>
Unsuk Jung5bc81142015-07-16 22:27:20 -07002522 </tr>
2523 <tr>
2524 <th>Video bitrate</th>
2525 <td>800 Kbps </td>
2526 <td>2 Mbps</td>
2527 <td>8 Mbps</td>
2528 <td>20 Mbps</td>
2529 </tr>
2530</table>
2531
Unsuk Jung9ddf3832015-09-29 17:16:29 -07002532<p class="table_footnote">1 REQUIRED for when the height as reported by the
2533Display.getSupportedModes() method is not smaller than the video resolution.</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07002534
Heidi von Markham84564992016-02-09 10:54:20 -08002535<p class="table_footnote">2 REQUIRED for Android Television device
2536implementations.</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07002537
Heidi von Markham84564992016-02-09 10:54:20 -08002538<p>Android device implementations, when supporting VP9 codec as described in
2539<a href="#5_1_3_video_codecs">section 5.1.3</a>, MUST support the following SD
2540video decoding profiles and SHOULD support the HD decoding profiles. Android
2541Television devices are STRONGLY RECOMMENDED to support the HD 1080p decoding
2542profile and SHOULD support the UHD decoding profile. When the UHD video decoding
2543profile is supported, it MUST support 8-bit color depth and SHOULD support VP9
2544Profile 2 (10-bit).</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07002545<table>
2546 <tr>
2547 <th></th>
2548 <th>SD (Low quality)</th>
2549 <th>SD (High quality)</th>
Danielle Robertsbbe05752015-09-29 16:49:50 -07002550 <th>HD 720p<sup>1</sup></th>
2551 <th>HD 1080p<sup>2</sup></th>
2552 <th>UHD<sup>2</sup></th>
Unsuk Jung5bc81142015-07-16 22:27:20 -07002553 </tr>
2554 <tr>
2555 <th>Video resolution</th>
2556 <td>320 x 180 px</td>
2557 <td>640 x 360 px</td>
2558 <td>1280 x 720 px</td>
2559 <td>1920 x 1080 px</td>
2560 <td>3840 x 2160 px</td>
2561 </tr>
2562 <tr>
2563 <th>Video frame rate</th>
2564 <td>30 fps</td>
2565 <td>30 fps</td>
2566 <td>30 fps</td>
Danielle Robertsbbe05752015-09-29 16:49:50 -07002567 <td>60 fps</td>
2568 <td>60 fps</td>
2569 </tr>
2570 <tr>
2571 <th>Video bitrate</th>
2572 <td>600 Kbps</td>
2573 <td>1.6 Mbps</td>
2574 <td>4 Mbps</td>
2575 <td>10 Mbps</td>
2576 <td>20 Mbps</td>
2577 </tr>
2578</table>
2579
2580
Heidi von Markham84564992016-02-09 10:54:20 -08002581<p class="table_footnote">1 Required for Android Television device
2582implementations, but for other type of devices only when supported by hardware.
2583</p>
Danielle Robertsbbe05752015-09-29 16:49:50 -07002584
Heidi von Markham84564992016-02-09 10:54:20 -08002585<p class="table_footnote">2 STRONGLY RECOMMENDED for existing Android Television
2586device implementations when supported by hardware.</p>
Danielle Robertsbbe05752015-09-29 16:49:50 -07002587
Heidi von Markham84564992016-02-09 10:54:20 -08002588<p>Android device implementations, when supporting H.265 codec as described in
2589<a href="#5_1_3_video_codecs">section 5.1.3</a>, MUST support the Main Profile
2590Level 3 Main tier and the following SD video decoding profiles and SHOULD
2591support the HD decoding profiles. Android Television devices MUST support the
2592Main Profile Level 4.1 Main tier and the HD 1080p decoding profile and SHOULD
2593support Main10 Level 5 Main Tier profile and the UHD decoding profile.</p>
Danielle Robertsbbe05752015-09-29 16:49:50 -07002594<table>
2595 <tr>
2596 <th></th>
2597 <th>SD (Low quality)</th>
2598 <th>SD (High quality)</th>
Glenn Kastenee7e79a2015-10-06 15:01:45 -07002599 <th>HD 720p<sup>1</sup></th>
2600 <th>HD 1080p<sup>1</sup></th>
2601 <th>UHD<sup>2</sup></th>
Danielle Robertsbbe05752015-09-29 16:49:50 -07002602 </tr>
2603 <tr>
2604 <th>Video resolution</th>
2605 <td>352 x 288 px</td>
2606 <td>640 x 360 px</td>
2607 <td>1280 x 720 px</td>
2608 <td>1920 x 1080 px</td>
2609 <td>3840 x 2160 px</td>
2610 </tr>
2611 <tr>
2612 <th>Video frame rate</th>
Unsuk Jung5bc81142015-07-16 22:27:20 -07002613 <td>30 fps</td>
2614 <td>30 fps</td>
Danielle Robertsbbe05752015-09-29 16:49:50 -07002615 <td>30 fps</td>
2616 <td>60 fps<sup>2</sup></td>
2617 <td>60 fps</td>
Unsuk Jung5bc81142015-07-16 22:27:20 -07002618 </tr>
2619 <tr>
2620 <th>Video bitrate</th>
2621 <td>600 Kbps </td>
2622 <td>1.6 Mbps</td>
2623 <td>4 Mbps</td>
2624 <td>10 Mbps</td>
2625 <td>20 Mbps</td>
2626 </tr>
2627</table>
2628
2629
Heidi von Markham84564992016-02-09 10:54:20 -08002630<p class="table_footnote">1 Required for Android Television device
2631implementations, but for other type of devices only when supported by hardware.
2632</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07002633
Heidi von Markham84564992016-02-09 10:54:20 -08002634<p class="table_footnote">2 STRONGLY RECOMMENDED for existing Android Television
2635device implementations when supported by hardware.</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07002636
2637<h2 id="5_4_audio_recording">5.4. Audio Recording</h2>
2638
2639
2640<p>While some of the requirements outlined in this section are stated as SHOULD
2641since Android 4.3, the Compatibility Definition for a future version is planned
Heidi von Markham84564992016-02-09 10:54:20 -08002642to change these to MUST. Existing and new Android devices are <strong>STRONGLY
2643RECOMMENDED</strong> to meet these requirements, or they will not be able to
2644attain Android compatibility when upgraded to the future version.</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07002645
2646<h3 id="5_4_1_raw_audio_capture">5.4.1. Raw Audio Capture</h3>
2647
2648
2649<p>Device implementations that declare android.hardware.microphone MUST allow
2650capture of raw audio content with the following characteristics:</p>
2651
2652<ul>
2653 <li><strong>Format</strong>: Linear PCM, 16-bit
2654 <li><strong>Sampling rates</strong>: 8000, 11025, 16000, 44100
2655 <li><strong>Channels</strong>: Mono
2656</ul>
2657
Glenn Kasten20cdbb72015-09-24 11:56:42 -07002658<p>The capture for the above sample rates MUST be done without up-sampling, and
2659any down-sampling MUST include an appropriate anti-aliasing filter.</p>
2660
Unsuk Jung5bc81142015-07-16 22:27:20 -07002661<p>Device implementations that declare android.hardware.microphone SHOULD allow
2662capture of raw audio content with the following characteristics:</p>
2663
2664<ul>
2665 <li><strong>Format</strong>: Linear PCM, 16-bit
2666 <li><strong>Sampling rates</strong>: 22050, 48000
2667 <li><strong>Channels</strong>: Stereo
2668</ul>
2669
Heidi von Markham84564992016-02-09 10:54:20 -08002670<p>If capture for the above sample rates is supported, then the capture MUST be
2671done without up-sampling at any ratio higher than 16000:22050 or 44100:48000.
2672Any up-sampling or down-sampling MUST include an appropriate anti-aliasing
2673filter.</p>
Glenn Kasten20cdbb72015-09-24 11:56:42 -07002674
Heidi von Markham84564992016-02-09 10:54:20 -08002675<h3 id="5_4_2_capture_for_voice_recognition">5.4.2. Capture for Voice
2676Recognition</h3>
Unsuk Jung5bc81142015-07-16 22:27:20 -07002677
2678
2679<p>In addition to the above recording specifications, when an application has
2680started recording an audio stream using the
2681android.media.MediaRecorder.AudioSource.VOICE_RECOGNITION audio source:</p>
2682
2683<ul>
2684 <li>The device SHOULD exhibit approximately flat amplitude versus frequency
Heidi von Markham84564992016-02-09 10:54:20 -08002685 characteristics: specifically, &plusmn;3 dB, from 100 Hz to 4000 Hz.</li>
2686 <li>Audio input sensitivity SHOULD be set such that a 90 dB sound power level
2687 (SPL) source at 1000 Hz yields RMS of 2500 for 16-bit samples.</li>
2688 <li>PCM amplitude levels SHOULD linearly track input SPL changes over at least
2689 a 30 dB range from -18 dB to +12 dB re 90 dB SPL at the microphone.</li>
2690 <li>Total harmonic distortion SHOULD be less than 1% for 1 kHz at 90 dB SPL
2691 input level at the microphone.</li>
2692 <li>Noise reduction processing, if present, MUST be disabled.</li>
2693 <li>Automatic gain control, if present, MUST be disabled.</li>
Unsuk Jung5bc81142015-07-16 22:27:20 -07002694</ul>
2695
2696<p>If the platform supports noise suppression technologies tuned for speech
2697recognition, the effect MUST be controllable from the
2698android.media.audiofx.NoiseSuppressor API. Moreover, the UUID field for the
Heidi von Markham84564992016-02-09 10:54:20 -08002699noise suppressor&rsquo;s effect descriptor MUST uniquely identify each
2700implementation of the noise suppression technology.</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07002701
Heidi von Markham84564992016-02-09 10:54:20 -08002702<h3 id="5_4_3_capture_for_rerouting_of_playback">5.4.3. Capture for Rerouting of
2703Playback</h3>
Unsuk Jung5bc81142015-07-16 22:27:20 -07002704
2705
2706<p>The android.media.MediaRecorder.AudioSource class includes the REMOTE_SUBMIX
2707audio source. Devices that declare android.hardware.audio.output MUST properly
2708implement the REMOTE_SUBMIX audio source so that when an application uses the
2709android.media.AudioRecord API to record from this audio source, it can capture
2710a mix of all audio streams except for the following:</p>
2711
2712<ul>
2713 <li>STREAM_RING
2714 <li>STREAM_ALARM
2715 <li>STREAM_NOTIFICATION
2716</ul>
2717
2718<h2 id="5_5_audio_playback">5.5. Audio Playback</h2>
2719
2720
Heidi von Markham84564992016-02-09 10:54:20 -08002721<p>Device implementations that declare android.hardware.audio.output MUST
2722conform to the requirements in this section.</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07002723
2724<h3 id="5_5_1_raw_audio_playback">5.5.1. Raw Audio Playback</h3>
2725
2726
2727<p>The device MUST allow playback of raw audio content with the following
2728characteristics:</p>
2729
2730<ul>
2731 <li><strong>Format</strong>: Linear PCM, 16-bit</li>
Heidi von Markham84564992016-02-09 10:54:20 -08002732 <li><strong>Sampling rates</strong>: 8000, 11025, 16000, 22050, 32000,
2733 44100</li>
Unsuk Jung5bc81142015-07-16 22:27:20 -07002734 <li><strong>Channels</strong>: Mono, Stereo</li>
2735</ul>
2736
2737<p>The device SHOULD allow playback of raw audio content with the following
2738characteristics:</p>
2739
2740<ul>
2741 <li><strong>Sampling rates</strong>: 24000, 48000</li>
2742</ul>
2743
2744<h3 id="5_5_2_audio_effects">5.5.2. Audio Effects</h3>
2745
2746
Heidi von Markham84564992016-02-09 10:54:20 -08002747<p>Android provides an
2748<a href="http://developer.android.com/reference/android/media/audiofx/AudioEffect.html">API
2749for audio effects</a> for device implementations. Device implementations that
2750declare the feature android.hardware.audio.output:</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07002751
2752<ul>
2753 <li>MUST support the EFFECT_TYPE_EQUALIZER and EFFECT_TYPE_LOUDNESS_ENHANCER
Heidi von Markham84564992016-02-09 10:54:20 -08002754 implementations controllable through the AudioEffect subclasses Equalizer,
2755 LoudnessEnhancer.</li>
Unsuk Jung5bc81142015-07-16 22:27:20 -07002756 <li>MUST support the visualizer API implementation, controllable through the
Heidi von Markham84564992016-02-09 10:54:20 -08002757 Visualizer class.</li>
Unsuk Jung5bc81142015-07-16 22:27:20 -07002758 <li>SHOULD support the EFFECT_TYPE_BASS_BOOST, EFFECT_TYPE_ENV_REVERB,
Heidi von Markham84564992016-02-09 10:54:20 -08002759 EFFECT_TYPE_PRESET_REVERB, and EFFECT_TYPE_VIRTUALIZER implementations
2760 controllable through the AudioEffect sub-classes BassBoost,
2761 EnvironmentalReverb, PresetReverb, and Virtualizer.</li>
Unsuk Jung5bc81142015-07-16 22:27:20 -07002762</ul>
2763
2764<h3 id="5_5_3_audio_output_volume">5.5.3. Audio Output Volume</h3>
2765
2766
2767<p>Android Television device implementations MUST include support for system
2768Master Volume and digital audio output volume attenuation on supported outputs,
2769except for compressed audio passthrough output (where no audio decoding is done
2770on the device).</p>
2771
2772<h2 id="5_6_audio_latency">5.6. Audio Latency</h2>
2773
2774
2775<p>Audio latency is the time delay as an audio signal passes through a system.
2776Many classes of applications rely on short latencies, to achieve real-time
2777sound effects.</p>
2778
2779<p>For the purposes of this section, use the following definitions:</p>
2780
2781<ul>
Heidi von Markham84564992016-02-09 10:54:20 -08002782 <li><strong>output latency</strong>. The interval between when an application
2783 writes a frame of PCM-coded data and when the corresponding sound can be heard
2784 by an external listener or observed by a transducer.</li>
2785 <li><strong>cold output latency</strong>. The output latency for the first
2786 frame, when the audio output system has been idle and powered down prior to
2787 the request.</li>
2788 <li><strong>continuous output latency</strong>. The output latency for
2789 subsequent frames, after the device is playing audio.</li>
2790 <li><strong>input latency</strong>. The interval between when an external
2791 sound is presented to the device and when an application reads the
2792 corresponding frame of PCM-coded data.</li>
2793 <li><strong>cold input latency</strong>. The sum of lost input time and the
2794 input latency for the first frame, when the audio input system has been idle
2795 and powered down prior to the request.</li>
2796 <li><strong>continuous input latency</strong>. The input latency for
2797 subsequent frames, while the device is capturing audio.</li>
2798 <li><strong>cold output jitter</strong>. The variance among separate
2799 measurements of cold output latency values.</li>
2800 <li><strong>cold input jitter</strong>. The variance among separate
2801 measurements of cold input latency values.</li>
2802 <li><strong>continuous round-trip latency</strong>. The sum of continuous
2803 input latency plus continuous output latency plus one buffer period. The
2804 buffer period term allows processing time for the app and for the app to
2805 mitigate phase difference between input and output streams.</li>
2806 <li><strong>OpenSL ES PCM buffer queue API</strong>. The set of PCM-related
2807 OpenSL ES APIs within Android NDK; see NDK_root/docs/opensles/index.html.</li>
Unsuk Jung5bc81142015-07-16 22:27:20 -07002808</ul>
2809
Heidi von Markham84564992016-02-09 10:54:20 -08002810<p>Device implementations that declare android.hardware.audio.output are
2811STRONGLY RECOMMENDED to meet or exceed these audio output requirements:</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07002812
2813<ul>
2814 <li>cold output latency of 100 milliseconds or less</li>
2815 <li>continuous output latency of 45 milliseconds or less</li>
2816 <li>minimize the cold output jitter</li>
2817</ul>
2818
2819<p>If a device implementation meets the requirements of this section after any
2820initial calibration when using the OpenSL ES PCM buffer queue API, for
2821continuous output latency and cold output latency over at least one supported
Heidi von Markham84564992016-02-09 10:54:20 -08002822audio output device, it is STRONGLY RECOMMENDED to report support for
2823low-latency audio, by reporting the feature android.hardware.audio.low_latency
2824via the
2825<a href="http://developer.android.com/reference/android/content/pm/PackageManager.html">android.content.pm.PackageManager</a>
2826class. Conversely, if the device implementation does not meet these requirements
2827it MUST NOT report support for low-latency audio.</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07002828
Heidi von Markham84564992016-02-09 10:54:20 -08002829<p>Device implementations that include android.hardware.microphone are STRONGLY
2830RECOMMENDED to meet these input audio requirements:</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07002831
2832<ul>
2833 <li>cold input latency of 100 milliseconds or less</li>
2834 <li>continuous input latency of 30 milliseconds or less</li>
2835 <li>continuous round-trip latency of 50 milliseconds or less</li>
2836 <li>minimize the cold input jitter</li>
2837</ul>
2838
2839<h2 id="5_7_network_protocols">5.7. Network Protocols</h2>
2840
2841
Heidi von Markham84564992016-02-09 10:54:20 -08002842<p>Devices MUST support the
2843<a href="http://developer.android.com/guide/appendix/media-formats.html">media
2844network protocols</a> for audio and video playback as specified in the Android
2845SDK documentation. Specifically, devices MUST support the following media
2846network protocols:</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07002847
2848<ul>
2849 <li>RTSP (RTP, SDP)</li>
2850 <li>HTTP(S) progressive streaming</li>
Heidi von Markham84564992016-02-09 10:54:20 -08002851 <li>HTTP(S)
2852 <a href="http://tools.ietf.org/html/draft-pantos-http-live-streaming-03">Live
2853 Streaming draft protocol, Version 3</a></li>
Unsuk Jung5bc81142015-07-16 22:27:20 -07002854</ul>
2855
2856<h2 id="5_8_secure_media">5.8. Secure Media</h2>
2857
2858
2859<p>Device implementations that support secure video output and are capable of
2860supporting secure surfaces MUST declare support for Display.FLAG_SECURE. Device
2861implementations that declare support for Display.FLAG_SECURE, if they support a
2862wireless display protocol, MUST secure the link with a cryptographically strong
2863mechanism such as HDCP 2.x or higher for Miracast wireless displays. Similarly
2864if they support a wired external display, the device implementations MUST
2865support HDCP 1.2 or higher. Android Television device implementations MUST
2866support HDCP 2.2 for devices supporting 4K resolution and HDCP 1.4 or above for
2867lower resolutions. The upstream Android open source implementation includes
2868support for wireless (Miracast) and wired (HDMI) displays that satisfies this
2869requirement.</p>
2870
Glenn Kasten87ef61d2015-07-29 09:01:36 -07002871<h2 id="5_9_midi">5.9. Musical Instrument Digital Interface (MIDI)</h2>
2872
Heidi von Markham84564992016-02-09 10:54:20 -08002873<p>If a device implementation supports the inter-app MIDI software transport
2874(virtual MIDI devices), and it supports MIDI over <em>all</em> of the following
2875MIDI-capable hardware transports for which it provides generic non-MIDI
2876connectivity, it is STRONGLY RECOMMENDED to report support for feature
2877android.software.midi via the
2878<a href="http://developer.android.com/reference/android/content/pm/PackageManager.html">android.content.pm.PackageManager</a>
2879class.</p>
Glenn Kasten87ef61d2015-07-29 09:01:36 -07002880
2881<p>The MIDI-capable hardware transports are:</p>
2882<ul>
2883 <li>USB host mode (section 7.7 USB)</li>
2884 <li>USB peripheral mode (section 7.7 USB)</li>
2885</ul>
2886
Heidi von Markham84564992016-02-09 10:54:20 -08002887<p>Conversely, if the device implementation provides generic non-MIDI
2888connectivity over a particular MIDI-capable hardware transport listed above, but
2889does not support MIDI over that hardware transport, it MUST NOT report support
2890for feature android.software.midi.</p>
Glenn Kasten87ef61d2015-07-29 09:01:36 -07002891
Heidi von Markham84564992016-02-09 10:54:20 -08002892<p>MIDI over Bluetooth LE acting in central role (section 7.4.3 Bluetooth) is in
2893trial use status. A device implementation that reports
Glenn Kasten87ef61d2015-07-29 09:01:36 -07002894feature android.software.midi, and which provides generic non-MIDI connectivity
Heidi von Markham84564992016-02-09 10:54:20 -08002895over Bluetooth LE, SHOULD support MIDI over Bluetooth LE.</p>
Glenn Kasten87ef61d2015-07-29 09:01:36 -07002896
Glenn Kasten78eccbd2015-08-12 10:18:22 -07002897<h2 id="5_10_pro_audio">5.10. Professional Audio</h2>
2898
Heidi von Markham84564992016-02-09 10:54:20 -08002899<p>If a device implementation meets <em>all</em> of the following requirements,
2900it is STRONGLY RECOMMENDED to report support for feature
2901android.hardware.audio.pro via the
2902<a href="http://developer.android.com/reference/android/content/pm/PackageManager.html">android.content.pm.PackageManager</a>
2903class.</p>
Glenn Kasten78eccbd2015-08-12 10:18:22 -07002904
2905<ul>
Heidi von Markham84564992016-02-09 10:54:20 -08002906 <li>The device implementation MUST report support for feature
2907 android.hardware.audio.low_latency.</li>
2908 <li>The continuous round-trip audio latency, as defined in section 5.6 Audio
2909 Latency, MUST be 20 milliseconds or less and SHOULD be 10 milliseconds or less
2910 over at least one supported path.</li>
2911 <li>If the device includes a 4 conductor 3.5mm audio jack, the continuous
2912 round-trip audio latency MUST be 20 milliseconds or less over the audio jack
2913 path, and SHOULD be 10 milliseconds or less over at the audio jack path.</li>
2914 <li>The device implementation MUST include a USB port(s) supporting USB host
2915 mode and USB peripheral mode.</li>
2916 <li>The USB host mode MUST implement the USB audio class.</li>
2917 <li>If the device includes an HDMI port, the device implementation MUST
2918 support output in stereo and eight channels at 20-bit or 24-bit depth and 192
2919 kHz without bit-depth loss or resampling.</li>
2920 <li>The device implementation MUST report support for feature
2921 android.software.midi.</li>
2922 <li>If the device includes a 4 conductor 3.5mm audio jack, the device
2923 implementation is STRONGLY RECOMMENDED to comply with section
2924 <a href="https://source.android.com/accessories/headset/specification.html#mobile_device_jack_specifications">Mobile
2925 device (jack) specifications</a> of the
2926 <a href="https://source.android.com/accessories/headset/specification.html">Wired
2927 Audio Headset Specification (v1.1)</a>.</li>
Glenn Kasten78eccbd2015-08-12 10:18:22 -07002928</ul>
2929
Heidi von Markham84564992016-02-09 10:54:20 -08002930<h1 id="6_developer_tools_and_options_compatibility">6. Developer Tools and
2931Options Compatibility</h1>
Unsuk Jung5bc81142015-07-16 22:27:20 -07002932
Unsuk Jung5bc81142015-07-16 22:27:20 -07002933<h2 id="6_1_developer_tools">6.1. Developer Tools</h2>
2934
Heidi von Markham84564992016-02-09 10:54:20 -08002935<p>Device implementations MUST support the Android Developer Tools provided in
2936the Android SDK. Android compatible devices MUST be compatible with:</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07002937
2938<ul>
Heidi von Markham84564992016-02-09 10:54:20 -08002939 <li><a href="http://developer.android.com/tools/help/adb.html"><strong>Android
2940 Debug Bridge (adb)</strong></a>
2941 <ul>
2942 <li>Device implementations MUST support all adb functions as documented in
2943 the Android SDK including
2944 <a href="https://source.android.com/devices/input/diagnostics.html">dumpsys</a>.
2945 </li>
2946 <li>The device-side adb daemon MUST be inactive by default and there MUST be
2947 a user-accessible mechanism to turn on the Android Debug Bridge. If a device
2948 implementation omits USB peripheral mode, it MUST implement the Android
2949 Debug Bridge via local-area network (such as Ethernet or 802.11).</li>
2950 <li>Android includes support for secure adb. Secure adb enables adb on known
2951 authenticated hosts. Device implementations MUST support secure adb.</li>
2952 </ul></li>
2953 <li><a href="http://developer.android.com/tools/debugging/ddms.html"><strong>Dalvik
2954 Debug Monitor Service (ddms)</strong></a>
2955 <ul>
2956 <li>Device implementations MUST support all ddms features as documented in
2957 the Android SDK.</li>
2958 <li>As ddms uses adb, support for ddms SHOULD be inactive by default, but
2959 MUST be supported whenever the user has activated the Android Debug Bridge,
2960 as above.</li>
2961 </ul></li>
2962 <li><a href="http://developer.android.com/tools/help/monkey.html"><strong>Monkey</strong></a>.
2963 Device implementations MUST include the Monkey framework, and make it
2964 available for applications to use.</li>
2965 <li><a href="http://developer.android.com/tools/help/systrace.html"><strong>SysTrace</strong></a>
2966 <ul>
2967 <li>Device implementations MUST support systrace tool as documented in the
2968 Android SDK. Systrace must be inactive by default, and there MUST be a
2969 user-accessible mechanism to turn on Systrace.</li>
2970 <li>Most Linux-based systems and Apple Macintosh systems recognize Android
2971 devices using the standard Android SDK tools, without additional support;
2972 however Microsoft Windows systems typically require a driver for new Android
2973 devices. (For instance, new vendor IDs and sometimes new device IDs require
2974 custom USB drivers for Windows systems.)</li>
2975 <li>If a device implementation is unrecognized by the adb tool as provided
2976 in the standard Android SDK, device implementers MUST provide Windows
2977 drivers allowing developers to connect to the device using the adb protocol.
2978 These drivers MUST be provided for Windows XP, Windows Vista, Windows 7,
2979 Windows 8, and Windows 10 in both 32-bit and 64-bit versions.</li>
2980 </ul></li>
Unsuk Jung5bc81142015-07-16 22:27:20 -07002981</ul>
2982
Unsuk Jung5bc81142015-07-16 22:27:20 -07002983<h2 id="6_2_developer_options">6.2. Developer Options</h2>
2984
2985
2986<p>Android includes support for developers to configure application
2987development-related settings. Device implementations MUST honor the
Heidi von Markham84564992016-02-09 10:54:20 -08002988<a href="http://developer.android.com/reference/android/provider/Settings.html#ACTION_APPLICATION_DEVELOPMENT_SETTINGS">android.settings.APPLICATION_DEVELOPMENT_SETTINGS</a>
2989intent to show application development-related settings The upstream Android
2990implementation hides the Developer Options menu by default and enables users to
2991launch Developer Options after pressing seven (7) times on the
2992<strong>Settings</strong> > <strong>About Device</strong> > <strong>Build
2993Number</strong> menu item. Device implementations MUST provide a consistent
2994experience for Developer Options. Specifically, device implementations MUST hide
2995Developer Options by default and MUST provide a mechanism to enable Developer
2996Options that is consistent with the upstream Android implementation.</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07002997
2998<h1 id="7_hardware_compatibility">7. Hardware Compatibility</h1>
2999
3000
3001<p>If a device includes a particular hardware component that has a corresponding
3002API for third-party developers, the device implementation MUST implement that
3003API as described in the Android SDK documentation. If an API in the SDK
3004interacts with a hardware component that is stated to be optional and the
3005device implementation does not possess that component:</p>
3006
3007<ul>
Heidi von Markham84564992016-02-09 10:54:20 -08003008 <li>Complete class definitions (as documented by the SDK) for the component
3009 APIs MUST still be presented.</li>
3010 <li>The API&rsquo;s behaviors MUST be implemented as no-ops in some reasonable
3011 fashion.</li>
3012 <li>API methods MUST return null values where permitted by the SDK
3013 documentation.</li>
3014 <li>API methods MUST return no-op implementations of classes where null values
3015 are not permitted by the SDK documentation.</li>
3016 <li>API methods MUST NOT throw exceptions not documented by the SDK
3017 documentation.</li>
Unsuk Jung5bc81142015-07-16 22:27:20 -07003018</ul>
3019
Heidi von Markham84564992016-02-09 10:54:20 -08003020<p>A typical example of a scenario where these requirements apply is the
3021telephony API: Even on non-phone devices, these APIs must be implemented as
3022reasonable no-ops.</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07003023
Heidi von Markham84564992016-02-09 10:54:20 -08003024<p>Device implementations MUST consistently report accurate hardware
3025configuration information via the getSystemAvailableFeatures() and
3026hasSystemFeature(String) methods on the
3027<a href="http://developer.android.com/reference/android/content/pm/PackageManager.html">android.content.pm.PackageManager</a>
3028class for the same build fingerprint.</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07003029
3030<h2 id="7_1_display_and_graphics">7.1. Display and Graphics</h2>
3031
3032
Heidi von Markham84564992016-02-09 10:54:20 -08003033<p>Android includes facilities that automatically adjust application assets and
3034UI layouts appropriately for the device to ensure that third-party applications
3035run well on a
3036<a href="http://developer.android.com/guide/practices/screens_support.html">variety
3037of hardware configurations</a>. Devices MUST properly implement these APIs and
3038behaviors, as detailed in this section.</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07003039
3040<p>The units referenced by the requirements in this section are defined as
3041follows:</p>
3042
3043<ul>
Heidi von Markham84564992016-02-09 10:54:20 -08003044 <li><strong>physical diagonal size</strong>. The distance in inches between
3045 two opposing corners of the illuminated portion of the display.</li>
3046 <li><strong>dots per inch (dpi)</strong>. The number of pixels encompassed by
3047 a linear horizontal or vertical span of 1&rdquo;. Where dpi values are listed,
3048 both horizontal and vertical dpi must fall within the range.</li>
3049 <li><strong>aspect ratio</strong>. The ratio of the pixels of the longer
3050 dimension to the shorter dimension of the screen. For example, a display of
3051 480x854 pixels would be 854/480 = 1.779, or roughly &ldquo;16:9&rdquo;.</li>
3052 <li><strong>density-independent pixel (dp)</strong>. The virtual pixel unit
3053 normalized to a 160 dpi screen, calculated as: pixels = dps * (density/160).
3054 </li>
Unsuk Jung5bc81142015-07-16 22:27:20 -07003055</ul>
3056
3057<h3 id="7_1_1_screen_configuration">7.1.1. Screen Configuration</h3>
3058
3059
3060<h4 id="7_1_1_1_screen_size">7.1.1.1. Screen Size</h4>
3061
3062<div class="note">
Heidi von Markham84564992016-02-09 10:54:20 -08003063<p>Android Watch devices (detailed in <a href="#2_device_types">section 2</a>)
3064MAY have smaller screen sizes as described in this section.</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07003065</div>
3066
3067<p>The Android UI framework supports a variety of different screen sizes, and
Heidi von Markham84564992016-02-09 10:54:20 -08003068allows applications to query the device screen size (aka &ldquo;screen layout")
3069via android.content.res.Configuration.screenLayout with the
3070SCREENLAYOUT_SIZE_MASK. Device implementations MUST report the correct
3071<a href="http://developer.android.com/guide/practices/screens_support.html">screen
3072size</a> as defined in the Android SDK documentation and determined by the
3073upstream Android platform. Specifically, device implementations MUST report the
3074correct screen size according to the following logical density-independent pixel
3075(dp) screen dimensions.</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07003076
3077<ul>
Heidi von Markham84564992016-02-09 10:54:20 -08003078 <li>Devices MUST have screen sizes of at least 426 dp x 320 dp
3079 (&lsquo;small&rsquo;), unless it is an Android Watch device.</li>
3080 <li>Devices that report screen size &lsquo;normal&rsquo; MUST have screen
3081 sizes of at least 480 dp x 320 dp.</li>
3082 <li>Devices that report screen size &lsquo;large&rsquo; MUST have screen sizes
3083 of at least 640 dp x 480 dp.</li>
3084 <li>Devices that report screen size &lsquo;xlarge&rsquo; MUST have screen
3085 sizes of at least 960 dp x 720 dp.</li>
Unsuk Jung5bc81142015-07-16 22:27:20 -07003086</ul>
3087
Heidi von Markham84564992016-02-09 10:54:20 -08003088<p>In addition:</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07003089
3090<ul>
Heidi von Markham84564992016-02-09 10:54:20 -08003091 <li>Android Watch devices MUST have a screen with the physical diagonal size
3092 in the range from 1.1 to 2.5 inches.</li>
3093 <li>Other types of Android device implementations, with a physically
3094 integrated screen, MUST have a screen at least 2.5 inches in physical diagonal
3095 size.</li>
Unsuk Jung5bc81142015-07-16 22:27:20 -07003096</ul>
3097
3098<p>Devices MUST NOT change their reported screen size at any time.</p>
3099
3100<p>Applications optionally indicate which screen sizes they support via the
Unsuk Jung2e62f9a2015-07-16 23:01:44 -07003101&lt;supports-screens&gt; attribute in the AndroidManifest.xml file. Device
Unsuk Jung5bc81142015-07-16 22:27:20 -07003102implementations MUST correctly honor applications' stated support for small,
3103normal, large, and xlarge screens, as described in the Android SDK
3104documentation.</p>
3105
3106<h4 id="7_1_1_2_screen_aspect_ratio">7.1.1.2. Screen Aspect Ratio</h4>
3107
3108<div class="note">
3109<p>Android Watch devices MAY have an aspect ratio of 1.0 (1:1).</p>
3110</div>
3111
3112
3113<p>The screen aspect ratio MUST be a value from 1.3333 (4:3) to 1.86 (roughly
311416:9), but Android Watch devices MAY have an aspect ratio of 1.0 (1:1) because
3115such a device implementation will use a UI_MODE_TYPE_WATCH as the
3116android.content.res.Configuration.uiMode.</p>
3117
3118<h4 id="7_1_1_3_screen_density">7.1.1.3. Screen Density</h4>
3119
3120
3121<p>The Android UI framework defines a set of standard logical densities to help
3122application developers target application resources. Device implementations
3123MUST report only one of the following logical Android framework densities
3124through the android.util.DisplayMetrics APIs, and MUST execute applications at
3125this standard density and MUST NOT change the value at at any time for the
3126default display.</p>
3127
3128<ul>
3129 <li>120 dpi (ldpi)</li>
3130 <li>160 dpi (mdpi)</li>
3131 <li>213 dpi (tvdpi)</li>
3132 <li>240 dpi (hdpi)</li>
3133 <li>280 dpi (280dpi)</li>
3134 <li>320 dpi (xhdpi)</li>
Unsuk Jung9b2d31a2015-10-06 00:03:01 -07003135 <li>360 dpi (360dpi)</li>
Unsuk Jung5bc81142015-07-16 22:27:20 -07003136 <li>400 dpi (400dpi)</li>
Unsuk Jung9b2d31a2015-10-06 00:03:01 -07003137 <li>420 dpi (420dpi)</li>
Unsuk Jung5bc81142015-07-16 22:27:20 -07003138 <li>480 dpi (xxhdpi)</li>
3139 <li>560 dpi (560dpi)</li>
3140 <li>640 dpi (xxxhdpi)</li>
3141</ul>
3142
3143<p>Device implementations SHOULD define the standard Android framework density
3144that is numerically closest to the physical density of the screen, unless that
3145logical density pushes the reported screen size below the minimum supported. If
3146the standard Android framework density that is numerically closest to the
3147physical density results in a screen size that is smaller than the smallest
3148supported compatible screen size (320 dp width), device implementations SHOULD
3149report the next lowest standard Android framework density.</p>
3150
3151<h3 id="7_1_2_display_metrics">7.1.2. Display Metrics</h3>
3152
3153
3154<p>Device implementations MUST report correct values for all display metrics
Heidi von Markham84564992016-02-09 10:54:20 -08003155defined in
3156<a href="http://developer.android.com/reference/android/util/DisplayMetrics.html">android.util.DisplayMetrics</a>
3157and MUST report the same values regardless of whether the embedded or external
3158screen is used as the default display.</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07003159
3160<h3 id="7_1_3_screen_orientation">7.1.3. Screen Orientation</h3>
3161
3162
3163<p>Devices MUST report which screen orientations they support
3164(android.hardware.screen.portrait and/or android.hardware.screen.landscape) and
3165MUST report at least one supported orientation. For example, a device with a
3166fixed orientation landscape screen, such as a television or laptop, SHOULD only
3167report android.hardware.screen.landscape.</p>
3168
3169<p>Devices that report both screen orientations MUST support dynamic orientation
3170by applications to either portrait or landscape screen orientation. That is,
3171the device must respect the application&rsquo;s request for a specific screen
3172orientation. Device implementations MAY select either portrait or landscape
3173orientation as the default.</p>
3174
Heidi von Markham84564992016-02-09 10:54:20 -08003175<p>Devices MUST report the correct value for the device&rsquo;s current
3176orientation, whenever queried via the
3177android.content.res.Configuration.orientation,
Unsuk Jung5bc81142015-07-16 22:27:20 -07003178android.view.Display.getOrientation(), or other APIs.</p>
3179
3180<p>Devices MUST NOT change the reported screen size or density when changing
3181orientation.</p>
3182
Heidi von Markham84564992016-02-09 10:54:20 -08003183<h3 id="7_1_4_2d_and_3d_graphics_acceleration">7.1.4. 2D and 3D Graphics
3184Acceleration</h3>
Unsuk Jung5bc81142015-07-16 22:27:20 -07003185
3186
Heidi von Markham84564992016-02-09 10:54:20 -08003187<p>Device implementations MUST support both OpenGL ES 1.0 and 2.0, as embodied
3188and detailed in the Android SDK documentations. Device implementations SHOULD
Unsuk Jung5bc81142015-07-16 22:27:20 -07003189support OpenGL ES 3.0 or 3.1 on devices capable of supporting it. Device
Heidi von Markham84564992016-02-09 10:54:20 -08003190implementations MUST also support
3191<a href="http://developer.android.com/guide/topics/renderscript/">Android
3192RenderScript</a>, as detailed in the Android SDK documentation.</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07003193
3194<p>Device implementations MUST also correctly identify themselves as supporting
3195OpenGL ES 1.0, OpenGL ES 2.0, OpenGL ES 3.0 or OpenGL 3.1. That is:</p>
3196
3197<ul>
Heidi von Markham84564992016-02-09 10:54:20 -08003198 <li>The managed APIs (such as via the GLES10.getString() method) MUST report
3199 support for OpenGL ES 1.0 and OpenGL ES 2.0.</li>
Unsuk Jung5bc81142015-07-16 22:27:20 -07003200 <li>The native C/C++ OpenGL APIs (APIs available to apps via libGLES_v1CM.so,
Heidi von Markham84564992016-02-09 10:54:20 -08003201 libGLES_v2.so, or libEGL.so) MUST report support for OpenGL ES 1.0 and OpenGL
3202 ES 2.0.</li>
Unsuk Jung5bc81142015-07-16 22:27:20 -07003203 <li>Device implementations that declare support for OpenGL ES 3.0 or 3.1 MUST
Heidi von Markham84564992016-02-09 10:54:20 -08003204 support the corresponding managed APIs and include support for native C/C++
3205 APIs. On device implementations that declare support for OpenGL ES 3.0 or 3.1,
3206 libGLESv2.so MUST export the corresponding function symbols in addition to the
3207 OpenGL ES 2.0 function symbols.</li>
Unsuk Jung5bc81142015-07-16 22:27:20 -07003208</ul>
3209
Heidi von Markham84564992016-02-09 10:54:20 -08003210<p>In addition to OpenGL ES 3.1, Android provides an
3211<a href="https://developer.android.com/reference/android/opengl/GLES31Ext.html">extension
3212pack</a> with Java interfaces and native support for advanced graphics
3213functionality such as tessellation and the ASTC texture compression format.
3214Android device implementations MAY support this extension pack, and&mdash;only
3215if fully implemented&mdash;MUST identify the support through the
3216android.hardware.opengles.aep feature flag.</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07003217
3218<p>Also, device implementations MAY implement any desired OpenGL ES extensions.
3219However, device implementations MUST report via the OpenGL ES managed and
3220native APIs all extension strings that they do support, and conversely MUST NOT
3221report extension strings that they do not support.</p>
3222
Heidi von Markham84564992016-02-09 10:54:20 -08003223<p>Note that Android includes support for applications to optionally specify
3224that they require specific OpenGL texture compression formats. These formats are
Unsuk Jung5bc81142015-07-16 22:27:20 -07003225typically vendor-specific. Device implementations are not required by Android
3226to implement any specific texture compression format. However, they SHOULD
3227accurately report any texture compression formats that they do support, via the
3228getString() method in the OpenGL API.</p>
3229
3230<p>Android includes a mechanism for applications to declare that they want to
3231enable hardware acceleration for 2D graphics at the Application, Activity,
3232Window, or View level through the use of a manifest tag
Heidi von Markham84564992016-02-09 10:54:20 -08003233<a href="http://developer.android.com/guide/topics/graphics/hardware-accel.html">android:hardwareAccelerated</a>
3234or direct API calls.</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07003235
3236<p>Device implementations MUST enable hardware acceleration by default, and MUST
3237disable hardware acceleration if the developer so requests by setting
Heidi von Markham84564992016-02-09 10:54:20 -08003238android:hardwareAccelerated="false&rdquo; or disabling hardware acceleration
3239directly through the Android View APIs.</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07003240
3241<p>In addition, device implementations MUST exhibit behavior consistent with the
Heidi von Markham84564992016-02-09 10:54:20 -08003242Android SDK documentation on
3243<a href="http://developer.android.com/guide/topics/graphics/hardware-accel.html">hardware
3244acceleration</a>.</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07003245
3246<p>Android includes a TextureView object that lets developers directly integrate
3247hardware-accelerated OpenGL ES textures as rendering targets in a UI hierarchy.
3248Device implementations MUST support the TextureView API, and MUST exhibit
3249consistent behavior with the upstream Android implementation.</p>
3250
3251<p>Android includes support for EGL_ANDROID_RECORDABLE, an EGLConfig attribute
3252that indicates whether the EGLConfig supports rendering to an ANativeWindow
3253that records images to a video. Device implementations MUST support
Heidi von Markham84564992016-02-09 10:54:20 -08003254<a href="https://www.khronos.org/registry/egl/extensions/ANDROID/EGL_ANDROID_recordable.txt">EGL_ANDROID_RECORDABLE</a>
3255extension.</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07003256
Heidi von Markham84564992016-02-09 10:54:20 -08003257<h3 id="7_1_5_legacy_application_compatibility_mode">7.1.5. Legacy Application
3258Compatibility Mode</h3>
Unsuk Jung5bc81142015-07-16 22:27:20 -07003259
3260
Heidi von Markham84564992016-02-09 10:54:20 -08003261<p>Android specifies a &ldquo;compatibility mode&rdquo; in which the framework
3262operates in a 'normal' screen size equivalent (320dp width) mode for the benefit
3263of legacy applications not developed for old versions of Android that pre-date
Unsuk Jung5bc81142015-07-16 22:27:20 -07003264screen-size independence.</p>
3265
3266<ul>
Heidi von Markham84564992016-02-09 10:54:20 -08003267 <li>Android Automotive does not support legacy compatibility mode.</li>
3268 <li>All other device implementations MUST include support for legacy
3269 application compatibility mode as implemented by the upstream Android open
3270 source code. That is, device implementations MUST NOT alter the triggers or
3271 thresholds at which compatibility mode is activated, and MUST NOT alter the
3272 behavior of the compatibility mode itself.</li>
Unsuk Jung5bc81142015-07-16 22:27:20 -07003273</ul>
3274
3275<h3 id="7_1_6_screen_technology">7.1.6. Screen Technology</h3>
3276
3277
3278<p>The Android platform includes APIs that allow applications to render rich
3279graphics to the display. Devices MUST support all of these APIs as defined by
3280the Android SDK unless specifically allowed in this document. </p>
3281
3282<ul>
Heidi von Markham84564992016-02-09 10:54:20 -08003283 <li>Devices MUST support displays capable of rendering 16-bit color graphics
3284 and SHOULD support displays capable of 24-bit color graphics.</li>
Unsuk Jung5bc81142015-07-16 22:27:20 -07003285 <li>Devices MUST support displays capable of rendering animations.</li>
Heidi von Markham84564992016-02-09 10:54:20 -08003286 <li>The display technology used MUST have a pixel aspect ratio (PAR) between
3287 0.9 and 1.15. That is, the pixel aspect ratio MUST be near square (1.0) with a
3288 10 ~ 15% tolerance.</li>
Unsuk Jung5bc81142015-07-16 22:27:20 -07003289</ul>
3290
3291<h3 id="7_1_7_external_displays">7.1.7. Secondary Displays</h3>
3292
3293
3294<p>Android includes support for secondary display to enable media sharing
3295capabilities and developer APIs for accessing external displays. If a device
3296supports an external display either via a wired, wireless, or an embedded
3297additional display connection then the device implementation MUST implement the
Heidi von Markham84564992016-02-09 10:54:20 -08003298<a href="http://developer.android.com/reference/android/hardware/display/DisplayManager.html">display
3299manager API</a> as described in the Android SDK documentation.</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07003300
3301<h2 id="7_2_input_devices">7.2. Input Devices</h2>
3302
3303<p>Devices MUST support a touchscreen or meet the requirements listed in 7.2.2
3304for non-touch navigation.</p>
3305
3306<h3 id="7_2_1_keyboard">7.2.1. Keyboard</h3>
3307
3308<div class="note">
3309<p>Android Watch and Android Automotive implementations MAY implement a soft
3310keyboard. All other device implementations MUST implement a soft keyboard and:</p>
3311</div>
3312
3313
3314<p>Device implementations:</p>
3315
3316<ul>
3317 <li>MUST include support for the Input Management Framework (which allows
Heidi von Markham84564992016-02-09 10:54:20 -08003318 third-party developers to create Input Method Editors&mdash;i.e. soft
3319 keyboard) as detailed at
3320 <a href="http://developer.android.com">http://developer.android.com</a>.</li>
3321 <li>MUST provide at least one soft keyboard implementation (regardless of
3322 whether a hard keyboard is present) except for Android Watch devices where the
3323 screen size makes it less reasonable to have a soft keyboard.</li>
Unsuk Jung5bc81142015-07-16 22:27:20 -07003324 <li>MAY include additional soft keyboard implementations.</li>
3325 <li>MAY include a hardware keyboard.</li>
Heidi von Markham84564992016-02-09 10:54:20 -08003326 <li>MUST NOT include a hardware keyboard that does not match one of the
3327 formats specified in
3328 <a href="http://developer.android.com/reference/android/content/res/Configuration.html">android.content.res.Configuration.keyboard</a>
3329 (QWERTY or 12-key).</li>
Unsuk Jung5bc81142015-07-16 22:27:20 -07003330</ul>
3331
3332<h3 id="7_2_2_non-touch_navigation">7.2.2. Non-touch Navigation</h3>
3333
3334<div class="note">
3335<p>Android Television devices MUST support D-pad.</p>
3336</div>
3337
3338<p>Device implementations:</p>
3339
3340<ul>
3341 <li>MAY omit a non-touch navigation option (trackball, d-pad, or wheel) if the
Heidi von Markham84564992016-02-09 10:54:20 -08003342 device implementation is not an Android Television device.</li>
3343 <li>MUST report the correct value for
3344 <a href="http://developer.android.com/reference/android/content/res/Configuration.html">android.content.res.Configuration.navigation</a>.
3345 </li>
Unsuk Jung5bc81142015-07-16 22:27:20 -07003346 <li>MUST provide a reasonable alternative user interface mechanism for the
Heidi von Markham84564992016-02-09 10:54:20 -08003347 selection and editing of text, compatible with Input Management Engines. The
3348 upstream Android open source implementation includes a selection mechanism
3349 suitable for use with devices that lack non-touch navigation inputs.</li>
Unsuk Jung5bc81142015-07-16 22:27:20 -07003350</ul>
3351
3352<h3 id="7_2_3_navigation_keys">7.2.3. Navigation Keys</h3>
3353
3354<div class="note">
3355<p>The availability and visibility requirement of the Home, Recents, and Back
3356functions differ between device types as described in this section.</p>
3357</div>
3358
3359<p>The Home, Recents, and Back functions (mapped to the key events KEYCODE_HOME,
3360KEYCODE_APP_SWITCH, KEYCODE_BACK, respectively) are essential to the Android
3361navigation paradigm and therefore:</p>
3362
3363<ul>
Heidi von Markham84564992016-02-09 10:54:20 -08003364 <li>Android Handheld device implementations MUST provide the Home, Recents,
3365 and Back functions.</li>
Unsuk Jung5bc81142015-07-16 22:27:20 -07003366 <li>Android Television device implementations MUST provide the Home and Back
Heidi von Markham84564992016-02-09 10:54:20 -08003367 functions.</li>
3368 <li>Android Watch device implementations MUST have the Home function available
3369 to the user, and the Back function except for when it is in
3370 UI_MODE_TYPE_WATCH.</li>
Unsuk Jung5bc81142015-07-16 22:27:20 -07003371 <li>Android Automotive implementations MUST provide the Home function and MAY
Heidi von Markham84564992016-02-09 10:54:20 -08003372 provide Back and Recent functions.</li>
Unsuk Jung5bc81142015-07-16 22:27:20 -07003373 <li>All other types of device implementations MUST provide the Home and Back
Heidi von Markham84564992016-02-09 10:54:20 -08003374 functions.</li>
Unsuk Jung5bc81142015-07-16 22:27:20 -07003375</ul>
3376
3377<p>These functions MAY be implemented via dedicated physical buttons (such as
3378mechanical or capacitive touch buttons), or MAY be implemented using dedicated
3379software keys on a distinct portion of the screen, gestures, touch panel, etc.
3380Android supports both implementations. All of these functions MUST be
3381accessible with a single action (e.g. tap, double-click or gesture) when
3382visible.</p>
3383
Heidi von Markham84564992016-02-09 10:54:20 -08003384<p>Recents function, if provided, MUST have a visible button or icon unless
3385hidden together with other navigation functions in full-screen mode. This does
3386not apply to devices upgrading from earlier Android versions that have physical
Unsuk Jung5bc81142015-07-16 22:27:20 -07003387buttons for navigation and no recents key.</p>
3388
Heidi von Markham84564992016-02-09 10:54:20 -08003389<p>The Home and Back functions, if provided, MUST each have a visible button or
Unsuk Jung5bc81142015-07-16 22:27:20 -07003390icon unless hidden together with other navigation functions in full-screen mode
3391or when the uiMode UI_MODE_TYPE_MASK is set to UI_MODE_TYPE_WATCH.</p>
3392
3393<p>The Menu function is deprecated in favor of action bar since Android 4.0.
Heidi von Markham84564992016-02-09 10:54:20 -08003394Therefore the new device implementations shipping with Android ANDROID_VERSION
3395and later MUST NOT implement a dedicated physical button for the Menu function.
3396Older device implementations SHOULD NOT implement a dedicated physical button
3397for the Menu function, but if the physical Menu button is implemented and the
3398device is running applications with targetSdkVersion > 10, the device
3399implementation:</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07003400
3401<ul>
Heidi von Markham84564992016-02-09 10:54:20 -08003402 <li>MUST display the action overflow button on the action bar when it is
3403 visible and the resulting action overflow menu popup is not empty. For a
3404 device implementation launched before Android 4.4 but upgrading to Android
3405 ANDROID_VERSION, this is RECOMMENDED.</li>
Unsuk Jung5bc81142015-07-16 22:27:20 -07003406 <li>MUST NOT modify the position of the action overflow popup displayed by
Heidi von Markham84564992016-02-09 10:54:20 -08003407 selecting the overflow button in the action bar.</li>
3408 <li>MAY render the action overflow popup at a modified position on the screen
3409 when it is displayed by selecting the physical menu button.</li>
Unsuk Jung5bc81142015-07-16 22:27:20 -07003410</ul>
3411
Heidi von Markham84564992016-02-09 10:54:20 -08003412<p>For backwards compatibility, device implementations MUST make the Menu
3413function available to applications when targetSdkVersion is less than 10, either
3414by a physical button, a software key, or gestures. This Menu function should be
3415presented unless hidden together with other navigation functions.</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07003416
Heidi von Markham84564992016-02-09 10:54:20 -08003417<p>Android device implementations with the support of the
3418<a href="http://developer.android.com/reference/android/content/Intent.html#ACTION_ASSIST">Assist
3419action</a> MUST make this accessisble with a single action (e.g. tap,
3420double-click, or gesture) when other navigation keys are visible, and are
3421STRONGLY RECOMMENDED to use the long-press on the Home button or software key as
3422the single action.</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07003423
Heidi von Markham84564992016-02-09 10:54:20 -08003424<p>Device implementations MAY use a distinct portion of the screen to display
3425the navigation keys, but if so, MUST meet these requirements:</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07003426
3427<ul>
3428 <li>Device implementation navigation keys MUST use a distinct portion of the
Heidi von Markham84564992016-02-09 10:54:20 -08003429 screen, not available to applications, and MUST NOT obscure or otherwise
3430 interfere with the portion of the screen available to applications.</li>
Unsuk Jung5bc81142015-07-16 22:27:20 -07003431 <li>Device implementations MUST make available a portion of the display to
Heidi von Markham84564992016-02-09 10:54:20 -08003432 applications that meets the requirements defined in
3433 <a href="#7_1_1_screen_configuration">section 7.1.1</a>.</li>
3434 <li>Device implementations MUST display the navigation keys when applications
3435 do not specify a system UI mode, or specify SYSTEM_UI_FLAG_VISIBLE.</li>
3436 <li>Device implementations MUST present the navigation keys in an unobtrusive
3437 &ldquo;low profile&rdquo; (eg. dimmed) mode when applications specify
3438 SYSTEM_UI_FLAG_LOW_PROFILE.</li>
3439 <li>Device implementations MUST hide the navigation keys when applications
3440 specify SYSTEM_UI_FLAG_HIDE_NAVIGATION.</li>
Unsuk Jung5bc81142015-07-16 22:27:20 -07003441</ul>
3442
3443<h3 id="7_2_4_touchscreen_input">7.2.4. Touchscreen Input</h3>
3444
3445<div class="note">
3446<p>Android Handhelds and Watch Devices MUST support touchscreen input.</p>
3447</div>
3448
3449
Heidi von Markham84564992016-02-09 10:54:20 -08003450<p>Device implementations SHOULD have a pointer input system of some kind
3451(either mouse-like or touch). However, if a device implementation does not
3452support a pointer input system, it MUST NOT report the
3453android.hardware.touchscreen or android.hardware.faketouch feature constant.
3454Device implementations that do include a pointer input system:</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07003455
3456<ul>
Heidi von Markham84564992016-02-09 10:54:20 -08003457 <li>SHOULD support fully independently tracked pointers, if the device input
3458 system supports multiple pointers.</li>
3459 <li>MUST report the value of
3460 <a href="http://developer.android.com/reference/android/content/res/Configuration.html">android.content.res.Configuration.touchscreen</a>
3461 corresponding to the type of the specific touchscreen on the device.</li>
Unsuk Jung5bc81142015-07-16 22:27:20 -07003462</ul>
3463
3464<p>Android includes support for a variety of touchscreens, touch pads, and fake
Heidi von Markham84564992016-02-09 10:54:20 -08003465touch input devices.
3466<a href="http://source.android.com/devices/tech/input/touch-devices.html">Touchscreen
3467based device implementations</a> are associated with a display such that the
3468user has the impression of directly manipulating items on screen. Since the user
3469is directly touching the screen, the system does not require any additional
3470affordances to indicate the objects being manipulated. In contrast, a fake touch
3471interface provides a user input system that approximates a subset of touchscreen
3472capabilities. For example, a mouse or remote control that drives an on-screen
3473cursor approximates touch, but requires the user to first point or focus then
3474click. Numerous input devices like the mouse, trackpad, gyro-based air mouse,
3475gyro-pointer, joystick, and multi-touch trackpad can support fake touch
3476interactions. Android includes the feature constant android.hardware.faketouch,
3477which corresponds to a high-fidelity non-touch (pointer-based) input device such
3478as a mouse or trackpad that can adequately emulate touch-based input (including
3479basic gesture support), and indicates that the device supports an emulated
3480subset of touchscreen functionality. Device implementations that declare the
3481fake touch feature MUST meet the fake touch requirements in
3482<a href="#7_2_5_fake_touch_input">section 7.2.5</a>.</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07003483
3484<p>Device implementations MUST report the correct feature corresponding to the
3485type of input used. Device implementations that include a touchscreen
3486(single-touch or better) MUST report the platform feature constant
3487android.hardware.touchscreen. Device implementations that report the platform
3488feature constant android.hardware.touchscreen MUST also report the platform
3489feature constant android.hardware.faketouch. Device implementations that do not
3490include a touchscreen (and rely on a pointer device only) MUST NOT report any
3491touchscreen feature, and MUST report only android.hardware.faketouch if they
Heidi von Markham84564992016-02-09 10:54:20 -08003492meet the fake touch requirements in <a href="#7_2_5_fake_touch_input">section
34937.2.5</a>.</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07003494
3495<h3 id="7_2_5_fake_touch_input">7.2.5. Fake Touch Input</h3>
3496
3497
3498<p>Device implementations that declare support for android.hardware.faketouch:</p>
3499
3500<ul>
Heidi von Markham84564992016-02-09 10:54:20 -08003501 <li>MUST report the
3502 <a href="http://developer.android.com/reference/android/view/MotionEvent.html">absolute
3503 X and Y screen positions</a>of the pointer location and display a visual
3504 pointer on the screen.</li>
3505 <li>MUST report touch event with the action code that specifies the state
3506 change that occurs on the pointer
3507 <a href="http://developer.android.com/reference/android/view/MotionEvent.html">going
3508 down or up on the screen</a>.</li>
3509 <li>MUST support pointer down and up on an object on the screen, which allows
3510 users to emulate tap on an object on the screen.</li>
3511 <li>MUST support pointer down, pointer up, pointer down then pointer up in the
3512 same place on an object on the screen within a time threshold, which allows
3513 users to
3514 <a href="http://developer.android.com/reference/android/view/MotionEvent.html">emulate
3515 double tap</a> on an object on the screen.</li>
3516 <li>MUST support pointer down on an arbitrary point on the screen, pointer
3517 move to any other arbitrary point on the screen, followed by a pointer up,
3518 which allows users to emulate a touch drag.</li>
Unsuk Jung5bc81142015-07-16 22:27:20 -07003519 <li>MUST support pointer down then allow users to quickly move the object to a
Heidi von Markham84564992016-02-09 10:54:20 -08003520 different position on the screen and then pointer up on the screen, which
3521 allows users to fling an object on the screen.</li>
Unsuk Jung5bc81142015-07-16 22:27:20 -07003522</ul>
3523
Heidi von Markham84564992016-02-09 10:54:20 -08003524<p>Devices that declare support for
3525android.hardware.faketouch.multitouch.distinct MUST meet the requirements for
3526faketouch above, and MUST also support distinct tracking of two or more
3527independent pointer inputs.</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07003528
3529<h3 id="7_2_6_game_controller_support">7.2.6. Game Controller Support</h3>
3530
3531
3532<p>Android Television device implementations MUST support button mappings for game
3533controllers as listed below. The upstream Android implementation includes
3534implementation for game controllers that satisfies this requirement. </p>
3535
3536<h4 id="7_2_6_1_button_mappings">7.2.6.1. Button Mappings</h4>
3537
3538
3539<p>Android Television device implementations MUST support the following key
3540mappings:</p>
3541<table>
3542 <tr>
3543 <th>Button</th>
Glenn Kastenee7e79a2015-10-06 15:01:45 -07003544 <th>HID Usage<sup>2</sup></th>
Unsuk Jung5bc81142015-07-16 22:27:20 -07003545 <th>Android Button</th>
3546 </tr>
3547 <tr>
3548 <td><a href="http://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_BUTTON_A">A</a><sup>1</sup></td>
3549 <td>0x09 0x0001</td>
3550 <td>KEYCODE_BUTTON_A (96)</td>
3551 </tr>
3552 <tr>
3553 <td><a href="http://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_BUTTON_B">B</a><sup>1</sup></td>
3554 <td>0x09 0x0002</td>
3555 <td>KEYCODE_BUTTON_B (97)</td>
3556 </tr>
3557 <tr>
3558 <td><a href="http://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_BUTTON_X">X</a><sup>1</sup></td>
3559 <td>0x09 0x0004</td>
3560 <td>KEYCODE_BUTTON_X (99)</td>
3561 </tr>
3562 <tr>
3563 <td><a href="http://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_BUTTON_Y">Y</a><sup>1</sup></td>
3564 <td>0x09 0x0005</td>
3565 <td>KEYCODE_BUTTON_Y (100)</td>
3566 </tr>
3567 <tr>
Glenn Kastenee7e79a2015-10-06 15:01:45 -07003568 <td><a href="http://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_DPAD_UP">D-pad up</a><sup>1</sup><br />
Unsuk Jung5bc81142015-07-16 22:27:20 -07003569
Glenn Kastenee7e79a2015-10-06 15:01:45 -07003570<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 -07003571 <td>0x01 0x0039<sup>3</sup></td>
Unsuk Jung5bc81142015-07-16 22:27:20 -07003572 <td><a href="http://developer.android.com/reference/android/view/MotionEvent.html#AXIS_HAT_Y">AXIS_HAT_Y</a><sup>4</sup></td>
3573 </tr>
3574 <tr>
Glenn Kastenee7e79a2015-10-06 15:01:45 -07003575 <td><a href="http://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_DPAD_LEFT">D-pad left</a>1<br />
Unsuk Jung5bc81142015-07-16 22:27:20 -07003576
Glenn Kastenee7e79a2015-10-06 15:01:45 -07003577<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 -07003578 <td>0x01 0x0039<sup>3</sup></td>
Unsuk Jung5bc81142015-07-16 22:27:20 -07003579 <td><a href="http://developer.android.com/reference/android/view/MotionEvent.html#AXIS_HAT_X">AXIS_HAT_X</a><sup>4</sup></td>
3580 </tr>
3581 <tr>
3582 <td><a href="http://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_BUTTON_L1">Left shoulder button</a><sup>1</sup></td>
3583 <td>0x09 0x0007</td>
3584 <td>KEYCODE_BUTTON_L1 (102)</td>
3585 </tr>
3586 <tr>
3587 <td><a href="http://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_BUTTON_R1">Right shoulder button</a><sup>1</sup></td>
3588 <td>0x09 0x0008</td>
3589 <td>KEYCODE_BUTTON_R1 (103)</td>
3590 </tr>
3591 <tr>
3592 <td><a href="http://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_BUTTON_THUMBL">Left stick click</a><sup>1</sup></td>
3593 <td>0x09 0x000E</td>
3594 <td>KEYCODE_BUTTON_THUMBL (106)</td>
3595 </tr>
3596 <tr>
3597 <td><a href="http://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_BUTTON_THUMBR">Right stick click</a><sup>1</sup></td>
3598 <td>0x09 0x000F</td>
3599 <td>KEYCODE_BUTTON_THUMBR (107)</td>
3600 </tr>
3601 <tr>
3602 <td><a href="http://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_HOME">Home</a><sup>1</sup></td>
3603 <td>0x0c 0x0223</td>
3604 <td>KEYCODE_HOME (3)</td>
3605 </tr>
3606 <tr>
3607 <td><a href="http://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_BACK">Back</a><sup>1</sup></td>
3608 <td>0x0c 0x0224</td>
3609 <td>KEYCODE_BACK (4)</td>
3610 </tr>
3611</table>
3612
3613
Heidi von Markham84564992016-02-09 10:54:20 -08003614<p class="table_footnote">1 <a href="http://developer.android.com/reference/android/view/KeyEvent.html">KeyEvent</a></p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07003615
3616<p class="table_footnote">2 The above HID usages must be declared within a Game pad CA (0x01 0x0005).</p>
3617
Heidi von Markham84564992016-02-09 10:54:20 -08003618<p class="table_footnote">3 This usage must have a Logical Minimum of 0, a
3619Logical Maximum of 7, a Physical Minimum of 0, a Physical Maximum of 315, Units
3620in Degrees, and a Report Size of 4. The logical value is defined to be the
3621clockwise rotation away from the vertical axis; for example, a logical value of
36220 represents no rotation and the up button being pressed, while a logical value
3623of 1 represents a rotation of 45 degrees and both the up and left keys being
3624pressed.</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07003625
Heidi von Markham84564992016-02-09 10:54:20 -08003626<p class="table_footnote">4 <a href="http://developer.android.com/reference/android/view/MotionEvent.html">MotionEvent</a></p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07003627
3628<table>
3629 <tr>
Glenn Kastenee7e79a2015-10-06 15:01:45 -07003630 <th>Analog Controls<sup>1</sup></th>
Unsuk Jung5bc81142015-07-16 22:27:20 -07003631 <th>HID Usage</th>
3632 <th>Android Button</th>
3633 </tr>
3634 <tr>
3635 <td><a href="http://developer.android.com/reference/android/view/MotionEvent.html#AXIS_LTRIGGER">Left Trigger</a></td>
3636 <td>0x02 0x00C5</td>
3637 <td>AXIS_LTRIGGER </td>
3638 </tr>
3639 <tr>
3640 <td><a href="http://developer.android.com/reference/android/view/MotionEvent.html#AXIS_THROTTLE">Right Trigger</a></td>
3641 <td>0x02 0x00C4</td>
3642 <td>AXIS_RTRIGGER </td>
3643 </tr>
3644 <tr>
3645 <td><a href="http://developer.android.com/reference/android/view/MotionEvent.html#AXIS_Y">Left Joystick</a></td>
Glenn Kastenee7e79a2015-10-06 15:01:45 -07003646 <td>0x01 0x0030<br />
Unsuk Jung5bc81142015-07-16 22:27:20 -07003647
Glenn Kastenee7e79a2015-10-06 15:01:45 -070036480x01 0x0031</td>
3649 <td>AXIS_X<br />
Unsuk Jung5bc81142015-07-16 22:27:20 -07003650
Glenn Kastenee7e79a2015-10-06 15:01:45 -07003651AXIS_Y</td>
Unsuk Jung5bc81142015-07-16 22:27:20 -07003652 </tr>
3653 <tr>
3654 <td><a href="http://developer.android.com/reference/android/view/MotionEvent.html#AXIS_Z">Right Joystick</a></td>
Glenn Kastenee7e79a2015-10-06 15:01:45 -07003655 <td>0x01 0x0032<br />
Unsuk Jung5bc81142015-07-16 22:27:20 -07003656
Glenn Kastenee7e79a2015-10-06 15:01:45 -070036570x01 0x0035</td>
3658 <td>AXIS_Z<br />
Unsuk Jung5bc81142015-07-16 22:27:20 -07003659
Glenn Kastenee7e79a2015-10-06 15:01:45 -07003660AXIS_RZ</td>
Unsuk Jung5bc81142015-07-16 22:27:20 -07003661 </tr>
3662</table>
3663
3664
Heidi von Markham84564992016-02-09 10:54:20 -08003665<p class="table_footnote">1 <a href="http://developer.android.com/reference/android/view/MotionEvent.html">MotionEvent</a></p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07003666
3667<h3 id="7_2_7_remote_control">7.2.7. Remote Control</h3>
3668
3669
3670<p>Android Television device implementations SHOULD provide a remote control to
3671allow users to access the TV interface. The remote control MAY be a physical
3672remote or can be a software-based remote that is accessible from a mobile phone
3673or tablet. The remote control MUST meet the requirements defined below.</p>
3674
3675<ul>
Heidi von Markham84564992016-02-09 10:54:20 -08003676 <li><strong>Search affordance</strong>. Device implementations MUST fire
3677 KEYCODE_SEARCH when the user invokes voice search either on the physical or
3678 software-based remote.</li>
3679 <li><strong>Navigation</strong>. All Android Television remotes MUST include
3680 <a href="http://developer.android.com/reference/android/view/KeyEvent.html">Back,
3681 Home, and Select buttons and support for D-pad events</a>.</li>
Unsuk Jung5bc81142015-07-16 22:27:20 -07003682</ul>
3683
3684<h2 id="7_3_sensors">7.3. Sensors</h2>
3685
3686
3687<p>Android includes APIs for accessing a variety of sensor types. Devices
3688implementations generally MAY omit these sensors, as provided for in the
3689following subsections. If a device includes a particular sensor type that has a
3690corresponding API for third-party developers, the device implementation MUST
3691implement that API as described in the Android SDK documentation and the
Heidi von Markham84564992016-02-09 10:54:20 -08003692Android Open Source documentation on
3693<a href="http://source.android.com/devices/sensors/">sensors</a>. For example,
3694device implementations:</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07003695
3696<ul>
3697 <li>MUST accurately report the presence or absence of sensors per the
Heidi von Markham84564992016-02-09 10:54:20 -08003698 <a href="http://developer.android.com/reference/android/content/pm/PackageManager.html">android.content.pm.PackageManager</a>
3699 class.</li>
Unsuk Jung5bc81142015-07-16 22:27:20 -07003700 <li>MUST return an accurate list of supported sensors via the
Heidi von Markham84564992016-02-09 10:54:20 -08003701 SensorManager.getSensorList() and similar methods.</li>
3702 <li>MUST behave reasonably for all other sensor APIs (for example, by
3703 returning true or false as appropriate when applications attempt to register
3704 listeners, not calling sensor listeners when the corresponding sensors are not
3705 present; etc.).</li>
3706 <li>MUST
3707 <a href="http://developer.android.com/reference/android/hardware/SensorEvent.html">report
3708 all sensor measurements</a> using the relevant International System of Units
3709 (metric) values for each sensor type as defined in the Android SDK
3710 documentation.</li>
3711 <li>SHOULD
3712 <a href="http://developer.android.com/reference/android/hardware/SensorEvent.html#timestamp">report
3713 the event time</a> in nanoseconds as defined in the Android SDK documentation,
3714 representing the time the event happened and synchronized with the
3715 SystemClock.elapsedRealtimeNano() clock. Existing and new Android devices are
3716 <strong>STRONGLY RECOMMENDED</strong> to meet these requirements so they will
3717 be able to upgrade to the future platform releases where this might become a
3718 REQUIRED component. The synchronization error SHOULD be below 100
3719 milliseconds.</li>
3720 <li>MUST report sensor data with a maximum latency of 100 milliseconds + 2 *
3721 sample_time for the case of a sensor streamed with a minimum required latency
3722 of 5 ms + 2 * sample_time when the application processor is active. This delay
3723 does not include any filtering delays.</li>
3724 <li>MUST report the first sensor sample within 400 milliseconds + 2 *
3725 sample_time of the sensor being activated. It is acceptable for this sample to
3726 have an accuracy of 0.</li>
Unsuk Jung5bc81142015-07-16 22:27:20 -07003727</ul>
3728
Heidi von Markham84564992016-02-09 10:54:20 -08003729<p>The list above is not comprehensive; the documented behavior of the Android
3730SDK and the Android Open Source Documentations on
3731<a href="http://source.android.com/devices/sensors/">sensors</a> is to be
3732considered authoritative.</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07003733
Heidi von Markham84564992016-02-09 10:54:20 -08003734<p>Some sensor types are composite, meaning they can be derived from data
3735provided by one or more other sensors. (Examples include the orientation sensor
3736and the linear acceleration sensor.) Device implementations SHOULD implement
3737these sensor types, when they include the prerequisite physical sensors as
3738described in
3739<a href="https://source.android.com/devices/sensors/sensor-types.html">sensor
3740types</a>. If a device implementation includes a composite sensor it MUST
3741implement the sensor as described in the Android Open Source documentation on
3742<a href="https://source.android.com/devices/sensors/sensor-types.html#composite_sensor_type_summary">composite
3743sensors</a>.</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07003744
Heidi von Markham84564992016-02-09 10:54:20 -08003745<p>Some Android sensors support a
3746<a href="https://source.android.com/devices/sensors/report-modes.html#continuous">&ldquo;continuous&rdquo;
3747trigger mode</a>, which returns data continuously. For any API indicated by the
3748Android SDK documentation to be a continuous sensor, device implementations MUST
3749continuously provide periodic data samples that SHOULD have a jitter below 3%,
3750where jitter is defined as the standard deviation of the difference of the
3751reported timestamp values between consecutive events.</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07003752
3753<p>Note that the device implementations MUST ensure that the sensor event stream
3754MUST NOT prevent the device CPU from entering a suspend state or waking up from
3755a suspend state.</p>
3756
3757<p>Finally, when several sensors are activated, the power consumption SHOULD NOT
3758exceed the sum of the individual sensor&rsquo;s reported power consumption.</p>
3759
3760<h3 id="7_3_1_accelerometer">7.3.1. Accelerometer</h3>
3761
3762
Heidi von Markham84564992016-02-09 10:54:20 -08003763<p>Device implementations SHOULD include a 3-axis accelerometer. Android
3764Handheld devices and Android Watch devices are STRONGLY RECOMMENDED to include
3765this sensor. If a device implementation does include a 3-axis accelerometer, it:
3766</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07003767
3768<ul>
Heidi von Markham84564992016-02-09 10:54:20 -08003769 <li>MUST implement and report
3770 <a href="http://developer.android.com/reference/android/hardware/Sensor.html#TYPE_ACCELEROMETER">TYPE_ACCELEROMETER sensor</a>.
3771 </li>
Unsuk Jung5bc81142015-07-16 22:27:20 -07003772 <li>MUST be able to report events up to a frequency of at least 50 Hz for
3773 Android Watch devices as such devices have a stricter power constraint and
3774 100 Hz for all other device types.</li>
3775 <li>SHOULD report events up to at least 200 Hz.</li>
Heidi von Markham84564992016-02-09 10:54:20 -08003776 <li>MUST comply with the
3777 <a href="http://developer.android.com/reference/android/hardware/SensorEvent.html">Android
3778 sensor coordinate system</a> as detailed in the Android APIs.</li>
3779 <li>MUST be capable of measuring from freefall up to four times the gravity
3780 (4g) or more on any axis.</li>
3781 <li>MUST have a resolution of at least 12-bits and SHOULD have a resolution of
3782 at least 16-bits.</li>
3783 <li>SHOULD be calibrated while in use if the characteristics changes over the
3784 life cycle and compensated, and preserve the compensation parameters between
3785 device reboots.</li>
Unsuk Jung5bc81142015-07-16 22:27:20 -07003786 <li>SHOULD be temperature compensated.</li>
Heidi von Markham84564992016-02-09 10:54:20 -08003787 <li>MUST have a standard deviation no greater than 0.05 m/s^, where the
3788 standard deviation should be calculated on a per axis basis on samples
3789 collected over a period of at least 3 seconds at the fastest sampling rate.
3790 </li>
Unsuk Jung5bc81142015-07-16 22:27:20 -07003791 <li>SHOULD implement the TYPE_SIGNIFICANT_MOTION, TYPE_TILT_DETECTOR,
Heidi von Markham84564992016-02-09 10:54:20 -08003792 TYPE_STEP_DETECTOR, TYPE_STEP_COUNTER composite sensors as described in the
3793 Android SDK document. Existing and new Android devices are <strong>STRONGLY
3794 RECOMMENDED</strong> to implement the TYPE_SIGNIFICANT_MOTION composite
3795 sensor. If any of these sensors are implemented, the sum of their power
3796 consumption MUST always be less than 4 mW and SHOULD each be below 2 mW and
3797 0.5 mW for when the device is in a dynamic or static condition.</li>
Unsuk Jung5bc81142015-07-16 22:27:20 -07003798 <li>If a gyroscope sensor is included, MUST implement the TYPE_GRAVITY and
Heidi von Markham84564992016-02-09 10:54:20 -08003799 TYPE_LINEAR_ACCELERATION composite sensors and SHOULD implement the
3800 TYPE_GAME_ROTATION_VECTOR composite sensor. Existing and new Android devices
3801 are STRONGLY RECOMMENDED to implement the TYPE_GAME_ROTATION_VECTOR sensor.
3802 </li>
3803 <li>MUST implement a TYPE_ROTATION_VECTOR composite sensor, if a gyroscope
3804 sensor and a magnetometer sensor is also included.</li>
Unsuk Jung5bc81142015-07-16 22:27:20 -07003805</ul>
3806
3807<h3 id="7_3_2_magnetometer">7.3.2. Magnetometer</h3>
3808
3809
3810<p>Device implementations SHOULD include a 3-axis magnetometer (compass). If a
3811device does include a 3-axis magnetometer, it:</p>
3812
3813<ul>
3814 <li>MUST implement the TYPE_MAGNETIC_FIELD sensor and SHOULD also implement
Heidi von Markham84564992016-02-09 10:54:20 -08003815 TYPE_MAGNETIC_FIELD_UNCALIBRATED sensor. Existing and new Android devices are
3816 STRONGLY RECOMMENDED to implement the TYPE_MAGNETIC_FIELD_UNCALIBRATED sensor.
3817 </li>
3818 <li>MUST be able to report events up to a frequency of at least 10 Hz and
3819 SHOULD report events up to at least 50 Hz.</li>
3820 <li>MUST comply with the
3821 <a href="http://developer.android.com/reference/android/hardware/SensorEvent.html">Android
3822 sensor coordinate system</a> as detailed in the Android APIs.</li>
3823 <li>MUST be capable of measuring between -900 &micro;T and +900 &micro;T on
3824 each axis before saturating.</li>
3825 <li>MUST have a hard iron offset value less than 700 &micro;T and SHOULD have
3826 a value below 200 &micro;T, by placing the magnetometer far from dynamic
3827 (current-induced) and static (magnet-induced) magnetic fields.</li>
3828 <li>MUST have a resolution equal or denser than 0.6 &micro;T and SHOULD have a
3829 resolution equal or denser than 0.2 &micro;.</li>
Unsuk Jung5bc81142015-07-16 22:27:20 -07003830 <li>SHOULD be temperature compensated.</li>
Heidi von Markham84564992016-02-09 10:54:20 -08003831 <li>MUST support online calibration and compensation of the hard iron bias,
3832 and preserve the compensation parameters between device reboots.</li>
3833 <li>MUST have the soft iron compensation applied&mdash;the calibration can be
3834 done either while in use or during the production of the device.</li>
3835 <li>SHOULD have a standard deviation, calculated on a per axis basis on
3836 samples collected over a period of at least 3 seconds at the fastest sampling
3837 rate, no greater than 0.5 &micro;T.</li>
3838 <li>MUST implement a TYPE_ROTATION_VECTOR composite sensor, if an
3839 accelerometer sensor and a gyroscope sensor is also included.</li>
3840 <li>MAY implement the TYPE_GEOMAGNETIC_ROTATION_VECTOR sensor if an
3841 accelerometer sensor is also implemented. However if implemented, it MUST
3842 consume less than 10 mW and SHOULD consume less than 3 mW when the sensor is
3843 registered for batch mode at 10 Hz.</li>
Unsuk Jung5bc81142015-07-16 22:27:20 -07003844</ul>
3845
3846<h3 id="7_3_3_gps">7.3.3. GPS</h3>
3847
3848
3849<p>Device implementations SHOULD include a GPS receiver. If a device
Heidi von Markham84564992016-02-09 10:54:20 -08003850implementation does include a GPS receiver, it SHOULD include some form
3851of&ldquo;assisted GPS&rdquo; technique to minimize GPS lock-on time.</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07003852
3853<h3 id="7_3_4_gyroscope">7.3.4. Gyroscope</h3>
3854
3855
3856<p>Device implementations SHOULD include a gyroscope (angular change sensor).
3857Devices SHOULD NOT include a gyroscope sensor unless a 3-axis accelerometer is
3858also included. If a device implementation includes a gyroscope, it:</p>
3859
3860<ul>
3861 <li>MUST implement the TYPE_GYROSCOPE sensor and SHOULD also implement
Heidi von Markham84564992016-02-09 10:54:20 -08003862 TYPE_GYROSCOPE_UNCALIBRATED sensor. Existing and new Android devices are
3863 STRONGLY RECOMMENDED to implement the SENSOR_TYPE_GYROSCOPE_UNCALIBRATED
3864 sensor.</li>
3865 <li>MUST be capable of measuring orientation changes up to 1,000 degrees per
3866 second.</li>
Unsuk Jung5bc81142015-07-16 22:27:20 -07003867 <li>MUST be able to report events up to a frequency of at least 50 Hz for
Heidi von Markham84564992016-02-09 10:54:20 -08003868 Android Watch devices as such devices have a stricter power constraint and 100
3869 Hz for all other device types.</li>
Unsuk Jung5bc81142015-07-16 22:27:20 -07003870 <li>SHOULD report events up to at least 200 Hz.</li>
3871 <li>MUST have a resolution of 12-bits or more and SHOULD have a resolution of
Heidi von Markham84564992016-02-09 10:54:20 -08003872 16-bits or more.</li>
Unsuk Jung5bc81142015-07-16 22:27:20 -07003873 <li>MUST be temperature compensated.</li>
Heidi von Markham84564992016-02-09 10:54:20 -08003874 <li>MUST be calibrated and compensated while in use, and preserve the
3875 compensation parameters between device reboots.</li>
3876 <li>MUST have a variance no greater than 1e-7 rad^2 / s^2 per Hz (variance per
3877 Hz, or rad^2 / s). The variance is allowed to vary with the sampling rate, but
3878 must be constrained by this value. In other words, if you measure the variance
3879 of the gyro at 1 Hz sampling rate it should be no greater than 1e-7 rad^2/s^2.
3880 </li>
3881 <li>MUST implement a TYPE_ROTATION_VECTOR composite sensor, if an
3882 accelerometer sensor and a magnetometer sensor is also included.</li>
3883 <li>If an accelerometer sensor is included, MUST implement the TYPE_GRAVITY
3884 and TYPE_LINEAR_ACCELERATION composite sensors and SHOULD implement the
3885 TYPE_GAME_ROTATION_VECTOR composite sensor. Existing and new Android devices
3886 are STRONGLY RECOMMENDED to implement the TYPE_GAME_ROTATION_VECTOR sensor.
3887 </li>
Unsuk Jung5bc81142015-07-16 22:27:20 -07003888</ul>
3889
3890<h3 id="7_3_5_barometer">7.3.5. Barometer</h3>
3891
3892
3893<p>Device implementations SHOULD include a barometer (ambient air pressure
3894sensor). If a device implementation includes a barometer, it:</p>
3895
3896<ul>
3897 <li>MUST implement and report TYPE_PRESSURE sensor.</li>
3898 <li>MUST be able to deliver events at 5 Hz or greater.</li>
3899 <li>MUST have adequate precision to enable estimating altitude.</li>
3900 <li>MUST be temperature compensated.</li>
3901</ul>
3902
3903<h3 id="7_3_6_thermometer">7.3.6. Thermometer</h3>
3904
3905
Heidi von Markham84564992016-02-09 10:54:20 -08003906<p>Device implementations MAY include an ambient thermometer (temperature
3907sensor). If present, it MUST be defined as SENSOR_TYPE_AMBIENT_TEMPERATURE and
3908it MUST measure the ambient (room) temperature in degrees Celsius.</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07003909
Heidi von Markham84564992016-02-09 10:54:20 -08003910<p>Device implementations MAY but SHOULD NOT include a CPU temperature sensor.
3911If present, it MUST be defined as SENSOR_TYPE_TEMPERATURE, it MUST measure the
Unsuk Jung5bc81142015-07-16 22:27:20 -07003912temperature of the device CPU, and it MUST NOT measure any other temperature.
3913Note the SENSOR_TYPE_TEMPERATURE sensor type was deprecated in Android 4.0.</p>
3914
3915<h3 id="7_3_7_photometer">7.3.7. Photometer</h3>
3916
3917
3918<p>Device implementations MAY include a photometer (ambient light sensor).</p>
3919
3920<h3 id="7_3_8_proximity_sensor">7.3.8. Proximity Sensor</h3>
3921
3922
Heidi von Markham84564992016-02-09 10:54:20 -08003923<p>Device implementations MAY include a proximity sensor. Devices that can make
3924a voice call and indicate any value other than PHONE_TYPE_NONE in getPhoneType
Unsuk Jung5bc81142015-07-16 22:27:20 -07003925SHOULD include a proximity sensor. If a device implementation does include a
3926proximity sensor, it:</p>
3927
3928<ul>
Heidi von Markham84564992016-02-09 10:54:20 -08003929 <li>MUST measure the proximity of an object in the same direction as the
3930 screen. That is, the proximity sensor MUST be oriented to detect objects close
3931 to the screen, as the primary intent of this sensor type is to detect a phone
3932 in use by the user. If a device implementation includes a proximity sensor
3933 with any other orientation, it MUST NOT be accessible through this API.</li>
Unsuk Jung5bc81142015-07-16 22:27:20 -07003934 <li>MUST have 1-bit of accuracy or more.</li>
3935</ul>
3936
Unsuk Jung66ef8472015-09-30 04:00:08 -07003937
3938<h3 id="7_3_9_hifi_sensors">7.3.9. High Fidelity Sensors</h3>
3939
Heidi von Markham84564992016-02-09 10:54:20 -08003940<p>Device implementations supporting a set of higher quality sensors that can
3941meet all the requirements listed in this section MUST identify the support
3942through the <code>android.hardware.sensor.hifi_sensors</code> feature flag.</p>
Unsuk Jung66ef8472015-09-30 04:00:08 -07003943
Heidi von Markham84564992016-02-09 10:54:20 -08003944<p>A device declaring android.hardware.sensor.hifi_sensors MUST support all of
3945the following sensor types meeting the quality requirements as below:</p>
Unsuk Jung66ef8472015-09-30 04:00:08 -07003946
3947<ul>
3948 <li>SENSOR_TYPE_ACCELEROMETER
3949 <ul>
Heidi von Markham84564992016-02-09 10:54:20 -08003950 <li>MUST have a measurement range between at least -8g and +8g.</li>
3951 <li>MUST have a measurement resolution of at least 1024 LSB/G.</li>
3952 <li>MUST have a minimum measurement frequency of 12.5 Hz or lower.</li>
3953 <li>MUST have a maxmium measurement frequency of 200 Hz or higher.</li>
3954 <li>MUST have a measurement noise not above 400uG/&radic;Hz.</li>
3955 <li>MUST implement a non-wake-up form of this sensor with a buffering
3956 capability of at least 3000 sensor events.</li>
3957 <li>MUST have a batching power consumption not worse than 3 mW.</li>
Unsuk Jung66ef8472015-09-30 04:00:08 -07003958 </ul>
3959 </li>
3960 <li>SENSOR_TYPE_GYROSCOPE
3961 <ul>
Heidi von Markham84564992016-02-09 10:54:20 -08003962 <li>MUST have a measurement range between at least -1000 and +1000 dps.</li>
3963 <li>MUST have a measurement resolution of at least 16 LSB/dps.</li>
3964 <li>MUST have a minimum measurement frequency of 12.5 Hz or lower.</li>
3965 <li>MUST have a maxmium measurement frequency of 200 Hz or higher.</li>
3966 <li>MUST have a measurement noise not above 0.014&deg;/s/&radic;Hz.</li>
Unsuk Jung66ef8472015-09-30 04:00:08 -07003967 </ul>
3968 </li>
3969 <li>SENSOR_TYPE_GYROSCOPE_UNCALIBRATED with the same quality requirements as
Heidi von Markham84564992016-02-09 10:54:20 -08003970 SENSOR_TYPE_GYROSCOPE.</li>
Unsuk Jung66ef8472015-09-30 04:00:08 -07003971 <li>SENSOR_TYPE_GEOMAGNETIC_FIELD
3972 <ul>
Heidi von Markham84564992016-02-09 10:54:20 -08003973 <li>MUST have a measurement range between at least -900 and +900 uT.</li>
3974 <li>MUST have a measurement resolution of at least 5 LSB/uT.</li>
3975 <li>MUST have a minimum measurement frequency of 5 Hz or lower.</li>
3976 <li>MUST have a maxmium measurement frequency of 50 Hz or higher.</li>
3977 <li>MUST have a measurement noise not above 0.5 uT.</li>
Unsuk Jung66ef8472015-09-30 04:00:08 -07003978 </ul>
3979 </li>
Heidi von Markham84564992016-02-09 10:54:20 -08003980 <li>SENSOR_TYPE_MAGNETIC_FIELD_UNCALIBRATED with the same quality requirements
3981 as SENSOR_TYPE_GEOMAGNETIC_FIELD and in addition:
Unsuk Jung66ef8472015-09-30 04:00:08 -07003982 <ul>
Heidi von Markham84564992016-02-09 10:54:20 -08003983 <li>MUST implement a non-wake-up form of this sensor with a buffering
3984 capability of at least 600 sensor events.</li>
Unsuk Jung66ef8472015-09-30 04:00:08 -07003985 </ul>
3986 </li>
3987 <li>SENSOR_TYPE_PRESSURE
3988 <ul>
Heidi von Markham84564992016-02-09 10:54:20 -08003989 <li>MUST have a measurement range between at least 300 and 1100 hPa.</li>
3990 <li>MUST have a measurement resolution of at least 80 LSB/hPa.</li>
3991 <li>MUST have a minimum measurement frequency of 1 Hz or lower.</li>
3992 <li>MUST have a maximum measurement frequency of 10 Hz or higher.</li>
3993 <li>MUST have a measurement noise not above 2 Pa/&radic;Hz.</li>
3994 <li>MUST implement a non-wake-up form of this sensor with a buffering
3995 capability of at least 300 sensor events.</li>
3996 <li>MUST have a batching power consumption not worse than 2 mW.</li>
Unsuk Jung66ef8472015-09-30 04:00:08 -07003997 </ul>
3998 </li>
3999 <li>SENSOR_TYPE_ROTATION_VECTOR
4000 <ul>
Heidi von Markham84564992016-02-09 10:54:20 -08004001 <li>MUST have a batching power consumption not worse than 4 mW.</li>
Unsuk Jung66ef8472015-09-30 04:00:08 -07004002 </ul>
4003 </li>
Heidi von Markham84564992016-02-09 10:54:20 -08004004 <li>SENSOR_TYPE_GAME_ROTATION_VECTOR MUST implement a non-wake-up form of this
4005 sensor with a buffering capability of at least 300 sensor events.</li>
Unsuk Jung66ef8472015-09-30 04:00:08 -07004006 <li>SENSOR_TYPE_SIGNIFICANT_MOTION
4007 <ul>
Heidi von Markham84564992016-02-09 10:54:20 -08004008 <li>MUST have a power consumption not worse than 0.5 mW when device is
4009 static and 1.5 mW when device is moving.</li>
Unsuk Jung66ef8472015-09-30 04:00:08 -07004010 </ul>
4011 </li>
4012 <li>SENSOR_TYPE_STEP_DETECTOR
4013 <ul>
Heidi von Markham84564992016-02-09 10:54:20 -08004014 <li>MUST implement a non-wake-up form of this sensor with a buffering
4015 capability of at least 100 sensor events.</li>
4016 <li>MUST have a power consumption not worse than 0.5 mW when device is
4017 static and 1.5 mW when device is moving.</li>
4018 <li>MUST have a batching power consumption not worse than 4 mW.</li>
Unsuk Jung66ef8472015-09-30 04:00:08 -07004019 </ul>
4020 </li>
4021 <li>SENSOR_TYPE_STEP_COUNTER
4022 <ul>
Heidi von Markham84564992016-02-09 10:54:20 -08004023 <li>MUST have a power consumption not worse than 0.5 mW when device is
4024 static and 1.5 mW when device is moving.</li>
Unsuk Jung66ef8472015-09-30 04:00:08 -07004025 </ul>
4026 </li>
4027 <li>SENSOR_TILT_DETECTOR
4028 <ul>
Heidi von Markham84564992016-02-09 10:54:20 -08004029 <li>MUST have a power consumption not worse than 0.5 mW when device is
4030 static and 1.5 mW when device is moving.</li>
Unsuk Jung66ef8472015-09-30 04:00:08 -07004031 </ul>
4032 </li>
4033</ul>
4034
4035<p>Also such a device MUST meet the following sensor subsystem requirements:</p>
4036
4037<ul>
Heidi von Markham84564992016-02-09 10:54:20 -08004038 <li>The event timestamp of the same physical event reported by the
4039 Accelerometer, Gyroscope sensor and Magnetometer MUST be within 2.5
4040 milliseconds of each other.</li>
4041 <li>The Gyroscope sensor event timestamps MUST be on the same time base as the
4042 camera subsystem and within 1 millisconds of error.</li>
4043 <li>The latency of delivery of samples to the HAL SHOULD be below 5
4044 milliseconds from the instant the data is available on the physical sensor
4045 hardware.</li>
4046 <li>The power consumption MUST not be higher than 0.5 mW when device is static
4047 and 2.0 mW when device is moving when any combination of the following sensors
4048 are enabled:
Unsuk Jung66ef8472015-09-30 04:00:08 -07004049 <ul>
4050 <li>SENSOR_TYPE_SIGNIFICANT_MOTION</li>
4051 <li>SENSOR_TYPE_STEP_DETECTOR</li>
4052 <li>SENSOR_TYPE_STEP_COUNTER</li>
4053 <li>SENSOR_TILT_DETECTORS</li>
4054 </ul>
4055 </li>
4056</ul>
4057
Heidi von Markham84564992016-02-09 10:54:20 -08004058<p>Note that all power consumption requirements in this section do not include
4059the power consumption of the Application Processor. It is inclusive of the power
4060drawn by the entire sensor chain&mdash;the sensor, any supporting circuitry, any
4061dedicated sensor processing system, etc.</p>
Unsuk Jung66ef8472015-09-30 04:00:08 -07004062
Heidi von Markham84564992016-02-09 10:54:20 -08004063<p>The following sensor types MAY also be supported on a device implementation
4064declaring android.hardware.sensor.hifi_sensors, but if these sensor types are
4065present they MUST meet the following minimum buffering capability requirement:
4066</p>
Unsuk Jung66ef8472015-09-30 04:00:08 -07004067
4068<ul>
4069 <li>SENSOR_TYPE_PROXIMITY: 100 sensor events</li>
4070</ul>
4071
Unsuk Jung5b08df22015-09-29 18:50:14 -07004072<h3 id="7_3_10_fingeprint">7.3.10. Fingerprint Sensor</h3>
4073
Heidi von Markham84564992016-02-09 10:54:20 -08004074<p>Device implementations with a secure lock screen SHOULD include a fingerprint
4075sensor. If a device implementation includes a fingerprint sensor and has a
4076corresponding API for third-party developers, it:</p>
Unsuk Jung5b08df22015-09-29 18:50:14 -07004077
4078<ul>
4079 <li>MUST declare support for the android.hardware.fingerprint feature.</li>
Heidi von Markham84564992016-02-09 10:54:20 -08004080 <li>MUST fully implement the
4081 <a href="https://developer.android.com/reference/android/hardware/fingerprint/package-summary.html">corresponding
4082 API</a> as described in the Android SDK documentation.</li>
Unsuk Jung5b08df22015-09-29 18:50:14 -07004083 <li>MUST have a false acceptance rate not higher than 0.002%.</li>
Heidi von Markham84564992016-02-09 10:54:20 -08004084 <li>Is STRONGLY RECOMMENDED to have a false rejection rate not higher than
4085 10%, and a latency from when the fingerprint sensor is touched until the
4086 screen is unlocked below 1 second, for 1 enrolled finger.</li>
4087 <li>MUST rate limit attempts for at least 30 seconds after 5 false trials for
4088 fingerprint verification.</li>
4089 <li>MUST have a hardware-backed keystore implementation, and perform the
4090 fingerprint matching in a Trusted Execution Environment (TEE) or on a chip
4091 with a secure channel to the TEE.</li>
4092 <li>MUST have all identifiable fingerprint data encrypted and
4093 cryptographically authenticated such that they cannot be acquired, read or
4094 altered outside of the Trusted Execution Environment (TEE) as documented in
4095 the
4096 <a href="https://source.android.com/devices/tech/security/authentication/fingerprint-hal.html">implementation
4097 guidelines</a> on the Android Open Source Project site.</li>
4098 <li>MUST prevent adding a fingerprint without first establishing a chain of
4099 trust by having the user confirm existing or add a new device credential
4100 (PIN/pattern/password) using the TEE as implemented in the Android Open Source
4101 project.</li>
4102 <li>MUST NOT enable 3rd-party applications to distinguish between individual
4103 fingerprints.</li>
Unsuk Jung5b08df22015-09-29 18:50:14 -07004104 <li>MUST honor the DevicePolicyManager.KEYGUARD_DISABLE_FINGERPRINT flag.</li>
Heidi von Markham84564992016-02-09 10:54:20 -08004105 <li>MUST, when upgraded from a version earlier than Android 6.0, have the
4106 fingerprint data securely migrated to meet the above requirements or removed.
4107 </li>
4108 <li>SHOULD use the Android Fingerprint icon provided in the Android Open
4109 Source Project.</li>
Unsuk Jung5b08df22015-09-29 18:50:14 -07004110</ul>
4111
Unsuk Jung5bc81142015-07-16 22:27:20 -07004112<h2 id="7_4_data_connectivity">7.4. Data Connectivity</h2>
4113
4114
4115<h3 id="7_4_1_telephony">7.4.1. Telephony</h3>
4116
4117
Heidi von Markham84564992016-02-09 10:54:20 -08004118<p>&ldquo;Telephony&rdquo; as used by the Android APIs and this document refers
4119specifically to hardware related to placing voice calls and sending SMS messages
4120via a GSM or CDMA network. While these voice calls may or may not be
4121packet-switched, they are for the purposes of Android considered independent of
4122any data connectivity that may be implemented using the same network. In other
4123words, the Android &ldquo;telephony&rdquo; functionality and APIs refer
4124specifically to voice calls and SMS. For instance, device implementations that
4125cannot place calls or send/receive SMS messages MUST NOT report the
4126android.hardware.telephony feature or any subfeatures, regardless of whether
4127they use a cellular network for data connectivity.</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07004128
Heidi von Markham84564992016-02-09 10:54:20 -08004129<p>Android MAY be used on devices that do not include telephony hardware. That
4130is, Android is compatible with devices that are not phones. However, if a device
Unsuk Jung5bc81142015-07-16 22:27:20 -07004131implementation does include GSM or CDMA telephony, it MUST implement full
4132support for the API for that technology. Device implementations that do not
4133include telephony hardware MUST implement the full APIs as no-ops.</p>
4134
4135<h3 id="7_4_2_ieee_802_11_wi-fi">7.4.2. IEEE 802.11 (Wi-Fi)</h3>
4136
4137<div class="note">
4138<p>Android Television device implementations MUST include Wi-Fi support.</p>
4139</div>
4140
4141
Heidi von Markham84564992016-02-09 10:54:20 -08004142<p>Android Television device implementations MUST include support for one or
4143more forms of 802.11 (b/g/a/n, etc.) and other types of Android device
Unsuk Jung5bc81142015-07-16 22:27:20 -07004144implementation SHOULD include support for one or more forms of 802.11. If a
4145device implementation does include support for 802.11 and exposes the
4146functionality to a third-party application, it MUST implement the corresponding
4147Android API and:</p>
4148
4149<ul>
4150 <li>MUST report the hardware feature flag android.hardware.wifi.</li>
Heidi von Markham84564992016-02-09 10:54:20 -08004151 <li>MUST implement the
4152 <a href="http://developer.android.com/reference/android/net/wifi/WifiManager.MulticastLock.html">multicast
4153 API</a> as described in the SDK documentation.</li>
Unsuk Jung5bc81142015-07-16 22:27:20 -07004154 <li>MUST support multicast DNS (mDNS) and MUST NOT filter mDNS packets
Heidi von Markham84564992016-02-09 10:54:20 -08004155 (224.0.0.251) at any time of operation including:
4156 <ul>
4157 <li>Even when the screen is not in an active state.</li>
4158 <li>For Android Television device implementations, even when in standby
4159 power states.</li>
Unsuk Jung302ee7a2015-09-29 17:27:12 -07004160 </ul>
Unsuk Jung5bc81142015-07-16 22:27:20 -07004161</ul>
4162
4163<h4 id="7_4_2_1_wi-fi_direct">7.4.2.1. Wi-Fi Direct</h4>
4164
4165
4166<p>Device implementations SHOULD include support for Wi-Fi Direct (Wi-Fi
Heidi von Markham84564992016-02-09 10:54:20 -08004167peer-to-peer). If a device implementation does include support for Wi-Fi Direct,
4168it MUST implement the
4169<a href="http://developer.android.com/reference/android/net/wifi/p2p/WifiP2pManager.html">corresponding
4170Android API</a> as described in the SDK documentation. If a device
4171implementation includes support for Wi-Fi Direct, then it:</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07004172
4173<ul>
4174 <li>MUST report the hardware feature android.hardware.wifi.direct.</li>
4175 <li>MUST support regular Wi-Fi operation.</li>
4176 <li>SHOULD support concurrent Wi-Fi and Wi-Fi Direct operation.</li>
4177</ul>
4178
Heidi von Markham84564992016-02-09 10:54:20 -08004179<h4 id="7_4_2_2_wi-fi_tunneled_direct_link_setup">7.4.2.2. Wi-Fi Tunneled Direct
4180Link Setup</h4>
Unsuk Jung5bc81142015-07-16 22:27:20 -07004181
4182<div class="note">
4183<p>Android Television device implementations MUST include support for Wi-Fi
4184Tunneled Direct Link Setup (TDLS).</p>
4185</div>
4186
4187
Heidi von Markham84564992016-02-09 10:54:20 -08004188<p>Android Television device implementations MUST include support for
4189<a href="http://developer.android.com/reference/android/net/wifi/WifiManager.html">Wi-Fi
4190Tunneled Direct Link Setup (TDLS)</a> and other types of Android device
Unsuk Jung5bc81142015-07-16 22:27:20 -07004191implementations SHOULD include support for Wi-Fi TDLS as described in the
Heidi von Markham84564992016-02-09 10:54:20 -08004192Android SDK Documentation. If a device implementation does include support for
4193TDLS and TDLS is enabled by the WiFiManager API, the device:</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07004194
4195<ul>
4196 <li>SHOULD use TDLS only when it is possible AND beneficial.</li>
Heidi von Markham84564992016-02-09 10:54:20 -08004197 <li>SHOULD have some heuristic and NOT use TDLS when its performance might be
4198 worse than going through the Wi-Fi access point.</li>
Unsuk Jung5bc81142015-07-16 22:27:20 -07004199</ul>
4200
4201<h3 id="7_4_3_bluetooth">7.4.3. Bluetooth</h3>
4202
4203<div class="note">
4204<p>Android Watch and Automotive implementations MUST support Bluetooth. Android
4205Television implementations MUST support Bluetooth and Bluetooth LE.</p>
4206</div>
4207
4208
Heidi von Markham84564992016-02-09 10:54:20 -08004209<p>Android includes support for
4210<a href="http://developer.android.com/reference/android/bluetooth/package-summary.html">Bluetooth
4211and Bluetooth Low Energy </a>. Device implementations that include support for
4212Bluetooth and Bluetooth Low Energy MUST declare the relevant platform features
4213(android.hardware.bluetooth and android.hardware.bluetooth_le respectively) and
4214implement the platform APIs. Device implementations SHOULD implement relevant
4215Bluetooth profiles such as A2DP, AVCP, OBEX, etc. as appropriate for the device.
4216Android Television device implementations MUST support Bluetooth and Bluetooth
4217LE.</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07004218
4219<p>Device implementations including support for Bluetooth Low Energy:</p>
4220
4221<ul>
4222 <li>MUST declare the hardware feature android.hardware.bluetooth_le.</li>
4223 <li>MUST enable the GATT (generic attribute profile) based Bluetooth APIs as
Heidi von Markham84564992016-02-09 10:54:20 -08004224 described in the SDK documentation and
4225 <a href="http://developer.android.com/reference/android/bluetooth/package-summary.html">android.bluetooth</a>.
4226 </li>
Unsuk Junga13d8762015-09-29 22:25:08 -07004227 <li>MUST implement a Resolvable Private Address (RPA) timeout no longer than
Heidi von Markham84564992016-02-09 10:54:20 -08004228 15 minutes, and rotate the address at timeout to protect user privacy.</li>
4229 <li>SHOULD support offloading of the filtering logic to the bluetooth chipset
4230 when implementing the
4231 <a href="https://developer.android.com/reference/android/bluetooth/le/ScanFilter.html">ScanFilter
4232 API</a>, and MUST report the correct value of where the filtering logic is
4233 implemented whenever queried via the
4234 android.bluetooth.BluetoothAdapter.isOffloadedFilteringSupported() method.
4235 </li>
4236 <li>SHOULD support offloading of the batched scanning to the bluetooth
4237 chipset, but if not supported, MUST report &lsquo;false&rsquo; whenever
4238 queried via the
4239 android.bluetooth.BluetoothAdapter.isOffloadedScanBatchingSupported() method.
4240 </li>
4241 <li>SHOULD support multi advertisement with at least 4 slots, but if not
4242 supported, MUST report &lsquo;false&rsquo; whenever queried via the
4243 android.bluetooth.BluetoothAdapter.isMultipleAdvertisementSupported() method.
4244 </li>
Unsuk Jung5bc81142015-07-16 22:27:20 -07004245</ul>
4246
4247<h3 id="7_4_4_near-field_communications">7.4.4. Near-Field Communications</h3>
4248
4249
4250<p>Device implementations SHOULD include a transceiver and related hardware for
4251Near-Field Communications (NFC). If a device implementation does include NFC
4252hardware and plans to make it available to third-party apps, then it:</p>
4253
4254<ul>
4255 <li>MUST report the android.hardware.nfc feature from the
Heidi von Markham84564992016-02-09 10:54:20 -08004256 <a href="http://developer.android.com/reference/android/content/pm/PackageManager.html">android.content.pm.PackageManager.hasSystemFeature()
4257 method</a>.</li>
Unsuk Jung5bc81142015-07-16 22:27:20 -07004258 <li>MUST be capable of reading and writing NDEF messages via the following NFC
Heidi von Markham84564992016-02-09 10:54:20 -08004259 standards:
Unsuk Jung5bc81142015-07-16 22:27:20 -07004260 <ul>
Heidi von Markham84564992016-02-09 10:54:20 -08004261 <li>MUST be capable of acting as an NFC Forum reader/writer (as defined by
4262 the NFC Forum technical specification NFCForum-TS-DigitalProtocol-1.0) via
4263 the following NFC standards:
Unsuk Jung5bc81142015-07-16 22:27:20 -07004264 <ul>
4265 <li>NfcA (ISO14443-3A)</li>
4266 <li>NfcB (ISO14443-3B)</li>
Martijn Coenen048f4aa2015-09-17 14:24:55 +02004267 <li>NfcF (JIS X 6319-4)</li>
Unsuk Jung5bc81142015-07-16 22:27:20 -07004268 <li>IsoDep (ISO 14443-4)</li>
4269 <li>NFC Forum Tag Types 1, 2, 3, 4 (defined by the NFC Forum)</li>
4270 </ul>
Heidi von Markham84564992016-02-09 10:54:20 -08004271 <li>STRONGLY RECOMMENDED to be capable of reading and writing NDEF messages as
4272 well as raw data via the following NFC standards. Note that while the NFC
4273 standards below are stated as STRONGLY RECOMMENDED, the Compatibility
4274 Definition for a future version is planned to change these to MUST. These
4275 standards are optional in this version but will be required in future
4276 versions. Existing and new devices that run this version of Android are very
4277 strongly encouraged to meet these requirements now so they will be able to
4278 upgrade to the future platform releases.
Unsuk Jung5bc81142015-07-16 22:27:20 -07004279 <ul>
4280 <li>NfcV (ISO 15693)</li>
4281 </ul></li>
Martijn Coenen048f4aa2015-09-17 14:24:55 +02004282 <li>SHOULD be capable of reading the barcode and URL (if encoded) of
Heidi von Markham84564992016-02-09 10:54:20 -08004283 <a href="http://developer.android.com/reference/android/nfc/tech/NfcBarcode.html">Thinfilm
4284 NFC Barcode</a> products.</li>
Unsuk Jung5bc81142015-07-16 22:27:20 -07004285 <li>MUST be capable of transmitting and receiving data via the following
Heidi von Markham84564992016-02-09 10:54:20 -08004286 peer-to-peer standards and protocols:
Unsuk Jung5bc81142015-07-16 22:27:20 -07004287 <ul>
4288 <li>ISO 18092</li>
Martijn Coenen048f4aa2015-09-17 14:24:55 +02004289 <li>LLCP 1.2 (defined by the NFC Forum)</li>
Unsuk Jung5bc81142015-07-16 22:27:20 -07004290 <li>SDP 1.0 (defined by the NFC Forum)</li>
Heidi von Markham84564992016-02-09 10:54:20 -08004291 <li><a href="http://static.googleusercontent.com/media/source.android.com/en/us/compatibility/ndef-push-protocol.pdf">NDEF
4292 Push Protocol</a></li>
Unsuk Jung5bc81142015-07-16 22:27:20 -07004293 <li>SNEP 1.0 (defined by the NFC Forum)</li>
4294 </ul></li>
Heidi von Markham84564992016-02-09 10:54:20 -08004295 <li>MUST include support for <a href="http://developer.android.com/guide/topics/connectivity/nfc/nfc.html">Android Beam</a>:
Unsuk Jung5bc81142015-07-16 22:27:20 -07004296 <ul>
Heidi von Markham84564992016-02-09 10:54:20 -08004297 <li>MUST implement the SNEP default server. Valid NDEF messages received by
4298 the default SNEP server MUST be dispatched to applications using the
4299 android.nfc.ACTION_NDEF_DISCOVERED intent. Disabling Android Beam in
4300 settings MUST NOT disable dispatch of incoming NDEF message.</li>
4301 <li>MUST honor the android.settings.NFCSHARING_SETTINGS intent to show
4302 <a href="http://developer.android.com/reference/android/provider/Settings.html#ACTION_NFCSHARING_SETTINGS">NFC
4303 sharing settings</a>.</li>
4304 <li>MUST implement the NPP server. Messages received by the NPP server MUST
4305 be processed the same way as the SNEP default server.</li>
4306 <li>MUST implement a SNEP client and attempt to send outbound P2P NDEF to
4307 the default SNEP server when Android Beam is enabled. If no default SNEP
4308 server is found then the client MUST attempt to send to an NPP server.</li>
4309 <li>MUST allow foreground activities to set the outbound P2P NDEF message
4310 using android.nfc.NfcAdapter.setNdefPushMessage, and
4311 android.nfc.NfcAdapter.setNdefPushMessageCallback, and
4312 android.nfc.NfcAdapter.enableForegroundNdefPush.</li>
4313 <li>SHOULD use a gesture or on-screen confirmation, such as 'Touch to Beam',
4314 before sending outbound P2P NDEF messages.</li>
4315 <li>SHOULD enable Android Beam by default and MUST be able to send and
4316 receive using Android Beam, even when another proprietary NFC P2p mode is
4317 turned on.</li>
4318 <li>MUST support NFC Connection handover to Bluetooth when the device
4319 supports Bluetooth Object Push Profile. Device implementations MUST support
4320 connection handover to Bluetooth when using
4321 android.nfc.NfcAdapter.setBeamPushUris, by implementing the
4322 &ldquo;<a href="http://members.nfc-forum.org/specs/spec_list/#conn_handover">Connection
4323 Handover version 1.2</a>&rdquo; and
4324 &ldquo;<a href="http://members.nfc-forum.org/apps/group_public/download.php/18688/NFCForum-AD-BTSSP_1_1.pdf">Bluetooth
4325 Secure Simple Pairing Using NFC version 1.0</a>&rdquo; specs from the NFC
4326 Forum. Such an implementation MUST implement the handover LLCP service with
4327 service name &ldquo;urn:nfc:sn:handover&rdquo; for exchanging the handover
4328 request/select records over NFC, and it MUST use the Bluetooth Object Push
4329 Profile for the actual Bluetooth data transfer. For legacy reasons (to
4330 remain compatible with Android 4.1 devices), the implementation SHOULD still
4331 accept SNEP GET requests for exchanging the handover request/select records
4332 over NFC. However an implementation itself SHOULD NOT send SNEP GET requests
4333 for performing connection handover.</li>
Unsuk Jung5bc81142015-07-16 22:27:20 -07004334 </ul></li>
4335 <li>MUST poll for all supported technologies while in NFC discovery mode.</li>
4336 <li>SHOULD be in NFC discovery mode while the device is awake with the screen
Heidi von Markham84564992016-02-09 10:54:20 -08004337 active and the lock-screen unlocked.</li>
Unsuk Jung5bc81142015-07-16 22:27:20 -07004338</ul>
4339</ul>
4340
Heidi von Markham84564992016-02-09 10:54:20 -08004341<p>(Note that publicly available links are not available for the JIS, ISO, and
4342NFC Forum specifications cited above.)</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07004343
4344<p>Android includes support for NFC Host Card Emulation (HCE) mode. If a
4345device implementation does include an NFC controller chipset capable of HCE and
4346Application ID (AID) routing, then it:</p>
4347
4348<ul>
4349 <li>MUST report the android.hardware.nfc.hce feature constant.</li>
Heidi von Markham84564992016-02-09 10:54:20 -08004350 <li>MUST support
4351 <a href="http://developer.android.com/guide/topics/connectivity/nfc/hce.html">NFC
4352 HCE APIs</a> as defined in the Android SDK.</li>
Unsuk Jung5bc81142015-07-16 22:27:20 -07004353</ul>
4354
Heidi von Markham84564992016-02-09 10:54:20 -08004355<p>Additionally, device implementations MAY include reader/writer support for
4356the following MIFARE technologies.</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07004357
4358<ul>
4359 <li>MIFARE Classic</li>
4360 <li>MIFARE Ultralight</li>
4361 <li>NDEF on MIFARE Classic</li>
4362</ul>
4363
4364<p>Note that Android includes APIs for these MIFARE types. If a device
4365implementation supports MIFARE in the reader/writer role, it:</p>
4366
4367<ul>
Heidi von Markham84564992016-02-09 10:54:20 -08004368 <li>MUST implement the corresponding Android APIs as documented by the Android
4369 SDK.</li>
Unsuk Jung5bc81142015-07-16 22:27:20 -07004370 <li>MUST report the feature com.nxp.mifare from the
Heidi von Markham84564992016-02-09 10:54:20 -08004371 <a href="http://developer.android.com/reference/android/content/pm/PackageManager.html">android.content.pm.PackageManager.hasSystemFeature()</a>
4372 method. Note that this is not a standard Android feature and as such does not
4373 appear as a constant in the android.content.pm.PackageManager class.</li>
4374 <li>MUST NOT implement the corresponding Android APIs nor report the
4375 com.nxp.mifare feature unless it also implements general NFC support as
4376 described in this section.</li>
Unsuk Jung5bc81142015-07-16 22:27:20 -07004377</ul>
4378
4379<p>If a device implementation does not include NFC hardware, it MUST NOT declare
4380the android.hardware.nfc feature from the
Heidi von Markham84564992016-02-09 10:54:20 -08004381<a href="http://developer.android.com/reference/android/content/pm/PackageManager.html">android.content.pm.PackageManager.hasSystemFeature()</a>
4382method, and MUST implement the Android NFC API as a no-op.</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07004383
4384<p>As the classes android.nfc.NdefMessage and android.nfc.NdefRecord represent a
4385protocol-independent data representation format, device implementations MUST
4386implement these APIs even if they do not include support for NFC or declare the
4387android.hardware.nfc feature.</p>
4388
4389<h3 id="7_4_5_minimum_network_capability">7.4.5. Minimum Network Capability</h3>
4390
4391
4392<p>Device implementations MUST include support for one or more forms of data
4393networking. Specifically, device implementations MUST include support for at
4394least one data standard capable of 200Kbit/sec or greater. Examples of
4395technologies that satisfy this requirement include EDGE, HSPA, EV-DO, 802.11g,
4396Ethernet, Bluetooth PAN, etc.</p>
4397
Heidi von Markham84564992016-02-09 10:54:20 -08004398<p>Device implementations where a physical networking standard (such as
4399Ethernet) is the primary data connection SHOULD also include support for at
4400least one common wireless data standard, such as 802.11 (Wi-Fi).</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07004401
4402<p>Devices MAY implement more than one form of data connectivity.</p>
4403
Lorenzo Colitti857d22c2015-10-14 17:37:05 +09004404<p>Devices MUST include an IPv6 networking stack and support IPv6 communication
4405using the managed APIs, such as <code>java.net.Socket</code> and
4406<code>java.net.URLConnection</code>, as well as the native APIs, such as
4407<code>AF_INET6</code> sockets. The required level of IPv6 support depends on
4408the network type, as follows:</p>
4409<ul>
4410 <li>Devices that support Wi-Fi networks MUST support dual-stack and IPv6-only
4411 operation on Wi-Fi.</li>
4412 <li>Devices that support Ethernet networks MUST support dual-stack operation
4413 on Ethernet.</li>
4414 <li>Devices that support cellular data SHOULD support IPv6 operation
4415 (IPv6-only and possibly dual-stack) on cellular data.</li>
4416 <li>When a device is simultaneously connected to more than one network (e.g.,
4417 Wi-Fi and cellular data), it MUST simultaneously meet these requirements on
4418 each network to which it is connected.</li>
4419</ul>
4420
4421<p>IPv6 MUST be enabled by default.</p>
4422
4423<p>In order to ensure that IPv6 communication is as reliable as IPv4, unicast
4424IPv6 packets sent to the device MUST NOT be dropped, even when the screen is
4425not in an active state. Redundant multicast IPv6 packets, such as repeated
4426identical Router Advertisements, MAY be rate-limited in hardware or firmware
4427if doing so is necessary to save power. In such cases, rate-limiting MUST NOT
4428cause the device to lose IPv6 connectivity on any IPv6-compliant network that
4429uses RA lifetimes of at least 180 seconds.</p>
4430
4431<p>IPv6 connectivity MUST be maintained in doze mode.</p>
4432
Unsuk Jung5bc81142015-07-16 22:27:20 -07004433<h3 id="7_4_6_sync_settings">7.4.6. Sync Settings</h3>
4434
4435
4436<p>Device implementations MUST have the master auto-sync setting on by default so
Heidi von Markham84564992016-02-09 10:54:20 -08004437that the method
4438<a href="http://developer.android.com/reference/android/content/ContentResolver.html">getMasterSyncAutomatically()</a>
4439returns &ldquo;true&rdquo;.</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07004440
4441<h2 id="7_5_cameras">7.5. Cameras</h2>
4442
4443
4444<p>Device implementations SHOULD include a rear-facing camera and MAY include a
4445front-facing camera. A rear-facing camera is a camera located on the side of
4446the device opposite the display; that is, it images scenes on the far side of
4447the device, like a traditional camera. A front-facing camera is a camera
4448located on the same side of the device as the display; that is, a camera
4449typically used to image the user, such as for video conferencing and similar
4450applications.</p>
4451
Heidi von Markham84564992016-02-09 10:54:20 -08004452<p>If a device implementation includes at least one camera, it SHOULD be
4453possible for an application to simultaneously allocate 3 bitmaps equal to the
4454size of the images produced by the largest-resolution camera sensor on the
4455device.</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07004456
4457<h3 id="7_5_1_rear-facing_camera">7.5.1. Rear-Facing Camera</h3>
4458
4459
4460<p>Device implementations SHOULD include a rear-facing camera. If a device
4461implementation includes at least one rear-facing camera, it:</p>
4462
4463<ul>
4464 <li>MUST report the feature flag android.hardware.camera and
Heidi von Markham84564992016-02-09 10:54:20 -08004465 android.hardware.camera.any.</li>
Unsuk Jung5bc81142015-07-16 22:27:20 -07004466 <li>MUST have a resolution of at least 2 megapixels.</li>
Heidi von Markham84564992016-02-09 10:54:20 -08004467 <li>SHOULD have either hardware auto-focus or software auto-focus implemented
4468 in the camera driver (transparent to application software).</li>
Unsuk Jung5bc81142015-07-16 22:27:20 -07004469 <li>MAY have fixed-focus or EDOF (extended depth of field) hardware.</li>
Heidi von Markham84564992016-02-09 10:54:20 -08004470 <li>MAY include a flash. If the Camera includes a flash, the flash lamp MUST
4471 NOT be lit while an android.hardware.Camera.PreviewCallback instance has been
4472 registered on a Camera preview surface, unless the application has explicitly
4473 enabled the flash by enabling the FLASH_MODE_AUTO or FLASH_MODE_ON attributes
4474 of a Camera.Parameters object. Note that this constraint does not apply to the
4475 device&rsquo;s built-in system camera application, but only to third-party
4476 applications using Camera.PreviewCallback.</li>
Unsuk Jung5bc81142015-07-16 22:27:20 -07004477</ul>
4478
4479<h3 id="7_5_2_front-facing_camera">7.5.2. Front-Facing Camera</h3>
4480
4481
4482<p>Device implementations MAY include a front-facing camera. If a device
4483implementation includes at least one front-facing camera, it:</p>
4484
4485<ul>
4486 <li>MUST report the feature flag android.hardware.camera.any and
Heidi von Markham84564992016-02-09 10:54:20 -08004487 android.hardware.camera.front.</li>
Unsuk Jung5bc81142015-07-16 22:27:20 -07004488 <li>MUST have a resolution of at least VGA (640x480 pixels).</li>
4489 <li>MUST NOT use a front-facing camera as the default for the Camera API. The
Heidi von Markham84564992016-02-09 10:54:20 -08004490 camera API in Android has specific support for front-facing cameras and device
4491 implementations MUST NOT configure the API to to treat a front-facing camera
4492 as the default rear-facing camera, even if it is the only camera on the
4493 device.</li>
4494 <li>MAY include features (such as auto-focus, flash, etc.) available to
4495 rear-facing cameras as described in
4496 <a href="#7_5_1_rear-facing_camera">section 7.5.1</a>.</li>
4497 <li>MUST horizontally reflect (i.e. mirror) the stream displayed by an app in
4498 a CameraPreview, as follows:
Unsuk Jung5bc81142015-07-16 22:27:20 -07004499 <ul>
Heidi von Markham84564992016-02-09 10:54:20 -08004500 <li>If the device implementation is capable of being rotated by user (such
4501 as automatically via an accelerometer or manually via user input), the
4502 camera preview MUST be mirrored horizontally relative to the device&rsquo;s
4503 current orientation.</li>
4504 <li>If the current application has explicitly requested that the Camera
4505 display be rotated via a call to the
4506 <a href="http://developer.android.com/reference/android/hardware/Camera.html#setDisplayOrientation(int)">android.hardware.Camera.setDisplayOrientation()</a>
4507 method, the camera preview MUST be mirrored horizontally relative to the
4508 orientation specified by the application.</li>
4509 <li>Otherwise, the preview MUST be mirrored along the device&rsquo;s default
4510 horizontal axis.</li>
Unsuk Jung5bc81142015-07-16 22:27:20 -07004511 </ul></li>
4512 <li>MUST mirror the image displayed by the postview in the same manner as the
Heidi von Markham84564992016-02-09 10:54:20 -08004513 camera preview image stream. If the device implementation does not support
4514 postview, this requirement obviously does not apply.</li>
4515 <li>MUST NOT mirror the final captured still image or video streams returned
4516 to application callbacks or committed to media storage.</li>
Unsuk Jung5bc81142015-07-16 22:27:20 -07004517</ul>
4518
4519<h3 id="7_5_3_external_camera">7.5.3. External Camera</h3>
4520
4521
4522<p>Device implementations with USB host mode MAY include support for an external
4523camera that connects to the USB port. If a device includes support for an
4524external camera, it:</p>
4525
4526<ul>
4527 <li>MUST declare the platform feature android.hardware.camera.external and
4528android.hardware camera.any.</li>
4529 <li>MUST support USB Video Class (UVC 1.0 or higher).</li>
4530 <li>MAY support multiple cameras.</li>
4531</ul>
4532
4533<p>Video compression (such as MJPEG) support is RECOMMENDED to enable transfer of
4534high-quality unencoded streams (i.e. raw or independently compressed picture
4535streams). Camera-based video encoding MAY be supported. If so, a simultaneous
4536unencoded/ MJPEG stream (QVGA or greater resolution) MUST be accessible to the
4537device implementation.</p>
4538
4539<h3 id="7_5_4_camera_api_behavior">7.5.4. Camera API Behavior</h3>
4540
4541
4542<p>Android includes two API packages to access the camera, the newer
4543android.hardware.camera2 API expose lower-level camera control to the app,
4544including efficient zero-copy burst/streaming flows and per-frame controls of
4545exposure, gain, white balance gains, color conversion, denoising, sharpening,
4546and more.</p>
4547
4548<p>The older API package, android.hardware.Camera, is marked as deprecated in
4549Android 5.0 but as it should still be available for apps to use Android device
4550implementations MUST ensure the continued support of the API as described in
4551this section and in the Android SDK.</p>
4552
4553<p>Device implementations MUST implement the following behaviors for the
4554camera-related APIs, for all available cameras:</p>
4555
4556<ul>
4557 <li>If an application has never called
Heidi von Markham84564992016-02-09 10:54:20 -08004558 android.hardware.Camera.Parameters.setPreviewFormat(int), then the device MUST
4559 use android.hardware.PixelFormat.YCbCr_420_SP for preview data provided to
4560 application callbacks.</li>
4561 <li>If an application registers an android.hardware.Camera.PreviewCallback
4562 instance and the system calls the onPreviewFrame() method when the preview
4563 format is YCbCr_420_SP, the data in the byte[] passed into onPreviewFrame()
4564 must further be in the NV21 encoding format. That is, NV21 MUST be the
4565 default.</li>
Unsuk Jung5bc81142015-07-16 22:27:20 -07004566 <li>For android.hardware.Camera, device implementations MUST support the YV12
Heidi von Markham84564992016-02-09 10:54:20 -08004567 format (as denoted by the android.graphics.ImageFormat.YV12 constant) for
4568 camera previews for both front- and rear-facing cameras. (The hardware video
4569 encoder and camera may use any native pixel format, but the device
4570 implementation MUST support conversion to YV12.)</li>
Unsuk Jung5bc81142015-07-16 22:27:20 -07004571 <li>For android.hardware.camera2, device implementations must support the
Heidi von Markham84564992016-02-09 10:54:20 -08004572 android.hardware.ImageFormat.YUV_420_888 and android.hardware.ImageFormat.JPEG
4573 formats as outputs through the android.media.ImageReader API.</li>
Unsuk Jung5bc81142015-07-16 22:27:20 -07004574</ul>
4575
Heidi von Markham84564992016-02-09 10:54:20 -08004576<p>Device implementations MUST still implement the full
4577<a href="http://developer.android.com/reference/android/hardware/Camera.html">Camera
4578API</a> included in the Android SDK documentation, regardless of whether the
4579device includes hardware autofocus or other capabilities. For instance, cameras
4580that lack autofocus MUST still call any registered
4581android.hardware.Camera.AutoFocusCallback instances (even though this has no
4582relevance to a non-autofocus camera.) Note that this does apply to front-facing
4583cameras; for instance, even though most front-facing cameras do not support
4584autofocus, the API callbacks must still be &ldquo;faked&rdquo; as described.</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07004585
Heidi von Markham84564992016-02-09 10:54:20 -08004586<p>Device implementations MUST recognize and honor each parameter name defined
4587as a constant on the
4588<a href="http://developer.android.com/reference/android/hardware/Camera.Parameters.html">android.hardware.Camera.Parameters</a>
4589class, if the underlying hardware supports the feature. If the device hardware
4590does not support a feature, the API must behave as documented. Conversely,
4591device implementations MUST NOT honor or recognize string constants passed to
4592the android.hardware.Camera.setParameters() method other than those documented
4593as constants on the android.hardware.Camera.Parameters. That is, device
Unsuk Jung5bc81142015-07-16 22:27:20 -07004594implementations MUST support all standard Camera parameters if the hardware
Heidi von Markham84564992016-02-09 10:54:20 -08004595allows, and MUST NOT support custom Camera parameter types. For instance, device
4596implementations that support image capture using high dynamic range (HDR)
4597imaging techniques MUST support camera parameter Camera.SCENE_MODE_HDR.</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07004598
4599<p>Because not all device implementations can fully support all the features of
4600the android.hardware.camera2 API, device implementations MUST report the proper
Heidi von Markham84564992016-02-09 10:54:20 -08004601level of support with the
4602<a href="https://developer.android.com/reference/android/hardware/camera2/CameraCharacteristics.html#INFO_SUPPORTED_HARDWARE_LEVEL">android.info.supportedHardwareLevel</a>
4603property as described in the Android SDK and report the appropriate
4604<a href="http://source.android.com/devices/camera/versioning.html">framework
4605feature flags</a>.</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07004606
Heidi von Markham84564992016-02-09 10:54:20 -08004607<p>Device implementations MUST also declare its Individual camera capabilities
4608of android.hardware.camera2 via the android.request.availableCapabilities
4609property and declare the appropriate
4610<a href="http://source.android.com/devices/camera/versioning.html">feature
4611flags</a>; a device must define the feature flag if any of its attached camera
4612devices supports the feature.</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07004613
4614<p>Device implementations MUST broadcast the Camera.ACTION_NEW_PICTURE intent
4615whenever a new picture is taken by the camera and the entry of the picture has
4616been added to the media store.</p>
4617
4618<p>Device implementations MUST broadcast the Camera.ACTION_NEW_VIDEO intent
4619whenever a new video is recorded by the camera and the entry of the picture has
4620been added to the media store.</p>
4621
4622<h3 id="7_5_5_camera_orientation">7.5.5. Camera Orientation</h3>
4623
4624
4625<p>Both front- and rear-facing cameras, if present, MUST be oriented so that the
Heidi von Markham84564992016-02-09 10:54:20 -08004626long dimension of the camera aligns with the screen&rsquo;s long dimension. That
4627is, when the device is held in the landscape orientation, cameras MUST capture
4628images in the landscape orientation. This applies regardless of the
4629device&rsquo;s natural orientation; that is, it applies to landscape-primary
4630devices as well as portrait-primary devices.</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07004631
4632<h2 id="7_6_memory_and_storage">7.6. Memory and Storage</h2>
4633
4634
4635<h3 id="7_6_1_minimum_memory_and_storage">7.6.1. Minimum Memory and Storage</h3>
4636
4637<div class="note">
4638<p>Android Television devices MUST have at least 5GB of non-volatile storage
4639available for application private data.</p>
4640</div>
4641
4642
Heidi von Markham84564992016-02-09 10:54:20 -08004643<p>The memory available to the kernel and userspace on device implementations
4644MUST be at least equal or larger than the minimum values specified by the
4645following table. (See <a href="#7_1_1_screen_configuration">section 7.1.1</a>
4646for screen size and density definitions.)</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07004647<table>
4648 <tr>
4649 <th>Density and screen size</th>
4650 <th>32-bit device</th>
4651 <th>64-bit device</th>
4652 </tr>
4653 <tr>
4654 <td>Android Watch devices (due to smaller screens)</td>
4655 <td>416MB</td>
4656 <td>Not applicable</td>
4657 </tr>
4658 <tr>
4659 <td><ul>
Unsuk Jung2e62f9a2015-07-16 23:01:44 -07004660 <li class="table_list">280dpi or lower on small/normal screens</li>
Unsuk Jung5bc81142015-07-16 22:27:20 -07004661 <li class="table_list">mdpi or lower on large screens</li>
4662 <li class="table_list">ldpi or lower on extra large screens</li>
4663 </ul></td>
4664 <td>424MB</td>
Unsuk Jung2e62f9a2015-07-16 23:01:44 -07004665 <td>704MB</td>
Unsuk Jung5bc81142015-07-16 22:27:20 -07004666 </tr>
4667 <tr>
4668 <td><ul>
4669 <li class="table_list">xhdpi or higher on small/normal screens</li>
4670 <li class="table_list">hdpi or higher on large screens</li>
4671 <li class="table_list">mdpi or higher on extra large screens</li></ul></td>
4672 <td>512MB</td>
4673 <td>832MB</td>
4674 </tr>
4675 <tr>
4676 <td><ul>
4677 <li class="table_list">400dpi or higher on small/normal screens</li>
4678 <li class="table_list">xhdpi or higher on large screens</li>
4679 <li class="table_list">tvdpi or higher on extra large screens</li></ul></td>
4680 <td>896MB</td>
4681 <td>1280MB</td>
4682 </tr>
4683 <tr>
4684 <td><ul>
4685 <li class="table_list">560dpi or higher on small/normal screens</li>
4686 <li class="table_list">400dpi or higher on large screens</li>
4687 <li class="table_list">xhdpi or higher on extra large screens</li></ul></td>
4688 <td>1344MB</td>
4689 <td>1824MB</td>
4690 </tr>
4691</table>
4692
4693
4694<p>The minimum memory values MUST be in addition to any memory space already
4695dedicated to hardware components such as radio, video, and so on that is not
4696under the kernel&rsquo;s control.</p>
4697
4698<p>Device implementations with less than 512MB of memory available to the kernel
4699and userspace, unless an Android Watch, MUST return the value "true" for
4700ActivityManager.isLowRamDevice().</p>
4701
4702<p>Android Television devices MUST have at least 5GB and other device
4703implementations MUST have at least 1.5GB of non-volatile storage available for
4704application private data. That is, the /data partition MUST be at least 5GB for
4705Android Television devices and at least 1.5GB for other device implementations.
Heidi von Markham84564992016-02-09 10:54:20 -08004706Device implementations that run Android are <strong>STRONGLY
4707RECOMMENDED</strong> to have at least 3GB of non-volatile storage for
4708application private data so they will be able to upgrade to the future platform
4709releases.</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07004710
Heidi von Markham84564992016-02-09 10:54:20 -08004711<p>The Android APIs include a
4712<a href="http://developer.android.com/reference/android/app/DownloadManager.html">Download
4713Manager</a> that applications MAY use to download data files. The device
4714implementation of the Download Manager MUST be capable of downloading individual
4715files of at least 100MB in size to the default &ldquo;cache&rdquo; location.</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07004716
4717<h3 id="7_6_2_application_shared_storage">7.6.2. Application Shared Storage</h3>
4718
4719
4720<p>Device implementations MUST offer shared storage for applications also often
Heidi von Markham84564992016-02-09 10:54:20 -08004721referred as &ldquo;shared external storage&rdquo;.</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07004722
4723<p>Device implementations MUST be configured with shared storage mounted by
Heidi von Markham84564992016-02-09 10:54:20 -08004724default, &ldquo;out of the box&rdquo;. If the shared storage is not mounted on
4725the Linuxpath /sdcard, then the device MUST include a Linux symbolic link from
4726/sdcard to the actual mount point.</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07004727
Heidi von Markham84564992016-02-09 10:54:20 -08004728<p>Device implementations MAY have hardware for user-accessible removable
4729storage, such as a Secure Digital (SD) card slot. If this slot is used to
4730satisfy the shared storage requirement, the device implementation:</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07004731
4732<ul>
Heidi von Markham84564992016-02-09 10:54:20 -08004733 <li>MUST implement a toast or pop-up user interface warning the user when
4734 there is no SD card.</li>
4735 <li>MUST include a FAT-formatted SD card 1GB in size or larger OR show on the
4736 box and other material available at time of purchase that the SD card has to
4737 be separately purchased.</li>
Unsuk Jung5bc81142015-07-16 22:27:20 -07004738 <li>MUST mount the SD card by default.</li>
4739</ul>
4740
4741<p>Alternatively, device implementations MAY allocate internal (non-removable)
4742storage as shared storage for apps as included in the upstream Android Open
4743Source Project; device implementations SHOULD use this configuration and
4744software implementation. If a device implementation uses internal
4745(non-removable) storage to satisfy the shared storage requirement, that storage
4746MUST be 1GB in size or larger and mounted on /sdcard (or /sdcard MUST be a
4747symbolic link to the physical location if it is mounted elsewhere).</p>
4748
4749<p>Device implementations MUST enforce as documented the
4750android.permission.WRITE_EXTERNAL_STORAGE permission on this shared storage.
4751Shared storage MUST otherwise be writable by any application that obtains that
4752permission.</p>
4753
Heidi von Markham84564992016-02-09 10:54:20 -08004754<p>Device implementations that include multiple shared storage paths (such as
4755both an SD card slot and shared internal storage) MUST NOT allow Android
Unsuk Jung5bc81142015-07-16 22:27:20 -07004756applications to write to the secondary external storage, except for their
4757package-specific directories on the secondary external storage, but SHOULD
Heidi von Markham84564992016-02-09 10:54:20 -08004758expose content from both storage paths transparently through Android&rsquo;s
4759media scanner service and android.provider.MediaStore.</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07004760
4761<p>Regardless of the form of shared storage used, if the device implementation
4762has a USB port with USB peripheral mode support, it MUST provide some mechanism
4763to access the contents of shared storage from a host computer. Device
4764implementations MAY use USB mass storage, but SHOULD use Media Transfer Protocol
4765to satisfy this requirement. If the device implementation supports Media
4766Transfer Protocol, it:</p>
4767
4768<ul>
Heidi von Markham84564992016-02-09 10:54:20 -08004769 <li>SHOULD be compatible with the reference Android MTP host,
4770 <a href="http://www.android.com/filetransfer">Android File Transfer</a>.</li>
Unsuk Jung5bc81142015-07-16 22:27:20 -07004771 <li>SHOULD report a USB device class of 0x00.</li>
4772 <li>SHOULD report a USB interface name of 'MTP'.</li>
4773</ul>
4774
Clay Murphy0b2d3c22015-10-06 23:22:35 -07004775<h3 id="7_6_3_adoptable_storage">7.6.3. Adoptable Storage</h3>
4776
Heidi von Markham84564992016-02-09 10:54:20 -08004777<p>Device implementations are STRONGLY RECOMMENDED to implement
4778<a href="http://source.android.com/devices/storage/adoptable.html">adoptable
4779storage</a> if the removable storage device port is in a long-term stable
4780location, such as within the battery compartment or other protective cover.</p>
Clay Murphy0b2d3c22015-10-06 23:22:35 -07004781
4782<p>Device implementations such as a television, MAY enable adoption through USB
4783ports as the device is expected to be static and not mobile. But for other
4784device implementations that are mobile in nature, it is STRONGLY RECOMMENDED to
Heidi von Markham84564992016-02-09 10:54:20 -08004785implement the adoptable storage in a long-term stable location, since
4786accidentally disconnecting them can cause data loss/corruption.</p>
Clay Murphy0b2d3c22015-10-06 23:22:35 -07004787
Unsuk Jung5bc81142015-07-16 22:27:20 -07004788<h2 id="7_7_usb">7.7. USB</h2>
4789
4790
4791<p>Device implementations SHOULD support USB peripheral mode and SHOULD support
4792USB host mode.</p>
4793
Heidi von Markham84564992016-02-09 10:54:20 -08004794<p>If a device implementation includes a USB port supporting peripheral mode:
4795</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07004796
4797<ul>
Heidi von Markham84564992016-02-09 10:54:20 -08004798 <li>The port MUST be connectable to a USB host that has a standard type-A or
4799 type-C USB port.</li>
4800 <li>The port SHOULD use micro-A, micro-AB or type-C USB form factor. Existing
4801 and new Android devices are <strong>STRONGLY RECOMMENDED to meet these
4802 requirements</strong> so they will be able to upgrade to the future platform
4803 releases.</li>
4804 <li>The port SHOULD be centered in the middle of an edge. Device
4805 implementations SHOULD either locate the port on the bottom of the device
4806 (according to natural orientation) or enable software screen rotation for all
4807 apps (including home screen), so that the display draws correctly when the
4808 device is oriented with the port at bottom. Existing and new Android devices
4809 are <strong>STRONGLY RECOMMENDED to meet these requirements</strong> so they
4810 will be able to upgrade to future platform releases.</li>
Unsuk Jung5bc81142015-07-16 22:27:20 -07004811 <li>It MUST allow a USB host connected with the Android device to access the
Heidi von Markham84564992016-02-09 10:54:20 -08004812 contents of the shared storage volume using either USB mass storage or Media
4813 Transfer Protocol.</li>
4814 <li>It SHOULD implement the Android Open Accessory (AOA) API and specification
4815 as documented in the Android SDK documentation, and if it is an Android
4816 Handheld device it MUST implement the AOA API. Device implementations
4817 implementing the AOA specification:
Unsuk Jung5bc81142015-07-16 22:27:20 -07004818 <ul>
Heidi von Markham84564992016-02-09 10:54:20 -08004819 <li>MUST declare support for the hardware feature
4820 <a href="http://developer.android.com/guide/topics/connectivity/usb/accessory.html">android.hardware.usb.accessory</a>.
4821 </li>
4822 <li>MUST implement the
4823 <a href="http://developer.android.com/reference/android/hardware/usb/UsbConstants.html#USB_CLASS_AUDIO">USB
4824 audio class</a>as documented in the Android SDK documentation.</li>
4825 <li>The USB mass storage class MUST include the string "android" at the end
4826 of the interface description <code>iInterface</code> string of the USB mass
4827 storage</li>
Unsuk Jungd94638a2015-09-29 20:50:56 -07004828 </ul>
4829 </li>
Heidi von Markham84564992016-02-09 10:54:20 -08004830 <li>It SHOULD implement support to draw 1.5 A current during HS chirp and
4831 traffic as specified in the
4832 <a href="http://www.usb.org/developers/docs/devclass_docs/USB_Battery_Charging_1.2.pdf">USB
4833 battery charging specification</a>. Existing and new Android devices are
4834 <strong>STRONGLY RECOMMENDED to meet these requirements</strong> so they will
4835 be able to upgrade to the future platform releases.</li>
4836 <li>The value of iSerialNumber in USB standard device descriptor MUST be equal
4837 to the value of android.os.Build.SERIAL.</li>
Unsuk Jung5bc81142015-07-16 22:27:20 -07004838</ul>
4839
4840<p>If a device implementation includes a USB port supporting host mode, it:</p>
4841
4842<ul>
Heidi von Markham84564992016-02-09 10:54:20 -08004843 <li>SHOULD use a type-C USB port, if the device implementation supports USB
4844 3.1.</li>
4845 <li>MAY use a non-standard port form factor, but if so MUST ship with a cable
4846 or cables adapting the port to a standard type-A or type-C USB port.</li>
Unsuk Jung5bc81142015-07-16 22:27:20 -07004847 <li>MAY use a micro-AB USB port, but if so SHOULD ship with a cable or cables
Heidi von Markham84564992016-02-09 10:54:20 -08004848 adapting the port to a standard type-A or type-C USB port.</li>
4849 <li>is <strong>STRONGLY RECOMMENDED</strong> to implement the
4850 <a href="http://developer.android.com/reference/android/hardware/usb/UsbConstants.html#USB_CLASS_AUDIO">USB
4851 audio class</a> as documented in the Android SDK documentation.</li>
4852 <li>MUST implement the Android USB host API as documented in the Android SDK,
4853 and MUST declare support for the hardware feature
4854 <a href="http://developer.android.com/guide/topics/connectivity/usb/host.html">android.hardware.usb.host</a>.
4855 </li>
4856 <li>SHOULD support the Charging Downstream Port output current range of 1.5 A
4857 ~ 5 A as specified in the
4858 <a href="http://www.usb.org/developers/docs/devclass_docs/USB_Battery_Charging_1.2.pdf">USB
4859 Battery Charging Specifications</a>.</li>
Unsuk Jung5bc81142015-07-16 22:27:20 -07004860</ul>
4861
4862<h2 id="7_8_audio">7.8. Audio</h2>
4863
4864
4865<h3 id="7_8_1_microphone">7.8.1. Microphone</h3>
4866
4867<div class="note">
4868<p>Android Handheld, Watch, and Automotive implementations MUST include a
4869microphone.</p>
4870</div>
4871
4872
4873<p>Device implementations MAY omit a microphone. However, if a device
4874implementation omits a microphone, it MUST NOT report the
4875android.hardware.microphone feature constant, and MUST implement the audio
Heidi von Markham84564992016-02-09 10:54:20 -08004876recording API at least as no-ops, per
4877<a href="#7_hardware_compatibility">section 7</a>. Conversely, device
4878implementations that do possess a microphone:</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07004879
4880<ul>
Heidi von Markham84564992016-02-09 10:54:20 -08004881 <li>MUST report the android.hardware.microphone feature constant.</li>
4882 <li>MUST meet the audio recording requirements in
4883 <a href="#5_4_audio_recording">section 5.4</a>.</li>
4884 <li>MUST meet the audio latency requirements in
4885 <a href="#5_6_audio_latency">section 5.6</a>.</li>
Glenn Kasten20cdbb72015-09-24 11:56:42 -07004886 <li>STRONGLY RECOMMENDED to support near-ultrasound recording as described in
Heidi von Markham84564992016-02-09 10:54:20 -08004887 <a href="#7_8_3_near_ultrasound">section 7.8.3</a>.</li>
Unsuk Jung5bc81142015-07-16 22:27:20 -07004888</ul>
4889
4890<h3 id="7_8_2_audio_output">7.8.2. Audio Output</h3>
4891
4892<div class="note">
4893<p>Android Watch devices MAY include an audio output.</p>
4894</div>
4895
4896<p>Device implementations including a speaker or with an audio/multimedia output
4897port for an audio output peripheral as a headset or an external speaker:</p>
4898
4899<ul>
4900 <li>MUST report the android.hardware.audio.output feature constant.</li>
Heidi von Markham84564992016-02-09 10:54:20 -08004901 <li>MUST meet the audio playback requirements in
4902 <a href="#5_5_audio_playback">section 5.5</a>.</li>
4903 <li>MUST meet the audio latency requirements in
4904 <a href="#5_6_audio_latency">section 5.6</a>.</li>
Glenn Kasten20cdbb72015-09-24 11:56:42 -07004905 <li>STRONGLY RECOMMENDED to support near-ultrasound playback as described in
Heidi von Markham84564992016-02-09 10:54:20 -08004906 <a href="#7_8_3_near_ultrasound">section 7.8.3</a>.</li>
Unsuk Jung5bc81142015-07-16 22:27:20 -07004907</ul>
4908
4909<p>Conversely, if a device implementation does not include a speaker or audio
4910output port, it MUST NOT report the android.hardware.audio output feature, and
4911MUST implement the Audio Output related APIs as no-ops at least. </p>
4912
4913<p>Android Watch device implementation MAY but SHOULD NOT have audio output, but
4914other types of Android device implementations MUST have an audio output and
4915declare android.hardware.audio.output.</p>
4916
4917<h4 id="7_8_2_1_analog_audio_ports">7.8.2.1. Analog Audio Ports</h4>
4918
4919
Heidi von Markham84564992016-02-09 10:54:20 -08004920<p>In order to be compatible with the
4921<a href="http://source.android.com/accessories/headset-spec.html">headsets and
4922other audio accessories</a> using the 3.5mm audio plug across the Android
4923ecosystem, if a device implementation includes one or more analog audio ports,
4924at least one of the audio port(s) SHOULD be a 4 conductor 3.5mm audio jack. If a
4925device implementation has a 4 conductor 3.5mm audio jack, it:</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07004926
4927<ul>
Heidi von Markham84564992016-02-09 10:54:20 -08004928 <li>MUST support audio playback to stereo headphones and stereo headsets with
4929 a microphone, and SHOULD support audio recording from stereo headsets with a
4930 microphone.</li>
4931 <li>MUST support TRRS audio plugs with the CTIA pin-out order, and SHOULD
4932 support audio plugs with the OMTP pin-out order.</li>
4933 <li>MUST support the detection of microphone on the plugged in audio
4934 accessory, if the device implementation supports a microphone, and broadcast
4935 the android.intent.action.HEADSET_PLUG with the extra value microphone set as
4936 1.</li>
4937 <li>SHOULD support the detection and mapping to the keycodes for the following
4938 3 ranges of equivalent impedance between the microphone and ground conductors
4939 on the audio plug:
Unsuk Jung5bc81142015-07-16 22:27:20 -07004940 <ul>
4941 <li><strong>70 ohm or less</strong>: KEYCODE_HEADSETHOOK</li>
Glenn Kasten54e6ac12015-08-12 09:07:12 -07004942 <li><strong>210&#45;290 Ohm</strong>: KEYCODE_VOLUME_UP</li>
Unsuk Jung5bc81142015-07-16 22:27:20 -07004943 <li><strong>360&#45;680 Ohm</strong>: KEYCODE_VOLUME_DOWN</li>
4944 </ul></li>
Heidi von Markham84564992016-02-09 10:54:20 -08004945 <li>SHOULD support the detection and mapping to the keycode for the following
4946 range of equivalent impedance between the microphone and ground conductors on
4947 the audio plug:
Unsuk Jung5bc81142015-07-16 22:27:20 -07004948 <ul>
4949 <li><strong>110&#45;180 Ohm: </strong>KEYCODE_VOICE_ASSIST</li>
4950 </ul></li>
4951 <li>MUST trigger ACTION_HEADSET_PLUG upon a plug insert, but only after all
Heidi von Markham84564992016-02-09 10:54:20 -08004952 contacts on plug are touching their relevant segments on the jack.</li>
4953 <li>MUST be capable of driving at least 150mV &plusmn; 10% of output voltage
4954 on a 32 Ohm speaker impedance.</li>
Unsuk Jung5bc81142015-07-16 22:27:20 -07004955 <li>MUST have a microphone bias voltage between 1.8V ~ 2.9V.</li>
4956</ul>
4957
Glenn Kasten20cdbb72015-09-24 11:56:42 -07004958<h3 id="7_8_3_near_ultrasound">7.8.3. Near-Ultrasound </h3>
4959
Heidi von Markham84564992016-02-09 10:54:20 -08004960<p>Near-Ultrasound audio is the 18.5 kHz to 20 kHz band. Device implementations
4961MUST correctly report the support of near-ultrasound audio capability via the
Glenn Kasten20cdbb72015-09-24 11:56:42 -07004962<a href="http://developer.android.com/reference/android/media/AudioManager.html#getProperty(java.lang.String)">AudioManager.getProperty</a>
4963API as follows:
4964</p>
4965
4966<ul>
4967 <li>If
4968 <a href="http://developer.android.com/reference/android/media/AudioManager.html#PROPERTY_SUPPORT_MIC_NEAR_ULTRASOUND">PROPERTY_SUPPORT_MIC_NEAR_ULTRASOUND</a>
4969 is "true", then
4970 <ul>
Heidi von Markham84564992016-02-09 10:54:20 -08004971 <li>The microphone's mean power response in the 18.5 kHz to 20 kHz band MUST
4972 be no more than 15 dB below the response at 2 kHz.</li>
4973 <li>The signal to noise ratio of the microphone MUST be no lower than 80 dB.
4974 </li>
Glenn Kasten20cdbb72015-09-24 11:56:42 -07004975 </ul>
4976 </li>
4977 <li>If
4978 <a href="http://developer.android.com/reference/android/media/AudioManager.html#PROPERTY_SUPPORT_SPEAKER_NEAR_ULTRASOUND">PROPERTY_SUPPORT_SPEAKER_NEAR_ULTRASOUND</a>
Heidi von Markham84564992016-02-09 10:54:20 -08004979 is "true", then the speaker's mean response in 18.5 kHz - 20 kHz MUST be no
4980 lower than 40 dB below the response at 2 kHz.</li>
Glenn Kasten20cdbb72015-09-24 11:56:42 -07004981</ul>
4982
Danielle Roberts727f7d72015-10-09 15:29:36 -07004983<h1 id="8_performance_power">8. Performance and Power</h1>
Unsuk Jung5bc81142015-07-16 22:27:20 -07004984
4985
Heidi von Markham84564992016-02-09 10:54:20 -08004986<p>Some minimum performance and power criteria are critical to the user
4987experience and impact the baseline assumptions developers would have when
4988developing an app. Android Watch devices SHOULD and other type of device
4989implementations MUST meet the following criteria.</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07004990
4991<h2 id="8_1_user_experience_consistency">8.1. User Experience Consistency</h2>
4992
4993
4994<p>Device implementations MUST provide a smooth user interface by ensuring a
4995consistent frame rate and response times for applications and games. Device
Heidi von Markham84564992016-02-09 10:54:20 -08004996implementations MUST meet the following requirements:</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07004997
4998<ul>
Heidi von Markham84564992016-02-09 10:54:20 -08004999 <li><strong>Consistent frame latency</strong>. Inconsistent frame latency or a
5000 delay to render frames MUST NOT happen more often than 5 frames in a second,
5001 and SHOULD be below 1 frames in a second.</li>
5002 <li><strong>User interface latency</strong>. Device implementations MUST
5003 ensure low latency user experience by scrolling a list of 10K list entries as
5004 defined by the Android Compatibility Test Suite (CTS) in less than 36 secs.
5005 </li>
5006 <li><strong>Task switching</strong>. When multiple applications have been
5007 launched, re-launching an already-running application after it has been
5008 launched MUST take less than 1 second.</li>
Unsuk Jung5bc81142015-07-16 22:27:20 -07005009</ul>
5010
5011<h2 id="8_2_file_i_o_access_performance">8.2. File I/O Access Performance</h2>
5012
5013
Heidi von Markham84564992016-02-09 10:54:20 -08005014<p>Device implementations MUST ensure internal storage file access performance
5015consistency for read and write operations.</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07005016
5017<ul>
Heidi von Markham84564992016-02-09 10:54:20 -08005018 <li><strong>Sequential write</strong>. Device implementations MUST ensure a
5019 sequential write performance of at least 5MB/s for a 256MB file using 10MB
5020 write buffer.</li>
5021 <li><strong>Random write</strong>. Device implementations MUST ensure a random
5022 write performance of at least 0.5MB/s for a 256MB file using 4KB write buffer.
5023 </li>
5024 <li><strong>Sequential read</strong>. Device implementations MUST ensure a
5025 sequential read performance of at least 15MB/s for a 256MB file using 10MB
5026 write buffer.</li>
5027 <li><strong>Random read</strong>. Device implementations MUST ensure a random
5028 read performance of at least 3.5MB/s for a 256MB file using 4KB write buffer.
5029 </li>
Unsuk Jung5bc81142015-07-16 22:27:20 -07005030</ul>
5031
Clay Murphye97c9232015-10-07 00:28:32 -07005032<h2 id="8_3_power_saving_modes">8.3. Power-Saving Modes</h2>
5033
5034<p>All apps exempted from App Standby and/or Doze mode MUST be made visible to
5035the end user. Further, the triggering, maintenance, wakeup algorithms and
5036the use of Global system settings of these power-saving modes MUST not deviate
5037from the Android Open Source Project.</p>
5038
5039<h2 id="8_4_power_consumption_accounting">8.4. Power Consumption Accounting</h2>
5040
Heidi von Markham84564992016-02-09 10:54:20 -08005041<p>A more accurate accounting and reporting of the power consumption provides
5042the app developer both the incentives and the tools to optimize the power usage
5043pattern of the application. Therefore, device implementations:</p>
Clay Murphye97c9232015-10-07 00:28:32 -07005044
5045<ul>
Heidi von Markham84564992016-02-09 10:54:20 -08005046 <li>MUST be able to track hardware component power usage and attribute that
5047 power usage to specific applications. Specifically, implementations:
Clay Murphye97c9232015-10-07 00:28:32 -07005048 <ul>
Heidi von Markham84564992016-02-09 10:54:20 -08005049 <li>MUST provide a per-component power profile that defines the
5050 <a href="http://source.android.com/devices/tech/power/values.html">current
5051 consumption value</a> for each hardware component and the approximate
5052 battery drain caused by the components over time as documented in the
5053 Android Open Source Project site.</li>
5054 <li>MUST report all power consumption values in milliampere hours (mAh).
5055 </li>
Clay Murphye97c9232015-10-07 00:28:32 -07005056 <li>SHOULD be attributed to the hardware component itself if unable to
Heidi von Markham84564992016-02-09 10:54:20 -08005057 attribute hardware component power usage to an application.</li>
5058 <li>MUST report CPU power consumption per each process's UID. The Android
5059 Open Source Project meets the requirement through the
5060 <code>uid_cputime</code> kernel module implementation.</li>
Clay Murphye97c9232015-10-07 00:28:32 -07005061 </ul>
5062 </li>
Heidi von Markham84564992016-02-09 10:54:20 -08005063 <li>MUST make this power usage available via the
5064 <a href="http://source.android.com/devices/tech/power/batterystats.html"><code>adb
5065 shell dumpsys batterystats</code></a> shell command to the app developer.</li>
5066 <li>MUST honor the
5067 <a href="http://developer.android.com/reference/android/content/Intent.html#ACTION_POWER_USAGE_SUMMARY">android.intent.action.POWER_USAGE_SUMMARY</a>
5068 intent and display a settings menu that shows this power usage.</li>
Clay Murphye97c9232015-10-07 00:28:32 -07005069</ul>
5070
Unsuk Jung5bc81142015-07-16 22:27:20 -07005071<h1 id="9_security_model_compatibility">9. Security Model Compatibility</h1>
5072
5073
5074<p>Device implementations MUST implement a security model consistent with the
Heidi von Markham84564992016-02-09 10:54:20 -08005075Android platform security model as defined in
5076<a href="http://developer.android.com/guide/topics/security/permissions.html">Security
5077and Permissions reference document</a> in the APIs in the Android developer
5078documentation. Device implementations MUST support installation of self-signed
5079applications without requiring any additional permissions/certificates from any
5080third parties/authorities. Specifically, compatible devices MUST support the
5081security mechanisms described in the follow subsections.</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07005082
5083<h2 id="9_1_permissions">9.1. Permissions</h2>
5084
5085
Heidi von Markham84564992016-02-09 10:54:20 -08005086<p>Device implementations MUST support the
5087<a href="http://developer.android.com/guide/topics/security/permissions.html">Android
5088permissions model</a> as defined in the Android developer documentation.
5089Specifically, implementations MUST enforce each permission defined as described
5090in the SDK documentation; no permissions may be omitted, altered, or ignored.
5091Implementations MAY add additional permissions, provided the new permission ID
5092strings are not in the android.* namespace.</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07005093
Heidi von Markham84564992016-02-09 10:54:20 -08005094<p>Permissions with a protection level of dangerous are runtime permissions.
5095Applications with targetSdkVersion > 22 request them at runtime. Device
5096implementations:</p>
Unsuk Jungad5c4c32015-09-29 18:03:10 -07005097
5098<ul>
Heidi von Markham84564992016-02-09 10:54:20 -08005099 <li>MUST show a dedicated interface for the user to decide whether to grant
5100 the requested runtime permissions and also provide an interface for the user
5101 to manage runtime permissions.</li>
5102 <li>MUST have one and only one implementation of both user interfaces.</li>
5103 <li>MUST NOT grant any runtime permissions to preinstalled apps unless:
Unsuk Jungad5c4c32015-09-29 18:03:10 -07005104 <ul>
5105 <li>the user's consent can be obtained before the application uses it</li>
Heidi von Markham84564992016-02-09 10:54:20 -08005106 <li>the runtime permissions are associated with an intent pattern for which
5107 the preinstalled application is set as the default handler</li>
Unsuk Jungad5c4c32015-09-29 18:03:10 -07005108 </ul>
Heidi von Markham84564992016-02-09 10:54:20 -08005109 </li>
Unsuk Jungad5c4c32015-09-29 18:03:10 -07005110</ul>
Svetoslav4bbf7402015-09-11 14:45:48 -07005111
Unsuk Jung5bc81142015-07-16 22:27:20 -07005112<h2 id="9_2_uid_and_process_isolation">9.2. UID and Process Isolation</h2>
5113
5114
5115<p>Device implementations MUST support the Android application sandbox model, in
5116which each application runs as a unique Unixstyle UID and in a separate
5117process. Device implementations MUST support running multiple applications as
5118the same Linux user ID, provided that the applications are properly signed and
Heidi von Markham84564992016-02-09 10:54:20 -08005119constructed, as defined in the
5120<a href="http://developer.android.com/guide/topics/security/permissions.html">Security
5121and Permissions reference</a>.</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07005122
5123<h2 id="9_3_filesystem_permissions">9.3. Filesystem Permissions</h2>
5124
5125
5126<p>Device implementations MUST support the Android file access permissions model
Heidi von Markham84564992016-02-09 10:54:20 -08005127as defined in the
5128<a href="http://developer.android.com/guide/topics/security/permissions.html">Security
5129and Permissions reference</a>.</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07005130
Heidi von Markham84564992016-02-09 10:54:20 -08005131<h2 id="9_4_alternate_execution_environments">9.4. Alternate Execution
5132Environments</h2>
Unsuk Jung5bc81142015-07-16 22:27:20 -07005133
5134
5135<p>Device implementations MAY include runtime environments that execute
5136applications using some other software or technology than the Dalvik Executable
5137Format or native code. However, such alternate execution environments MUST NOT
5138compromise the Android security model or the security of installed Android
5139applications, as described in this section.</p>
5140
5141<p>Alternate runtimes MUST themselves be Android applications, and abide by the
Heidi von Markham84564992016-02-09 10:54:20 -08005142standard Android security model, as described elsewhere in
5143<a href="#9_security_model_compatibility">section 9</a>.</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07005144
5145<p>Alternate runtimes MUST NOT be granted access to resources protected by
Heidi von Markham84564992016-02-09 10:54:20 -08005146permissions not requested in the runtime&rsquo;s AndroidManifest.xml file via
5147the &lt;uses-permission&gt; mechanism.</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07005148
5149<p>Alternate runtimes MUST NOT permit applications to make use of features
5150protected by Android permissions restricted to system applications.</p>
5151
5152<p>Alternate runtimes MUST abide by the Android sandbox model. Specifically,
5153alternate runtimes:</p>
5154
5155<ul>
Heidi von Markham84564992016-02-09 10:54:20 -08005156 <li>SHOULD install apps via the PackageManager into separate Android sandboxes
5157 (Linux user IDs, etc.).</li>
Unsuk Jung5bc81142015-07-16 22:27:20 -07005158 <li>MAY provide a single Android sandbox shared by all applications using the
Heidi von Markham84564992016-02-09 10:54:20 -08005159 alternate runtime.</li>
5160 <li>Installed applications using an alternate runtime MUST NOT reuse the
5161 sandbox of any other app installed on the device, except through the standard
5162 Android mechanisms of shared user ID and signing certificate.</li>
Unsuk Jung5bc81142015-07-16 22:27:20 -07005163 <li>MUST NOT launch with, grant, or be granted access to the sandboxes
Heidi von Markham84564992016-02-09 10:54:20 -08005164 corresponding to other Android applications.</li>
Unsuk Jung5bc81142015-07-16 22:27:20 -07005165 <li>MUST NOT be launched with, be granted, or grant to other applications any
Heidi von Markham84564992016-02-09 10:54:20 -08005166 privileges of the superuser (root), or of any other user ID.</li>
Unsuk Jung5bc81142015-07-16 22:27:20 -07005167</ul>
5168
5169<p>The .apk files of alternate runtimes MAY be included in the system image of a
5170device implementation, but MUST be signed with a key distinct from the key used
5171to sign other applications included with the device implementation.</p>
5172
5173<p>When installing applications, alternate runtimes MUST obtain user consent for
Heidi von Markham84564992016-02-09 10:54:20 -08005174the Android permissions used by the application. If an application needs to make
5175use of a device resource for which there is a corresponding Android permission
5176(such as Camera, GPS, etc.), the alternate runtime MUST inform the user that the
5177application will be able to access that resource. If the runtime environment
5178does not record application capabilities in this manner, the runtime environment
5179MUST list all permissions held by the runtime itself when installing any
5180application using that runtime.</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07005181
5182<h2 id="9_5_multi-user_support">9.5. Multi-User Support</h2>
5183
5184<div class="note">
5185<p>This feature is optional for all device types.</p>
5186</div>
5187
5188
Heidi von Markham84564992016-02-09 10:54:20 -08005189<p>Android includes
5190<a href="http://developer.android.com/reference/android/os/UserManager.html">support
5191for multiple users</a> and provides support for full user isolation. Device
5192implementations MAY enable multiple users, but when enabled MUST meet the
5193following requirements related to
5194<a href="http://source.android.com/devices/storage/traditional.html">multi-user
5195support</a>:</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07005196
5197<ul>
5198 <li>Device implementations that do not declare the android.hardware.telephony
Heidi von Markham84564992016-02-09 10:54:20 -08005199 feature flag MUST support restricted profiles, a feature that allows device
5200 owners to manage additional users and their capabilities on the device. With
5201 restricted profiles, device owners can quickly set up separate environments
5202 for additional users to work in, with the ability to manage finer-grained
5203 restrictions in the apps that are available in those environments.</li>
5204 <li>Conversely device implementations that declare the
5205 android.hardware.telephony feature flag MUST NOT support restricted profiles
5206 but MUST align with the AOSP implementation of controls to enable /disable
5207 other users from accessing the voice calls and SMS.</li>
Unsuk Jung5bc81142015-07-16 22:27:20 -07005208 <li>Device implementations MUST, for each user, implement a security model
Heidi von Markham84564992016-02-09 10:54:20 -08005209 consistent with the Android platform security model as defined in
5210 <a href="http://developer.android.com/guide/topics/security/permissions.html">Security
5211 and Permissions reference document</a> in the APIs.</li>
Unsuk Jung5bc81142015-07-16 22:27:20 -07005212 <li>Each user instance on an Android device MUST have separate and isolated
Heidi von Markham84564992016-02-09 10:54:20 -08005213 external storage directories. Device implementations MAY store multiple users'
5214 data on the same volume or filesystem. However, the device implementation MUST
5215 ensure that applications owned by and running on behalf a given user cannot
5216 list, read, or write to data owned by any other user. Note that removable
5217 media, such as SD card slots, can allow one user to access another&rsquo;s
5218 data by means of a host PC. For this reason, device implementations that use
5219 removable media for the external storage APIs MUST encrypt the contents of the
5220 SD card if multiuser is enabled using a key stored only on non-removable media
5221 accessible only to the system. As this will make the media unreadable by a
5222 host PC, device implementations will be required to switch to MTP or a similar
5223 system to provide host PCs with access to the current user&rsquo;s data.
5224 Accordingly, device implementations MAY but SHOULD NOT enable multi-user if
5225 they use
5226 <a href="http://developer.android.com/reference/android/os/Environment.html">removable
5227 media</a> for primary external storage.</li>
Unsuk Jung5bc81142015-07-16 22:27:20 -07005228</ul>
5229
5230<h2 id="9_6_premium_sms_warning">9.6. Premium SMS Warning</h2>
5231
5232
Heidi von Markham84564992016-02-09 10:54:20 -08005233<p>Android includes support for warning users of any outgoing
5234<a href="http://en.wikipedia.org/wiki/Short_code">premium SMS message</a>.
5235Premium SMS messages are text messages sent to a service registered with a
5236carrier that may incur a charge to the user. Device implementations that declare
5237support for android.hardware.telephony MUST warn users before sending a SMS
5238message to numbers identified by regular expressions defined in
Unsuk Jung5bc81142015-07-16 22:27:20 -07005239/data/misc/sms/codes.xml file in the device. The upstream Android Open Source
5240Project provides an implementation that satisfies this requirement.</p>
5241
5242<h2 id="9_7_kernel_security_features">9.7. Kernel Security Features</h2>
5243
5244
Unsuk Jung5ead64e2015-10-06 02:35:25 -07005245<p>The Android Sandbox includes features that use the Security-Enhanced Linux
Unsuk Jung5bc81142015-07-16 22:27:20 -07005246(SELinux) mandatory access control (MAC) system and other security features in
Unsuk Jung5ead64e2015-10-06 02:35:25 -07005247the Linux kernel. SELinux or any other security features implemented below
Unsuk Jung5bc81142015-07-16 22:27:20 -07005248the Android framework:</p>
5249
5250<ul>
5251 <li>MUST maintain compatibility with existing applications.</li>
Heidi von Markham84564992016-02-09 10:54:20 -08005252 <li>MUST NOT have a visible user interface when a security violation is
5253 detected and successfully blocked, but MAY have a visible user interface when
5254 an unblocked security violation occurs resulting in a successful exploit.</li>
Unsuk Jung5bc81142015-07-16 22:27:20 -07005255 <li>SHOULD NOT be user or developer configurable.</li>
5256</ul>
5257
5258<p>If any API for configuration of policy is exposed to an application that can
5259affect another application (such as a Device Administration API), the API MUST
5260NOT allow configurations that break compatibility.</p>
5261
Unsuk Jung5ead64e2015-10-06 02:35:25 -07005262<p>Devices MUST implement SELinux or, if using a kernel other than Linux, an
5263equivalent mandatory access control system. Devices MUST also meet the
5264following requirements, which are satisfied by the reference implementation
5265in the upstream Android Open Source Project.</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07005266
5267<p>Device implementations:</p>
5268
5269<ul>
Unsuk Jung5ead64e2015-10-06 02:35:25 -07005270 <li>MUST set SELinux to global enforcing mode.</li>
5271 <li>MUST configure all domains in enforcing mode. No permissive mode domains
Heidi von Markham84564992016-02-09 10:54:20 -08005272 are allowed, including domains specific to a device/vendor.</li>
Unsuk Jung5bc81142015-07-16 22:27:20 -07005273 <li>MUST NOT modify, omit, or replace the neverallow rules present within the
Nick Kralevich93a53292016-04-13 07:55:04 -07005274 system/sepolicy folder provided in the upstream Android Open Source Project
Heidi von Markham84564992016-02-09 10:54:20 -08005275 (AOSP) and the policy MUST compile with all neverallow rules present, for both
5276 AOSP SELinux domains as well as device/vendor specific domains.</li>
Unsuk Jung5bc81142015-07-16 22:27:20 -07005277</ul>
5278
Heidi von Markham84564992016-02-09 10:54:20 -08005279<p>Device implementations SHOULD retain the default SELinux policy provided in
Nick Kralevich93a53292016-04-13 07:55:04 -07005280the system/sepolicy folder of the upstream Android Open Source Project and
Heidi von Markham84564992016-02-09 10:54:20 -08005281only further add to this policy for their own device-specific configuration.
5282Device implementations MUST be compatible with the upstream Android Open Source
5283Project.</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07005284
5285<h2 id="9_8_privacy">9.8. Privacy</h2>
5286
Heidi von Markham84564992016-02-09 10:54:20 -08005287<p>If the device implements functionality in the system that captures the
5288contents displayed on the screen and/or records the audio stream played on the
5289device, it MUST continuously notify the user whenever this functionality is
5290enabled and actively capturing/recording.</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07005291
5292<p>If a device implementation has a mechanism that routes network data traffic
5293through a proxy server or VPN gateway by default (for example, preloading a VPN
5294service with android.permission.CONTROL_VPN granted), the device implementation
5295MUST ask for the user's consent before enabling that mechanism.</p>
5296
Unsuk Jungaad25192015-09-29 11:55:45 -07005297<p>If a device implementation has a USB port with USB peripheral mode support,
5298it MUST present a user interface asking for the user's consent before allowing
5299access to the contents of the shared storage over the USB port.</p>
5300
Unsuk Jung5bc81142015-07-16 22:27:20 -07005301<h2 id="9_9_full-disk_encryption">9.9. Full-Disk Encryption</h2>
5302
5303<div class="note">
5304<p>Optional for Android device implementations without a lock screen.</p>
5305</div>
5306
Heidi von Markham84564992016-02-09 10:54:20 -08005307<p>If the device implementation supports a secure lock screen reporting
5308"<code>true</code>" for
5309<a href="http://developer.android.com/reference/android/app/KeyguardManager.html#isDeviceSecure()">KeyguardManager.isDeviceSecure()</a>,
Unsuk Jung41641fb2015-09-29 11:19:49 -07005310and is not a device with restricted memory as reported through the
Heidi von Markham84564992016-02-09 10:54:20 -08005311ActivityManager.isLowRamDevice() method, then the device MUST support full-disk
5312<a href="http://source.android.com/devices/tech/security/encryption/index.html">encryption</a>
Unsuk Jung41641fb2015-09-29 11:19:49 -07005313of the application private data (/data partition), as well as the application
5314shared storage partition (/sdcard partition) if it is a permanent, non-removable
5315part of the device.</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07005316
Unsuk Jung41641fb2015-09-29 11:19:49 -07005317<p>For device implementations supporting full-disk encryption and with Advanced
5318Encryption Standard (AES) crypto performance above 50MiB/sec, the full-disk
Heidi von Markham84564992016-02-09 10:54:20 -08005319encryption MUST be enabled by default at the time the user has completed the
5320out-of-box setup experience. If a device implementation is already launched on
5321an earlier Android version with full-disk encryption disabled by default, such a
5322device cannot meet the requirement through a system software update and thus MAY
5323be exempted.</p>
Unsuk Jung41641fb2015-09-29 11:19:49 -07005324
5325<p>Encryption MUST use AES with a key of 128-bits (or greater) and a mode designed
Unsuk Jung5bc81142015-07-16 22:27:20 -07005326for storage (for example, AES-XTS, AES-CBC-ESSIV). The encryption key MUST NOT
5327be written to storage at any time without being encrypted. Other than when in
5328active use, the encryption key SHOULD be AES encrypted with the lockscreen
5329passcode stretched using a slow stretching algorithm (e.g. PBKDF2 or scrypt).
5330If the user has not specified a lockscreen passcode or has disabled use of the
5331passcode for encryption, the system SHOULD use a default passcode to wrap the
5332encryption key. If the device provides a hardware-backed keystore, the password
5333stretching algorithm MUST be cryptographically bound to that keystore. The
5334encryption key MUST NOT be sent off the device (even when wrapped with the user
5335passcode and/or hardware bound key). The upstream Android Open Source project
Clay Murphyf4fa6bc2015-08-28 17:20:31 -07005336provides a preferred implementation of this feature based on the Linux kernel
Unsuk Jung5bc81142015-07-16 22:27:20 -07005337feature dm-crypt.</p>
5338
5339<h2 id="9_10_verified_boot">9.10. Verified Boot</h2>
5340
5341<p>
5342Verified boot is a feature that guarantees the integrity of the device software.
5343If a device implementation supports the feature, it MUST:
Glenn Kasten54e6ac12015-08-12 09:07:12 -07005344</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07005345<ul>
Heidi von Markham84564992016-02-09 10:54:20 -08005346 <li>Declare the platform feature flag android.software.verified_boot.</li>
5347 <li>Perform verification on every boot sequence.</li>
5348 <li>Start verification from an immutable hardware key that is the root of
5349 trust and go all the way up to the system partition.</li>
5350 <li>Implement each stage of verification to check the integrity and
5351 authenticity of all the bytes in the next stage before executing the code in
5352 the next stage.</li>
5353 <li>Use verification algorithms as strong as current recommendations from NIST
5354 for hashing algorithms (SHA-256) and public key sizes (RSA-2048).</li>
Unsuk Jung5bc81142015-07-16 22:27:20 -07005355</ul>
Unsuk Jung5bc81142015-07-16 22:27:20 -07005356
Heidi von Markham84564992016-02-09 10:54:20 -08005357<p>The upstream Android Open Source Project provides a preferred implementation
5358of this feature based on the Linux kernel feature dm-verity.</p>
Clay Murphyf4fa6bc2015-08-28 17:20:31 -07005359
Heidi von Markham84564992016-02-09 10:54:20 -08005360<p>Starting from Android 6.0, device implementations with Advanced Encryption
5361Standard (AES) crypto perfomance above 50MiB/seconds MUST support verified boot
5362for device integrity. If a device implementation is already launched without
5363supporting verified boot on an earlier version of Android, such a device can not
5364add support for this feature with a system software update and thus are exempted
5365from the requirement.</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07005366
Unsuk Jungb5ef8ac2015-09-29 22:52:29 -07005367<h2 id="9_11_keys_and_credentials">9.11. Keys and Credentials</h2>
5368
Heidi von Markham84564992016-02-09 10:54:20 -08005369<p>The <a href="https://developer.android.com/training/articles/keystore.html">Android
5370Keystore System</a> allows app developers to store cryptographic keys in a
5371container and use them in cryptographic
5372operations through the
5373<a href="https://developer.android.com/reference/android/security/KeyChain.html">KeyChain
5374API</a> or the
5375<a href="https://developer.android.com/reference/java/security/KeyStore.html">Keystore
5376API</a>.</p>
Unsuk Jungb5ef8ac2015-09-29 22:52:29 -07005377
5378<p>All Android device implementations MUST meet the following requirements:</p>
5379
5380<ul>
Heidi von Markham84564992016-02-09 10:54:20 -08005381 <li>SHOULD not limit the number of keys that can be generated, and MUST at
5382 least allow more than 8,192 keys to be imported.</li>
5383 <li>The lock screen authentication MUST rate limit attempts and SHOULD have an
5384 exponential backoff algorithm as implemented in the Android Open Source
5385 Project.</li>
5386 <li>When the device implementation supports a secure lock screen and has a
5387 secure hardware such as a Secure Element (SE) where a Trusted Execution
5388 Environment (TEE) can be implemented, then it:
5389 <ul>
5390 <li>Is STRONGLY RECOMMENDED to back up the keystore implementation with the
5391 secure hardware. The upstream Android Open Source Project provides the
5392 Keymaster Hardware Abstraction Layer (HAL) implementation that can be used
5393 to satisfy this requirement.</li>
5394 <li>MUST perform the lock screen authentication in the secure hardware if
5395 the device has a hardware-backed keystore implementation and only when
5396 successful allow the authentication-bound keys to be used. The upstream
5397 Android Open Source Project provides the
5398 <a href="http://source.android.com/devices/tech/security/authentication/gatekeeper.html">Gatekeeper
5399 Hardware Abstraction Layer (HAL)</a> that can be used to satisfy this
5400 requirement.</li>
5401 </ul>
Unsuk Jungb5ef8ac2015-09-29 22:52:29 -07005402</li>
5403</ul>
5404
Heidi von Markham84564992016-02-09 10:54:20 -08005405<p>Note that while the above TEE-related requirements are stated as STRONGLY
5406RECOMMENDED, the Compatibility Definition for the next API version is planned to
5407changed these to REQIUIRED. If a device implementation is already launched on an
5408earlier Android version and has not implemented a trusted operating system on
5409the secure hardware, such a device might not be able to meet the requirements
5410through a system software update and thus is STRONGLY RECOMMENDED to implement a
5411TEE.</p>
Unsuk Jungb5ef8ac2015-09-29 22:52:29 -07005412
Bert McMeen83ceaf22015-10-06 15:34:02 -07005413<h2 id="9_12_data_deletion">9.12. Data Deletion</h2>
5414
5415<p>Devices MUST provide users with a mechanism to perform a "Factory Data Reset"
Heidi von Markham84564992016-02-09 10:54:20 -08005416that allows logical and physical deletion of all data. This MUST satisfy
5417relevant industry standards for data deletion such as NIST SP800-88. This MUST
5418be used for the implementation of the wipeData() API (part of the Android Device
5419Administration API) described in <a href="#3_9_device_administration">section
54203.9 Device Administration</a>.</p>
Bert McMeen83ceaf22015-10-06 15:34:02 -07005421
5422<p>Devices MAY provide a fast data wipe that conducts a logical data erase.</p>
5423
Heidi von Markham84564992016-02-09 10:54:20 -08005424<h1 id="10_software_compatibility_testing">10. Software Compatibility
5425Testing</h1>
Unsuk Jung5bc81142015-07-16 22:27:20 -07005426
5427
5428<p>Device implementations MUST pass all tests described in this section.</p>
5429
5430<p>However, note that no software test package is fully comprehensive. For this
Heidi von Markham84564992016-02-09 10:54:20 -08005431reason, device implementers are <strong>STRONGLY RECOMMENDED</strong> to make
5432the minimum number of changes as possible to the reference and preferred
5433implementation of Android available from the Android Open Source Project. This
5434will minimize the risk of introducing bugs that create incompatibilities
5435requiring rework and potential device updates.</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07005436
5437<h2 id="10_1_compatibility_test_suite">10.1. Compatibility Test Suite</h2>
5438
5439
Heidi von Markham84564992016-02-09 10:54:20 -08005440<p>Device implementations MUST pass the
5441<a href="http://source.android.com/compatibility/index.html">Android
5442Compatibility Test Suite (CTS)</a> available from the Android Open Source
5443Project, using the final shipping software on the device. Additionally, device
5444implementers SHOULD use the reference implementation in the Android Open Source
5445tree as much as possible, and MUST ensure compatibility in cases of ambiguity in
5446CTS and for any reimplementations of parts of the reference source code.</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07005447
5448<p>The CTS is designed to be run on an actual device. Like any software, the CTS
5449may itself contain bugs. The CTS will be versioned independently of this
5450Compatibility Definition, and multiple revisions of the CTS may be released for
Heidi von Markham84564992016-02-09 10:54:20 -08005451Android ANDROID_VERSION. Device implementations MUST pass the latest CTS version
5452available at the time the device software is completed.</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07005453
5454<h2 id="10_2_cts_verifier">10.2. CTS Verifier</h2>
5455
5456
5457<p>Device implementations MUST correctly execute all applicable cases in the CTS
5458Verifier. The CTS Verifier is included with the Compatibility Test Suite, and
5459is intended to be run by a human operator to test functionality that cannot be
5460tested by an automated system, such as correct functioning of a camera and
5461sensors.</p>
5462
Heidi von Markham84564992016-02-09 10:54:20 -08005463<p>The CTS Verifier has tests for many kinds of hardware, including some
5464hardware that is optional. Device implementations MUST pass all tests for
5465hardware that they possess; for instance, if a device possesses an
5466accelerometer, it MUST correctly execute the Accelerometer test case in the CTS
5467Verifier. Test cases for features noted as optional by this Compatibility
5468Definition Document MAY be skipped or omitted.</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07005469
5470<p>Every device and every build MUST correctly run the CTS Verifier, as noted
5471above. However, since many builds are very similar, device implementers are not
5472expected to explicitly run the CTS Verifier on builds that differ only in
5473trivial ways. Specifically, device implementations that differ from an
5474implementation that has passed the CTS Verifier only by the set of included
5475locales, branding, etc. MAY omit the CTS Verifier test.</p>
5476
5477<h1 id="11_updatable_software">11. Updatable Software</h1>
5478
5479
Heidi von Markham84564992016-02-09 10:54:20 -08005480<p>Device implementations MUST include a mechanism to replace the entirety of
5481the system software. The mechanism need not perform &ldquo;live&rdquo;
5482upgrades&mdash;that is, a device restart MAY be required.</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07005483
5484<p>Any method can be used, provided that it can replace the entirety of the
5485software preinstalled on the device. For instance, any of the following
5486approaches will satisfy this requirement:</p>
5487
5488<ul>
Heidi von Markham84564992016-02-09 10:54:20 -08005489 <li>&ldquo;Over-the-air (OTA)&rdquo; downloads with offline update via
5490 reboot.</li>
5491 <li>&ldquo;Tethered&rdquo; updates over USB from a host PC.</li>
5492 <li>&ldquo;Offline&rdquo; updates via a reboot and update from a file on
5493 removable storage.</li>
Unsuk Jung5bc81142015-07-16 22:27:20 -07005494</ul>
5495
5496<p>However, if the device implementation includes support for an unmetered data
5497connection such as 802.11 or Bluetooth PAN (Personal Area Network) profile:</p>
5498
5499<ul>
Heidi von Markham84564992016-02-09 10:54:20 -08005500 <li>Android Automotive implementations SHOULD support OTA downloads with
5501 offline update via reboot.</li>
5502 <li>All other device implementations MUST support OTA downloads with offline
5503 update via reboot.</li>
Unsuk Jung5bc81142015-07-16 22:27:20 -07005504</ul>
5505
5506<p>The update mechanism used MUST support updates without wiping user data. That
5507is, the update mechanism MUST preserve application private data and application
5508shared data. Note that the upstream Android software includes an update
5509mechanism that satisfies this requirement.</p>
5510
Heidi von Markham84564992016-02-09 10:54:20 -08005511<p>For device implementations that are launching with Android ANDROID_VERSION
5512and later, the update mechanism SHOULD support verifying that the system image
5513is binary identical to expected result following an OTA. The block-based OTA
Unsuk Jung5bc81142015-07-16 22:27:20 -07005514implementation in the upstream Android Open Source Project, added since Android
55155.1, satisfies this requirement.</p>
5516
Heidi von Markham84564992016-02-09 10:54:20 -08005517<p>If an error is found in a device implementation after it has been released
5518but within its reasonable product lifetime that is determined in consultation
5519with the Android Compatibility Team to affect the compatibility of third-party
Unsuk Jung5bc81142015-07-16 22:27:20 -07005520applications, the device implementer MUST correct the error via a software
5521update available that can be applied per the mechanism just described.</p>
5522
Heidi von Markham84564992016-02-09 10:54:20 -08005523<p>Android includes features that allow the Device Owner app (if present) to
5524control the installation of system updates. To facilitate this, the system
5525update subsystem for devices that report android.software.device_admin MUST
5526implement the behavior described in the
5527<a href="http://developer.android.com/reference/android/app/admin/SystemUpdatePolicy.html">SystemUpdatePolicy</a>
5528class.</p>
Andy Dyer-smith9332c422015-09-11 15:17:38 +01005529
Unsuk Jung5bc81142015-07-16 22:27:20 -07005530<h1 id="12_document_changelog">12. Document Changelog</h1>
5531
Heidi von Markham4da7c472016-02-08 11:07:58 -08005532<p>For a summary of changes to the Compatibility Definition in this release,
5533refer to the <a href="https://android.googlesource.com/platform/docs/source.android.com/+log/master/src/compatibility">changelog</a>.
5534</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07005535
5536<h1 id="13_contact_us">13. Contact Us</h1>
5537
5538
Heidi von Markham84564992016-02-09 10:54:20 -08005539<p>You can join the
5540<a href="https://groups.google.com/forum/#!forum/android-compatibility">android-compatibility
5541forum</a> and ask for clarifications or bring up any issues that you think the
5542document does not cover.</p>
Unsuk Jung5bc81142015-07-16 22:27:20 -07005543
5544</div>
5545</body>
5546</html>