1 <!DOCTYPE html> 2 <html> 3 <head> 4 <title> 5 Android 7.1 Compatibility Definition 6 </title> 7 <link href="source/android-cdd.css" rel="stylesheet" type="text/css"/> 8 </head> 9 <body> 10 <h6> 11 Table of Contents 12 </h6> 13 <div id="toc"> 14 <div id="toc_left"> 15 <p class="toc_h1"> 16 <a href="#1_introduction">1. Introduction</a> 17 </p> 18 <p class="toc_h1"> 19 <a href="#2_device_types">2. Device Types</a> 20 </p> 21 <p class="toc_h2"> 22 <a href="#2_1_device_configurations">2.1 Device Configurations</a> 23 </p> 24 <p class="toc_h1"> 25 <a href="#3_software">3. Software</a> 26 </p> 27 <p class="toc_h2"> 28 <a href="#3_1_managed_api_compatibility">3.1. Managed API Compatibility</a> 29 </p> 30 <p class="toc_h2"> 31 <a href="#3_1_1_android_extensions">3.1.1. Android Extensions</a> 32 </p> 33 <p class="toc_h2"> 34 <a href="#3_2_soft_api_compatibility">3.2. Soft API Compatibility</a> 35 </p> 36 <p class="toc_h3"> 37 <a href="#3_2_1_permissions">3.2.1. Permissions</a> 38 </p> 39 <p class="toc_h3"> 40 <a href="#3_2_2_build_parameters">3.2.2. Build Parameters</a> 41 </p> 42 <p class="toc_h3"> 43 <a href="#3_2_3_intent_compatibility">3.2.3. Intent Compatibility</a> 44 </p> 45 <p class="toc_h4"> 46 <a href="#3_2_3_1_core_application_intents">3.2.3.1. Core Application Intents</a> 47 </p> 48 <p class="toc_h4"> 49 <a href="#3_2_3_2_intent_resolution">3.2.3.2. Intent Resolution</a> 50 </p> 51 <p class="toc_h4"> 52 <a href="#3_2_3_3_intent_namespaces">3.2.3.3. Intent Namespaces</a> 53 </p> 54 <p class="toc_h4"> 55 <a href="#3_2_3_4_broadcast_intents">3.2.3.4. Broadcast Intents</a> 56 </p> 57 <p class="toc_h4"> 58 <a href="#3_2_3_5_default_app_settings">3.2.3.5. Default App Settings</a> 59 </p> 60 <p class="toc_h2"> 61 <a href="#3_3_native_api_compatibility">3.3. Native API Compatibility</a> 62 </p> 63 <p class="toc_h3"> 64 <a href="#3_3_1_application_binary_interfaces">3.3.1. Application Binary Interfaces</a> 65 </p> 66 <p class="toc_h4"> 67 <a href="#3_3_1_1_graphic_libraries">3.3.1.1. Graphic Libraries</a> 68 </p> 69 <p class="toc_h3"> 70 <a href="#3_3_2_32-bit_arm_native_code_compatibility">3.3.2. 32-bit ARM Native Code Compatibility</a> 71 </p> 72 <p class="toc_h2"> 73 <a href="#3_4_web_compatibility">3.4. Web Compatibility</a> 74 </p> 75 <p class="toc_h3"> 76 <a href="#3_4_1_webview_compatibility">3.4.1. WebView Compatibility</a> 77 </p> 78 <p class="toc_h3"> 79 <a href="#3_4_2_browser_compatibility">3.4.2. Browser Compatibility</a> 80 </p> 81 <p class="toc_h2"> 82 <a href="#3_5_api_behavioral_compatibility">3.5. API Behavioral Compatibility</a> 83 </p> 84 <p class="toc_h2"> 85 <a href="#3_6_api_namespaces">3.6. API Namespaces</a> 86 </p> 87 <p class="toc_h2"> 88 <a href="#3_7_runtime_compatibility">3.7. Runtime Compatibility</a> 89 </p> 90 <p class="toc_h2"> 91 <a href="#3_8_user_interface_compatibility">3.8. User Interface Compatibility</a> 92 </p> 93 <p class="toc_h3"> 94 <a href="#3_8_1_launcher_(home_screen)">3.8.1. Launcher (Home Screen)</a> 95 </p> 96 <p class="toc_h3"> 97 <a href="#3_8_2_widgets">3.8.2. Widgets</a> 98 </p> 99 <p class="toc_h3"> 100 <a href="#3_8_3_notifications">3.8.3. Notifications</a> 101 </p> 102 <p class="toc_h3"> 103 <a href="#3_8_4_search">3.8.4. Search</a> 104 </p> 105 <p class="toc_h3"> 106 <a href="#3_8_5_toasts">3.8.5. Toasts</a> 107 </p> 108 <p class="toc_h3"> 109 <a href="#3_8_6_themes">3.8.6. Themes</a> 110 </p> 111 <p class="toc_h3"> 112 <a href="#3_8_7_live_wallpapers">3.8.7. Live Wallpapers</a> 113 </p> 114 <p class="toc_h3"> 115 <a href="#3_8_8_activity_switching">3.8.8. Activity Switching</a> 116 </p> 117 </div> 118 <div id="toc_right"> 119 <p class="toc_h3"> 120 <a href="#3_8_9_input_management">3.8.9. Input Management</a> 121 </p> 122 <p class="toc_h3"> 123 <a href="#3_8_10_lock_screen_media_control">3.8.10. Lock Screen Media Control</a> 124 </p> 125 <p class="toc_h3"> 126 <a href="#3_8_11_screen_savers_(previously_dreams)">3.8.11. Screen savers (previously Dreams)</a> 127 </p> 128 <p class="toc_h3"> 129 <a href="#3_8_12_location">3.8.12. Location</a> 130 </p> 131 <p class="toc_h3"> 132 <a href="#3_8_13_unicode_and_font">3.8.13. Unicode and Font</a> 133 </p> 134 <p class="toc_h3"> 135 <a href="#3_8_14_multi-windows">3.8.14. Multi-windows</a> 136 </p> 137 <p class="toc_h2"> 138 <a href="#3_9_device_administration">3.9. Device Administration</a> 139 </p> 140 <p class="toc_h3"> 141 <a href="#3_9_1_device_provisioning">3.9.1 Device Provisioning</a> 142 </p> 143 <p class="toc_h4"> 144 <a href="#3_9_1_1_device_owner_provisioning">3.9.1.1 Device owner provisioning</a> 145 </p> 146 <p class="toc_h4"> 147 <a href="#3_9_1_2_managed_profile_provisioning">3.9.1.2 Managed profile provisioning</a> 148 </p> 149 <p class="toc_h2"> 150 <a href="#3_9_2_managed_profile_support">3.9.2 Managed Profile Support</a> 151 </p> 152 <p class="toc_h2"> 153 <a href="#3_10_accessibility">3.10. Accessibility</a> 154 </p> 155 <p class="toc_h2"> 156 <a href="#3_11_text-to-speech">3.11. Text-to-Speech</a> 157 </p> 158 <p class="toc_h2"> 159 <a href="#3_12_tv_input_framework">3.12. TV Input Framework</a> 160 </p> 161 <p class="toc_h3"> 162 <a href="#3_12_1_tv_app">3.12.1. TV App</a> 163 </p> 164 <p class="toc_h4"> 165 <a href="#3_12_1_1_electronic_program_guide">3.12.1.1. Electronic Program Guide</a> 166 </p> 167 <p class="toc_h4"> 168 <a href="#3_12_1_2_navigation">3.12.1.2. Navigation</a> 169 </p> 170 <p class="toc_h4"> 171 <a href="#3_12_1_3_tv_input_app_linking">3.12.1.3. TV input app linking</a> 172 </p> 173 <p class="toc_h4"> 174 <a href="#3_12_1_4_time_shifting">3.12.1.4. Time shifting</a> 175 </p> 176 <p class="toc_h4"> 177 <a href="#3_12_1_5_tv_recording">3.12.1.5. TV recording</a> 178 </p> 179 <p class="toc_h2"> 180 <a href="#3_13_quick_settings">3.13. Quick Settings</a> 181 </p> 182 <p class="toc_h2"> 183 <a href="#3_14_vehicle_ui_apis">3.14. Vehicle UI APIs</a> 184 </p> 185 <p class="toc_h3"> 186 <a href="#3_14_1__vehicle_media_ui">3.14.1. Vehicle Media UI</a> 187 </p> 188 <p class="toc_h1"> 189 <a href="#4_application_packaging_compatibility">4. Application Packaging Compatibility</a> 190 </p> 191 <p class="toc_h1"> 192 <a href="#5_multimedia_compatibility">5. Multimedia Compatibility</a> 193 </p> 194 <p class="toc_h2"> 195 <a href="#5_1_media_codecs">5.1. Media Codecs</a> 196 </p> 197 <p class="toc_h3"> 198 <a href="#5_1_1_audio_codecs">5.1.1. Audio Codecs</a> 199 </p> 200 <p class="toc_h3"> 201 <a href="#5_1_2_image_codecs">5.1.2. Image Codecs</a> 202 </p> 203 <p class="toc_h3"> 204 <a href="#5_1_3_video_codecs">5.1.3. Video Codecs</a> 205 </p> 206 <p class="toc_h2"> 207 <a href="#5_2_video_encoding">5.2. Video Encoding</a> 208 </p> 209 <p class="toc_h3"> 210 <a href="#5_2_1_h_263">5.2.1. H.263</a> 211 </p> 212 <p class="toc_h3"> 213 <a href="#5_2_2_h-264">5.2.2. H-264</a> 214 </p> 215 <p class="toc_h3"> 216 <a href="#5_2_3_vp8">5.2.3. VP8</a> 217 </p> 218 <p class="toc_h2"> 219 <a href="#5_3_video_decoding">5.3. Video Decoding</a> 220 </p> 221 </div> 222 <div style="clear: both; page-break-after:always; height:1px"></div> 223 <div id="toc_left"> 224 <p class="toc_h3"> 225 <a href="#5_3_1_mpeg-2">5.3.1. MPEG-2</a> 226 </p> 227 <p class="toc_h3"> 228 <a href="#5_3_2_h_263">5.3.2. H.263</a> 229 </p> 230 <p class="toc_h3"> 231 <a href="#5_3_3_mpeg-4">5.3.3. MPEG-4</a> 232 </p> 233 <p class="toc_h3"> 234 <a href="#5_3_4_h_264">5.3.4. H.264</a> 235 </p> 236 <p class="toc_h3"> 237 <a href="#5_3_5_h_265_(hevc)">5.3.5. H.265 (HEVC)</a> 238 </p> 239 <p class="toc_h3"> 240 <a href="#5_3_6_vp8">5.3.6. VP8</a> 241 </p> 242 <p class="toc_h3"> 243 <a href="#5_3_7_vp9">5.3.7. VP9</a> 244 </p> 245 <p class="toc_h2"> 246 <a href="#5_4_audio_recording">5.4. Audio Recording</a> 247 </p> 248 <p class="toc_h3"> 249 <a href="#5_4_1_raw_audio_capture">5.4.1. Raw Audio Capture</a> 250 </p> 251 <p class="toc_h3"> 252 <a href="#5_4_2_capture_for_voice_recognition">5.4.2. Capture for Voice Recognition</a> 253 </p> 254 <p class="toc_h3"> 255 <a href="#5_4_3_capture_for_rerouting_of_playback">5.4.3. Capture for Rerouting of Playback</a> 256 </p> 257 <p class="toc_h2"> 258 <a href="#5_5_audio_playback">5.5. Audio Playback</a> 259 </p> 260 <p class="toc_h3"> 261 <a href="#5_5_1_raw_audio_playback">5.5.1. Raw Audio Playback</a> 262 </p> 263 <p class="toc_h3"> 264 <a href="#5_5_2_audio_effects">5.5.2. Audio Effects</a> 265 </p> 266 <p class="toc_h3"> 267 <a href="#5_5_3_audio_output_volume">5.5.3. Audio Output Volume</a> 268 </p> 269 <p class="toc_h2"> 270 <a href="#5_6_audio_latency">5.6. Audio Latency</a> 271 </p> 272 <p class="toc_h2"> 273 <a href="#5_7_network_protocols">5.7. Network Protocols</a> 274 </p> 275 <p class="toc_h2"> 276 <a href="#5_8_secure_media">5.8. Secure Media</a> 277 </p> 278 <p class="toc_h2"> 279 <a href="#5_9_musical_instrument_digital_interface_(midi)">5.9. Musical Instrument Digital Interface (MIDI)</a> 280 </p> 281 <p class="toc_h2"> 282 <a href="#5_10_professional_audio">5.10. Professional Audio</a> 283 </p> 284 <p class="toc_h2"> 285 <a href="#5_11_capture_for_unprocessed">5.11. Capture for Unprocessed</a> 286 </p> 287 <p class="toc_h1"> 288 <a href="#6_developer_tools_and_options_compatibility">6. Developer Tools and Options Compatibility</a> 289 </p> 290 <p class="toc_h2"> 291 <a href="#6_1_developer_tools">6.1. Developer Tools</a> 292 </p> 293 <p class="toc_h2"> 294 <a href="#6_2_developer_options">6.2. Developer Options</a> 295 </p> 296 <p class="toc_h1"> 297 <a href="#7_hardware_compatibility">7. Hardware Compatibility</a> 298 </p> 299 <p class="toc_h2"> 300 <a href="#7_1_display_and_graphics">7.1. Display and Graphics</a> 301 </p> 302 <p class="toc_h3"> 303 <a href="#7_1_1_screen_configuration">7.1.1. Screen Configuration</a> 304 </p> 305 <p class="toc_h4"> 306 <a href="#7_1_1_1_screen_size">7.1.1.1. Screen Size</a> 307 </p> 308 <p class="toc_h4"> 309 <a href="#7_1_1_2_screen_aspect_ratio">7.1.1.2. Screen Aspect Ratio</a> 310 </p> 311 <p class="toc_h4"> 312 <a href="#7_1_1_3_screen_density">7.1.1.3. Screen Density</a> 313 </p> 314 <p class="toc_h3"> 315 <a href="#7_1_2_display_metrics">7.1.2. Display Metrics</a> 316 </p> 317 <p class="toc_h3"> 318 <a href="#7_1_3_screen_orientation">7.1.3. Screen Orientation</a> 319 </p> 320 <p class="toc_h3"> 321 <a href="#7_1_4_2d_and_3d_graphics_acceleration">7.1.4. 2D and 3D Graphics Acceleration</a> 322 </p> 323 <p class="toc_h3"> 324 <a href="#7_1_5_legacy_application_compatibility_mode">7.1.5. Legacy Application Compatibility Mode</a> 325 </p> 326 </div> 327 <div id="toc_right"> 328 <p class="toc_h3"> 329 <a href="#7_1_6_screen_technology">7.1.6. Screen Technology</a> 330 </p> 331 <p class="toc_h3"> 332 <a href="#7_1_7_secondary_displays">7.1.7. Secondary Displays</a> 333 </p> 334 <p class="toc_h2"> 335 <a href="#7_2_input_devices">7.2. Input Devices</a> 336 </p> 337 <p class="toc_h3"> 338 <a href="#7_2_1_keyboard">7.2.1. Keyboard</a> 339 </p> 340 <p class="toc_h3"> 341 <a href="#7_2_2_non-touch_navigation">7.2.2. Non-touch Navigation</a> 342 </p> 343 <p class="toc_h3"> 344 <a href="#7_2_3_navigation_keys">7.2.3. Navigation Keys</a> 345 </p> 346 <p class="toc_h3"> 347 <a href="#7_2_4_touchscreen_input">7.2.4. Touchscreen Input</a> 348 </p> 349 <p class="toc_h3"> 350 <a href="#7_2_5_fake_touch_input">7.2.5. Fake Touch Input</a> 351 </p> 352 <p class="toc_h3"> 353 <a href="#7_2_6_game_controller_support">7.2.6. Game Controller Support</a> 354 </p> 355 <p class="toc_h4"> 356 <a href="#7_2_6_1_button_mappings">7.2.6.1. Button Mappings</a> 357 </p> 358 <p class="toc_h3"> 359 <a href="#7_2_7_remote_control">7.2.7. Remote Control</a> 360 </p> 361 <p class="toc_h2"> 362 <a href="#7_3_sensors">7.3. Sensors</a> 363 </p> 364 <p class="toc_h3"> 365 <a href="#7_3_1_accelerometer">7.3.1. Accelerometer</a> 366 </p> 367 <p class="toc_h3"> 368 <a href="#7_3_2_magnetometer">7.3.2. Magnetometer</a> 369 </p> 370 <p class="toc_h3"> 371 <a href="#7_3_3_gps">7.3.3. GPS</a> 372 </p> 373 <p class="toc_h3"> 374 <a href="#7_3_4_gyroscope">7.3.4. Gyroscope</a> 375 </p> 376 <p class="toc_h3"> 377 <a href="#7_3_5_barometer">7.3.5. Barometer</a> 378 </p> 379 <p class="toc_h3"> 380 <a href="#7_3_6_thermometer">7.3.6. Thermometer</a> 381 </p> 382 <p class="toc_h3"> 383 <a href="#7_3_7_photometer">7.3.7. Photometer</a> 384 </p> 385 <p class="toc_h3"> 386 <a href="#7_3_8_proximity_sensor">7.3.8. Proximity Sensor</a> 387 </p> 388 <p class="toc_h3"> 389 <a href="#7_3_9_high_fidelity_sensors">7.3.9. High Fidelity Sensors</a> 390 </p> 391 <p class="toc_h3"> 392 <a href="#7_3_10_fingerprint_sensor">7.3.10. Fingerprint Sensor</a> 393 </p> 394 <p class="toc_h3"> 395 <a href="#7_3_11_android_automotive-only_sensors">7.3.11. Android Automotive-only sensors</a> 396 </p> 397 <p class="toc_h4"> 398 <a href="#7_3_11_1_current_gear">7.3.11.1. Current Gear</a> 399 </p> 400 <p class="toc_h4"> 401 <a href="#7_3_11_2_day_night_mode">7.3.11.2. Day Night Mode</a> 402 </p> 403 <p class="toc_h4"> 404 <a href="#7_3_11_3_driving_status">7.3.11.3. Driving Status</a> 405 </p> 406 <p class="toc_h4"> 407 <a href="#7_3_11_4_wheel_speed">7.3.11.4. Wheel Speed</a> 408 </p> 409 <p class="toc_h2"> 410 <a href="#7_3_12_pose_sensor">7.3.12. Pose Sensor</a> 411 </p> 412 <p class="toc_h2"> 413 <a href="#7_4_data_connectivity">7.4. Data Connectivity</a> 414 </p> 415 <p class="toc_h3"> 416 <a href="#7_4_1_telephony">7.4.1. Telephony</a> 417 </p> 418 <p class="toc_h4"> 419 <a href="#7_4_1_1_number_blocking_compatibility">7.4.1.1. Number Blocking Compatibility</a> 420 </p> 421 <p class="toc_h3"> 422 <a href="#7_4_2_ieee_802_11_(wi-fi)">7.4.2. IEEE 802.11 (Wi-Fi)</a> 423 </p> 424 <p class="toc_h4"> 425 <a href="#7_4_2_1_wi-fi_direct">7.4.2.1. Wi-Fi Direct</a> 426 </p> 427 <p class="toc_h4"> 428 <a href="#7_4_2_2_wi-fi_tunneled_direct_link_setup">7.4.2.2. Wi-Fi Tunneled Direct Link Setup</a> 429 </p> 430 </div> 431 <div style="clear: both; page-break-after:always; height:1px"></div> 432 <div id="toc_left"> 433 <p class="toc_h3"> 434 <a href="#7_4_3_bluetooth">7.4.3. Bluetooth</a> 435 </p> 436 <p class="toc_h3"> 437 <a href="#7_4_4_near-field_communications">7.4.4. Near-Field Communications</a> 438 </p> 439 <p class="toc_h3"> 440 <a href="#7_4_5_minimum_network_capability">7.4.5. Minimum Network Capability</a> 441 </p> 442 <p class="toc_h3"> 443 <a href="#7_4_6_sync_settings">7.4.6. Sync Settings</a> 444 </p> 445 <p class="toc_h3"> 446 <a href="#7_4_7_data_saver">7.4.7. Data Saver</a> 447 </p> 448 <p class="toc_h2"> 449 <a href="#7_5_cameras">7.5. Cameras</a> 450 </p> 451 <p class="toc_h3"> 452 <a href="#7_5_1_rear-facing_camera">7.5.1. Rear-Facing Camera</a> 453 </p> 454 <p class="toc_h3"> 455 <a href="#7_5_2_front-facing_camera">7.5.2. Front-Facing Camera</a> 456 </p> 457 <p class="toc_h3"> 458 <a href="#7_5_3_external_camera">7.5.3. External Camera</a> 459 </p> 460 <p class="toc_h3"> 461 <a href="#7_5_4_camera_api_behavior">7.5.4. Camera API Behavior</a> 462 </p> 463 <p class="toc_h3"> 464 <a href="#7_5_5_camera_orientation">7.5.5. Camera Orientation</a> 465 </p> 466 <p class="toc_h2"> 467 <a href="#7_6_memory_and_storage">7.6. Memory and Storage</a> 468 </p> 469 <p class="toc_h3"> 470 <a href="#7_6_1_minimum_memory_and_storage">7.6.1. Minimum Memory and Storage</a> 471 </p> 472 <p class="toc_h3"> 473 <a href="#7_6_2_application_shared_storage">7.6.2. Application Shared Storage</a> 474 </p> 475 <p class="toc_h3"> 476 <a href="#7_6_3_adoptable_storage">7.6.3. Adoptable Storage</a> 477 </p> 478 <p class="toc_h2"> 479 <a href="#7_7_usb">7.7. USB</a> 480 </p> 481 <p class="toc_h3"> 482 <a href="#7_7_1_usb_peripheral_mode">7.7.1. USB peripheral mode</a> 483 </p> 484 <p class="toc_h3"> 485 <a href="#7_7_2_usb_host_mode">7.7.2. USB host mode</a> 486 </p> 487 <p class="toc_h2"> 488 <a href="#7_8_audio">7.8. Audio</a> 489 </p> 490 <p class="toc_h3"> 491 <a href="#7_8_1_microphone">7.8.1. Microphone</a> 492 </p> 493 <p class="toc_h3"> 494 <a href="#7_8_2_audio_output">7.8.2. Audio Output</a> 495 </p> 496 <p class="toc_h4"> 497 <a href="#7_8_2_1_analog_audio_ports">7.8.2.1. Analog Audio Ports</a> 498 </p> 499 <p class="toc_h3"> 500 <a href="#7_8_3_near-ultrasound">7.8.3. Near-Ultrasound</a> 501 </p> 502 <p class="toc_h2"> 503 <a href="#7_9_virtual_reality">7.9. Virtual Reality</a> 504 </p> 505 <p class="toc_h3"> 506 <a href="#7_9_1_virtual_reality_mode">7.9.1. Virtual Reality Mode</a> 507 </p> 508 <p class="toc_h3"> 509 <a href="#7_9_2_virtual_reality_high_performance">7.9.2. Virtual Reality High Performance</a> 510 </p> 511 <p class="toc_h1"> 512 <a href="#8_performance_and_power">8. Performance and Power</a> 513 </p> 514 <p class="toc_h2"> 515 <a href="#8_1_user_experience_consistency">8.1. User Experience Consistency</a> 516 </p> 517 <p class="toc_h2"> 518 <a href="#8_2_file_i/o_access_performance">8.2. File I/O Access Performance</a> 519 </p> 520 <p class="toc_h2"> 521 <a href="#8_3_power-saving_modes">8.3. Power-Saving Modes</a> 522 </p> 523 <p class="toc_h2"> 524 <a href="#8_4_power_consumption_accounting">8.4. Power Consumption Accounting</a> 525 </p> 526 <p class="toc_h2"> 527 <a href="#8_5_consistent_performance">8.5. Consistent Performance</a> 528 </p> 529 <p class="toc_h1"> 530 <a href="#9_security_model_compatibility">9. Security Model Compatibility</a> 531 </p> 532 <p class="toc_h2"> 533 <a href="#9_1_permissions">9.1. Permissions</a> 534 </p> 535 </div> 536 <div id="toc_right"> 537 <p class="toc_h2"> 538 <a href="#9_2_uid_and_process_isolation">9.2. UID and Process Isolation</a> 539 </p> 540 <p class="toc_h2"> 541 <a href="#9_3_filesystem_permissions">9.3. Filesystem Permissions</a> 542 </p> 543 <p class="toc_h2"> 544 <a href="#9_4_alternate_execution_environments">9.4. Alternate Execution Environments</a> 545 </p> 546 <p class="toc_h2"> 547 <a href="#9_5_multi-user_support">9.5. Multi-User Support</a> 548 </p> 549 <p class="toc_h2"> 550 <a href="#9_6_premium_sms_warning">9.6. Premium SMS Warning</a> 551 </p> 552 <p class="toc_h2"> 553 <a href="#9_7_kernel_security_features">9.7. Kernel Security Features</a> 554 </p> 555 <p class="toc_h2"> 556 <a href="#9_8_privacy">9.8. Privacy</a> 557 </p> 558 <p class="toc_h2"> 559 <a href="#9_9_data_storage_encryption">9.9. Data Storage Encryption</a> 560 </p> 561 <p class="toc_h3"> 562 <a href="#9_9_1_direct_boot">9.9.1. Direct Boot</a> 563 </p> 564 <p class="toc_h3"> 565 <a href="#9_9_2_file_based_encryption">9.9.2. File Based Encryption</a> 566 </p> 567 <p class="toc_h3"> 568 <a href="#9_9_3_full_disk_encryption">9.9.3. Full Disk Encryption</a> 569 </p> 570 <p class="toc_h2"> 571 <a href="#9_10_device_integrity">9.10. Device Integrity</a> 572 </p> 573 <p class="toc_h2"> 574 <a href="#9_11_keys_and_credentials">9.11. Keys and Credentials</a> 575 </p> 576 <p class="toc_h3"> 577 <a href="#9_11_1_secure_lock_screen">9.11.1. Secure Lock Screen</a> 578 </p> 579 <p class="toc_h2"> 580 <a href="#9_12_data_deletion">9.12. Data Deletion</a> 581 </p> 582 <p class="toc_h2"> 583 <a href="#9_13_safe_boot_mode">9.13. Safe Boot Mode</a> 584 </p> 585 <p class="toc_h2"> 586 <a href="#9_14_automotive_vehicle_system_isolation">9.14. Automotive Vehicle System Isolation</a> 587 </p> 588 <p class="toc_h1"> 589 <a href="#10_software_compatibility_testing">10. Software Compatibility Testing</a> 590 </p> 591 <p class="toc_h2"> 592 <a href="#10_1_compatibility_test_suite">10.1. Compatibility Test Suite</a> 593 </p> 594 <p class="toc_h2"> 595 <a href="#10_2_cts_verifier">10.2. CTS Verifier</a> 596 </p> 597 <p class="toc_h1"> 598 <a href="#11_updatable_software">11. Updatable Software</a> 599 </p> 600 <p class="toc_h1"> 601 <a href="#12_document_changelog">12. Document Changelog</a> 602 </p> 603 <p class="toc_h2"> 604 <a href="#12_1_changelog_viewing_tips">12.1. Changelog Viewing Tips</a> 605 </p> 606 <p class="toc_h1"> 607 <a href="#13_contact_us">13. Contact Us</a> 608 </p> 609 </div> 610 <div style="clear: both; page-break-after:always; height:1px"></div> 611 <div style="clear: both"></div> 612 </div> 613 <div id="main"> 614 <h1 id="1_introduction"> 615 1. Introduction 616 </h1> 617 <p> 618 This document enumerates the requirements that must be met in order for devices to be compatible with Android 7.1. 619 </p> 620 <p> 621 The use of MUST, MUST NOT, REQUIRED, SHALL, SHALL NOT, SHOULD, SHOULD NOT, RECOMMENDED, MAY, and OPTIONAL is per the IETF standard defined in <a href="http://www.ietf.org/rfc/rfc2119.txt">RFC2119</a> . 622 </p> 623 <p> 624 As used in this document, a device implementer or implementer is a person or organization developing a hardware/software solution running Android 7.1. A device implementation or implementation is the hardware/software solution so developed. 625 </p> 626 <p> 627 To be considered compatible with Android 7.1, device implementations MUST meet the requirements presented in this Compatibility Definition, including any documents incorporated via reference. 628 </p> 629 <p> 630 Where this definition or the software tests described in <a href="#10_software_compatibility_testing">section 10</a> is silent, ambiguous, or incomplete, it is the responsibility of the device implementer to ensure compatibility with existing implementations. 631 </p> 632 <p> 633 For this reason, the <a href="http://source.android.com/">Android Open Source Project</a> is both the reference and preferred implementation of Android. Device implementers are STRONGLY RECOMMENDED to base their implementations to the greatest extent possible on the upstream source code available from the Android Open Source Project. While some components can hypothetically be replaced with alternate implementations, it is STRONGLY RECOMMENDED to not follow this practice, as passing the software tests will become substantially more difficult. It is the implementers responsibility to ensure full behavioral compatibility with the standard Android implementation, including and beyond the Compatibility Test Suite. Finally, note that certain component substitutions and modifications are explicitly forbidden by this document. 634 </p> 635 <p> 636 Many of the resources linked to in this document are derived directly or indirectly from the Android SDK and will be functionally identical to the information in that SDKs documentation. In any cases where this Compatibility Definition or the Compatibility Test Suite disagrees with the SDK documentation, the SDK documentation is considered authoritative. Any technical details provided in the linked resources throughout this document are considered by inclusion to be part of this Compatibility Definition. 637 </p> 638 <h1 id="2_device_types"> 639 2. Device Types 640 </h1> 641 <p> 642 While the Android Open Source Project has been used in the implementation of a variety of device types and form factors, many aspects of the architecture and compatibility requirements were optimized for handheld devices. Starting from Android 5.0, the Android Open Source Project aims to embrace a wider variety of device types as described in this section. 643 </p> 644 <p> 645 <strong>Android Handheld device</strong> refers to an Android device implementation that is typically used by holding it in the hand, such as mp3 players, phones, and tablets. Android Handheld device implementations: 646 </p> 647 <ul> 648 <li>MUST have a touchscreen embedded in the device. 649 </li> 650 <li>MUST have a power source that provides mobility, such as a battery. 651 </li> 652 </ul> 653 <p> 654 <strong>Android Television device</strong> refers to an Android device implementation that is an entertainment interface for consuming digital media, movies, games, apps, and/or live TV for users sitting about ten feet away (a lean back or 10-foot user interface). Android Television devices: 655 </p> 656 <ul> 657 <li>MUST have an embedded screen OR include a video output port, such as VGA, HDMI, or a wireless port for display. 658 </li> 659 <li>MUST declare the features <a href="http://developer.android.com/reference/android/content/pm/PackageManager.html#FEATURE_LEANBACK">android.software.leanback</a> and android.hardware.type.television. 660 </li> 661 </ul> 662 <p> 663 <strong>Android Watch device</strong> refers to an Android device implementation intended to be worn on the body, perhaps on the wrist, and: 664 </p> 665 <ul> 666 <li>MUST have a screen with the physical diagonal length in the range from 1.1 to 2.5 inches. 667 </li> 668 <li>MUST declare the feature android.hardware.type.watch. 669 </li> 670 <li>MUST support uiMode = <a href="http://developer.android.com/reference/android/content/res/Configuration.html#UI_MODE_TYPE_WATCH">UI_MODE_TYPE_WATCH</a> . 671 </li> 672 </ul> 673 <p> 674 <strong>Android Automotive implementation</strong> refers to a vehicle head unit running Android as an operating system for part or all of the system and/or infotainment functionality. Android Automotive implementations: 675 </p> 676 <ul> 677 <li>MUST have a screen with the physical diagonal length equal to or greater than 6 inches. 678 </li> 679 <li>MUST declare the feature android.hardware.type.automotive. 680 </li> 681 <li>MUST support uiMode = <a href="http://developer.android.com/reference/android/content/res/Configuration.html#UI_MODE_TYPE_CAR">UI_MODE_TYPE_CAR</a> . 682 </li> 683 <li>Android Automotive implementations MUST support all public APIs in the <code>android.car.*</code> namespace. 684 </li> 685 </ul> 686 <p> 687 All Android device implementations that do not fit into any of the above device types still MUST meet all requirements in this document to be Android 7.1 compatible, unless the requirement is explicitly described to be only applicable to a specific Android device type from above. 688 </p> 689 <h2 id="2_1_device_configurations"> 690 2.1 Device Configurations 691 </h2> 692 <p> 693 This is a summary of major differences in hardware configuration by device type. (Empty cells denote a MAY). Not all configurations are covered in this table; see relevant hardware sections for more detail. 694 </p> 695 <table> 696 <tr> 697 <th> 698 Category 699 </th> 700 <th> 701 Feature 702 </th> 703 <th> 704 Section 705 </th> 706 <th> 707 Handheld 708 </th> 709 <th> 710 Television 711 </th> 712 <th> 713 Watch 714 </th> 715 <th> 716 Automotive 717 </th> 718 <th> 719 Other 720 </th> 721 </tr> 722 <tr> 723 <td rowspan="3"> 724 Input 725 </td> 726 <td> 727 D-pad 728 </td> 729 <td> 730 <a href="#7_2_2_non-touch-navigation">7.2.2. Non-touch Navigation</a> 731 </td> 732 <td></td> 733 <td> 734 MUST 735 </td> 736 <td></td> 737 <td></td> 738 <td></td> 739 </tr> 740 <tr> 741 <td> 742 Touchscreen 743 </td> 744 <td> 745 <a href="#7_2_4_touchscreen_input">7.2.4. Touchscreen input</a> 746 </td> 747 <td> 748 MUST 749 </td> 750 <td></td> 751 <td> 752 MUST 753 </td> 754 <td></td> 755 <td> 756 SHOULD 757 </td> 758 </tr> 759 <tr> 760 <td> 761 Microphone 762 </td> 763 <td> 764 <a href="#7_8_1_microphone">7.8.1. Microphone</a> 765 </td> 766 <td> 767 MUST 768 </td> 769 <td> 770 SHOULD 771 </td> 772 <td> 773 MUST 774 </td> 775 <td> 776 MUST 777 </td> 778 <td> 779 SHOULD 780 </td> 781 </tr> 782 <tr> 783 <td rowspan="2"> 784 Sensors 785 </td> 786 <td> 787 Accelerometer 788 </td> 789 <td> 790 <a href="#7_3_1_accelerometer">7.3.1 Accelerometer</a> 791 </td> 792 <td> 793 SHOULD 794 </td> 795 <td></td> 796 <td> 797 SHOULD 798 </td> 799 <td></td> 800 <td> 801 SHOULD 802 </td> 803 </tr> 804 <tr> 805 <td> 806 GPS 807 </td> 808 <td> 809 <a href="#7_3_3_gps">7.3.3. GPS</a> 810 </td> 811 <td> 812 SHOULD 813 </td> 814 <td></td> 815 <td></td> 816 <td> 817 SHOULD 818 </td> 819 <td></td> 820 </tr> 821 <tr> 822 <td rowspan="6"> 823 Connectivity 824 </td> 825 <td> 826 Wi-Fi 827 </td> 828 <td> 829 <a href="#7_4_2_ieee_802.11">7.4.2. IEEE 802.11</a> 830 </td> 831 <td> 832 SHOULD 833 </td> 834 <td> 835 SHOULD 836 </td> 837 <td></td> 838 <td> 839 SHOULD 840 </td> 841 <td> 842 SHOULD 843 </td> 844 </tr> 845 <tr> 846 <td> 847 Wi-Fi Direct 848 </td> 849 <td> 850 <a href="#7_4_2_1_wi-fi-direct">7.4.2.1. Wi-Fi Direct</a> 851 </td> 852 <td> 853 SHOULD 854 </td> 855 <td> 856 SHOULD 857 </td> 858 <td></td> 859 <td></td> 860 <td> 861 SHOULD 862 </td> 863 </tr> 864 <tr> 865 <td> 866 Bluetooth 867 </td> 868 <td> 869 <a href="#7_4_3_bluetooth">7.4.3. Bluetooth</a> 870 </td> 871 <td> 872 SHOULD 873 </td> 874 <td> 875 MUST 876 </td> 877 <td> 878 MUST 879 </td> 880 <td> 881 MUST 882 </td> 883 <td> 884 SHOULD 885 </td> 886 </tr> 887 <tr> 888 <td> 889 Bluetooth Low Energy 890 </td> 891 <td> 892 <a href="#7_4_3_bluetooth">7.4.3. Bluetooth</a> 893 </td> 894 <td> 895 SHOULD 896 </td> 897 <td> 898 MUST 899 </td> 900 <td> 901 SHOULD 902 </td> 903 <td> 904 SHOULD 905 </td> 906 <td> 907 SHOULD 908 </td> 909 </tr> 910 <tr> 911 <td> 912 Cellular radio 913 </td> 914 <td> 915 <a href="#7_4_5_minimum_network_capability">7.4.5. Minimum Network Capability</a> 916 </td> 917 <td></td> 918 <td></td> 919 <td></td> 920 <td> 921 SHOULD 922 </td> 923 <td></td> 924 </tr> 925 <tr> 926 <td> 927 USB peripheral/host mode 928 </td> 929 <td> 930 <a href="#7_7_usb">7.7. USB</a> 931 </td> 932 <td> 933 SHOULD 934 </td> 935 <td></td> 936 <td></td> 937 <td> 938 SHOULD 939 </td> 940 <td> 941 SHOULD 942 </td> 943 </tr> 944 <tr> 945 <td> 946 Output 947 </td> 948 <td> 949 Speaker and/or Audio output ports 950 </td> 951 <td> 952 <a href="#7_8_2_audio_output">7.8.2. Audio Output</a> 953 </td> 954 <td> 955 MUST 956 </td> 957 <td> 958 MUST 959 </td> 960 <td></td> 961 <td> 962 MUST 963 </td> 964 <td> 965 MUST 966 </td> 967 </tr> 968 </table> 969 <h1 id="3_software"> 970 3. Software 971 </h1> 972 <h2 id="3_1_managed_api_compatibility"> 973 3.1. Managed API Compatibility 974 </h2> 975 <p> 976 The managed Dalvik bytecode execution environment is the primary vehicle for Android applications. The Android application programming interface (API) is the set of Android platform interfaces exposed to applications running in the managed runtime environment. Device implementations MUST provide complete implementations, including all documented behaviors, of any documented API exposed by the <a href="http://developer.android.com/reference/packages.html">Android SDK</a> or any API decorated with the @SystemApi marker in the upstream Android source code. 977 </p> 978 <p> 979 Device implementations MUST support/preserve all classes, methods, and associated elements marked by the TestApi annotation (@TestApi). 980 </p> 981 <p> 982 Device implementations MUST NOT omit any managed APIs, alter API interfaces or signatures, deviate from the documented behavior, or include no-ops, except where specifically allowed by this Compatibility Definition. 983 </p> 984 <p> 985 This Compatibility Definition permits some types of hardware for which Android includes APIs to be omitted by device implementations. In such cases, the APIs MUST still be present and behave in a reasonable way. See <a href="#7_hardware_compatibility">section 7</a> for specific requirements for this scenario. 986 </p> 987 <h2 id="3_1_1_android_extensions"> 988 3.1.1. Android Extensions 989 </h2> 990 <p> 991 Android includes the support of extending the managed APIs while keeping the same API level version. Android device implementations MUST preload the AOSP implementation of both the shared library <code>ExtShared</code> and services <code>ExtServices</code> with versions higher than or equal to the minimum versions allowed per each API level. For example, Android 7.0 device implementations, running API level 24 MUST include at least version 1. 992 </p> 993 <h2 id="3_2_soft_api_compatibility"> 994 3.2. Soft API Compatibility 995 </h2> 996 <p> 997 In addition to the managed APIs from <a href="#3_1_managed_api_compatibility">section 3.1</a> , Android also includes a significant runtime-only soft API, in the form of such things as intents, permissions, and similar aspects of Android applications that cannot be enforced at application compile time. 998 </p> 999 <h3 id="3_2_1_permissions"> 1000 3.2.1. Permissions 1001 </h3> 1002 <p> 1003 Device implementers MUST support and enforce all permission constants as documented by the <a href="http://developer.android.com/reference/android/Manifest.permission.html">Permission reference page</a> . Note that <a href="#9_security_model_compatibility">section 9</a> lists additional requirements related to the Android security model. 1004 </p> 1005 <h3 id="3_2_2_build_parameters"> 1006 3.2.2. Build Parameters 1007 </h3> 1008 <p> 1009 The Android APIs include a number of constants on the <a href="http://developer.android.com/reference/android/os/Build.html">android.os.Build class</a> that are intended to describe the current device. To provide consistent, meaningful values across device implementations, the table below includes additional restrictions on the formats of these values to which device implementations MUST conform. 1010 </p> 1011 <table> 1012 <tr> 1013 <th> 1014 Parameter 1015 </th> 1016 <th> 1017 Details 1018 </th> 1019 </tr> 1020 <tr> 1021 <td> 1022 VERSION.RELEASE 1023 </td> 1024 <td> 1025 The version of the currently-executing Android system, in human-readable format. This field MUST have one of the string values defined in <a href="http://source.android.com/compatibility/7.1/versions.html">7.1</a> . 1026 </td> 1027 </tr> 1028 <tr> 1029 <td> 1030 VERSION.SDK 1031 </td> 1032 <td> 1033 The version of the currently-executing Android system, in a format accessible to third-party application code. For Android 7.1, this field MUST have the integer value 7.1_INT. 1034 </td> 1035 </tr> 1036 <tr> 1037 <td> 1038 VERSION.SDK_INT 1039 </td> 1040 <td> 1041 The version of the currently-executing Android system, in a format accessible to third-party application code. For Android 7.1, this field MUST have the integer value 7.1_INT. 1042 </td> 1043 </tr> 1044 <tr> 1045 <td> 1046 VERSION.INCREMENTAL 1047 </td> 1048 <td> 1049 A value chosen by the device implementer designating the specific build of the currently-executing Android system, in human-readable format. This value MUST NOT be reused for different builds made available to end users. A typical use of this field is to indicate which build number or source-control change identifier was used to generate the build. There are no requirements on the specific format of this field, except that it MUST NOT be null or the empty string (""). 1050 </td> 1051 </tr> 1052 <tr> 1053 <td> 1054 BOARD 1055 </td> 1056 <td> 1057 A value chosen by the device implementer identifying the specific internal hardware used by the device, in human-readable format. A possible use of this field is to indicate the specific revision of the board powering the device. The value of this field MUST be encodable as 7-bit ASCII and match the regular expression ^[a-zA-Z0-9_-]+$. 1058 </td> 1059 </tr> 1060 <tr> 1061 <td> 1062 BRAND 1063 </td> 1064 <td> 1065 A value reflecting the brand name associated with the device as known to the end users. MUST be in human-readable format and SHOULD represent the manufacturer of the device or the company brand under which the device is marketed. The value of this field MUST be encodable as 7-bit ASCII and match the regular expression ^[a-zA-Z0-9_-]+$. 1066 </td> 1067 </tr> 1068 <tr> 1069 <td> 1070 SUPPORTED_ABIS 1071 </td> 1072 <td> 1073 The name of the instruction set (CPU type + ABI convention) of native code. See <a href="#3_3_native_api_compatibility">section 3.3. Native API Compatibility</a> . 1074 </td> 1075 </tr> 1076 <tr> 1077 <td> 1078 SUPPORTED_32_BIT_ABIS 1079 </td> 1080 <td> 1081 The name of the instruction set (CPU type + ABI convention) of native code. See <a href="#3_3_native_api_compatibility">section 3.3. Native API Compatibility</a> . 1082 </td> 1083 </tr> 1084 <tr> 1085 <td> 1086 SUPPORTED_64_BIT_ABIS 1087 </td> 1088 <td> 1089 The name of the second instruction set (CPU type + ABI convention) of native code. See <a href="#3_3_native_api_compatibility">section 3.3. Native API Compatibility</a> . 1090 </td> 1091 </tr> 1092 <tr> 1093 <td> 1094 CPU_ABI 1095 </td> 1096 <td> 1097 The name of the instruction set (CPU type + ABI convention) of native code. See <a href="#3_3_native_api_compatibility">section 3.3. Native API Compatibility</a> . 1098 </td> 1099 </tr> 1100 <tr> 1101 <td> 1102 CPU_ABI2 1103 </td> 1104 <td> 1105 The name of the second instruction set (CPU type + ABI convention) of native code. See <a href="#3_3_native_api_compatibility">section 3.3. Native API Compatibility</a> . 1106 </td> 1107 </tr> 1108 <tr> 1109 <td> 1110 DEVICE 1111 </td> 1112 <td> 1113 A value chosen by the device implementer containing the development name or code name identifying the configuration of the hardware features and industrial design of the device. The value of this field MUST be encodable as 7-bit ASCII and match the regular expression ^[a-zA-Z0-9_-]+$. This device name MUST NOT change during the lifetime of the product. 1114 </td> 1115 </tr> 1116 <tr> 1117 <td> 1118 FINGERPRINT 1119 </td> 1120 <td> 1121 A string that uniquely identifies this build. It SHOULD be reasonably human-readable. It MUST follow this template: 1122 <p class="small"> 1123 $(BRAND)/$(PRODUCT)/<br /> 1124 $(DEVICE):$(VERSION.RELEASE)/$(ID)/$(VERSION.INCREMENTAL):$(TYPE)/$(TAGS) 1125 </p> 1126 <p> 1127 For example: 1128 </p> 1129 <p class="small"> 1130 acme/myproduct/<br /> 1131 mydevice:7.1/LMYXX/3359:userdebug/test-keys 1132 </p> 1133 <p> 1134 The fingerprint MUST NOT include whitespace characters. If other fields included in the template above have whitespace characters, they MUST be replaced in the build fingerprint with another character, such as the underscore ("_") character. The value of this field MUST be encodable as 7-bit ASCII. 1135 </p> 1136 </td> 1137 </tr> 1138 <tr> 1139 <td> 1140 HARDWARE 1141 </td> 1142 <td> 1143 The name of the hardware (from the kernel command line or /proc). It SHOULD be reasonably human-readable. The value of this field MUST be encodable as 7-bit ASCII and match the regular expression ^[a-zA-Z0-9_-]+$. 1144 </td> 1145 </tr> 1146 <tr> 1147 <td> 1148 HOST 1149 </td> 1150 <td> 1151 A string that uniquely identifies the host the build was built on, in human-readable format. There are no requirements on the specific format of this field, except that it MUST NOT be null or the empty string (""). 1152 </td> 1153 </tr> 1154 <tr> 1155 <td> 1156 ID 1157 </td> 1158 <td> 1159 An identifier chosen by the device implementer to refer to a specific release, in human-readable format. This field can be the same as android.os.Build.VERSION.INCREMENTAL, but SHOULD be a value sufficiently meaningful for end users to distinguish between software builds. The value of this field MUST be encodable as 7-bit ASCII and match the regular expression ^[a-zA-Z0-9._-]+$. 1160 </td> 1161 </tr> 1162 <tr> 1163 <td> 1164 MANUFACTURER 1165 </td> 1166 <td> 1167 The trade name of the Original Equipment Manufacturer (OEM) of the product. There are no requirements on the specific format of this field, except that it MUST NOT be null or the empty string (""). 1168 </td> 1169 </tr> 1170 <tr> 1171 <td> 1172 MODEL 1173 </td> 1174 <td> 1175 A value chosen by the device implementer containing the name of the device as known to the end user. This SHOULD be the same name under which the device is marketed and sold to end users. There are no requirements on the specific format of this field, except that it MUST NOT be null or the empty string (""). 1176 </td> 1177 </tr> 1178 <tr> 1179 <td> 1180 PRODUCT 1181 </td> 1182 <td> 1183 A value chosen by the device implementer containing the development name or code name of the specific product (SKU) that MUST be unique within the same brand. MUST be human-readable, but is not necessarily intended for view by end users. The value of this field MUST be encodable as 7-bit ASCII and match the regular expression ^[a-zA-Z0-9_-]+$. This product name MUST NOT change during the lifetime of the product. 1184 </td> 1185 </tr> 1186 <tr> 1187 <td> 1188 SERIAL 1189 </td> 1190 <td> 1191 A hardware serial number, which MUST be available and unique across devices with the same MODEL and MANUFACTURER. The value of this field MUST be encodable as 7-bit ASCII and match the regular expression ^([a-zA-Z0-9]{6,20})$. 1192 </td> 1193 </tr> 1194 <tr> 1195 <td> 1196 TAGS 1197 </td> 1198 <td> 1199 A comma-separated list of tags chosen by the device implementer that further distinguishes the build. This field MUST have one of the values corresponding to the three typical Android platform signing configurations: release-keys, dev-keys, test-keys. 1200 </td> 1201 </tr> 1202 <tr> 1203 <td> 1204 TIME 1205 </td> 1206 <td> 1207 A value representing the timestamp of when the build occurred. 1208 </td> 1209 </tr> 1210 <tr> 1211 <td> 1212 TYPE 1213 </td> 1214 <td> 1215 A value chosen by the device implementer specifying the runtime configuration of the build. This field MUST have one of the values corresponding to the three typical Android runtime configurations: user, userdebug, or eng. 1216 </td> 1217 </tr> 1218 <tr> 1219 <td> 1220 USER 1221 </td> 1222 <td> 1223 A name or user ID of the user (or automated user) that generated the build. There are no requirements on the specific format of this field, except that it MUST NOT be null or the empty string (""). 1224 </td> 1225 </tr> 1226 <tr> 1227 <td> 1228 SECURITY_PATCH 1229 </td> 1230 <td> 1231 A value indicating the security patch level of a build. It MUST signify that the build includes all security patches issued up through the designated Android Public Security Bulletin. It MUST be in the format [YYYY-MM-DD], matching one of the Android Security Patch Level strings of the <a href="source.android.com/security/bulletin">Public Security Bulletins</a> , for example "2015-11-01". 1232 </td> 1233 </tr> 1234 <tr> 1235 <td> 1236 BASE_OS 1237 </td> 1238 <td> 1239 A value representing the FINGERPRINT parameter of the build that is otherwise identical to this build except for the patches provided in the Android Public Security Bulletin. It MUST report the correct value and if such a build does not exist, report an empty string (""). 1240 </td> 1241 </tr> 1242 </table> 1243 <h3 id="3_2_3_intent_compatibility"> 1244 3.2.3. Intent Compatibility 1245 </h3> 1246 <h4 id="3_2_3_1_core_application_intents"> 1247 3.2.3.1. Core Application Intents 1248 </h4> 1249 <p> 1250 Android intents allow application components to request functionality from other Android components. The Android upstream project includes a list of applications considered core Android applications, which implements several intent patterns to perform common actions. The core Android applications are: 1251 </p> 1252 <ul> 1253 <li>Desk Clock 1254 </li> 1255 <li>Browser 1256 </li> 1257 <li>Calendar 1258 </li> 1259 <li>Contacts 1260 </li> 1261 <li>Gallery 1262 </li> 1263 <li>GlobalSearch 1264 </li> 1265 <li>Launcher 1266 </li> 1267 <li>Music 1268 </li> 1269 <li>Settings 1270 </li> 1271 </ul> 1272 <p> 1273 Device implementations MUST include the core Android applications as appropriate or a component implementing the same intent patterns defined by all the Activity or Service components of these core Android applications exposed to other applications, implicitly or explicitly, through the <code>android:exported</code> attribute. 1274 </p> 1275 <h4 id="3_2_3_2_intent_resolution"> 1276 3.2.3.2. Intent Resolution 1277 </h4> 1278 <p> 1279 As Android is an extensible platform, device implementations MUST allow each intent pattern referenced in <a href="#3_2_3_1_core_application_intents">section 3.2.3.1</a> to be overridden by third-party applications. The upstream Android open source implementation allows this by default; device implementers MUST NOT attach special privileges to system applications' use of these intent patterns, or prevent third-party applications from binding to and assuming control of these patterns. This prohibition specifically includes but is not limited to disabling the Chooser user interface that allows the user to select between multiple applications that all handle the same intent pattern. 1280 </p> 1281 <p> 1282 Device implementations MUST provide a user interface for users to modify the default activity for intents. 1283 </p> 1284 <p> 1285 However, device implementations MAY provide default activities for specific URI patterns (e.g. http://play.google.com) when the default activity provides a more specific attribute for the data URI. For example, an intent filter pattern specifying the data URI http://www.android.com is more specific than the browser's core intent pattern for http://. 1286 </p> 1287 <p> 1288 Android also includes a mechanism for third-party apps to declare an authoritative default <a href="https://developer.android.com/training/app-links">app linking behavior</a> for certain types of web URI intents. When such authoritative declarations are defined in an app's intent filter patterns, device implementations: 1289 </p> 1290 <ul> 1291 <li>MUST attempt to validate any intent filters by performing the validation steps defined in the <a href="https://developers.google.com/digital-asset-links">Digital Asset Links specification</a> as implemented by the Package Manager in the upstream Android Open Source Project. 1292 </li> 1293 <li>MUST attempt validation of the intent filters during the installation of the application and set all successfully validated UIR intent filters as default app handlers for their UIRs. 1294 </li> 1295 <li>MAY set specific URI intent filters as default app handlers for their URIs, if they are successfully verified but other candidate URI filters fail verification. If a device implementation does this, it MUST provide the user appropriate per-URI pattern overrides in the settings menu. 1296 </li> 1297 <li>MUST provide the user with per-app App Links controls in Settings as follows: 1298 <ul> 1299 <li>The user MUST be able to override holistically the default app links behavior for an app to be: always open, always ask, or never open, which must apply to all candidate URI intent filters equally. 1300 </li> 1301 <li>The user MUST be able to see a list of the candidate URI intent filters. 1302 </li> 1303 <li>The device implementation MAY provide the user with the ability to override specific candidate URI intent filters that were successfully verified, on a per-intent filter basis. 1304 </li> 1305 <li>The device implementation MUST provide users with the ability to view and override specific candidate URI intent filters if the device implementation lets some candidate URI intent filters succeed verification while some others can fail. 1306 </li> 1307 </ul> 1308 </li> 1309 </ul> 1310 <h4 id="3_2_3_3_intent_namespaces"> 1311 3.2.3.3. Intent Namespaces 1312 </h4> 1313 <p> 1314 Device implementations MUST NOT include any Android component that honors any new intent or broadcast intent patterns using an ACTION, CATEGORY, or other key string in the android. <em>or com.android.</em> namespace. Device implementers MUST NOT include any Android components that honor any new intent or broadcast intent patterns using an ACTION, CATEGORY, or other key string in a package space belonging to another organization. Device implementers MUST NOT alter or extend any of the intent patterns used by the core apps listed in <a href="#3_2_3_1_core_application_intents">section 3.2.3.1</a> . Device implementations MAY include intent patterns using namespaces clearly and obviously associated with their own organization. This prohibition is analogous to that specified for Java language classes in <a href="#3_6_api_namespaces">section 3.6</a> . 1315 </p> 1316 <h4 id="3_2_3_4_broadcast_intents"> 1317 3.2.3.4. Broadcast Intents 1318 </h4> 1319 <p> 1320 Third-party applications rely on the platform to broadcast certain intents to notify them of changes in the hardware or software environment. Android-compatible devices MUST broadcast the public broadcast intents in response to appropriate system events. Broadcast intents are described in the SDK documentation. 1321 </p> 1322 <h4 id="3_2_3_5_default_app_settings"> 1323 3.2.3.5. Default App Settings 1324 </h4> 1325 <p> 1326 Android includes settings that provide users an easy way to select their default applications, for example for Home screen or SMS. Where it makes sense, device implementations MUST provide a similar settings menu and be compatible with the intent filter pattern and API methods described in the SDK documentation as below. 1327 </p> 1328 <p> 1329 Device implementations: 1330 </p> 1331 <ul> 1332 <li>MUST honor the <a href="http://developer.android.com/reference/android/provider/Settings.html#ACTION_HOME_SETTINGS">android.settings.HOME_SETTINGS</a> intent to show a default app settings menu for Home Screen, if the device implementation reports android.software.home_screen. 1333 </li> 1334 <li>MUST provide a settings menu that will call the <a href="http://developer.android.com/reference/android/provider/Telephony.Sms.Intents.html">android.provider.Telephony.ACTION_CHANGE_DEFAULT</a> intent to show a dialog to change the default SMS application, if the device implementation reports android.hardware.telephony. 1335 </li> 1336 <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> intent to show a default app settings menu for Tap and Pay, if the device implementation reports android.hardware.nfc.hce. 1337 </li> 1338 <li>MUST honor the <a href="https://developer.android.com/reference/android/telecom/TelecomManager.html#ACTION_CHANGE_DEFAULT_DIALER">android.telecom.action.CHANGE_DEFAULT_DIALER</a> intent to show a dialog to allow the user to change the default Phone application, if the device implementation reports <code>android.hardware.telephony</code> . 1339 </li> 1340 <li>MUST honor the <a href="https://developer.android.com/reference/android/provider/Settings.html#ACTION_VOICE_INPUT_SETTINGS">android.settings.ACTION_VOICE_INPUT_SETTINGS</a> intent when the device supports the VoiceInteractionService and show a default app settings menu for voice input and assist. 1341 </li> 1342 </ul> 1343 <h2 id="3_3_native_api_compatibility"> 1344 3.3. Native API Compatibility 1345 </h2> 1346 <p> 1347 Native code compatibility is challenging. For this reason, device implementers are <strong>STRONGLY RECOMMENDED</strong> to use the implementations of the libraries listed below from the upstream Android Open Source Project. 1348 </p> 1349 <h3 id="3_3_1_application_binary_interfaces"> 1350 3.3.1. Application Binary Interfaces 1351 </h3> 1352 <p> 1353 Managed Dalvik bytecode can call into native code provided in the application .apk file as an ELF .so file compiled for the appropriate device hardware architecture. As native code is highly dependent on the underlying processor technology, Android defines a number of Application Binary Interfaces (ABIs) in the Android NDK. Device implementations MUST be compatible with one or more defined ABIs, and MUST implement compatibility with the Android NDK, as below. 1354 </p> 1355 <p> 1356 If a device implementation includes support for an Android ABI, it: 1357 </p> 1358 <ul> 1359 <li>MUST include support for code running in the managed environment to call into native code, using the standard Java Native Interface (JNI) semantics. 1360 </li> 1361 <li>MUST be source-compatible (i.e. header compatible) and binary-compatible (for the ABI) with each required library in the list below. 1362 </li> 1363 <li>MUST support the equivalent 32-bit ABI if any 64-bit ABI is supported. 1364 </li> 1365 <li>MUST accurately report the native Application Binary Interface (ABI) supported by the device, via the android.os.Build.SUPPORTED_ABIS, android.os.Build.SUPPORTED_32_BIT_ABIS, and android.os.Build.SUPPORTED_64_BIT_ABIS parameters, each a comma separated list of ABIs ordered from the most to the least preferred one. 1366 </li> 1367 <li>MUST report, via the above parameters, only those ABIs documented and described in the latest version of the <a href="https://developer.android.com/ndk/guides/abis.html">Android NDK ABI Management documentation</a> , and MUST include support for the <a href="http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0388f/Beijfcja.html">Advanced SIMD</a> (a.k.a. NEON) extension. 1368 </li> 1369 <li>SHOULD be built using the source code and header files available in the upstream Android Open Source Project 1370 </li> 1371 </ul> 1372 <p> 1373 Note that future releases of the Android NDK may introduce support for additional ABIs. If a device implementation is not compatible with an existing predefined ABI, it MUST NOT report support for any ABIs at all. 1374 </p> 1375 <p> 1376 The following native code APIs MUST be available to apps that include native code: 1377 </p> 1378 <ul> 1379 <li>libandroid.so (native Android activity support) 1380 </li> 1381 <li>libc (C library) 1382 </li> 1383 <li>libcamera2ndk.so 1384 </li> 1385 <li>libdl (dynamic linker) 1386 </li> 1387 <li>libEGL.so (native OpenGL surface management) 1388 </li> 1389 <li>libGLESv1_CM.so (OpenGL ES 1.x) 1390 </li> 1391 <li>libGLESv2.so (OpenGL ES 2.0) 1392 </li> 1393 <li>libGLESv3.so (OpenGL ES 3.x) 1394 </li> 1395 <li>libicui18n.so 1396 </li> 1397 <li>libicuuc.so 1398 </li> 1399 <li>libjnigraphics.so 1400 </li> 1401 <li>liblog (Android logging) 1402 </li> 1403 <li>libmediandk.so (native media APIs support) 1404 </li> 1405 <li>libm (math library) 1406 </li> 1407 <li>libOpenMAXAL.so (OpenMAX AL 1.0.1 support) 1408 </li> 1409 <li>libOpenSLES.so (OpenSL ES 1.0.1 audio support) 1410 </li> 1411 <li>libRS.so 1412 </li> 1413 <li>libstdc++ (Minimal support for C++) 1414 </li> 1415 <li>libvulkan.so (Vulkan) 1416 </li> 1417 <li>libz (Zlib compression) 1418 </li> 1419 <li>JNI interface 1420 </li> 1421 <li>Support for OpenGL, as described below 1422 </li> 1423 </ul> 1424 <p> 1425 For the native libraries listed above, the device implementation MUST NOT add or remove the public functions. 1426 </p> 1427 <p> 1428 Native libraries not listed above but implemented and provided in AOSP as system libraries are reserved and MUST NOT be exposed to third-party apps targeting API level 24 or higher. 1429 </p> 1430 <p> 1431 Device implementations MAY add non-AOSP libraries and expose them directly as an API to third-party apps but the additional libraries SHOULD be in <code>/vendor/lib</code> or <code>/vendor/lib64</code> and MUST be listed in <code>/vendor/etc/public.libraries.txt</code> . 1432 </p> 1433 <p> 1434 Note that device implementations MUST include libGLESv3.so and in turn, MUST export all the OpenGL ES 3.1 and <a href="http://developer.android.com/guide/topics/graphics/opengl.html#aep">Android Extension Pack</a> function symbols as defined in the NDK release android-24. Although all the symbols must be present, only the corresponding functions for OpenGL ES versions and extensions actually supported by the device must be fully implemented. 1435 </p> 1436 <h4 id="3_3_1_1_graphic_libraries"> 1437 3.3.1.1. Graphic Libraries 1438 </h4> 1439 <p> 1440 <a href="https://www.khronos.org/registry/vulkan/specs/1.0-wsi_extensions/xhtml/vkspec.html">Vulkan</a> is a low-overhead, cross-platform API for high-performance 3D graphics. Device implementations, even if not including support of the Vulkan APIs, MUST satisfy the following requirements: 1441 </p> 1442 <ul> 1443 <li>It MUST always provide a native library named <code>libvulkan.so</code> which exports function symbols for the core Vulkan 1.0 API as well as the <code>VK_KHR_surface</code> , <code>VK_KHR_android_surface</code> , and <code>VK_KHR_swapchain</code> extensions. 1444 </li> 1445 </ul> 1446 <p> 1447 Device implementations, if including support of the Vulkan APIs: 1448 </p> 1449 <ul> 1450 <li>MUST report, one or more <code>VkPhysicalDevices</code> through the <code>vkEnumeratePhysicalDevices</code> call. 1451 </li> 1452 <li>Each enumerated <code>VkPhysicalDevices</code> MUST fully implement the Vulkan 1.0 API. 1453 </li> 1454 <li>MUST report the correct <a href="https://developer.android.com/reference/android/content/pm/PackageManager.html#FEATURE_VULKAN_HARDWARE_LEVEL"><code>PackageManager#FEATURE_VULKAN_HARDWARE_LEVEL</code></a> and <a href="https://developer.android.com/reference/android/content/pm/PackageManager.html#FEATURE_VULKAN_HARDWARE_VERSION"><code>PackageManager#FEATURE_VULKAN_HARDWARE_VERSION</code></a> feature flags. 1455 </li> 1456 <li>MUST enumerate layers, contained in native libraries named <code>libVkLayer*.so</code> in the application packages native library directory, through the <code>vkEnumerateInstanceLayerProperties</code> and <code>vkEnumerateDeviceLayerProperties</code> functions in <code>libvulkan.so</code> 1457 </li> 1458 <li>MUST NOT enumerate layers provided by libraries outside of the application package, or provide other ways of tracing or intercepting the Vulkan API, unless the application has the <code>android:debuggable=true</code> attribute. 1459 </li> 1460 </ul> 1461 <p> 1462 Device implementations, if not including support of the Vulkan APIs: 1463 </p> 1464 <ul> 1465 <li>MUST report 0 <code>VkPhysicalDevices</code> through the <code>vkEnumeratePhysicalDevices</code> call. 1466 </li> 1467 <li>MUST NOT declare any of the Vulkan feature flags <a href="https://developer.android.com/reference/android/content/pm/PackageManager.html#FEATURE_VULKAN_HARDWARE_LEVEL"><code>PackageManager#FEATURE_VULKAN_HARDWARE_LEVEL</code></a> and <a href="https://developer.android.com/reference/android/content/pm/PackageManager.html#FEATURE_VULKAN_HARDWARE_VERSION"><code>PackageManager#FEATURE_VULKAN_HARDWARE_VERSION</code></a> . 1468 </li> 1469 </ul> 1470 <h3 id="3_3_2_32-bit_arm_native_code_compatibility"> 1471 3.3.2. 32-bit ARM Native Code Compatibility 1472 </h3> 1473 <p> 1474 The ARMv8 architecture deprecates several CPU operations, including some operations used in existing native code. On 64-bit ARM devices, the following deprecated operations MUST remain available to 32-bit native ARM code, either through native CPU support or through software emulation: 1475 </p> 1476 <ul> 1477 <li>SWP and SWPB instructions 1478 </li> 1479 <li>SETEND instruction 1480 </li> 1481 <li>CP15ISB, CP15DSB, and CP15DMB barrier operations 1482 </li> 1483 </ul> 1484 <p> 1485 Legacy versions of the Android NDK used /proc/cpuinfo to discover CPU features from 32-bit ARM native code. For compatibility with applications built using this NDK, devices MUST include the following lines in /proc/cpuinfo when it is read by 32-bit ARM applications: 1486 </p> 1487 <ul> 1488 <li>"Features: ", followed by a list of any optional ARMv7 CPU features supported by the device. 1489 </li> 1490 <li>"CPU architecture: ", followed by an integer describing the device's highest supported ARM architecture (e.g., "8" for ARMv8 devices). 1491 </li> 1492 </ul> 1493 <p> 1494 These requirements only apply when /proc/cpuinfo is read by 32-bit ARM applications. Devices SHOULD not alter /proc/cpuinfo when read by 64-bit ARM or non-ARM applications. 1495 </p> 1496 <h2 id="3_4_web_compatibility"> 1497 3.4. Web Compatibility 1498 </h2> 1499 <h3 id="3_4_1_webview_compatibility"> 1500 3.4.1. WebView Compatibility 1501 </h3> 1502 <div class="note"> 1503 Android Watch devices MAY, but all other device implementations MUST provide a complete implementation of the android.webkit.Webview API. 1504 </div> 1505 <p> 1506 The platform feature android.software.webview MUST be reported on any device that provides a complete implementation of the android.webkit.WebView API, and MUST NOT be reported on devices without a complete implementation of the API. The Android Open Source implementation uses code from the Chromium Project to implement the <a href="http://developer.android.com/reference/android/webkit/WebView.html">android.webkit.WebView</a> . Because it is not feasible to develop a comprehensive test suite for a web rendering system, device implementers MUST use the specific upstream build of Chromium in the WebView implementation. Specifically: 1507 </p> 1508 <ul> 1509 <li>Device android.webkit.WebView implementations MUST be based on the <a href="http://www.chromium.org/">Chromium</a> build from the upstream Android Open Source Project for Android 7.1. This build includes a specific set of functionality and security fixes for the WebView. 1510 </li> 1511 <li> 1512 <p> 1513 The user agent string reported by the WebView MUST be in this format: 1514 </p> 1515 <p> 1516 Mozilla/5.0 (Linux; Android $(VERSION); $(MODEL) Build/$(BUILD); wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 $(CHROMIUM_VER) Mobile Safari/537.36 1517 </p> 1518 <ul> 1519 <li>The value of the $(VERSION) string MUST be the same as the value for android.os.Build.VERSION.RELEASE. 1520 </li> 1521 <li>The value of the $(MODEL) string MUST be the same as the value for android.os.Build.MODEL. 1522 </li> 1523 <li>The value of the $(BUILD) string MUST be the same as the value for android.os.Build.ID. 1524 </li> 1525 <li>The value of the $(CHROMIUM_VER) string MUST be the version of Chromium in the upstream Android Open Source Project. 1526 </li> 1527 <li>Device implementations MAY omit Mobile in the user agent string. 1528 </li> 1529 </ul> 1530 </li> 1531 </ul> 1532 <p> 1533 The WebView component SHOULD include support for as many HTML5 features as possible and if it supports the feature SHOULD conform to the <a href="http://html.spec.whatwg.org/multipage/">HTML5 specification</a> . 1534 </p> 1535 <h3 id="3_4_2_browser_compatibility"> 1536 3.4.2. Browser Compatibility 1537 </h3> 1538 <div class="note"> 1539 Android Television, Watch, and Android Automotive implementations MAY omit a browser application, but MUST support the public intent patterns as described in <a href="#3_2_3_1_core_application_intents">section 3.2.3.1</a> . All other types of device implementations MUST include a standalone Browser application for general user web browsing. 1540 </div> 1541 <p> 1542 The standalone Browser MAY be based on a browser technology other than WebKit. However, even if an alternate Browser application is used, the android.webkit.WebView component provided to third-party applications MUST be based on WebKit, as described in <a href="#3_4_1_webview_compatibility">section 3.4.1</a> . 1543 </p> 1544 <p> 1545 Implementations MAY ship a custom user agent string in the standalone Browser application. 1546 </p> 1547 <p> 1548 The standalone Browser application (whether based on the upstream WebKit Browser application or a third-party replacement) SHOULD include support for as much of <a href="http://html.spec.whatwg.org/multipage/">HTML5</a> as possible. Minimally, device implementations MUST support each of these APIs associated with HTML5: 1549 </p> 1550 <ul> 1551 <li> 1552 <a href="http://www.w3.org/html/wg/drafts/html/master/browsers.html#offline">application cache/offline operation</a> 1553 </li> 1554 <li> 1555 <a href="http://www.w3.org/html/wg/drafts/html/master/semantics.html#video"><video> tag</a> 1556 </li> 1557 <li> 1558 <a href="http://www.w3.org/TR/geolocation-API/">geolocation</a> 1559 </li> 1560 </ul> 1561 <p> 1562 Additionally, device implementations MUST support the HTML5/W3C <a href="http://www.w3.org/TR/webstorage/">webstorage API</a> and SHOULD support the HTML5/W3C <a href="http://www.w3.org/TR/IndexedDB/">IndexedDB API</a> . Note that as the web development standards bodies are transitioning to favor IndexedDB over webstorage, IndexedDB is expected to become a required component in a future version of Android. 1563 </p> 1564 <h2 id="3_5_api_behavioral_compatibility"> 1565 3.5. API Behavioral Compatibility 1566 </h2> 1567 <p> 1568 The behaviors of each of the API types (managed, soft, native, and web) must be consistent with the preferred implementation of the upstream <a href="http://source.android.com/">Android Open Source Project</a> . Some specific areas of compatibility are: 1569 </p> 1570 <ul> 1571 <li>Devices MUST NOT change the behavior or semantics of a standard intent. 1572 </li> 1573 <li>Devices MUST NOT alter the lifecycle or lifecycle semantics of a particular type of system component (such as Service, Activity, ContentProvider, etc.). 1574 </li> 1575 <li>Devices MUST NOT change the semantics of a standard permission. 1576 </li> 1577 </ul> 1578 <p> 1579 The above list is not comprehensive. The Compatibility Test Suite (CTS) tests significant portions of the platform for behavioral compatibility, but not all. It is the responsibility of the implementer to ensure behavioral compatibility with the Android Open Source Project. For this reason, device implementers SHOULD use the source code available via the Android Open Source Project where possible, rather than re-implement significant parts of the system. 1580 </p> 1581 <h2 id="3_6_api_namespaces"> 1582 3.6. API Namespaces 1583 </h2> 1584 <p> 1585 Android follows the package and class namespace conventions defined by the Java programming language. To ensure compatibility with third-party applications, device implementers MUST NOT make any prohibited modifications (see below) to these package namespaces: 1586 </p> 1587 <ul> 1588 <li>java.* 1589 </li> 1590 <li>javax.* 1591 </li> 1592 <li>sun.* 1593 </li> 1594 <li>android.* 1595 </li> 1596 <li>com.android.* 1597 </li> 1598 </ul> 1599 <p> 1600 <strong>Prohibited modifications include</strong> : 1601 </p> 1602 <ul> 1603 <li>Device implementations MUST NOT modify the publicly exposed APIs on the Android platform by changing any method or class signatures, or by removing classes or class fields. 1604 </li> 1605 <li>Device implementers MAY modify the underlying implementation of the APIs, but such modifications MUST NOT impact the stated behavior and Java-language signature of any publicly exposed APIs. 1606 </li> 1607 <li>Device implementers MUST NOT add any publicly exposed elements (such as classes or interfaces, or fields or methods to existing classes or interfaces) to the APIs above. 1608 </li> 1609 </ul> 1610 <p> 1611 A publicly exposed element is any construct that is not decorated with the@hide marker as used in the upstream Android source code. In other words, device implementers MUST NOT expose new APIs or alter existing APIs in the namespaces noted above. Device implementers MAY make internal-only modifications, but those modifications MUST NOT be advertised or otherwise exposed to developers. 1612 </p> 1613 <p> 1614 Device implementers MAY add custom APIs, but any such APIs MUST NOT be in a namespace owned by or referring to another organization. For instance, device implementers MUST NOT add APIs to the com.google.* or similar namespace: only Google may do so. Similarly, Google MUST NOT add APIs to other companies' namespaces. Additionally, if a device implementation includes custom APIs outside the standard Android namespace, those APIs MUST be packaged in an Android shared library so that only apps that explicitly use them (via the <uses-library> mechanism) are affected by the increased memory usage of such APIs. 1615 </p> 1616 <p> 1617 If a device implementer proposes to improve one of the package namespaces above (such as by adding useful new functionality to an existing API, or adding a new API), the implementer SHOULD visit <a href="http://source.android.com/">source.android.com</a> and begin the process for contributing changes and code, according to the information on that site. 1618 </p> 1619 <p> 1620 Note that the restrictions above correspond to standard conventions for naming APIs in the Java programming language; this section simply aims to reinforce those conventions and make them binding through inclusion in this Compatibility Definition. 1621 </p> 1622 <h2 id="3_7_runtime_compatibility"> 1623 3.7. Runtime Compatibility 1624 </h2> 1625 <p> 1626 Device implementations MUST support the full Dalvik Executable (DEX) format and <a href="https://android.googlesource.com/platform/dalvik/">Dalvik bytecode specification and semantics</a> . Device implementers SHOULD use ART, the reference upstream implementation of the Dalvik Executable Format, and the reference implementations package management system. 1627 </p> 1628 <p> 1629 Device implementations MUST configure Dalvik runtimes to allocate memory in accordance with the upstream Android platform, and as specified by the following table. (See <a href="#7_1_1_screen_configuration">section 7.1.1</a> for screen size and screen density definitions.) Note that memory values specified below are considered minimum values and device implementations MAY allocate more memory per application. 1630 </p> 1631 <table> 1632 <tr> 1633 <th> 1634 Screen Layout 1635 </th> 1636 <th> 1637 Screen Density 1638 </th> 1639 <th> 1640 Minimum Application Memory 1641 </th> 1642 </tr> 1643 <tr> 1644 <td rowspan="12"> 1645 Android Watch 1646 </td> 1647 <td> 1648 120 dpi (ldpi) 1649 </td> 1650 <td rowspan="3"> 1651 32MB 1652 </td> 1653 </tr> 1654 <tr> 1655 <td> 1656 160 dpi (mdpi) 1657 </td> 1658 </tr> 1659 <tr> 1660 <td> 1661 213 dpi (tvdpi) 1662 </td> 1663 </tr> 1664 <tr> 1665 <td> 1666 240 dpi (hdpi) 1667 </td> 1668 <td rowspan="2"> 1669 36MB 1670 </td> 1671 </tr> 1672 <tr> 1673 <td> 1674 280 dpi (280dpi) 1675 </td> 1676 </tr> 1677 <tr> 1678 <td> 1679 320 dpi (xhdpi) 1680 </td> 1681 <td rowspan="2"> 1682 48MB 1683 </td> 1684 </tr> 1685 <tr> 1686 <td> 1687 360 dpi (360dpi) 1688 </td> 1689 </tr> 1690 <tr> 1691 <td> 1692 400 dpi (400dpi) 1693 </td> 1694 <td> 1695 56MB 1696 </td> 1697 </tr> 1698 <tr> 1699 <td> 1700 420 dpi (420dpi) 1701 </td> 1702 <td> 1703 64MB 1704 </td> 1705 </tr> 1706 <tr> 1707 <td> 1708 480 dpi (xxhdpi) 1709 </td> 1710 <td> 1711 88MB 1712 </td> 1713 </tr> 1714 <tr> 1715 <td> 1716 560 dpi (560dpi) 1717 </td> 1718 <td> 1719 112MB 1720 </td> 1721 </tr> 1722 <tr> 1723 <td> 1724 640 dpi (xxxhdpi) 1725 </td> 1726 <td> 1727 154MB 1728 </td> 1729 </tr> 1730 <tr> 1731 <td rowspan="12"> 1732 small/normal 1733 </td> 1734 <td> 1735 120 dpi (ldpi) 1736 </td> 1737 <td rowspan="2"> 1738 32MB 1739 </td> 1740 </tr> 1741 <tr> 1742 <td> 1743 160 dpi (mdpi) 1744 </td> 1745 </tr> 1746 <tr> 1747 <td> 1748 213 dpi (tvdpi) 1749 </td> 1750 <td rowspan="3"> 1751 48MB 1752 </td> 1753 </tr> 1754 <tr> 1755 <td> 1756 240 dpi (hdpi) 1757 </td> 1758 </tr> 1759 <tr> 1760 <td> 1761 280 dpi (280dpi) 1762 </td> 1763 </tr> 1764 <tr> 1765 <td> 1766 320 dpi (xhdpi) 1767 </td> 1768 <td rowspan="2"> 1769 80MB 1770 </td> 1771 </tr> 1772 <tr> 1773 <td> 1774 360 dpi (360dpi) 1775 </td> 1776 </tr> 1777 <tr> 1778 <td> 1779 400 dpi (400dpi) 1780 </td> 1781 <td> 1782 96MB 1783 </td> 1784 </tr> 1785 <tr> 1786 <td> 1787 420 dpi (420dpi) 1788 </td> 1789 <td> 1790 112MB 1791 </td> 1792 </tr> 1793 <tr> 1794 <td> 1795 480 dpi (xxhdpi) 1796 </td> 1797 <td> 1798 128MB 1799 </td> 1800 </tr> 1801 <tr> 1802 <td> 1803 560 dpi (560dpi) 1804 </td> 1805 <td> 1806 192MB 1807 </td> 1808 </tr> 1809 <tr> 1810 <td> 1811 640 dpi (xxxhdpi) 1812 </td> 1813 <td> 1814 256MB 1815 </td> 1816 </tr> 1817 <tr> 1818 <td rowspan="12"> 1819 large 1820 </td> 1821 <td> 1822 120 dpi (ldpi) 1823 </td> 1824 <td> 1825 32MB 1826 </td> 1827 </tr> 1828 <tr> 1829 <td> 1830 160 dpi (mdpi) 1831 </td> 1832 <td> 1833 48MB 1834 </td> 1835 </tr> 1836 <tr> 1837 <td> 1838 213 dpi (tvdpi) 1839 </td> 1840 <td rowspan="2"> 1841 80MB 1842 </td> 1843 </tr> 1844 <tr> 1845 <td> 1846 240 dpi (hdpi) 1847 </td> 1848 </tr> 1849 <tr> 1850 <td> 1851 280 dpi (280dpi) 1852 </td> 1853 <td> 1854 96MB 1855 </td> 1856 </tr> 1857 <tr> 1858 <td> 1859 320 dpi (xhdpi) 1860 </td> 1861 <td> 1862 128MB 1863 </td> 1864 </tr> 1865 <tr> 1866 <td> 1867 360 dpi (360dpi) 1868 </td> 1869 <td> 1870 160MB 1871 </td> 1872 </tr> 1873 <tr> 1874 <td> 1875 400 dpi (400dpi) 1876 </td> 1877 <td> 1878 192MB 1879 </td> 1880 </tr> 1881 <tr> 1882 <td> 1883 420 dpi (420dpi) 1884 </td> 1885 <td> 1886 228MB 1887 </td> 1888 </tr> 1889 <tr> 1890 <td> 1891 480 dpi (xxhdpi) 1892 </td> 1893 <td> 1894 256MB 1895 </td> 1896 </tr> 1897 <tr> 1898 <td> 1899 560 dpi (560dpi) 1900 </td> 1901 <td> 1902 384MB 1903 </td> 1904 </tr> 1905 <tr> 1906 <td> 1907 640 dpi (xxxhdpi) 1908 </td> 1909 <td> 1910 512MB 1911 </td> 1912 </tr> 1913 <tr> 1914 <td rowspan="12"> 1915 xlarge 1916 </td> 1917 <td> 1918 120 dpi (ldpi) 1919 </td> 1920 <td> 1921 48MB 1922 </td> 1923 </tr> 1924 <tr> 1925 <td> 1926 160 dpi (mdpi) 1927 </td> 1928 <td> 1929 80MB 1930 </td> 1931 </tr> 1932 <tr> 1933 <td> 1934 213 dpi (tvdpi) 1935 </td> 1936 <td rowspan="2"> 1937 96MB 1938 </td> 1939 </tr> 1940 <tr> 1941 <td> 1942 240 dpi (hdpi) 1943 </td> 1944 </tr> 1945 <tr> 1946 <td> 1947 280 dpi (280dpi) 1948 </td> 1949 <td> 1950 144MB 1951 </td> 1952 </tr> 1953 <tr> 1954 <td> 1955 320 dpi (xhdpi) 1956 </td> 1957 <td> 1958 192MB 1959 </td> 1960 </tr> 1961 <tr> 1962 <td> 1963 360 dpi (360dpi) 1964 </td> 1965 <td> 1966 240MB 1967 </td> 1968 </tr> 1969 <tr> 1970 <td> 1971 400 dpi (400dpi) 1972 </td> 1973 <td> 1974 288MB 1975 </td> 1976 </tr> 1977 <tr> 1978 <td> 1979 420 dpi (420dpi) 1980 </td> 1981 <td> 1982 336MB 1983 </td> 1984 </tr> 1985 <tr> 1986 <td> 1987 480 dpi (xxhdpi) 1988 </td> 1989 <td> 1990 384MB 1991 </td> 1992 </tr> 1993 <tr> 1994 <td> 1995 560 dpi (560dpi) 1996 </td> 1997 <td> 1998 576MB 1999 </td> 2000 </tr> 2001 <tr> 2002 <td> 2003 640 dpi (xxxhdpi) 2004 </td> 2005 <td> 2006 768MB 2007 </td> 2008 </tr> 2009 </table> 2010 <h2 id="3_8_user_interface_compatibility"> 2011 3.8. User Interface Compatibility 2012 </h2> 2013 <h3 id="3_8_1_launcher_(home_screen)"> 2014 3.8.1. Launcher (Home Screen) 2015 </h3> 2016 <p> 2017 Android includes a launcher application (home screen) and support for third-party applications to replace the device launcher (home screen). Device implementations that allow third-party applications to replace the device home screen MUST declare the platform feature android.software.home_screen. 2018 </p> 2019 <h3 id="3_8_2_widgets"> 2020 3.8.2. Widgets 2021 </h3> 2022 <div class="note"> 2023 Widgets are optional for all Android device implementations, but SHOULD be supported on Android Handheld devices. 2024 </div> 2025 <p> 2026 Android defines a component type and corresponding API and lifecycle that allows applications to expose an <a href="http://developer.android.com/guide/practices/ui_guidelines/widget_design.html">AppWidget</a> to the end user, a feature that is STRONGLY RECOMMENDED to be supported on Handheld Device implementations. Device implementations that support embedding widgets on the home screen MUST meet the following requirements and declare support for platform feature android.software.app_widgets. 2027 </p> 2028 <ul> 2029 <li>Device launchers MUST include built-in support for AppWidgets and expose user interface affordances to add, configure, view, and remove AppWidgets directly within the Launcher. 2030 </li> 2031 <li>Device implementations MUST be capable of rendering widgets that are 4 x 4 in the standard grid size. See the <a href="http://developer.android.com/guide/practices/ui_guidelines/widget_design.html">App Widget Design Guidelines</a> in the Android SDK documentation for details. 2032 </li> 2033 <li>Device implementations that include support for lock screen MAY support application widgets on the lock screen. 2034 </li> 2035 <li>SHOULD trigger the fast-switch action between the two most recently used apps, when the recents function key is tapped twice. 2036 </li> 2037 <li>SHOULD trigger the split-screen multiwindow-mode, if supported, when the recents functions key is long pressed. 2038 </li> 2039 </ul> 2040 <h3 id="3_8_3_notifications"> 2041 3.8.3. Notifications 2042 </h3> 2043 <p> 2044 Android includes APIs that allow developers to <a href="http://developer.android.com/guide/topics/ui/notifiers/notifications.html">notify users of notable events</a> using hardware and software features of the device. 2045 </p> 2046 <p> 2047 Some APIs allow applications to perform notifications or attract attention using hardwarespecifically sound, vibration, and light. Device implementations MUST support notifications that use hardware features, as described in the SDK documentation, and to the extent possible with the device implementation hardware. For instance, if a device implementation includes a vibrator, it MUST correctly implement the vibration APIs. If a device implementation lacks hardware, the corresponding APIs MUST be implemented as no-ops. This behavior is further detailed in <a href="#7_hardware_compatibility">section 7</a> . 2048 </p> 2049 <p> 2050 Additionally, the implementation MUST correctly render all <a href="https://developer.android.com/guide/topics/resources/available-resources.html">resources</a> (icons, animation files etc.) provided for in the APIs, or in the Status/System Bar <a href="http://developer.android.com/design/style/iconography.html">icon style guide</a> , which in the case of an Android Television device includes the possibility to not display the notifications. Device implementers MAY provide an alternative user experience for notifications than that provided by the reference Android Open Source implementation; however, such alternative notification systems MUST support existing notification resources, as above. 2051 </p> 2052 <div class="note"> 2053 Android Automotive implementations MAY manage the visibility and timing of notifications to mitigate driver distraction, but MUST display notifications that use <a href="https://developer.android.com/reference/android/app/Notification.CarExtender.html">CarExtender</a> when requested by applications. 2054 </div> 2055 <p> 2056 Android includes support for various notifications, such as: 2057 </p> 2058 <ul> 2059 <li> 2060 <strong>Rich notifications</strong> . Interactive Views for ongoing notifications. 2061 </li> 2062 <li> 2063 <strong>Heads-up notifications</strong> . Interactive Views users can act on or dismiss without leaving the current app. 2064 </li> 2065 <li> 2066 <strong>Lock screen notifications</strong> . Notifications shown over a lock screen with granular control on visibility. 2067 </li> 2068 </ul> 2069 <p> 2070 Android device implementations, when such notifications are made visible, MUST properly execute Rich and Heads-up notifications and include the title/name, icon, text as <a href="https://developer.android.com/design/patterns/notifications.html">documented in the Android APIs</a> . 2071 </p> 2072 <p> 2073 Android includes Notification Listener Service APIs that allow apps (once explicitly enabled by the user) to receive a copy of all notifications as they are posted or updated. Device implementations MUST correctly and promptly send notifications in their entirety to all such installed and user-enabled listener services, including any and all metadata attached to the Notification object. 2074 </p> 2075 <p> 2076 Handheld device implementations MUST support the behaviors of updating, removing, replying to, and bundling notifications as described in this <a href="https://developer.android.com/guide/topics/ui/notifiers/notifications.html#Managing">section</a> . 2077 </p> 2078 <p> 2079 Also, handheld device implementations MUST provide: 2080 </p> 2081 <ul> 2082 <li>The ability to control notifications directly in the notification shade. 2083 </li> 2084 <li>The visual affordance to trigger the control panel in the notification shade. 2085 </li> 2086 <li>The ability to BLOCK, MUTE and RESET notification preference from a package, both in the inline control panel as well as in the settings app. 2087 </li> 2088 </ul> 2089 <p> 2090 All 6 direct subclasses of the <code>Notification.Style class</code> MUST be supported as described in the <a href="https://developer.android.com/reference/android/app/Notification.Style.html">SDK documents</a> . 2091 </p> 2092 <p> 2093 Device implementations that support the DND (Do not Disturb) feature MUST meet the following requirements: 2094 </p> 2095 <ul> 2096 <li>MUST implement an activity where the user can grant or deny the app access to DND policy configurations in response to the intent <a href="https://developer.android.com/reference/android/provider/Settings.html#ACTION_NOTIFICATION_POLICY_ACCESS_SETTINGS">ACTION_NOTIFICATION_POLICY_ACCESS_SETTINGS</a> . 2097 </li> 2098 <li>MUST display <a href="https://developer.android.com/reference/android/app/NotificationManager.html#addAutomaticZenRule%28android.app.AutomaticZenRule%29">Automatic DND rules</a> created by applications alongside the user-created and pre-defined rules. 2099 </li> 2100 <li>MUST honor the <a href="https://developer.android.com/reference/android/app/NotificationManager.Policy.html#suppressedVisualEffects"><code>suppressedVisualEffects</code></a> values passed along the <a href="https://developer.android.com/reference/android/app/NotificationManager.Policy.html#NotificationManager.Policy%28int,%20int,%20int,%20int%29"><code>NotificationManager.Policy</code></a> and if an app has set any of the SUPPRESSED_EFFECT_SCREEN_OFF or SUPPRESSED_EFFECT_SCREEN_ON flags, it SHOULD indicate to the user that the visual effects are suppressed in the DND settings menu. 2101 </li> 2102 </ul> 2103 <h3 id="3_8_4_search"> 2104 3.8.4. Search 2105 </h3> 2106 <p> 2107 Android includes APIs that allow developers to <a href="http://developer.android.com/reference/android/app/SearchManager.html">incorporate search</a> into their applications and expose their applications data into the global system search. Generally speaking, this functionality consists of a single, system-wide user interface that allows users to enter queries, displays suggestions as users type, and displays results. The Android APIs allow developers to reuse this interface to provide search within their own apps and allow developers to supply results to the common global search user interface. 2108 </p> 2109 <p> 2110 Android device implementations SHOULD include global search, a single, shared, system-wide search user interface capable of real-time suggestions in response to user input. Device implementations SHOULD implement the APIs that allow developers to reuse this user interface to provide search within their own applications. Device implementations that implement the global search interface MUST implement the APIs that allow third-party applications to add suggestions to the search box when it is run in global search mode. If no third-party applications are installed that make use of this functionality, the default behavior SHOULD be to display web search engine results and suggestions. 2111 </p> 2112 <p> 2113 Android device implementations SHOULD, and Android Automotive implementations MUST, implement an assistant on the device to handle the <a href="http://developer.android.com/reference/android/content/Intent.html#ACTION_ASSIST">Assist action</a> . 2114 </p> 2115 <p> 2116 Android also includes the <a href="https://developer.android.com/reference/android/app/assist/package-summary.html">Assist APIs</a> to allow applications to elect how much information of the current context is shared with the assistant on the device. Device implementations supporting the Assist action MUST indicate clearly to the end user when the context is shared by displaying a white light around the edges of the screen. To ensure clear visibility to the end user, the indication MUST meet or exceed the duration and brightness of the Android Open Source Project implementation. 2117 </p> 2118 <p> 2119 This indication MAY be disabled by default for preinstalled apps using the Assist and VoiceInteractionService API, if all following requirements are met: 2120 </p> 2121 <ul> 2122 <li> 2123 <p> 2124 The preinstalled app MUST request the context to be shared only when the user invoked the app by one of the following means, and the app is running in the foreground: 2125 </p> 2126 <ul> 2127 <li>hotword invocation 2128 </li> 2129 <li>input of the ASSIST navigation key/button/gesture 2130 </li> 2131 </ul> 2132 </li> 2133 <li> 2134 <p> 2135 The device implementation MUST provide an affordance to enable the indication, less than two navigations away from (the default voice input and assistant app settings menu) <a href="#3_2_3_5_default_app_settings">section 3.2.3.5</a> . 2136 </p> 2137 </li> 2138 </ul> 2139 <h3 id="3_8_5_toasts"> 2140 3.8.5. Toasts 2141 </h3> 2142 <p> 2143 Applications can use the <a href="http://developer.android.com/reference/android/widget/Toast.html">Toast API</a> to display short non-modal strings to the end user that disappear after a brief period of time. Device implementations MUST display Toasts from applications to end users in some high-visibility manner. 2144 </p> 2145 <h3 id="3_8_6_themes"> 2146 3.8.6. Themes 2147 </h3> 2148 <p> 2149 Android provides themes as a mechanism for applications to apply styles across an entire Activity or application. 2150 </p> 2151 <p> 2152 Android includes a Holo theme family as a set of defined styles for application developers to use if they want to match the <a href="http://developer.android.com/guide/topics/ui/themes.html">Holo theme look and feel</a> as defined by the Android SDK. Device implementations MUST NOT alter any of the <a href="http://developer.android.com/reference/android/R.style.html">Holo theme attributes</a> exposed to applications. 2153 </p> 2154 <p> 2155 Android includes a Material theme family as a set of defined styles for application developers to use if they want to match the design themes look and feel across the wide variety of different Android device types. Device implementations MUST support the Material theme family and MUST NOT alter any of the <a href="http://developer.android.com/reference/android/R.style.html#Theme_Material">Material theme attributes</a> or their assets exposed to applications. 2156 </p> 2157 <p> 2158 Android also includes a Device Default theme family as a set of defined styles for application developers to use if they want to match the look and feel of the device theme as defined by the device implementer. Device implementations MAY modify the <a href="http://developer.android.com/reference/android/R.style.html">Device Default theme attributes</a> exposed to applications. 2159 </p> 2160 <p> 2161 Android supports a variant theme with translucent system bars, which allows application developers to fill the area behind the status and navigation bar with their app content. To enable a consistent developer experience in this configuration, it is important the status bar icon style is maintained across different device implementations. Therefore, Android device implementations MUST use white for system status icons (such as signal strength and battery level) and notifications issued by the system, unless the icon is indicating a problematic status or an app requests a light status bar using the SYSTEM_UI_FLAG_LIGHT_STATUS_BAR flag. When an app requests a light status bar, Android device implementations MUST change the color of the system status icons to black (for details, refer to <a href="http://developer.android.com/reference/android/R.style.html">R.style</a> ). 2162 </p> 2163 <h3 id="3_8_7_live_wallpapers"> 2164 3.8.7. Live Wallpapers 2165 </h3> 2166 <p> 2167 Android defines a component type and corresponding API and lifecycle that allows applications to expose one or more <a href="http://developer.android.com/reference/android/service/wallpaper/WallpaperService.html">Live Wallpapers</a> to the end user. Live wallpapers are animations, patterns, or similar images with limited input capabilities that display as a wallpaper, behind other applications. 2168 </p> 2169 <p> 2170 Hardware is considered capable of reliably running live wallpapers if it can run all live wallpapers, with no limitations on functionality, at a reasonable frame rate with no adverse effects on other applications. If limitations in the hardware cause wallpapers and/or applications to crash, malfunction, consume excessive CPU or battery power, or run at unacceptably low frame rates, the hardware is considered incapable of running live wallpaper. As an example, some live wallpapers may use an OpenGL 2.0 or 3.x context to render their content. Live wallpaper will not run reliably on hardware that does not support multiple OpenGL contexts because the live wallpaper use of an OpenGL context may conflict with other applications that also use an OpenGL context. 2171 </p> 2172 <p> 2173 Device implementations capable of running live wallpapers reliably as described above SHOULD implement live wallpapers, and when implemented MUST report the platform feature flag android.software.live_wallpaper. 2174 </p> 2175 <h3 id="3_8_8_activity_switching"> 2176 3.8.8. Activity Switching 2177 </h3> 2178 <div class="note"> 2179 As the Recent function navigation key is OPTIONAL, the requirement to implement the overview screen is OPTIONAL for Android Watch and Android Automotive implementations, and RECOMMENDED for Android Television devices. There SHOULD still be a method to switch between activities on Android Automotive implementations. 2180 </div> 2181 <p> 2182 The upstream Android source code includes the <a href="http://developer.android.com/guide/components/recents.html">overview screen</a> , a system-level user interface for task switching and displaying recently accessed activities and tasks using a thumbnail image of the applications graphical state at the moment the user last left the application. Device implementations including the recents function navigation key as detailed in <a href="#7_2_3_navigation_keys">section 7.2.3</a> MAY alter the interface but MUST meet the following requirements: 2183 </p> 2184 <ul> 2185 <li>MUST support at least up to 20 displayed activities. 2186 </li> 2187 <li>SHOULD display the titles of at least 4 activities at a time. 2188 </li> 2189 <li>MUST implement the <a href="http://developer.android.com/about/versions/android-5.0.html#ScreenPinning">screen pinning behavior</a> and provide the user with a settings menu to toggle the feature. 2190 </li> 2191 <li>SHOULD display highlight color, icon, screen title in recents. 2192 </li> 2193 <li>SHOULD display a closing affordance ("x") but MAY delay this until user interacts with screens. 2194 </li> 2195 <li>SHOULD implement a shortcut to switch easily to the previous activity 2196 </li> 2197 <li>MAY display affiliated recents as a group that moves together. 2198 </li> 2199 </ul> 2200 <p> 2201 Device implementations are STRONGLY RECOMMENDED to use the upstream Android user interface (or a similar thumbnail-based interface) for the overview screen. 2202 </p> 2203 <h3 id="3_8_9_input_management"> 2204 3.8.9. Input Management 2205 </h3> 2206 <p> 2207 Android includes support for <a href="http://developer.android.com/guide/topics/text/creating-input-method.html">Input Management</a> and support for third-party input method editors. Device implementations that allow users to use third-party input methods on the device MUST declare the platform feature android.software.input_methods and support IME APIs as defined in the Android SDK documentation. 2208 </p> 2209 <p> 2210 Device implementations that declare the android.software.input_methods feature MUST provide a user-accessible mechanism to add and configure third-party input methods. Device implementations MUST display the settings interface in response to the android.settings.INPUT_METHOD_SETTINGS intent. 2211 </p> 2212 <h3 id="3_8_10_lock_screen_media_control"> 2213 3.8.10. Lock Screen Media Control 2214 </h3> 2215 <p> 2216 The Remote Control Client API is deprecated from Android 5.0 in favor of the <a href="http://developer.android.com/reference/android/app/Notification.MediaStyle.html">Media Notification Template</a> that allows media applications to integrate with playback controls that are displayed on the lock screen. Device implementations that support a lock screen, unless an Android Automotive or Watch implementation, MUST display the Lock screen Notifications including the Media Notification Template. 2217 </p> 2218 <h3 id="3_8_11_screen_savers_(previously_dreams)"> 2219 3.8.11. Screen savers (previously Dreams) 2220 </h3> 2221 <p> 2222 Android includes support for <a href="http://developer.android.com/reference/android/service/dreams/DreamService.html">interactivescreensavers</a> , previously referred to as Dreams. Screen savers allow users to interact with applications when a device connected to a power source is idle or docked in a desk dock. Android Watch devices MAY implement screen savers, but other types of device implementations SHOULD include support for screen savers and provide a settings option for users toconfigure screen savers in response to the <code>android.settings.DREAM_SETTINGS</code> intent. 2223 </p> 2224 <h3 id="3_8_12_location"> 2225 3.8.12. Location 2226 </h3> 2227 <p> 2228 When a device has a hardware sensor (e.g. GPS) that is capable of providing the location coordinates, <a href="http://developer.android.com/reference/android/provider/Settings.Secure.html#LOCATION_MODE">location modes</a> MUST be displayed in the Location menu within Settings. 2229 </p> 2230 <h3 id="3_8_13_unicode_and_font"> 2231 3.8.13. Unicode and Font 2232 </h3> 2233 <p> 2234 Android includes support for the emoji characters defined in <a href="http://www.unicode.org/versions/Unicode9.0.0/">Unicode 9.0</a> . All device implementations MUST be capable of rendering these emoji characters in color glyph and when Android device implementations include an IME, it SHOULD provide an input method to the user for these emoji characters. 2235 </p> 2236 <p> 2237 Android handheld devices SHOULD support the skin tone and diverse family emojis as specified in the <a href="http://unicode.org/reports/tr51">Unicode Technical Report #51</a> . 2238 </p> 2239 <p> 2240 Android includes support for Roboto 2 font with different weightssans-serif-thin, sans-serif-light, sans-serif-medium, sans-serif-black, sans-serif-condensed, sans-serif-condensed-lightwhich MUST all be included for the languages available on the device and full Unicode 7.0 coverage of Latin, Greek, and Cyrillic, including the Latin Extended A, B, C, and D ranges, and all glyphs in the currency symbols block of Unicode 7.0. 2241 </p> 2242 <h3 id="3_8_14_multi-windows"> 2243 3.8.14. Multi-windows 2244 </h3> 2245 <p> 2246 A device implementation MAY choose not to implement any multi-window modes, but if it has the capability to display multiple activities at the same time it MUST implement such multi-window mode(s) in accordance with the application behaviors and APIs described in the Android SDK <a href="https://developer.android.com/preview/features/multi-window.html">multi-window mode support documentation</a> and meet the following requirements: 2247 </p> 2248 <ul> 2249 <li>Applications can indicate whether they are capable of operating in multi-window mode in the AndroidManifest.xml file, either explicitly via the <a href="https://developer.android.com/reference/android/R.attr.html#resizeableActivity"><code>android:resizeableActivity</code></a> attribute or implicitly by having the targetSdkVersion > 24. Apps that explicitly set this attribute to false in their manifest MUST not be launched in multi-window mode. Apps that don't set the attribute in their manifest file (targetSdkVersion < 24) can be launched in multi-window mode, but the system MUST provide warning that the app may not work as expected in multi-window mode. 2250 </li> 2251 <li>Device implementations MUST NOT offer split-screen or freeform mode if both the screen height and width is less than 440 dp. 2252 </li> 2253 <li>Device implementations with screen size <code>xlarge</code> SHOULD support freeform mode. 2254 </li> 2255 <li>Android Television device implementations MUST support picture-in-picture (PIP) mode multi-window and place the PIP multi-window in the top right corner when PIP is ON. 2256 </li> 2257 <li>Device implementations with PIP mode multi-window support MUST allocate at least 240x135 dp for the PIP window. 2258 </li> 2259 <li>If the PIP multi-window mode is supported the <a href="https://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_WINDOW"><code>KeyEvent.KEYCODE_WINDOW</code></a> key MUST be used to control the PIP window; otherwise, the key MUST be available to the foreground activity. 2260 </li> 2261 </ul> 2262 <h2 id="3_9_device_administration"> 2263 3.9. Device Administration 2264 </h2> 2265 <p> 2266 Android includes features that allow security-aware applications to perform device administration functions at the system level, such as enforcing password policies or performing remote wipe, through the <a href="http://developer.android.com/guide/topics/admin/device-admin.html">Android Device Administration API</a> ]. Device implementations MUST provide an implementation of the <a href="http://developer.android.com/reference/android/app/admin/DevicePolicyManager.html">DevicePolicyManager</a> class. Device implementations that supports a secure lock screen MUST implement the full range of <a href="http://developer.android.com/guide/topics/admin/device-admin.html">device administration</a> policies defined in the Android SDK documentation and report the platform feature android.software.device_admin. 2267 </p> 2268 <h3 id="3_9_1_device_provisioning"> 2269 3.9.1 Device Provisioning 2270 </h3> 2271 <h4 id="3_9_1_1_device_owner_provisioning"> 2272 3.9.1.1 Device owner provisioning 2273 </h4> 2274 <p> 2275 If a device implementation declares the <code>android.software.device_admin</code> feature then it MUST implement the provisioning of the <a href="http://developer.android.com/reference/android/app/admin/DevicePolicyManager.html#isDeviceOwnerApp(java.lang.String)">Device Owner app</a> of a Device Policy Client (DPC) application as indicated below: 2276 </p> 2277 <ul> 2278 <li>When the device implementation has no user data configured yet, it: 2279 <ul> 2280 <li>MUST report <code>true</code> for <a href="https://developer.android.com/reference/android/app/admin/DevicePolicyManager.html#isProvisioningAllowed(java.lang.String)"><code>DevicePolicyManager.isProvisioningAllowed(ACTION_PROVISION_MANAGED_DEVICE)</code></a> . 2281 </li> 2282 <li>MUST enroll the DPC application as the Device Owner app in response to the intent action <a href="http://developer.android.com/reference/android/app/admin/DevicePolicyManager.html#ACTION_PROVISION_MANAGED_DEVICE"><code>android.app.action.PROVISION_MANAGED_DEVICE</code></a> . 2283 </li> 2284 <li>MUST enroll the DPC application as the Device Owner app if the device declares Near-Field Communications (NFC) support via the feature flag <code>android.hardware.nfc</code> and receives an NFC message containing a record with MIME type <a href="https://developer.android.com/reference/android/app/admin/DevicePolicyManager.html#MIME_TYPE_PROVISIONING_NFC"><code>MIME_TYPE_PROVISIONING_NFC</code></a> . 2285 </li> 2286 </ul> 2287 </li> 2288 <li>When the device implementation has user data, it: 2289 <ul> 2290 <li>MUST report <code>false</code> for the <a href="https://developer.android.com/reference/android/app/admin/DevicePolicyManager.html#isProvisioningAllowed(java.lang.String)"><code>DevicePolicyManager.isProvisioningAllowed(ACTION_PROVISION_MANAGED_DEVICE)</code></a> . 2291 </li> 2292 <li>MUST not enroll any DPC application as the Device Owner App any more. 2293 </li> 2294 </ul> 2295 </li> 2296 </ul> 2297 <p> 2298 Device implementations MAY have a preinstalled application performing device administration functions but this application MUST NOT be set as the Device Owner app without explicit consent or action from the user or the administrator of the device. 2299 </p> 2300 <h4 id="3_9_1_2_managed_profile_provisioning"> 2301 3.9.1.2 Managed profile provisioning 2302 </h4> 2303 <p> 2304 If a device implementation declares the android.software.managed_users, it MUST be possible to enroll a Device Policy Controller (DPC) application as the <a href="http://developer.android.com/reference/android/app/admin/DevicePolicyManager.html#isProfileOwnerApp(java.lang.String)">owner of a new Managed Profile</a> . 2305 </p> 2306 <p> 2307 The managed profile provisioning process (the flow initiated by <a href="http://developer.android.com/reference/android/app/admin/DevicePolicyManager.html#ACTION_PROVISION_MANAGED_PROFILE">android.app.action.PROVISION_MANAGED_PROFILE</a> ) user experience MUST align with the AOSP implementation. 2308 </p> 2309 <p> 2310 Device implementations MUST provide the following user affordances within the Settings user interface to indicate to the user when a particular system function has been disabled by the Device Policy Controller (DPC): 2311 </p> 2312 <ul> 2313 <li>A consistent icon or other user affordance (for example the upstream AOSP info icon) to represent when a particular setting is restricted by a Device Admin. 2314 </li> 2315 <li>A short explanation message, as provided by the Device Admin via the <a href="https://developer.android.com/reference/android/app/admin/DevicePolicyManager.html#setShortSupportMessage%28android.content.ComponentName,%20java.lang.CharSequence%29"><code>setShortSupportMessage</code></a> . 2316 </li> 2317 <li>The DPC applications icon. 2318 </li> 2319 </ul> 2320 <h2 id="3_9_2_managed_profile_support"> 2321 3.9.2 Managed Profile Support 2322 </h2> 2323 <p> 2324 Managed profile capable devices are those devices that: 2325 </p> 2326 <ul> 2327 <li>Declare android.software.device_admin (see <a href="#3_9_device_administration">section 3.9 Device Administration</a> ). 2328 </li> 2329 <li>Are not low RAM devices (see <a href="#7_6_1_minimum_memory_and_storage">section 7.6.1</a> ). 2330 </li> 2331 <li>Allocate internal (non-removable) storage as shared storage (see <a href="#7_6_2_application_shared_storage">section 7.6.2</a> ). 2332 </li> 2333 </ul> 2334 <p> 2335 Managed profile capable devices MUST: 2336 </p> 2337 <ul> 2338 <li>Declare the platform feature flag <code>android.software.managed_users</code> . 2339 </li> 2340 <li>Support managed profiles via the <code>android.app.admin.DevicePolicyManager</code> APIs. 2341 </li> 2342 <li>Allow one and only <a href="http://developer.android.com/reference/android/app/admin/DevicePolicyManager.html#ACTION_PROVISION_MANAGED_PROFILE">one managed profile to be created</a> . 2343 </li> 2344 <li>Use an icon badge (similar to the AOSP upstream work badge) to represent the managed applications and widgets and other badged UI elements like Recents & Notifications. 2345 </li> 2346 <li>Display a notification icon (similar to the AOSP upstream work badge) to indicate when user is within a managed profile application. 2347 </li> 2348 <li>Display a toast indicating that the user is in the managed profile if and when the device wakes up (ACTION_USER_PRESENT) and the foreground application is within the managed profile. 2349 </li> 2350 <li>Where a managed profile exists, show a visual affordance in the Intent 'Chooser' to allow the user to forward the intent from the managed profile to the primary user or vice versa, if enabled by the Device Policy Controller. 2351 </li> 2352 <li>Where a managed profile exists, expose the following user affordances for both the primary user and the managed profile: 2353 <ul> 2354 <li>Separate accounting for battery, location, mobile data and storage usage for the primary user and managed profile. 2355 </li> 2356 <li>Independent management of VPN Applications installed within the primary user or managed profile. 2357 </li> 2358 <li>Independent management of applications installed within the primary user or managed profile. 2359 </li> 2360 <li>Independent management of accounts within the primary user or managed profile. 2361 </li> 2362 </ul> 2363 </li> 2364 <li>Ensure the preinstalled dialer, contacts and messaging applications can search for and look up caller information from the managed profile (if one exists) alongside those from the primary profile, if the Device Policy Controller permits it. When contacts from the managed profile are displayed in the preinstalled call log, in-call UI, in-progress and missed-call notifications, contacts and messaging apps they SHOULD be badged with the same badge used to indicate managed profile applications. 2365 </li> 2366 <li>MUST ensure that it satisfies all the security requirements applicable for a device with multiple users enabled (see <a href="#9_5_multi-user_support">section 9.5</a> ), even though the managed profile is not counted as another user in addition to the primary user. 2367 </li> 2368 <li>Support the ability to specify a separate lock screen meeting the following requirements to grant access to apps running in a managed profile. 2369 <ul> 2370 <li>Device implementations MUST honor the <a href="https://developer.android.com/reference/android/app/admin/DevicePolicyManager.html#ACTION_SET_NEW_PASSWORD"><code>DevicePolicyManager.ACTION_SET_NEW_PASSWORD</code></a> intent and show an interface to configure a separate lock screen credential for the managed profile. 2371 </li> 2372 <li>The lock screen credentials of the managed profile MUST use the same credential storage and management mechanisms as the parent profile, as documented on the <a href="http://source.android.com/security/authentication/index.html">Android Open Source Project Site</a> 2373 </li> 2374 <li>The DPC <a href="https://developer.android.com/guide/topics/admin/device-admin.html#pwd">password policies</a> MUST apply to only the managed profile's lock screen credentials unless called upon the <code>DevicePolicyManager</code> instance returned by <a href="https://developer.android.com/reference/android/app/admin/DevicePolicyManager.html#getParentProfileInstance%28android.content.ComponentName%29">getParentProfileInstance</a> . 2375 </li> 2376 </ul> 2377 </li> 2378 </ul> 2379 <h2 id="3_10_accessibility"> 2380 3.10. Accessibility 2381 </h2> 2382 <p> 2383 Android provides an accessibility layer that helps users with disabilities to navigate their devices more easily. In addition, Android provides platform APIs that enable <a href="http://developer.android.com/reference/android/accessibilityservice/AccessibilityService.html">accessibility service implementations</a> to receive callbacks for user and system events and generate alternate feedback mechanisms, such as text-to-speech, haptic feedback, and trackball/d-pad navigation. 2384 </p> 2385 <p> 2386 Device implementations include the following requirements: 2387 </p> 2388 <ul> 2389 <li>Android Automotive implementations SHOULD provide an implementation of the Android accessibility framework consistent with the default Android implementation. 2390 </li> 2391 <li>Device implementations (Android Automotive excluded) MUST provide an implementation of the Android accessibility framework consistent with the default Android implementation. 2392 </li> 2393 <li>Device implementations (Android Automotive excluded) MUST support third-party accessibility service implementations through the <a href="http://developer.android.com/reference/android/view/accessibility/package-summary.html">android.accessibilityservice APIs</a> . 2394 </li> 2395 <li>Device implementations (Android Automotive excluded) MUST generate AccessibilityEvents and deliver these events to all registered AccessibilityService implementations in a manner consistent with the default Android implementation 2396 </li> 2397 <li> 2398 <p> 2399 Device implementations (Android Automotive and Android Watch devices with no audio output excluded), MUST provide a user-accessible mechanism to enable and disable accessibility services, and MUST display this interface in response to the android.provider.Settings.ACTION_ACCESSIBILITY_SETTINGS intent. 2400 </p> 2401 </li> 2402 <li> 2403 <p> 2404 Android device implementations with audio output are STRONGLY RECOMMENDED to provide implementations of accessibility services on the device comparable in or exceeding functionality of the TalkBack** and Switch Access accessibility services (https://github.com/google/talkback). 2405 </p> 2406 </li> 2407 <li>Android Watch devices with audio output SHOULD provide implementations of an accessibility service on the device comparable in or exceeding functionality of the TalkBack accessibility service (https://github.com/google/talkback). 2408 </li> 2409 <li>Device implementations SHOULD provide a mechanism in the out-of-box setup flow for users to enable relevant accessibility services, as well as options to adjust the font size, display size and magnification gestures. 2410 </li> 2411 </ul> 2412 <p> 2413 ** For languages supported by Text-to-speech. 2414 </p> 2415 <p> 2416 Also, note that if there is a preloaded accessibility service, it MUST be a Direct Boot aware {directBootAware} app if the device has encrypted storage using File Based Encryption (FBE). 2417 </p> 2418 <h2 id="3_11_text-to-speech"> 2419 3.11. Text-to-Speech 2420 </h2> 2421 <p> 2422 Android includes APIs that allow applications to make use of text-to-speech (TTS) services and allows service providers to provide implementations of TTS services. Device implementations reporting the feature android.hardware.audio.output MUST meet these requirements related to the <a href="http://developer.android.com/reference/android/speech/tts/package-summary.html">Android TTS framework</a> . 2423 </p> 2424 <p> 2425 Android Automotive implementations: 2426 </p> 2427 <ul> 2428 <li>MUST support the Android TTS framework APIs. 2429 </li> 2430 <li>MAY support installation of third-party TTS engines. If supported, partners MUST provide a user-accessible interface that allows the user to select a TTS engine for use at system level. 2431 </li> 2432 </ul> 2433 <p> 2434 All other device implementations: 2435 </p> 2436 <ul> 2437 <li>MUST support the Android TTS framework APIs and SHOULD include a TTS engine supporting the languages available on the device. Note that the upstream Android open source software includes a full-featured TTS engine implementation. 2438 </li> 2439 <li>MUST support installation of third-party TTS engines. 2440 </li> 2441 <li>MUST provide a user-accessible interface that allows users to select a TTS engine for use at the system level. 2442 </li> 2443 </ul> 2444 <h2 id="3_12_tv_input_framework"> 2445 3.12. TV Input Framework 2446 </h2> 2447 <p> 2448 The <a href="http://source.android.com/devices/tv/index.html">Android Television Input Framework (TIF)</a> simplifies the delivery of live content to Android Television devices. TIF provides a standard API to create input modules that control Android Television devices. Android Television device implementations MUST support TV Input Framework. 2449 </p> 2450 <p> 2451 Device implementations that support TIF MUST declare the platform feature android.software.live_tv. 2452 </p> 2453 <h3 id="3_12_1_tv_app"> 2454 3.12.1. TV App 2455 </h3> 2456 <p> 2457 Any device implementation that declares support for Live TV MUST have an installed TV application (TV App). The Android Open Source Project provides an implementation of the TV App. 2458 </p> 2459 <p> 2460 The TV App MUST provide facilities to install and use <a href="http://developer.android.com/reference/android/media/tv/TvContract.Channels.html">TV Channels</a> and meet the following requirements: 2461 </p> 2462 <ul> 2463 <li>Device implementations MUST allow third-party TIF-based inputs ( <a href="https://source.android.com/devices/tv/index.html#third-party_input_example">third-party inputs</a> ) to be installed and managed. 2464 </li> 2465 <li>Device implementations MAY provide visual separation between pre-installed <a href="https://source.android.com/devices/tv/index.html#tv_inputs">TIF-based inputs</a> (installed inputs) and third-party inputs. 2466 </li> 2467 <li>Device implementations MUST NOT display the third-party inputs more than a single navigation action away from the TV App (i.e. expanding a list of third-party inputs from the TV App). 2468 </li> 2469 </ul> 2470 <h4 id="3_12_1_1_electronic_program_guide"> 2471 3.12.1.1. Electronic Program Guide 2472 </h4> 2473 <p> 2474 Android Television device implementations MUST show an informational and interactive overlay, which MUST include an electronic program guide (EPG) generated from the values in the <a href="https://developer.android.com/reference/android/media/tv/TvContract.Programs.html">TvContract.Programs</a> fields. The EPG MUST meet the following requirements: 2475 </p> 2476 <ul> 2477 <li>The EPG MUST display information from all installed inputs and third-party inputs. 2478 </li> 2479 <li>The EPG MAY provide visual separation between the installed inputs and third-party inputs. 2480 </li> 2481 <li>The EPG is STRONGLY RECOMMENDED to display installed inputs and third-party inputs with equal prominence. The EPG MUST NOT display the third-party inputs more than a single navigation action away from the installed inputs on the EPG. 2482 </li> 2483 <li>On channel change, device implementations MUST display EPG data for the currently playing program. 2484 </li> 2485 </ul> 2486 <h4 id="3_12_1_2_navigation"> 2487 3.12.1.2. Navigation 2488 </h4> 2489 <p> 2490 The TV App MUST allow navigation for the following functions via the D-pad, Back, and Home keys on the Android Television devices input device(s) (i.e. remote control, remote control application, or game controller): 2491 </p> 2492 <ul> 2493 <li>Changing TV channels 2494 </li> 2495 <li>Opening EPG 2496 </li> 2497 <li>Configuring and tuning to third-party TIF-based inputs 2498 </li> 2499 <li>Opening Settings menu 2500 </li> 2501 </ul> 2502 <p> 2503 The TV App SHOULD pass key events to HDMI inputs through CEC. 2504 </p> 2505 <h4 id="3_12_1_3_tv_input_app_linking"> 2506 3.12.1.3. TV input app linking 2507 </h4> 2508 <p> 2509 Android Television device implementations MUST support <a href="http://developer.android.com/reference/android/media/tv/TvContract.Channels.html#COLUMN_APP_LINK_INTENT_URI">TV input app linking</a> , which allows all inputs to provide activity links from the current activity to another activity (i.e. a link from live programming to related content). The TV App MUST show TV input app linking when it is provided. 2510 </p> 2511 <h4 id="3_12_1_4_time_shifting"> 2512 3.12.1.4. Time shifting 2513 </h4> 2514 <p> 2515 Android Television device implementations MUST support time shifting, which allows the user to pause and resume live content. Device implementations MUST provide the user a way to pause and resume the currently playing program, if time shifting for that program <a href="https://developer.android.com/reference/android/media/tv/TvInputManager.html#TIME_SHIFT_STATUS_AVAILABLE">is available</a> . 2516 </p> 2517 <h4 id="3_12_1_5_tv_recording"> 2518 3.12.1.5. TV recording 2519 </h4> 2520 <p> 2521 Android Television device implementations are STRONGLY RECOMMENDED to support TV recording. If the TV input supports recording, the EPG MAY provide a way to <a href="https://developer.android.com/reference/android/media/tv/TvInputInfo.html#canRecord%28%29">record a program</a> if the recording of such a program is not <a href="https://developer.android.com/reference/android/media/tv/TvContract.Programs.html#COLUMN_RECORDING_PROHIBITED">prohibited</a> . Device implementations SHOULD provide a user interface to play recorded programs. 2522 </p> 2523 <h2 id="3_13_quick_settings"> 2524 3.13. Quick Settings 2525 </h2> 2526 <p> 2527 Android device implementations SHOULD include a Quick Settings UI component that allow quick access to frequently used or urgently needed actions. 2528 </p> 2529 <p> 2530 Android includes the <a href="https://developer.android.com/reference/android/service/quicksettings/package-summary.html"><code>quicksettings</code></a> API allowing third party apps to implement tiles that can be added by the user alongside the system-provided tiles in the Quick Settings UI component. If a device implementation has a Quick Settings UI component, it: 2531 </p> 2532 <ul> 2533 <li>MUST allow the user to add or remove tiles from a third-party app to Quick Settings. 2534 </li> 2535 <li>MUST NOT automatically add a tile from a third-party app directly to Quick Settings. 2536 </li> 2537 <li>MUST display all the user-added tiles from third-party apps alongside the system-provided quick setting tiles. 2538 </li> 2539 </ul> 2540 <h2 id="3_14_vehicle_ui_apis"> 2541 3.14. Vehicle UI APIs 2542 </h2> 2543 <h3 id="3_14_1__vehicle_media_ui"> 2544 3.14.1. Vehicle Media UI 2545 </h3> 2546 <p> 2547 Any device implementation that <a href="https://developer.android.com/reference/android/content/pm/PackageManager.html?#FEATURE_AUTOMOTIVE?">declares automotive support</a> MUST include a UI framework to support third-party apps consuming the <a href="http://developer.android.com/reference/android/media/browse/MediaBrowser.html">MediaBrowser</a> and <a href="http://developer.android.com/reference/android/media/session/MediaSession.html">MediaSession</a> APIs. 2548 </p> 2549 <p> 2550 The UI framework supporting third-party apps that depend on MediaBrowser and MediaSession has the following visual requirements: 2551 </p> 2552 <ul> 2553 <li>MUST display <a href="http://developer.android.com/reference/android/media/browse/MediaBrowser.MediaItem.html">MediaItem</a> icons and notification icons unaltered. 2554 </li> 2555 <li>MUST display those items as described by MediaSession, e.g., metadata, icons, imagery. 2556 </li> 2557 <li>MUST show app title. 2558 </li> 2559 <li>MUST have drawer to present <a href="http://developer.android.com/reference/android/media/browse/MediaBrowser.html">MediaBrowser</a> hierarchy. 2560 </li> 2561 </ul> 2562 <h1 id="4_application_packaging_compatibility"> 2563 4. Application Packaging Compatibility 2564 </h1> 2565 <p> 2566 Device implementations MUST install and run Android .apk files as generated by the aapt tool included in the <a href="http://developer.android.com/tools/help/index.html">official Android SDK</a> . For this reason device implementations SHOULD use the reference implementations package management system. 2567 </p> 2568 <p> 2569 The package manager MUST support verifying .apk files using the <a href="https://source.android.com/security/apksigning/v2.html">APK Signature Scheme v2</a> . 2570 </p> 2571 <p> 2572 Devices implementations MUST NOT extend either the <a href="http://developer.android.com/guide/components/fundamentals.html">.apk</a> , <a href="http://developer.android.com/guide/topics/manifest/manifest-intro.html">Android Manifest</a> , <a href="https://android.googlesource.com/platform/dalvik/">Dalvik bytecode</a> , or RenderScript bytecode formats in such a way that would prevent those files from installing and running correctly on other compatible devices. 2573 </p> 2574 <p> 2575 Device implementations MUST NOT allow apps other than the current "installer of record" for the package to silently uninstall the app without any prompt, as documented in the SDK for the <a href="https://developer.android.com/reference/android/Manifest.permission.html#DELETE_PACKAGES"><code>DELETE_PACKAGE</code></a> permission. The only exceptions are the system package verifier app handling <a href="https://developer.android.com/reference/android/content/Intent.html#ACTION_PACKAGE_NEEDS_VERIFICATION">PACKAGE_NEEDS_VERIFICATION</a> intent and the storage manager app handling <a href="https://developer.android.com/reference/android/os/storage/StorageManager.html#ACTION_MANAGE_STORAGE">ACTION_MANAGE_STORAGE</a> intent. 2576 </p> 2577 <h1 id="5_multimedia_compatibility"> 2578 5. Multimedia Compatibility 2579 </h1> 2580 <h2 id="5_1_media_codecs"> 2581 5.1. Media Codecs 2582 </h2> 2583 <p> 2584 Device implementations 2585 </p> 2586 <ul> 2587 <li> 2588 <p> 2589 MUST support the <a href="http://developer.android.com/guide/appendix/media-formats.html">core media formats</a> specified in the Android SDK documentation, except where explicitly permitted in this document. 2590 </p> 2591 </li> 2592 <li> 2593 <p> 2594 MUST support the media formats, encoders, decoders, file types, and container formats defined in the tables below and reported via <a href="http://developer.android.com/reference/android/media/MediaCodecList.html">MediaCodecList</a> . 2595 </p> 2596 </li> 2597 <li> 2598 <p> 2599 MUST also be able to decode all profiles reported in its <a href="http://developer.android.com/reference/android/media/CamcorderProfile.html">CamcorderProfile</a> 2600 </p> 2601 </li> 2602 <li> 2603 <p> 2604 MUST be able to decode all formats it can encode. This includes all bitstreams that its encoders generate. 2605 </p> 2606 </li> 2607 </ul> 2608 <p> 2609 Codecs SHOULD aim for minimum codec latency, in other words, codecs 2610 </p> 2611 <ul> 2612 <li>SHOULD NOT consume and store input buffers and return input buffers only once processed 2613 </li> 2614 <li>SHOULD NOT hold onto decoded buffers for longer than as specified by the standard (e.g. SPS). 2615 </li> 2616 <li>SHOULD NOT hold onto encoded buffers longer than required by the GOP structure. 2617 </li> 2618 </ul> 2619 <p> 2620 All of the codecs listed in the table below are provided as software implementations in the preferred Android implementation from the Android Open Source Project. 2621 </p> 2622 <p> 2623 Please note that neither Google nor the Open Handset Alliance make any representation that these codecs are free from third-party patents. Those intending to use this source code in hardware or software products are advised that implementations of this code, including in open source software or shareware, may require patent licenses from the relevant patent holders. 2624 </p> 2625 <h3 id="5_1_1_audio_codecs"> 2626 5.1.1. Audio Codecs 2627 </h3> 2628 <table> 2629 <tr> 2630 <th> 2631 Format/Codec 2632 </th> 2633 <th> 2634 Encoder 2635 </th> 2636 <th> 2637 Decoder 2638 </th> 2639 <th> 2640 Details 2641 </th> 2642 <th> 2643 Supported File Types/Container Formats 2644 </th> 2645 </tr> 2646 <tr> 2647 <td> 2648 MPEG-4 AAC Profile<br /> 2649 (AAC LC) 2650 </td> 2651 <td> 2652 REQUIRED <sup>1</sup> 2653 </td> 2654 <td> 2655 REQUIRED 2656 </td> 2657 <td> 2658 Support for mono/stereo/5.0/5.1 <sup>2</sup> content with standard sampling rates from 8 to 48 kHz. 2659 </td> 2660 <td> 2661 <ul> 2662 <li class="table_list">3GPP (.3gp) 2663 </li> 2664 <li class="table_list">MPEG-4 (.mp4, .m4a) 2665 </li> 2666 <li class="table_list">ADTS raw AAC (.aac, decode in Android 3.1+, encode in Android 4.0+, ADIF not supported) 2667 </li> 2668 <li class="table_list">MPEG-TS (.ts, not seekable, Android 3.0+) 2669 </li> 2670 </ul> 2671 </td> 2672 </tr> 2673 <tr> 2674 <td> 2675 MPEG-4 HE AAC Profile (AAC+) 2676 </td> 2677 <td> 2678 REQUIRED <sup>1</sup><br /> 2679 (Android 4.1+) 2680 </td> 2681 <td> 2682 REQUIRED 2683 </td> 2684 <td> 2685 Support for mono/stereo/5.0/5.1 <sup>2</sup> content with standard sampling rates from 16 to 48 kHz. 2686 </td> 2687 <td></td> 2688 </tr> 2689 <tr> 2690 <td> 2691 MPEG-4 HE AACv2<br /> 2692 Profile (enhanced AAC+) 2693 </td> 2694 <td></td> 2695 <td> 2696 REQUIRED 2697 </td> 2698 <td> 2699 Support for mono/stereo/5.0/5.1 <sup>2</sup> content with standard sampling rates from 16 to 48 kHz. 2700 </td> 2701 <td></td> 2702 </tr> 2703 <tr> 2704 <td> 2705 AAC ELD (enhanced low delay AAC) 2706 </td> 2707 <td> 2708 REQUIRED <sup>1</sup><br /> 2709 (Android 4.1+) 2710 </td> 2711 <td> 2712 REQUIRED<br /> 2713 (Android 4.1+) 2714 </td> 2715 <td> 2716 Support for mono/stereo content with standard sampling rates from 16 to 48 kHz. 2717 </td> 2718 <td></td> 2719 </tr> 2720 <tr> 2721 <td> 2722 AMR-NB 2723 </td> 2724 <td> 2725 REQUIRED <sup>3</sup> 2726 </td> 2727 <td> 2728 REQUIRED <sup>3</sup> 2729 </td> 2730 <td> 2731 4.75 to 12.2 kbps sampled @ 8 kHz 2732 </td> 2733 <td> 2734 3GPP (.3gp) 2735 </td> 2736 </tr> 2737 <tr> 2738 <td> 2739 AMR-WB 2740 </td> 2741 <td> 2742 REQUIRED <sup>3</sup> 2743 </td> 2744 <td> 2745 REQUIRED <sup>3</sup> 2746 </td> 2747 <td> 2748 9 rates from 6.60 kbit/s to 23.85 kbit/s sampled @ 16 kHz 2749 </td> 2750 <td></td> 2751 </tr> 2752 <tr> 2753 <td> 2754 FLAC 2755 </td> 2756 <td></td> 2757 <td> 2758 REQUIRED<br /> 2759 (Android 3.1+) 2760 </td> 2761 <td> 2762 Mono/Stereo (no multichannel). Sample rates up to 48 kHz (but up to 44.1 kHz is RECOMMENDED on devices with 44.1 kHz output, as the 48 to 44.1 kHz downsampler does not include a low-pass filter). 16-bit RECOMMENDED; no dither applied for 24-bit. 2763 </td> 2764 <td> 2765 FLAC (.flac) only 2766 </td> 2767 </tr> 2768 <tr> 2769 <td> 2770 MP3 2771 </td> 2772 <td></td> 2773 <td> 2774 REQUIRED 2775 </td> 2776 <td> 2777 Mono/Stereo 8-320Kbps constant (CBR) or variable bitrate (VBR) 2778 </td> 2779 <td> 2780 MP3 (.mp3) 2781 </td> 2782 </tr> 2783 <tr> 2784 <td> 2785 MIDI 2786 </td> 2787 <td></td> 2788 <td> 2789 REQUIRED 2790 </td> 2791 <td> 2792 MIDI Type 0 and 1. DLS Version 1 and 2. XMF and Mobile XMF. Support for ringtone formats RTTTL/RTX, OTA, and iMelody 2793 </td> 2794 <td> 2795 <ul> 2796 <li class="table_list">Type 0 and 1 (.mid, .xmf, .mxmf) 2797 </li> 2798 <li class="table_list">RTTTL/RTX (.rtttl, .rtx) 2799 </li> 2800 <li class="table_list">OTA (.ota) 2801 </li> 2802 <li class="table_list">iMelody (.imy) 2803 </li> 2804 </ul> 2805 </td> 2806 </tr> 2807 <tr> 2808 <td> 2809 Vorbis 2810 </td> 2811 <td></td> 2812 <td> 2813 REQUIRED 2814 </td> 2815 <td></td> 2816 <td> 2817 <ul> 2818 <li class="table_list">Ogg (.ogg) 2819 </li> 2820 <li class="table_list">Matroska (.mkv, Android 4.0+) 2821 </li> 2822 </ul> 2823 </td> 2824 </tr> 2825 <tr> 2826 <td> 2827 PCM/WAVE 2828 </td> 2829 <td> 2830 REQUIRED <sup>4</sup><br /> 2831 (Android 4.1+) 2832 </td> 2833 <td> 2834 REQUIRED 2835 </td> 2836 <td> 2837 16-bit linear PCM (rates up to limit of hardware). Devices MUST support sampling rates for raw PCM recording at 8000, 11025, 16000, and 44100 Hz frequencies. 2838 </td> 2839 <td> 2840 WAVE (.wav) 2841 </td> 2842 </tr> 2843 <tr> 2844 <td> 2845 Opus 2846 </td> 2847 <td></td> 2848 <td> 2849 REQUIRED<br /> 2850 (Android 5.0+) 2851 </td> 2852 <td></td> 2853 <td> 2854 Matroska (.mkv), Ogg(.ogg) 2855 </td> 2856 </tr> 2857 </table> 2858 <p class="table_footnote"> 2859 1 Required for device implementations that define android.hardware.microphone but optional for Android Watch device implementations. 2860 </p> 2861 <p class="table_footnote"> 2862 2 Recording or playback MAY be performed in mono or stereo, but the decoding of AAC input buffers of multichannel streams (i.e. more than two channels) to PCM through the default AAC audio decoder in the android.media.MediaCodec API, the following MUST be supported: 2863 </p> 2864 <ul> 2865 <li>decoding is performed without downmixing (e.g. a 5.0 AAC stream must be decoded to five channels of PCM, a 5.1 AAC stream must be decoded to six channels of PCM), 2866 </li> 2867 <li>dynamic range metadata, as defined in "Dynamic Range Control (DRC)" in ISO/IEC 14496-3, and the android.media.MediaFormat DRC keys to configure the dynamic range-related behaviors of the audio decoder. The AAC DRC keys were introduced in API 21,and are: KEY_AAC_DRC_ATTENUATION_FACTOR, KEY_AAC_DRC_BOOST_FACTOR, KEY_AAC_DRC_HEAVY_COMPRESSION, KEY_AAC_DRC_TARGET_REFERENCE_LEVEL and KEY_AAC_ENCODED_TARGET_LEVEL 2868 </li> 2869 </ul> 2870 <p class="table_footnote"> 2871 3 Required for Android Handheld device implementations. 2872 </p> 2873 <p class="table_footnote"> 2874 4 Required for device implementations that define android.hardware.microphone, including Android Watch device implementations. 2875 </p> 2876 <h3 id="5_1_2_image_codecs"> 2877 5.1.2. Image Codecs 2878 </h3> 2879 <table> 2880 <tr> 2881 <th> 2882 Format/Codec 2883 </th> 2884 <th> 2885 Encoder 2886 </th> 2887 <th> 2888 Decoder 2889 </th> 2890 <th> 2891 Details 2892 </th> 2893 <th> 2894 Supported File Types/Container Formats 2895 </th> 2896 </tr> 2897 <tr> 2898 <td> 2899 JPEG 2900 </td> 2901 <td> 2902 REQUIRED 2903 </td> 2904 <td> 2905 REQUIRED 2906 </td> 2907 <td> 2908 Base+progressive 2909 </td> 2910 <td> 2911 JPEG (.jpg) 2912 </td> 2913 </tr> 2914 <tr> 2915 <td> 2916 GIF 2917 </td> 2918 <td></td> 2919 <td> 2920 REQUIRED 2921 </td> 2922 <td></td> 2923 <td> 2924 GIF (.gif) 2925 </td> 2926 </tr> 2927 <tr> 2928 <td> 2929 PNG 2930 </td> 2931 <td> 2932 REQUIRED 2933 </td> 2934 <td> 2935 REQUIRED 2936 </td> 2937 <td></td> 2938 <td> 2939 PNG (.png) 2940 </td> 2941 </tr> 2942 <tr> 2943 <td> 2944 BMP 2945 </td> 2946 <td></td> 2947 <td> 2948 REQUIRED 2949 </td> 2950 <td></td> 2951 <td> 2952 BMP (.bmp) 2953 </td> 2954 </tr> 2955 <tr> 2956 <td> 2957 WebP 2958 </td> 2959 <td> 2960 REQUIRED 2961 </td> 2962 <td> 2963 REQUIRED 2964 </td> 2965 <td></td> 2966 <td> 2967 WebP (.webp) 2968 </td> 2969 </tr> 2970 <tr> 2971 <td> 2972 Raw 2973 </td> 2974 <td></td> 2975 <td> 2976 REQUIRED 2977 </td> 2978 <td></td> 2979 <td> 2980 ARW (.arw), CR2 (.cr2), DNG (.dng), NEF (.nef), NRW (.nrw), ORF (.orf), PEF (.pef), RAF (.raf), RW2 (.rw2), SRW (.srw) 2981 </td> 2982 </tr> 2983 </table> 2984 <h3 id="5_1_3_video_codecs"> 2985 5.1.3. Video Codecs 2986 </h3> 2987 <ul> 2988 <li> 2989 <p> 2990 Codecs advertising HDR profile support MUST support HDR static metadata parsing and handling. 2991 </p> 2992 </li> 2993 <li> 2994 <p> 2995 If a media codec advertises intra refresh support, then it MUST support the refresh periods in the range of 10 - 60 frames and accurately operate within 20% of configured refresh period. 2996 </p> 2997 </li> 2998 <li> 2999 <p> 3000 Video codecs MUST support output and input bytebuffer sizes that accommodate the largest feasible compressed and uncompressed frame as dictated by the standard and configuration but also not overallocate. 3001 </p> 3002 </li> 3003 <li> 3004 <p> 3005 Video encoders and decoders MUST support YUV420 flexible color format (COLOR_FormatYUV420Flexible). 3006 </p> 3007 </li> 3008 </ul> 3009 <table> 3010 <tr> 3011 <th> 3012 Format/Codec 3013 </th> 3014 <th> 3015 Encoder 3016 </th> 3017 <th> 3018 Decoder 3019 </th> 3020 <th> 3021 Details 3022 </th> 3023 <th> 3024 Supported File Types/<br /> 3025 Container Formats 3026 </th> 3027 </tr> 3028 <tr> 3029 <td> 3030 H.263 3031 </td> 3032 <td> 3033 MAY 3034 </td> 3035 <td> 3036 MAY 3037 </td> 3038 <td></td> 3039 <td> 3040 <ul> 3041 <li class="table_list">3GPP (.3gp) 3042 </li> 3043 <li class="table_list">MPEG-4 (.mp4) 3044 </li> 3045 </ul> 3046 </td> 3047 </tr> 3048 <tr> 3049 <td> 3050 H.264 AVC 3051 </td> 3052 <td> 3053 REQUIRED <sup>2</sup> 3054 </td> 3055 <td> 3056 REQUIRED <sup>2</sup> 3057 </td> 3058 <td> 3059 See <a href="#5_2_video_encoding">section 5.2</a> and <a href="#5_3_video_decoding">5.3</a> for details 3060 </td> 3061 <td> 3062 <ul> 3063 <li class="table_list">3GPP (.3gp) 3064 </li> 3065 <li class="table_list">MPEG-4 (.mp4) 3066 </li> 3067 <li class="table_list">MPEG-2 TS (.ts, AAC audio only, not seekable, Android 3.0+) 3068 </li> 3069 </ul> 3070 </td> 3071 </tr> 3072 <tr> 3073 <td> 3074 H.265 HEVC 3075 </td> 3076 <td></td> 3077 <td> 3078 REQUIRED <sup>5</sup> 3079 </td> 3080 <td> 3081 See <a href="#5_3_video_decoding">section 5.3</a> for details 3082 </td> 3083 <td> 3084 MPEG-4 (.mp4) 3085 </td> 3086 </tr> 3087 <tr> 3088 <td> 3089 MPEG-2 3090 </td> 3091 <td></td> 3092 <td> 3093 STRONGLY RECOMMENDED <sup>6</sup> 3094 </td> 3095 <td> 3096 Main Profile 3097 </td> 3098 <td> 3099 MPEG2-TS 3100 </td> 3101 </tr> 3102 <tr> 3103 <td> 3104 MPEG-4 SP 3105 </td> 3106 <td></td> 3107 <td> 3108 REQUIRED <sup>2</sup> 3109 </td> 3110 <td></td> 3111 <td> 3112 3GPP (.3gp) 3113 </td> 3114 </tr> 3115 <tr> 3116 <td> 3117 VP8 <sup>3</sup> 3118 </td> 3119 <td> 3120 REQUIRED <sup>2</sup><br /> 3121 (Android 4.3+) 3122 </td> 3123 <td> 3124 REQUIRED <sup>2</sup><br /> 3125 (Android 2.3.3+) 3126 </td> 3127 <td> 3128 See <a href="#5_2_video_encoding">section 5.2</a> and <a href="#5_3_video_decoding">5.3</a> for details 3129 </td> 3130 <td> 3131 <ul> 3132 <li class="table_list"> 3133 <a href="http://www.webmproject.org/">WebM (.webm)</a> 3134 </li> 3135 <li class="table_list">Matroska (.mkv, Android 4.0+) <sup>4</sup> 3136 </li> 3137 </ul> 3138 </td> 3139 </tr> 3140 <tr> 3141 <td> 3142 VP9 3143 </td> 3144 <td></td> 3145 <td> 3146 REQUIRED <sup>2</sup><br /> 3147 (Android 4.4+) 3148 </td> 3149 <td> 3150 See <a href="#5_3_video_decoding">section 5.3</a> for details 3151 </td> 3152 <td> 3153 <ul> 3154 <li class="table_list"> 3155 <a href="http://www.webmproject.org/">WebM (.webm)</a> 3156 </li> 3157 <li class="table_list">Matroska (.mkv, Android 4.0+) <sup>4</sup> 3158 </li> 3159 </ul> 3160 </td> 3161 </tr> 3162 </table> 3163 <p class="table_footnote"> 3164 1 Required for device implementations that include camera hardware and define android.hardware.camera or android.hardware.camera.front. 3165 </p> 3166 <p class="table_footnote"> 3167 2 Required for device implementations except Android Watch devices. 3168 </p> 3169 <p class="table_footnote"> 3170 3 For acceptable quality of web video streaming and video-conference services, device implementations SHOULD use a hardware VP8 codec that meets the <a href="http://www.webmproject.org/hardware/rtc-coding-requirements/">requirements</a> . 3171 </p> 3172 <p class="table_footnote"> 3173 4 Device implementations SHOULD support writing Matroska WebM files. 3174 </p> 3175 <p class="table_footnote"> 3176 5 STRONGLY RECOMMENDED for Android Automotive, optional for Android Watch, and required for all other device types. 3177 </p> 3178 <p class="table_footnote"> 3179 6 Applies only to Android Television device implementations. 3180 </p> 3181 <h2 id="5_2_video_encoding"> 3182 5.2. Video Encoding 3183 </h2> 3184 <div class="note"> 3185 Video codecs are optional for Android Watch device implementations. 3186 </div> 3187 <p> 3188 H.264, VP8, VP9 and HEVC video encoders 3189 </p> 3190 <ul> 3191 <li>MUST support dynamically configurable bitrates. 3192 </li> 3193 <li>SHOULD support variable frame rates, where video encoder SHOULD determine instantaneous frame duration based on the timestamps of input buffers, and allocate its bit bucket based on that frame duration. 3194 </li> 3195 </ul> 3196 <p> 3197 H.263 and MPEG-4 video encoder SHOULD support dynamically configurable bitrates. 3198 </p> 3199 <p> 3200 All video encoders SHOULD meet the following bitrate targets over two sliding windows: 3201 </p> 3202 <ul> 3203 <li>It SHOULD be not more than ~15% over the bitrate between intraframe (I-frame) intervals. 3204 </li> 3205 <li>It SHOULD be not more than ~100% over the bitrate over a sliding window of 1 second. 3206 </li> 3207 </ul> 3208 <h3 id="5_2_1_h_263"> 3209 5.2.1. H.263 3210 </h3> 3211 <p> 3212 Android device implementations with H.263 encoders MUST support Baseline Profile Level 45. 3213 </p> 3214 <h3 id="5_2_2_h-264"> 3215 5.2.2. H-264 3216 </h3> 3217 <p> 3218 Android device implementations with H.264 codec support: 3219 </p> 3220 <ul> 3221 <li>MUST support Baseline Profile Level 3.<br /> 3222 However, support for ASO (Arbitrary Slice Ordering), FMO (Flexible Macroblock Ordering) and RS (Redundant Slices) is OPTIONAL. Moreover, to maintain compatibility with other Android devices, it is RECOMMENDED that ASO, FMO and RS are not used for Baseline Profile by encoders. 3223 </li> 3224 <li>MUST support the SD (Standard Definition) video encoding profiles in the following table. 3225 </li> 3226 <li>SHOULD support Main Profile Level 4. 3227 </li> 3228 <li>SHOULD support the HD (High Definition) video encoding profiles as indicated in the following table. 3229 </li> 3230 <li>In addition, Android Television devices are STRONGLY RECOMMENDED to encode HD 1080p video at 30 fps. 3231 </li> 3232 </ul> 3233 <table> 3234 <tr> 3235 <th></th> 3236 <th> 3237 SD (Low quality) 3238 </th> 3239 <th> 3240 SD (High quality) 3241 </th> 3242 <th> 3243 HD 720p <sup>1</sup> 3244 </th> 3245 <th> 3246 HD 1080p <sup>1</sup> 3247 </th> 3248 </tr> 3249 <tr> 3250 <th> 3251 Video resolution 3252 </th> 3253 <td> 3254 320 x 240 px 3255 </td> 3256 <td> 3257 720 x 480 px 3258 </td> 3259 <td> 3260 1280 x 720 px 3261 </td> 3262 <td> 3263 1920 x 1080 px 3264 </td> 3265 </tr> 3266 <tr> 3267 <th> 3268 Video frame rate 3269 </th> 3270 <td> 3271 20 fps 3272 </td> 3273 <td> 3274 30 fps 3275 </td> 3276 <td> 3277 30 fps 3278 </td> 3279 <td> 3280 30 fps 3281 </td> 3282 </tr> 3283 <tr> 3284 <th> 3285 Video bitrate 3286 </th> 3287 <td> 3288 384 Kbps 3289 </td> 3290 <td> 3291 2 Mbps 3292 </td> 3293 <td> 3294 4 Mbps 3295 </td> 3296 <td> 3297 10 Mbps 3298 </td> 3299 </tr> 3300 </table> 3301 <p class="table_footnote"> 3302 1 When supported by hardware, but STRONGLY RECOMMENDED for Android Television devices. 3303 </p> 3304 <h3 id="5_2_3_vp8"> 3305 5.2.3. VP8 3306 </h3> 3307 <p> 3308 Android device implementations with VP8 codec support MUST support the SD video encoding profiles and SHOULD support the following HD (High Definition) video encoding profiles. 3309 </p> 3310 <table> 3311 <tr> 3312 <th></th> 3313 <th> 3314 SD (Low quality) 3315 </th> 3316 <th> 3317 SD (High quality) 3318 </th> 3319 <th> 3320 HD 720p <sup>1</sup> 3321 </th> 3322 <th> 3323 HD 1080p <sup>1</sup> 3324 </th> 3325 </tr> 3326 <tr> 3327 <th> 3328 Video resolution 3329 </th> 3330 <td> 3331 320 x 180 px 3332 </td> 3333 <td> 3334 640 x 360 px 3335 </td> 3336 <td> 3337 1280 x 720 px 3338 </td> 3339 <td> 3340 1920 x 1080 px 3341 </td> 3342 </tr> 3343 <tr> 3344 <th> 3345 Video frame rate 3346 </th> 3347 <td> 3348 30 fps 3349 </td> 3350 <td> 3351 30 fps 3352 </td> 3353 <td> 3354 30 fps 3355 </td> 3356 <td> 3357 30 fps 3358 </td> 3359 </tr> 3360 <tr> 3361 <th> 3362 Video bitrate 3363 </th> 3364 <td> 3365 800 Kbps 3366 </td> 3367 <td> 3368 2 Mbps 3369 </td> 3370 <td> 3371 4 Mbps 3372 </td> 3373 <td> 3374 10 Mbps 3375 </td> 3376 </tr> 3377 </table> 3378 <p class="table_footnote"> 3379 1 When supported by hardware. 3380 </p> 3381 <h2 id="5_3_video_decoding"> 3382 5.3. Video Decoding 3383 </h2> 3384 <div class="note"> 3385 Video codecs are optional for Android Watch device implementations. 3386 </div> 3387 <p> 3388 Device implementations 3389 </p> 3390 <ul> 3391 <li> 3392 <p> 3393 MUST support dynamic video resolution and frame rate switching through the standard Android APIs within the same stream for all VP8, VP9, H.264, and H.265 codecs in real time and up to the maximum resolution supported by each codec on the device. 3394 </p> 3395 </li> 3396 <li> 3397 <p> 3398 Implementations that support the Dolby Vision decoder 3399 </p> 3400 </li> 3401 <li>MUST provide a Dolby Vision-capable extractor. 3402 </li> 3403 <li> 3404 <p> 3405 MUST properly display Dolby Vision content on the device screen or on a standard video output port (e.g., HDMI). 3406 </p> 3407 </li> 3408 <li> 3409 <p> 3410 Implementations that provide a Dolby Vision-capable extractor MUST set the track index of backward-compatible base-layer(s) (if present) to be the same as the combined Dolby Vision layer's track index. 3411 </p> 3412 </li> 3413 </ul> 3414 <h3 id="5_3_1_mpeg-2"> 3415 5.3.1. MPEG-2 3416 </h3> 3417 <p> 3418 Android device implementations with MPEG-2 decoders must support the Main Profile High Level. 3419 </p> 3420 <h3 id="5_3_2_h_263"> 3421 5.3.2. H.263 3422 </h3> 3423 <p> 3424 Android device implementations with H.263 decoders MUST support Baseline Profile Level 30 and Level 45. 3425 </p> 3426 <h3 id="5_3_3_mpeg-4"> 3427 5.3.3. MPEG-4 3428 </h3> 3429 <p> 3430 Android device implementations with MPEG-4 decoders MUST support Simple Profile Level 3. 3431 </p> 3432 <h3 id="5_3_4_h_264"> 3433 5.3.4. H.264 3434 </h3> 3435 <p> 3436 Android device implementations with H.264 decoders: 3437 </p> 3438 <ul> 3439 <li>MUST support Main Profile Level 3.1 and Baseline Profile.<br /> 3440 Support for ASO (Arbitrary Slice Ordering), FMO (Flexible Macroblock Ordering) and RS (Redundant Slices) is OPTIONAL. 3441 </li> 3442 <li>MUST be capable of decoding videos with the SD (Standard Definition) profiles listed in the following table and encoded with the Baseline Profile and Main Profile Level 3.1 (including 720p30). 3443 </li> 3444 <li>SHOULD be capable of decoding videos with the HD (High Definition) profiles as indicated in the following table. 3445 </li> 3446 <li>In addition, Android Television devices 3447 <ul> 3448 <li>MUST support High Profile Level 4.2 and the HD 1080p60 decoding profile. 3449 </li> 3450 <li>MUST be capable of decoding videos with both HD profiles as indicated in the following table and encoded with either the Baseline Profile, Main Profile, or the High Profile Level 4.2 3451 </li> 3452 </ul> 3453 </li> 3454 </ul> 3455 <table> 3456 <tr> 3457 <th></th> 3458 <th> 3459 SD (Low quality) 3460 </th> 3461 <th> 3462 SD (High quality) 3463 </th> 3464 <th> 3465 HD 720p <sup>1</sup> 3466 </th> 3467 <th> 3468 HD 1080p <sup>1</sup> 3469 </th> 3470 </tr> 3471 <tr> 3472 <th> 3473 Video resolution 3474 </th> 3475 <td> 3476 320 x 240 px 3477 </td> 3478 <td> 3479 720 x 480 px 3480 </td> 3481 <td> 3482 1280 x 720 px 3483 </td> 3484 <td> 3485 1920 x 1080 px 3486 </td> 3487 </tr> 3488 <tr> 3489 <th> 3490 Video frame rate 3491 </th> 3492 <td> 3493 30 fps 3494 </td> 3495 <td> 3496 30 fps 3497 </td> 3498 <td> 3499 60 fps 3500 </td> 3501 <td> 3502 30 fps (60 fps <sup>2</sup> ) 3503 </td> 3504 </tr> 3505 <tr> 3506 <th> 3507 Video bitrate 3508 </th> 3509 <td> 3510 800 Kbps 3511 </td> 3512 <td> 3513 2 Mbps 3514 </td> 3515 <td> 3516 8 Mbps 3517 </td> 3518 <td> 3519 20 Mbps 3520 </td> 3521 </tr> 3522 </table> 3523 <p class="table_footnote"> 3524 1 REQUIRED for when the height as reported by the Display.getSupportedModes() method is equal or greater than the video resolution. 3525 </p> 3526 <p class="table_footnote"> 3527 2 REQUIRED for Android Television device implementations. 3528 </p> 3529 <h3 id="5_3_5_h_265_(hevc)"> 3530 5.3.5. H.265 (HEVC) 3531 </h3> 3532 <p> 3533 Android device implementations, when supporting H.265 codec as described in <a href="#5_1_3_video_codecs">section 5.1.3</a> : 3534 </p> 3535 <ul> 3536 <li>MUST support the Main Profile Level 3 Main tier and the SD video decoding profiles as indicated in the following table. 3537 </li> 3538 <li>SHOULD support the HD decoding profiles as indicated in the following table. 3539 </li> 3540 <li>MUST support the HD decoding profiles as indicated in the following table if there is a hardware decoder. 3541 </li> 3542 <li>In addition, Android Television devices: 3543 </li> 3544 <li>MUST support the HD 720p decoding profile. 3545 </li> 3546 <li>STRONGLY RECOMMENDED to support the HD 1080p decoding profile. If the HD 1080p decoding profile is supported, it MUST support the Main Profile Level 4.1 Main tier. 3547 </li> 3548 <li>SHOULD support the UHD decoding profile. If the UHD decoding profile is supported the codec MUST support Main10 Level 5 Main Tier profile. 3549 </li> 3550 </ul> 3551 <table> 3552 <tr> 3553 <th></th> 3554 <th> 3555 SD (Low quality) 3556 </th> 3557 <th> 3558 SD (High quality) 3559 </th> 3560 <th> 3561 HD 720p 3562 </th> 3563 <th> 3564 HD 1080p 3565 </th> 3566 <th> 3567 UHD 3568 </th> 3569 </tr> 3570 <tr> 3571 <th> 3572 Video resolution 3573 </th> 3574 <td> 3575 352 x 288 px 3576 </td> 3577 <td> 3578 720 x 480 px 3579 </td> 3580 <td> 3581 1280 x 720 px 3582 </td> 3583 <td> 3584 1920 x 1080 px 3585 </td> 3586 <td> 3587 3840 x 2160 px 3588 </td> 3589 </tr> 3590 <tr> 3591 <th> 3592 Video frame rate 3593 </th> 3594 <td> 3595 30 fps 3596 </td> 3597 <td> 3598 30 fps 3599 </td> 3600 <td> 3601 30 fps 3602 </td> 3603 <td> 3604 30 fps (60 fps <sup>1</sup> ) 3605 </td> 3606 <td> 3607 60 fps 3608 </td> 3609 </tr> 3610 <tr> 3611 <th> 3612 Video bitrate 3613 </th> 3614 <td> 3615 600 Kbps 3616 </td> 3617 <td> 3618 1.6 Mbps 3619 </td> 3620 <td> 3621 4 Mbps 3622 </td> 3623 <td> 3624 5 Mbps 3625 </td> 3626 <td> 3627 20 Mbps 3628 </td> 3629 </tr> 3630 </table> 3631 <p class="table_footnote"> 3632 1 REQUIRED for Android Television device implementations with H.265 hardware decoding. 3633 </p> 3634 <h3 id="5_3_6_vp8"> 3635 5.3.6. VP8 3636 </h3> 3637 <p> 3638 Android device implementations, when supporting VP8 codec as described in <a href="https://source.android.com/compatibility/android-cdd.html#5_1_3_video_codecs">section 5.1.3</a> : 3639 </p> 3640 <ul> 3641 <li>MUST support the SD decoding profiles in the following table. 3642 </li> 3643 <li>SHOULD support the HD decoding profiles in the following table. 3644 </li> 3645 <li>Android Television devices MUST support the HD 1080p60 decoding profile. 3646 </li> 3647 </ul> 3648 <table> 3649 <tr> 3650 <th></th> 3651 <th> 3652 SD (Low quality) 3653 </th> 3654 <th> 3655 SD (High quality) 3656 </th> 3657 <th> 3658 HD 720p <sup>1</sup> 3659 </th> 3660 <th> 3661 HD 1080p <sup>1</sup> 3662 </th> 3663 </tr> 3664 <tr> 3665 <th> 3666 Video resolution 3667 </th> 3668 <td> 3669 320 x 180 px 3670 </td> 3671 <td> 3672 640 x 360 px 3673 </td> 3674 <td> 3675 1280 x 720 px 3676 </td> 3677 <td> 3678 1920 x 1080 px 3679 </td> 3680 </tr> 3681 <tr> 3682 <th> 3683 Video frame rate 3684 </th> 3685 <td> 3686 30 fps 3687 </td> 3688 <td> 3689 30 fps 3690 </td> 3691 <td> 3692 30 fps (60 fps <sup>2</sup> ) 3693 </td> 3694 <td> 3695 30 (60 fps <sup>2</sup> ) 3696 </td> 3697 </tr> 3698 <tr> 3699 <th> 3700 Video bitrate 3701 </th> 3702 <td> 3703 800 Kbps 3704 </td> 3705 <td> 3706 2 Mbps 3707 </td> 3708 <td> 3709 8 Mbps 3710 </td> 3711 <td> 3712 20 Mbps 3713 </td> 3714 </tr> 3715 </table> 3716 <p class="table_footnote"> 3717 1 REQUIRED for when the height as reported by the Display.getSupportedModes() method is equal or greater than the video resolution. 3718 </p> 3719 <p class="table_footnote"> 3720 2 REQUIRED for Android Television device implementations. 3721 </p> 3722 <h3 id="5_3_7_vp9"> 3723 5.3.7. VP9 3724 </h3> 3725 <p> 3726 Android device implementations, when supporting VP9 codec as described in <a href="https://source.android.com/compatibility/android-cdd.html#5_1_3_video_codecs">section 5.1.3</a> : 3727 </p> 3728 <ul> 3729 <li>MUST support the SD video decoding profiles as indicated in the following table. 3730 </li> 3731 <li>SHOULD support the HD decoding profiles as indicated in the following table. 3732 </li> 3733 <li>MUST support the HD decoding profiles as indicated in the following table, if there is a hardware decoder. 3734 </li> 3735 <li> 3736 <p> 3737 In addition, Android Television devices: 3738 </p> 3739 <ul> 3740 <li>MUST support the HD 720p decoding profile. 3741 </li> 3742 <li>STRONGLY RECOMMENDED to support the HD 1080p decoding profile. 3743 </li> 3744 <li>SHOULD support the UHD decoding profile. If the UHD video decoding profile is supported, it MUST support 8-bit color depth and SHOULD support VP9 Profile 2 (10-bit). 3745 </li> 3746 </ul> 3747 </li> 3748 </ul> 3749 <table> 3750 <tr> 3751 <th></th> 3752 <th> 3753 SD (Low quality) 3754 </th> 3755 <th> 3756 SD (High quality) 3757 </th> 3758 <th> 3759 HD 720p 3760 </th> 3761 <th> 3762 HD 1080p 3763 </th> 3764 <th> 3765 UHD 3766 </th> 3767 </tr> 3768 <tr> 3769 <th> 3770 Video resolution 3771 </th> 3772 <td> 3773 320 x 180 px 3774 </td> 3775 <td> 3776 640 x 360 px 3777 </td> 3778 <td> 3779 1280 x 720 px 3780 </td> 3781 <td> 3782 1920 x 1080 px 3783 </td> 3784 <td> 3785 3840 x 2160 px 3786 </td> 3787 </tr> 3788 <tr> 3789 <th> 3790 Video frame rate 3791 </th> 3792 <td> 3793 30 fps 3794 </td> 3795 <td> 3796 30 fps 3797 </td> 3798 <td> 3799 30 fps 3800 </td> 3801 <td> 3802 30 fps (60 fps <sup>1</sup> ) 3803 </td> 3804 <td> 3805 60 fps 3806 </td> 3807 </tr> 3808 <tr> 3809 <th> 3810 Video bitrate 3811 </th> 3812 <td> 3813 600 Kbps 3814 </td> 3815 <td> 3816 1.6 Mbps 3817 </td> 3818 <td> 3819 4 Mbps 3820 </td> 3821 <td> 3822 5 Mbps 3823 </td> 3824 <td> 3825 20 Mbps 3826 </td> 3827 </tr> 3828 </table> 3829 <p class="table_footnote"> 3830 1 REQUIRED for Android Television device implementations with VP9 hardware decoding. 3831 </p> 3832 <h2 id="5_4_audio_recording"> 3833 5.4. Audio Recording 3834 </h2> 3835 <p> 3836 While some of the requirements outlined in this section are stated as SHOULD since Android 4.3, the Compatibility Definition for a future version is planned to change these to MUST. Existing and new Android devices are <strong>STRONGLY RECOMMENDED</strong> to meet these requirements that are stated as SHOULD, or they will not be able to attain Android compatibility when upgraded to the future version. 3837 </p> 3838 <h3 id="5_4_1_raw_audio_capture"> 3839 5.4.1. Raw Audio Capture 3840 </h3> 3841 <p> 3842 Device implementations that declare android.hardware.microphone MUST allow capture of raw audio content with the following characteristics: 3843 </p> 3844 <ul> 3845 <li> 3846 <strong>Format</strong> : Linear PCM, 16-bit 3847 </li> 3848 <li> 3849 <strong>Sampling rates</strong> : 8000, 11025, 16000, 44100 3850 </li> 3851 <li> 3852 <strong>Channels</strong> : Mono 3853 </li> 3854 </ul> 3855 <p> 3856 The capture for the above sample rates MUST be done without up-sampling, and any down-sampling MUST include an appropriate anti-aliasing filter. 3857 </p> 3858 <p> 3859 Device implementations that declare android.hardware.microphone SHOULD allow capture of raw audio content with the following characteristics: 3860 </p> 3861 <ul> 3862 <li> 3863 <strong>Format</strong> : Linear PCM, 16-bit 3864 </li> 3865 <li> 3866 <strong>Sampling rates</strong> : 22050, 48000 3867 </li> 3868 <li> 3869 <strong>Channels</strong> : Stereo 3870 </li> 3871 </ul> 3872 <p> 3873 If capture for the above sample rates is supported, then the capture MUST be done without up-sampling at any ratio higher than 16000:22050 or 44100:48000. Any up-sampling or down-sampling MUST include an appropriate anti-aliasing filter. 3874 </p> 3875 <h3 id="5_4_2_capture_for_voice_recognition"> 3876 5.4.2. Capture for Voice Recognition 3877 </h3> 3878 <p> 3879 The android.media.MediaRecorder.AudioSource.VOICE_RECOGNITION audio source MUST support capture at one of the sampling rates, 44100 and 48000. 3880 </p> 3881 <p> 3882 In addition to the above recording specifications, when an application has started recording an audio stream using the android.media.MediaRecorder.AudioSource.VOICE_RECOGNITION audio source: 3883 </p> 3884 <ul> 3885 <li>The device SHOULD exhibit approximately flat amplitude versus frequency characteristics: specifically, 3 dB, from 100 Hz to 4000 Hz. 3886 </li> 3887 <li>Audio input sensitivity SHOULD be set such that a 90 dB sound power level (SPL) source at 1000 Hz yields RMS of 2500 for 16-bit samples. 3888 </li> 3889 <li>PCM amplitude levels SHOULD linearly track input SPL changes over at least a 30 dB range from -18 dB to +12 dB re 90 dB SPL at the microphone. 3890 </li> 3891 <li>Total harmonic distortion SHOULD be less than 1% for 1 kHz at 90 dB SPL input level at the microphone. 3892 </li> 3893 <li>Noise reduction processing, if present, MUST be disabled. 3894 </li> 3895 <li>Automatic gain control, if present, MUST be disabled. 3896 </li> 3897 </ul> 3898 <p> 3899 If the platform supports noise suppression technologies tuned for speech recognition, the effect MUST be controllable from the android.media.audiofx.NoiseSuppressor API. Moreover, the UUID field for the noise suppressors effect descriptor MUST uniquely identify each implementation of the noise suppression technology. 3900 </p> 3901 <h3 id="5_4_3_capture_for_rerouting_of_playback"> 3902 5.4.3. Capture for Rerouting of Playback 3903 </h3> 3904 <p> 3905 The android.media.MediaRecorder.AudioSource class includes the REMOTE_SUBMIX audio source. Devices that declare android.hardware.audio.output MUST properly implement the REMOTE_SUBMIX audio source so that when an application uses the android.media.AudioRecord API to record from this audio source, it can capture a mix of all audio streams except for the following: 3906 </p> 3907 <ul> 3908 <li>STREAM_RING 3909 </li> 3910 <li>STREAM_ALARM 3911 </li> 3912 <li>STREAM_NOTIFICATION 3913 </li> 3914 </ul> 3915 <h2 id="5_5_audio_playback"> 3916 5.5. Audio Playback 3917 </h2> 3918 <p> 3919 Device implementations that declare android.hardware.audio.output MUST conform to the requirements in this section. 3920 </p> 3921 <h3 id="5_5_1_raw_audio_playback"> 3922 5.5.1. Raw Audio Playback 3923 </h3> 3924 <p> 3925 The device MUST allow playback of raw audio content with the following characteristics: 3926 </p> 3927 <ul> 3928 <li> 3929 <strong>Format</strong> : Linear PCM, 16-bit 3930 </li> 3931 <li> 3932 <strong>Sampling rates</strong> : 8000, 11025, 16000, 22050, 32000, 44100 3933 </li> 3934 <li> 3935 <strong>Channels</strong> : Mono, Stereo 3936 </li> 3937 </ul> 3938 <p> 3939 The device SHOULD allow playback of raw audio content with the following characteristics: 3940 </p> 3941 <ul> 3942 <li> 3943 <strong>Sampling rates</strong> : 24000, 48000 3944 </li> 3945 </ul> 3946 <h3 id="5_5_2_audio_effects"> 3947 5.5.2. Audio Effects 3948 </h3> 3949 <p> 3950 Android provides an <a href="http://developer.android.com/reference/android/media/audiofx/AudioEffect.html">API for audio effects</a> for device implementations. Device implementations that declare the feature android.hardware.audio.output: 3951 </p> 3952 <ul> 3953 <li>MUST support the EFFECT_TYPE_EQUALIZER and EFFECT_TYPE_LOUDNESS_ENHANCER implementations controllable through the AudioEffect subclasses Equalizer, LoudnessEnhancer. 3954 </li> 3955 <li>MUST support the visualizer API implementation, controllable through the Visualizer class. 3956 </li> 3957 <li>SHOULD support the EFFECT_TYPE_BASS_BOOST, EFFECT_TYPE_ENV_REVERB, EFFECT_TYPE_PRESET_REVERB, and EFFECT_TYPE_VIRTUALIZER implementations controllable through the AudioEffect sub-classes BassBoost, EnvironmentalReverb, PresetReverb, and Virtualizer. 3958 </li> 3959 </ul> 3960 <h3 id="5_5_3_audio_output_volume"> 3961 5.5.3. Audio Output Volume 3962 </h3> 3963 <p> 3964 Android Television device implementations MUST include support for system Master Volume and digital audio output volume attenuation on supported outputs, except for compressed audio passthrough output (where no audio decoding is done on the device). 3965 </p> 3966 <p> 3967 Android Automotive device implementations SHOULD allow adjusting audio volume separately per each audio stream using the content type or usage as defined by <a href="" title="http://developer.android.com/reference/android/media/AudioAttributes.html">AudioAttributes</a> and car audio usage as publicly defined in <code>android.car.CarAudioManager</code> . 3968 </p> 3969 <h2 id="5_6_audio_latency"> 3970 5.6. Audio Latency 3971 </h2> 3972 <p> 3973 Audio latency is the time delay as an audio signal passes through a system. Many classes of applications rely on short latencies, to achieve real-time sound effects. 3974 </p> 3975 <p> 3976 For the purposes of this section, use the following definitions: 3977 </p> 3978 <ul> 3979 <li> 3980 <strong>output latency</strong> . The interval between when an application writes a frame of PCM-coded data and when the corresponding sound is presented to environment at an on-device transducer or signal leaves the device via a port and can be observed externally. 3981 </li> 3982 <li> 3983 <strong>cold output latency</strong> . The output latency for the first frame, when the audio output system has been idle and powered down prior to the request. 3984 </li> 3985 <li> 3986 <strong>continuous output latency</strong> . The output latency for subsequent frames, after the device is playing audio. 3987 </li> 3988 <li> 3989 <strong>input latency</strong> . The interval between when a sound is presented by environment to device at an on-device transducer or signal enters the device via a port and when an application reads the corresponding frame of PCM-coded data. 3990 </li> 3991 <li> 3992 <strong>lost input</strong> . The initial portion of an input signal that is unusable or unavailable. 3993 </li> 3994 <li> 3995 <strong>cold input latency</strong> . The sum of lost input time and the input latency for the first frame, when the audio input system has been idle and powered down prior to the request. 3996 </li> 3997 <li> 3998 <strong>continuous input latency</strong> . The input latency for subsequent frames, while the device is capturing audio. 3999 </li> 4000 <li> 4001 <strong>cold output jitter</strong> . The variability among separate measurements of cold output latency values. 4002 </li> 4003 <li> 4004 <strong>cold input jitter</strong> . The variability among separate measurements of cold input latency values. 4005 </li> 4006 <li> 4007 <strong>continuous round-trip latency</strong> . The sum of continuous input latency plus continuous output latency plus one buffer period. The buffer period allows time for the app to process the signal and time for the app to mitigate phase difference between input and output streams. 4008 </li> 4009 <li> 4010 <strong>OpenSL ES PCM buffer queue API</strong> . The set of PCM-related OpenSL ES APIs within <a href="https://developer.android.com/ndk/index.html">Android NDK</a> . 4011 </li> 4012 </ul> 4013 <p> 4014 Device implementations that declare android.hardware.audio.output are STRONGLY RECOMMENDED to meet or exceed these audio output requirements: 4015 </p> 4016 <ul> 4017 <li>cold output latency of 100 milliseconds or less 4018 </li> 4019 <li>continuous output latency of 45 milliseconds or less 4020 </li> 4021 <li>minimize the cold output jitter 4022 </li> 4023 </ul> 4024 <p> 4025 If a device implementation meets the requirements of this section after any initial calibration when using the OpenSL ES PCM buffer queue API, for continuous output latency and cold output latency over at least one supported audio output device, it is STRONGLY RECOMMENDED to report support for low-latency audio, by reporting the feature android.hardware.audio.low_latency via the <a href="http://developer.android.com/reference/android/content/pm/PackageManager.html">android.content.pm.PackageManager</a> class. Conversely, if the device implementation does not meet these requirements it MUST NOT report support for low-latency audio. 4026 </p> 4027 <p> 4028 Device implementations that include android.hardware.microphone are STRONGLY RECOMMENDED to meet these input audio requirements: 4029 </p> 4030 <ul> 4031 <li>cold input latency of 100 milliseconds or less 4032 </li> 4033 <li>continuous input latency of 30 milliseconds or less 4034 </li> 4035 <li>continuous round-trip latency of 50 milliseconds or less 4036 </li> 4037 <li>minimize the cold input jitter 4038 </li> 4039 </ul> 4040 <h2 id="5_7_network_protocols"> 4041 5.7. Network Protocols 4042 </h2> 4043 <p> 4044 Devices MUST support the <a href="http://developer.android.com/guide/appendix/media-formats.html">media network protocols</a> for audio and video playback as specified in the Android SDK documentation. Specifically, devices MUST support the following media network protocols: 4045 </p> 4046 <ul> 4047 <li> 4048 <p> 4049 HTTP(S) progressive streaming<br /> 4050 All required codecs and container formats in <a href="#5_1_media_codecs">section 5.1</a> MUST be supported over HTTP(S) 4051 </p> 4052 </li> 4053 <li> 4054 <p> 4055 <a href="http://tools.ietf.org/html/draft-pantos-http-live-streaming-07">HTTP Live Streaming draft protocol, Version 7</a><br /> 4056 The following media segment formats MUST be supported: 4057 </p> 4058 </li> 4059 </ul> 4060 <table> 4061 <tr> 4062 <th> 4063 Segment formats 4064 </th> 4065 <th> 4066 Reference(s) 4067 </th> 4068 <th> 4069 Required codec support 4070 </th> 4071 </tr> 4072 <tr id="mp2t"> 4073 <td> 4074 MPEG-2 Transport Stream 4075 </td> 4076 <td> 4077 <a href="http://www.iso.org/iso/catalogue_detail?csnumber=44169">ISO 13818</a> 4078 </td> 4079 <td> 4080 Video codecs: 4081 <ul> 4082 <li class="table_list">H264 AVC 4083 </li> 4084 <li class="table_list">MPEG-4 SP 4085 </li> 4086 <li class="table_list">MPEG-2 4087 </li> 4088 </ul>See <a href="#5_1_3_video_codecs">section 5.1.3</a> for details on H264 AVC, MPEG2-4 SP,<br /> 4089 and MPEG-2. 4090 <p> 4091 Audio codecs: 4092 </p> 4093 <ul> 4094 <li class="table_list">AAC 4095 </li> 4096 </ul>See <a href="#5_1_1_audio_codecs">section 5.1.1</a> for details on AAC and its variants. 4097 </td> 4098 </tr> 4099 <tr> 4100 <td> 4101 AAC with ADTS framing and ID3 tags 4102 </td> 4103 <td> 4104 <a href="http://www.iso.org/iso/home/store/catalogue_tc/catalogue_detail.htm?csnumber=43345">ISO 13818-7</a> 4105 </td> 4106 <td> 4107 See <a href="#5_1_1_audio_codecs">section 5.1.1</a> for details on AAC and its variants 4108 </td> 4109 </tr> 4110 <tr> 4111 <td> 4112 WebVTT 4113 </td> 4114 <td> 4115 <a href="http://dev.w3.org/html5/webvtt/">WebVTT</a> 4116 </td> 4117 <td></td> 4118 </tr> 4119 </table> 4120 <ul> 4121 <li> 4122 <p> 4123 RTSP (RTP, SDP) 4124 </p> 4125 <p> 4126 The following RTP audio video profile and related codecs MUST be supported. For exceptions please see the table footnotes in <a href="#5_1_media_codecs">section 5.1</a> . 4127 </p> 4128 </li> 4129 </ul> 4130 <table> 4131 <tr> 4132 <th> 4133 Profile name 4134 </th> 4135 <th> 4136 Reference(s) 4137 </th> 4138 <th> 4139 Required codec support 4140 </th> 4141 </tr> 4142 <tr> 4143 <td> 4144 H264 AVC 4145 </td> 4146 <td> 4147 <a href="https://tools.ietf.org/html/rfc6184">RFC 6184</a> 4148 </td> 4149 <td> 4150 See <a href="#5_1_3_video_codecs">section 5.1.3</a> for details on H264 AVC 4151 </td> 4152 </tr> 4153 <tr> 4154 <td> 4155 MP4A-LATM 4156 </td> 4157 <td> 4158 <a href="https://tools.ietf.org/html/rfc6416">RFC 6416</a> 4159 </td> 4160 <td> 4161 See <a href="#5_1_1_audio_codecs">section 5.1.1</a> for details on AAC and its variants 4162 </td> 4163 </tr> 4164 <tr> 4165 <td> 4166 H263-1998 4167 </td> 4168 <td> 4169 <a href="https://tools.ietf.org/html/rfc3551">RFC 3551</a><br /> 4170 <a href="https://tools.ietf.org/html/rfc4629">RFC 4629</a><br /> 4171 <a href="https://tools.ietf.org/html/rfc2190">RFC 2190</a> 4172 </td> 4173 <td> 4174 See <a href="#5_1_3_video_codecs">section 5.1.3</a> for details on H263 4175 </td> 4176 </tr> 4177 <tr> 4178 <td> 4179 H263-2000 4180 </td> 4181 <td> 4182 <a href="https://tools.ietf.org/html/rfc4629">RFC 4629</a> 4183 </td> 4184 <td> 4185 See <a href="#5_1_3_video_codecs">section 5.1.3</a> for details on H263 4186 </td> 4187 </tr> 4188 <tr> 4189 <td> 4190 AMR 4191 </td> 4192 <td> 4193 <a href="https://tools.ietf.org/html/rfc4867">RFC 4867</a> 4194 </td> 4195 <td> 4196 See <a href="#5_1_1_audio_codecs">section 5.1.1</a> for details on AMR-NB 4197 </td> 4198 </tr> 4199 <tr> 4200 <td> 4201 AMR-WB 4202 </td> 4203 <td> 4204 <a href="https://tools.ietf.org/html/rfc4867">RFC 4867</a> 4205 </td> 4206 <td> 4207 See <a href="#5_1_1_audio_codecs">section 5.1.1</a> for details on AMR-WB 4208 </td> 4209 </tr> 4210 <tr> 4211 <td> 4212 MP4V-ES 4213 </td> 4214 <td> 4215 <a href="https://tools.ietf.org/html/rfc6416">RFC 6416</a> 4216 </td> 4217 <td> 4218 See <a href="#5_1_3_video_codecs">section 5.1.3</a> for details on MPEG-4 SP 4219 </td> 4220 </tr> 4221 <tr> 4222 <td> 4223 mpeg4-generic 4224 </td> 4225 <td> 4226 <a href="https://tools.ietf.org/html/rfc3640">RFC 3640</a> 4227 </td> 4228 <td> 4229 See <a href="#5_1_1_audio_codecs">section 5.1.1</a> for details on AAC and its variants 4230 </td> 4231 </tr> 4232 <tr> 4233 <td> 4234 MP2T 4235 </td> 4236 <td> 4237 <a href="https://tools.ietf.org/html/rfc2250">RFC 2250</a> 4238 </td> 4239 <td> 4240 See <a href="#mp2t">MPEG-2 Transport Stream</a> underneath HTTP Live Streaming for details 4241 </td> 4242 </tr> 4243 </table> 4244 <h2 id="5_8_secure_media"> 4245 5.8. Secure Media 4246 </h2> 4247 <p> 4248 Device implementations that support secure video output and are capable of supporting secure surfaces MUST declare support for Display.FLAG_SECURE. Device implementations that declare support for Display.FLAG_SECURE, if they support a wireless display protocol, MUST secure the link with a cryptographically strong mechanism such as HDCP 2.x or higher for Miracast wireless displays. Similarly if they support a wired external display, the device implementations MUST support HDCP 1.2 or higher. Android Television device implementations MUST support HDCP 2.2 for devices supporting 4K resolution and HDCP 1.4 or above for lower resolutions. The upstream Android open source implementation includes support for wireless (Miracast) and wired (HDMI) displays that satisfies this requirement. 4249 </p> 4250 <h2 id="5_9_musical_instrument_digital_interface_(midi)"> 4251 5.9. Musical Instrument Digital Interface (MIDI) 4252 </h2> 4253 <p> 4254 If a device implementation supports the inter-app MIDI software transport (virtual MIDI devices), and it supports MIDI over <em>all</em> of the following MIDI-capable hardware transports for which it provides generic non-MIDI connectivity, it is STRONGLY RECOMMENDED to report support for feature android.software.midi via the <a href="http://developer.android.com/reference/android/content/pm/PackageManager.html">android.content.pm.PackageManager</a> class. 4255 </p> 4256 <p> 4257 The MIDI-capable hardware transports are: 4258 </p> 4259 <ul> 4260 <li>USB host mode (section 7.7 USB) 4261 </li> 4262 <li>USB peripheral mode (section 7.7 USB) 4263 </li> 4264 <li>MIDI over Bluetooth LE acting in central role (section 7.4.3 Bluetooth) 4265 </li> 4266 </ul> 4267 <p> 4268 Conversely, if the device implementation provides generic non-MIDI connectivity over a particular MIDI-capable hardware transport listed above, but does not support MIDI over that hardware transport, it MUST NOT report support for feature android.software.midi. 4269 </p> 4270 <h2 id="5_10_professional_audio"> 4271 5.10. Professional Audio 4272 </h2> 4273 <p> 4274 If a device implementation meets <em>all</em> of the following requirements, it is STRONGLY RECOMMENDED to report support for feature android.hardware.audio.pro via the <a href="http://developer.android.com/reference/android/content/pm/PackageManager.html">android.content.pm.PackageManager</a> class. 4275 </p> 4276 <ul> 4277 <li>The device implementation MUST report support for feature android.hardware.audio.low_latency. 4278 </li> 4279 <li>The continuous round-trip audio latency, as defined in section 5.6 Audio Latency, MUST be 20 milliseconds or less and SHOULD be 10 milliseconds or less over at least one supported path. 4280 </li> 4281 <li>If the device includes a 4 conductor 3.5mm audio jack, the continuous round-trip audio latency MUST be 20 milliseconds or less over the audio jack path, and SHOULD be 10 milliseconds or less over at the audio jack path. 4282 </li> 4283 <li>The device implementation MUST include a USB port(s) supporting USB host mode and USB peripheral mode. 4284 </li> 4285 <li>The USB host mode MUST implement the USB audio class. 4286 </li> 4287 <li>If the device includes an HDMI port, the device implementation MUST support output in stereo and eight channels at 20-bit or 24-bit depth and 192 kHz without bit-depth loss or resampling. 4288 </li> 4289 <li>The device implementation MUST report support for feature android.software.midi. 4290 </li> 4291 <li>If the device includes a 4 conductor 3.5mm audio jack, the device implementation is STRONGLY RECOMMENDED to comply with section <a href="https://source.android.com/accessories/headset/specification.html#mobile_device_jack_specifications">Mobile device (jack) specifications</a> of the <a href="https://source.android.com/accessories/headset/specification.html">Wired Audio Headset Specification (v1.1)</a> . 4292 </li> 4293 </ul> 4294 <p> 4295 Latencies and USB audio requirements MUST be met using the <a href="https://developer.android.com/ndk/guides/audio/opensl-for-android.html">OpenSL ES</a> PCM buffer queue API. 4296 </p> 4297 <p> 4298 In addition, a device implementation that reports support for this feature SHOULD: 4299 </p> 4300 <ul> 4301 <li>Provide a sustainable level of CPU performance while audio is active. 4302 </li> 4303 <li>Minimize audio clock inaccuracy and drift relative to standard time. 4304 </li> 4305 <li>Minimize audio clock drift relative to the CPU <code>CLOCK_MONOTONIC</code> when both are active. 4306 </li> 4307 <li>Minimize audio latency over on-device transducers. 4308 </li> 4309 <li>Minimize audio latency over USB digital audio. 4310 </li> 4311 <li>Document audio latency measurements over all paths. 4312 </li> 4313 <li>Minimize jitter in audio buffer completion callback entry times, as this affects usable percentage of full CPU bandwidth by the callback. 4314 </li> 4315 <li>Provide zero audio underruns (output) or overruns (input) under normal use at reported latency. 4316 </li> 4317 <li>Provide zero inter-channel latency difference. 4318 </li> 4319 <li>Minimize MIDI mean latency over all transports. 4320 </li> 4321 <li>Minimize MIDI latency variability under load (jitter) over all transports. 4322 </li> 4323 <li>Provide accurate MIDI timestamps over all transports. 4324 </li> 4325 <li>Minimize audio signal noise over on-device transducers, including the period immediately after cold start. 4326 </li> 4327 <li>Provide zero audio clock difference between the input and output sides of corresponding end-points, when both are active. Examples of corresponding end-points include the on-device microphone and speaker, or the audio jack input and output. 4328 </li> 4329 <li>Handle audio buffer completion callbacks for the input and output sides of corresponding end-points on the same thread when both are active, and enter the output callback immediately after the return from the input callback. Or if it is not feasible to handle the callbacks on the same thread, then enter the output callback shortly after entering the input callback to permit the application to have a consistent timing of the input and output sides. 4330 </li> 4331 <li>Minimize the phase difference between HAL audio buffering for the input and output sides of corresponding end-points. 4332 </li> 4333 <li>Minimize touch latency. 4334 </li> 4335 <li>Minimize touch latency variability under load (jitter). 4336 </li> 4337 </ul> 4338 <h2 id="5_11_capture_for_unprocessed"> 4339 5.11. Capture for Unprocessed 4340 </h2> 4341 <p> 4342 Starting from Android 7.0, a new recording source has been added. It can be accessed using the <code>android.media.MediaRecorder.AudioSource.UNPROCESSED</code> audio source. In OpenSL ES, it can be accessed with the record preset <code>SL_ANDROID_RECORDING_PRESET_UNPROCESSED</code> . 4343 </p> 4344 <p> 4345 A device MUST satisfy all of the following requirements to report support of the unprocessed audio source via the <code>android.media.AudioManager</code> property <a href="http://developer.android.com/reference/android/media/AudioManager.html#PROPERTY_SUPPORT_AUDIO_SOURCE_UNPROCESSED">PROPERTY_SUPPORT_AUDIO_SOURCE_UNPROCESSED</a> : 4346 </p> 4347 <ul> 4348 <li> 4349 <p> 4350 The device MUST exhibit approximately flat amplitude-versus-frequency characteristics in the mid-frequency range: specifically 10dB from 100 Hz to 7000 Hz. 4351 </p> 4352 </li> 4353 <li> 4354 <p> 4355 The device MUST exhibit amplitude levels in the low frequency range: specifically from 20 dB from 5 Hz to 100 Hz compared to the mid-frequency range. 4356 </p> 4357 </li> 4358 <li> 4359 <p> 4360 The device MUST exhibit amplitude levels in the high frequency range: specifically from 30 dB from 7000 Hz to 22 KHz compared to the mid-frequency range. 4361 </p> 4362 </li> 4363 <li> 4364 <p> 4365 Audio input sensitivity MUST be set such that a 1000 Hz sinusoidal tone source played at 94 dB Sound Pressure Level (SPL) yields a response with RMS of 520 for 16 bit-samples (or -36 dB Full Scale for floating point/double precision samples). 4366 </p> 4367 </li> 4368 <li> 4369 <p> 4370 SNR > 60 dB (difference between 94 dB SPL and equivalent SPL of self noise, A-weighted). 4371 </p> 4372 </li> 4373 <li> 4374 <p> 4375 Total harmonic distortion MUST be less than 1% for 1 kHZ at 90 dB SPL input level at the microphone. 4376 </p> 4377 </li> 4378 <li> 4379 <p> 4380 The only signal processing allowed in the path is a level multiplier to bring the level to desired range. This level multiplier MUST NOT introduce delay or latency to the signal path. 4381 </p> 4382 </li> 4383 <li> 4384 <p> 4385 No other signal processing is allowed in the path, such as Automatic Gain Control, High Pass Filter, or Echo Cancellation. If any signal processing is present in the architecture for any reason, it MUST be disabled and effectively introduce zero delay or extra latency to the signal path. 4386 </p> 4387 </li> 4388 </ul> 4389 <p> 4390 All SPL measurements are made directly next to the microphone under test. 4391 </p> 4392 <p> 4393 For multiple microphone configurations, these requirements apply to each microphone. 4394 </p> 4395 <p> 4396 It is STRONGLY RECOMMENDED that a device satisfy as many of the requirements for the signal path for the unprocessed recording source; however, a device must satisfy <em>all</em> of these requirements, listed above, if it claims to support the unprocessed audio source. 4397 </p> 4398 <h1 id="6_developer_tools_and_options_compatibility"> 4399 6. Developer Tools and Options Compatibility 4400 </h1> 4401 <h2 id="6_1_developer_tools"> 4402 6.1. Developer Tools 4403 </h2> 4404 <p> 4405 Device implementations MUST support the Android Developer Tools provided in the Android SDK. Android compatible devices MUST be compatible with: 4406 </p> 4407 <ul> 4408 <li> 4409 <a href="http://developer.android.com/tools/help/adb.html"><strong>Android Debug Bridge (adb)</strong></a> 4410 <ul> 4411 <li>Device implementations MUST support all adb functions as documented in the Android SDK including <a href="https://source.android.com/devices/input/diagnostics.html">dumpsys</a> . 4412 </li> 4413 <li>The device-side adb daemon MUST be inactive by default and there MUST be a user-accessible mechanism to turn on the Android Debug Bridge. If a device implementation omits USB peripheral mode, it MUST implement the Android Debug Bridge via local-area network (such as Ethernet or 802.11). 4414 </li> 4415 <li>Android includes support for secure adb. Secure adb enables adb on known authenticated hosts. Device implementations MUST support secure adb. 4416 </li> 4417 </ul> 4418 </li> 4419 <li> 4420 <a href="http://developer.android.com/tools/debugging/ddms.html"><strong>Dalvik Debug Monitor Service (ddms)</strong></a> 4421 <ul> 4422 <li>Device implementations MUST support all ddms features as documented in the Android SDK. 4423 </li> 4424 <li>As ddms uses adb, support for ddms SHOULD be inactive by default, but MUST be supported whenever the user has activated the Android Debug Bridge, as above. 4425 </li> 4426 </ul> 4427 </li> 4428 <li> 4429 <a href="http://developer.android.com/tools/help/monkey.html"><strong>Monkey</strong></a> Device implementations MUST include the Monkey framework, and make it available for applications to use. 4430 </li> 4431 <li> 4432 <a href="http://developer.android.com/tools/help/systrace.html"><strong>SysTrace</strong></a> 4433 <ul> 4434 <li>Device implementations MUST support systrace tool as documented in the Android SDK. Systrace must be inactive by default, and there MUST be a user-accessible mechanism to turn on Systrace. 4435 </li> 4436 <li>Most Linux-based systems and Apple Macintosh systems recognize Android devices using the standard Android SDK tools, without additional support; however Microsoft Windows systems typically require a driver for new Android devices. (For instance, new vendor IDs and sometimes new device IDs require custom USB drivers for Windows systems.) 4437 </li> 4438 <li>If a device implementation is unrecognized by the adb tool as provided in the standard Android SDK, device implementers MUST provide Windows drivers allowing developers to connect to the device using the adb protocol. These drivers MUST be provided for Windows XP, Windows Vista, Windows 7, Windows 8, and Windows 10 in both 32-bit and 64-bit versions. 4439 </li> 4440 </ul> 4441 </li> 4442 </ul> 4443 <h2 id="6_2_developer_options"> 4444 6.2. Developer Options 4445 </h2> 4446 <p> 4447 Android includes support for developers to configure application development-related settings. Device implementations MUST honor the <a href="http://developer.android.com/reference/android/provider/Settings.html#ACTION_APPLICATION_DEVELOPMENT_SETTINGS">android.settings.APPLICATION_DEVELOPMENT_SETTINGS</a> intent to show application development-related settings The upstream Android implementation hides the Developer Options menu by default and enables users to launch Developer Options after pressing seven (7) times on the <strong>Settings</strong> > <strong>About Device</strong> > <strong>Build Number</strong> menu item. Device implementations MUST provide a consistent experience for Developer Options. Specifically, device implementations MUST hide Developer Options by default and MUST provide a mechanism to enable Developer Options that is consistent with the upstream Android implementation. 4448 </p> 4449 <div class="note"> 4450 Android Automotive implementations MAY limit access to the Developer Options menu by visually hiding or disabling the menu when the vehicle is in motion. 4451 </div> 4452 <h1 id="7_hardware_compatibility"> 4453 7. Hardware Compatibility 4454 </h1> 4455 <p> 4456 If a device includes a particular hardware component that has a corresponding API for third-party developers, the device implementation MUST implement that API as described in the Android SDK documentation. If an API in the SDK interacts with a hardware component that is stated to be optional and the device implementation does not possess that component: 4457 </p> 4458 <ul> 4459 <li>Complete class definitions (as documented by the SDK) for the component APIs MUST still be presented. 4460 </li> 4461 <li>The APIs behaviors MUST be implemented as no-ops in some reasonable fashion. 4462 </li> 4463 <li>API methods MUST return null values where permitted by the SDK documentation. 4464 </li> 4465 <li>API methods MUST return no-op implementations of classes where null values are not permitted by the SDK documentation. 4466 </li> 4467 <li>API methods MUST NOT throw exceptions not documented by the SDK documentation. 4468 </li> 4469 </ul> 4470 <p> 4471 A typical example of a scenario where these requirements apply is the telephony API: Even on non-phone devices, these APIs must be implemented as reasonable no-ops. 4472 </p> 4473 <p> 4474 Device implementations MUST consistently report accurate hardware configuration information via the getSystemAvailableFeatures() and hasSystemFeature(String) methods on the <a href="http://developer.android.com/reference/android/content/pm/PackageManager.html">android.content.pm.PackageManager</a> class for the same build fingerprint. 4475 </p> 4476 <h2 id="7_1_display_and_graphics"> 4477 7.1. Display and Graphics 4478 </h2> 4479 <p> 4480 Android includes facilities that automatically adjust application assets and UI layouts appropriately for the device to ensure that third-party applications run well on a <a href="http://developer.android.com/guide/practices/screens_support.html">variety of hardware configurations</a> . Devices MUST properly implement these APIs and behaviors, as detailed in this section. 4481 </p> 4482 <p> 4483 The units referenced by the requirements in this section are defined as follows: 4484 </p> 4485 <ul> 4486 <li> 4487 <strong>physical diagonal size</strong> . The distance in inches between two opposing corners of the illuminated portion of the display. 4488 </li> 4489 <li> 4490 <strong>dots per inch (dpi)</strong> . The number of pixels encompassed by a linear horizontal or vertical span of 1. Where dpi values are listed, both horizontal and vertical dpi must fall within the range. 4491 </li> 4492 <li> 4493 <strong>aspect ratio</strong> . The ratio of the pixels of the longer dimension to the shorter dimension of the screen. For example, a display of 480x854 pixels would be 854/480 = 1.779, or roughly 16:9. 4494 </li> 4495 <li> 4496 <strong>density-independent pixel (dp)</strong> . The virtual pixel unit normalized to a 160 dpi screen, calculated as: pixels = dps * (density/160). 4497 </li> 4498 </ul> 4499 <h3 id="7_1_1_screen_configuration"> 4500 7.1.1. Screen Configuration 4501 </h3> 4502 <h4 id="7_1_1_1_screen_size"> 4503 7.1.1.1. Screen Size 4504 </h4> 4505 <div class="note"> 4506 Android Watch devices (detailed in <a href="#2_device_types">section 2</a> ) MAY have smaller screen sizes as described in this section. 4507 </div> 4508 <p> 4509 The Android UI framework supports a variety of different screen sizes, and allows applications to query the device screen size (aka screen layout") via android.content.res.Configuration.screenLayout with the SCREENLAYOUT_SIZE_MASK. Device implementations MUST report the correct <a href="http://developer.android.com/guide/practices/screens_support.html">screen size</a> as defined in the Android SDK documentation and determined by the upstream Android platform. Specifically, device implementations MUST report the correct screen size according to the following logical density-independent pixel (dp) screen dimensions. 4510 </p> 4511 <ul> 4512 <li>Devices MUST have screen sizes of at least 426 dp x 320 dp (small), unless it is an Android Watch device. 4513 </li> 4514 <li>Devices that report screen size normal MUST have screen sizes of at least 480 dp x 320 dp. 4515 </li> 4516 <li>Devices that report screen size large MUST have screen sizes of at least 640 dp x 480 dp. 4517 </li> 4518 <li>Devices that report screen size xlarge MUST have screen sizes of at least 960 dp x 720 dp. 4519 </li> 4520 </ul> 4521 <p> 4522 In addition: 4523 </p> 4524 <ul> 4525 <li>Android Watch devices MUST have a screen with the physical diagonal size in the range from 1.1 to 2.5 inches. 4526 </li> 4527 <li>Android Automotive devices MUST have a screen with the physical diagonal size greater than or equal to 6 inches. 4528 </li> 4529 <li>Android Automotive devices MUST have a screen size of at least 750 dp x 480 dp. 4530 </li> 4531 <li>Other types of Android device implementations, with a physically integrated screen, MUST have a screen at least 2.5 inches in physical diagonal size. 4532 </li> 4533 </ul> 4534 <p> 4535 Devices MUST NOT change their reported screen size at any time. 4536 </p> 4537 <p> 4538 Applications optionally indicate which screen sizes they support via the <supports-screens> attribute in the AndroidManifest.xml file. Device implementations MUST correctly honor applications' stated support for small, normal, large, and xlarge screens, as described in the Android SDK documentation. 4539 </p> 4540 <h4 id="7_1_1_2_screen_aspect_ratio"> 4541 7.1.1.2. Screen Aspect Ratio 4542 </h4> 4543 <div class="note"> 4544 Android Watch devices MAY have an aspect ratio of 1.0 (1:1). 4545 </div> 4546 <p> 4547 The screen aspect ratio MUST be a value from 1.3333 (4:3) to 1.86 (roughly 16:9), but Android Watch devices MAY have an aspect ratio of 1.0 (1:1) because such a device implementation will use a UI_MODE_TYPE_WATCH as the android.content.res.Configuration.uiMode. 4548 </p> 4549 <h4 id="7_1_1_3_screen_density"> 4550 7.1.1.3. Screen Density 4551 </h4> 4552 <p> 4553 The Android UI framework defines a set of standard logical densities to help application developers target application resources. Device implementations MUST report only one of the following logical Android framework densities through the android.util.DisplayMetrics APIs, and MUST execute applications at this standard density and MUST NOT change the value at at any time for the default display. 4554 </p> 4555 <ul> 4556 <li>120 dpi (ldpi) 4557 </li> 4558 <li>160 dpi (mdpi) 4559 </li> 4560 <li>213 dpi (tvdpi) 4561 </li> 4562 <li>240 dpi (hdpi) 4563 </li> 4564 <li>280 dpi (280dpi) 4565 </li> 4566 <li>320 dpi (xhdpi) 4567 </li> 4568 <li>360 dpi (360dpi) 4569 </li> 4570 <li>400 dpi (400dpi) 4571 </li> 4572 <li>420 dpi (420dpi) 4573 </li> 4574 <li>480 dpi (xxhdpi) 4575 </li> 4576 <li>560 dpi (560dpi) 4577 </li> 4578 <li>640 dpi (xxxhdpi) 4579 </li> 4580 </ul> 4581 <p> 4582 Device implementations SHOULD define the standard Android framework density that is numerically closest to the physical density of the screen, unless that logical density pushes the reported screen size below the minimum supported. If the standard Android framework density that is numerically closest to the physical density results in a screen size that is smaller than the smallest supported compatible screen size (320 dp width), device implementations SHOULD report the next lowest standard Android framework density. 4583 </p> 4584 <p> 4585 Device implementations are STRONGLY RECOMMENDED to provide users a setting to change the display size. If there is an implementation to change the display size of the device, it MUST align with the AOSP implementation as indicated below: 4586 </p> 4587 <ul> 4588 <li>The display size MUST NOT be scaled any larger than 1.5 times the native density or produce an effective minimum screen dimension smaller than 320dp (equivalent to resource qualifier sw320dp), whichever comes first. 4589 </li> 4590 <li>Display size MUST NOT be scaled any smaller than 0.85 times the native density. 4591 </li> 4592 <li>To ensure good usability and consistent font sizes, it is RECOMMENDED that the following scaling of Native Display options be provided (while complying with the limits specified above) 4593 </li> 4594 <li>Small: 0.85x 4595 </li> 4596 <li>Default: 1x (Native display scale) 4597 </li> 4598 <li>Large: 1.15x 4599 </li> 4600 <li>Larger: 1.3x 4601 </li> 4602 <li>Largest 1.45x 4603 </li> 4604 </ul> 4605 <h3 id="7_1_2_display_metrics"> 4606 7.1.2. Display Metrics 4607 </h3> 4608 <p> 4609 Device implementations MUST report correct values for all display metrics defined in <a href="http://developer.android.com/reference/android/util/DisplayMetrics.html">android.util.DisplayMetrics</a> and MUST report the same values regardless of whether the embedded or external screen is used as the default display. 4610 </p> 4611 <h3 id="7_1_3_screen_orientation"> 4612 7.1.3. Screen Orientation 4613 </h3> 4614 <p> 4615 Devices MUST report which screen orientations they support (android.hardware.screen.portrait and/or android.hardware.screen.landscape) and MUST report at least one supported orientation. For example, a device with a fixed orientation landscape screen, such as a television or laptop, SHOULD only report android.hardware.screen.landscape. 4616 </p> 4617 <p> 4618 Devices that report both screen orientations MUST support dynamic orientation by applications to either portrait or landscape screen orientation. That is, the device must respect the applications request for a specific screen orientation. Device implementations MAY select either portrait or landscape orientation as the default. 4619 </p> 4620 <p> 4621 Devices MUST report the correct value for the devices current orientation, whenever queried via the android.content.res.Configuration.orientation, android.view.Display.getOrientation(), or other APIs. 4622 </p> 4623 <p> 4624 Devices MUST NOT change the reported screen size or density when changing orientation. 4625 </p> 4626 <h3 id="7_1_4_2d_and_3d_graphics_acceleration"> 4627 7.1.4. 2D and 3D Graphics Acceleration 4628 </h3> 4629 <p> 4630 Device implementations MUST support both OpenGL ES 1.0 and 2.0, as embodied and detailed in the Android SDK documentations. Device implementations SHOULD support OpenGL ES 3.0, 3.1, or 3.2 on devices capable of supporting it. Device implementations MUST also support <a href="http://developer.android.com/guide/topics/renderscript/">Android RenderScript</a> , as detailed in the Android SDK documentation. 4631 </p> 4632 <p> 4633 Device implementations MUST also correctly identify themselves as supporting OpenGL ES 1.0, OpenGL ES 2.0, OpenGL ES 3.0, OpenGL 3.1, or OpenGL 3.2. That is: 4634 </p> 4635 <ul> 4636 <li>The managed APIs (such as via the GLES10.getString() method) MUST report support for OpenGL ES 1.0 and OpenGL ES 2.0. 4637 </li> 4638 <li>The native C/C++ OpenGL APIs (APIs available to apps via libGLES_v1CM.so, libGLES_v2.so, or libEGL.so) MUST report support for OpenGL ES 1.0 and OpenGL ES 2.0. 4639 </li> 4640 <li>Device implementations that declare support for OpenGL ES 3.0, 3.1, or 3.2 MUST support the corresponding managed APIs and include support for native C/C++ APIs. On device implementations that declare support for OpenGL ES 3.0, 3.1, or 3.2 libGLESv2.so MUST export the corresponding function symbols in addition to the OpenGL ES 2.0 function symbols. 4641 </li> 4642 </ul> 4643 <p> 4644 Android provides an OpenGL ES <a href="https://developer.android.com/reference/android/opengl/GLES31Ext.html">extension pack</a> with Java interfaces and native support for advanced graphics functionality such as tessellation and the ASTC texture compression format. Android device implementations MUST support the extension pack if the device supports OpenGL ES 3.2 and MAY support it otherwise. If the extension pack is supported in its entirety, the device MUST identify the support through the <code>android.hardware.opengles.aep</code> feature flag. 4645 </p> 4646 <p> 4647 Also, device implementations MAY implement any desired OpenGL ES extensions. However, device implementations MUST report via the OpenGL ES managed and native APIs all extension strings that they do support, and conversely MUST NOT report extension strings that they do not support. 4648 </p> 4649 <p> 4650 Note that Android includes support for applications to optionally specify that they require specific OpenGL texture compression formats. These formats are typically vendor-specific. Device implementations are not required by Android to implement any specific texture compression format. However, they SHOULD accurately report any texture compression formats that they do support, via the getString() method in the OpenGL API. 4651 </p> 4652 <p> 4653 Android includes a mechanism for applications to declare that they want to enable hardware acceleration for 2D graphics at the Application, Activity, Window, or View level through the use of a manifest tag <a href="http://developer.android.com/guide/topics/graphics/hardware-accel.html">android:hardwareAccelerated</a> or direct API calls. 4654 </p> 4655 <p> 4656 Device implementations MUST enable hardware acceleration by default, and MUST disable hardware acceleration if the developer so requests by setting android:hardwareAccelerated="false or disabling hardware acceleration directly through the Android View APIs. 4657 </p> 4658 <p> 4659 In addition, device implementations MUST exhibit behavior consistent with the Android SDK documentation on <a href="http://developer.android.com/guide/topics/graphics/hardware-accel.html">hardware acceleration</a> . 4660 </p> 4661 <p> 4662 Android includes a TextureView object that lets developers directly integrate hardware-accelerated OpenGL ES textures as rendering targets in a UI hierarchy. Device implementations MUST support the TextureView API, and MUST exhibit consistent behavior with the upstream Android implementation. 4663 </p> 4664 <p> 4665 Android includes support for EGL_ANDROID_RECORDABLE, an EGLConfig attribute that indicates whether the EGLConfig supports rendering to an ANativeWindow that records images to a video. Device implementations MUST support <a href="https://www.khronos.org/registry/egl/extensions/ANDROID/EGL_ANDROID_recordable.txt">EGL_ANDROID_RECORDABLE</a> extension. 4666 </p> 4667 <h3 id="7_1_5_legacy_application_compatibility_mode"> 4668 7.1.5. Legacy Application Compatibility Mode 4669 </h3> 4670 <p> 4671 Android specifies a compatibility mode in which the framework operates in a 'normal' screen size equivalent (320dp width) mode for the benefit of legacy applications not developed for old versions of Android that pre-date screen-size independence. 4672 </p> 4673 <ul> 4674 <li>Android Automotive does not support legacy compatibility mode. 4675 </li> 4676 <li>All other device implementations MUST include support for legacy application compatibility mode as implemented by the upstream Android open source code. That is, device implementations MUST NOT alter the triggers or thresholds at which compatibility mode is activated, and MUST NOT alter the behavior of the compatibility mode itself. 4677 </li> 4678 </ul> 4679 <h3 id="7_1_6_screen_technology"> 4680 7.1.6. Screen Technology 4681 </h3> 4682 <p> 4683 The Android platform includes APIs that allow applications to render rich graphics to the display. Devices MUST support all of these APIs as defined by the Android SDK unless specifically allowed in this document. 4684 </p> 4685 <ul> 4686 <li>Devices MUST support displays capable of rendering 16-bit color graphics and SHOULD support displays capable of 24-bit color graphics. 4687 </li> 4688 <li>Devices MUST support displays capable of rendering animations. 4689 </li> 4690 <li>The display technology used MUST have a pixel aspect ratio (PAR) between 0.9 and 1.15. That is, the pixel aspect ratio MUST be near square (1.0) with a 10 ~ 15% tolerance. 4691 </li> 4692 </ul> 4693 <h3 id="7_1_7_secondary_displays"> 4694 7.1.7. Secondary Displays 4695 </h3> 4696 <p> 4697 Android includes support for secondary display to enable media sharing capabilities and developer APIs for accessing external displays. If a device supports an external display either via a wired, wireless, or an embedded additional display connection then the device implementation MUST implement the <a href="http://developer.android.com/reference/android/hardware/display/DisplayManager.html">display manager API</a> as described in the Android SDK documentation. 4698 </p> 4699 <h2 id="7_2_input_devices"> 4700 7.2. Input Devices 4701 </h2> 4702 <p> 4703 Devices MUST support a touchscreen or meet the requirements listed in 7.2.2 for non-touch navigation. 4704 </p> 4705 <h3 id="7_2_1_keyboard"> 4706 7.2.1. Keyboard 4707 </h3> 4708 <div class="note"> 4709 Android Watch and Android Automotive implementations MAY implement a soft keyboard. All other device implementations MUST implement a soft keyboard and: 4710 </div> 4711 <p> 4712 Device implementations: 4713 </p> 4714 <ul> 4715 <li>MUST include support for the Input Management Framework (which allows third-party developers to create Input Method Editorsi.e. soft keyboard) as detailed at <a href="http://developer.android.com">http://developer.android.com</a> . 4716 </li> 4717 <li>MUST provide at least one soft keyboard implementation (regardless of whether a hard keyboard is present) except for Android Watch devices where the screen size makes it less reasonable to have a soft keyboard. 4718 </li> 4719 <li>MAY include additional soft keyboard implementations. 4720 </li> 4721 <li>MAY include a hardware keyboard. 4722 </li> 4723 <li>MUST NOT include a hardware keyboard that does not match one of the formats specified in <a href="http://developer.android.com/reference/android/content/res/Configuration.html">android.content.res.Configuration.keyboard</a> (QWERTY or 12-key). 4724 </li> 4725 </ul> 4726 <h3 id="7_2_2_non-touch_navigation"> 4727 7.2.2. Non-touch Navigation 4728 </h3> 4729 <div class="note"> 4730 Android Television devices MUST support D-pad. 4731 </div> 4732 <p> 4733 Device implementations: 4734 </p> 4735 <ul> 4736 <li>MAY omit a non-touch navigation option (trackball, d-pad, or wheel) if the device implementation is not an Android Television device. 4737 </li> 4738 <li>MUST report the correct value for <a href="http://developer.android.com/reference/android/content/res/Configuration.html">android.content.res.Configuration.navigation</a> . 4739 </li> 4740 <li>MUST provide a reasonable alternative user interface mechanism for the selection and editing of text, compatible with Input Management Engines. The upstream Android open source implementation includes a selection mechanism suitable for use with devices that lack non-touch navigation inputs. 4741 </li> 4742 </ul> 4743 <h3 id="7_2_3_navigation_keys"> 4744 7.2.3. Navigation Keys 4745 </h3> 4746 <div class="note"> 4747 The availability and visibility requirement of the Home, Recents, and Back functions differ between device types as described in this section. 4748 </div> 4749 <p> 4750 The Home, Recents, and Back functions (mapped to the key events KEYCODE_HOME, KEYCODE_APP_SWITCH, KEYCODE_BACK, respectively) are essential to the Android navigation paradigm and therefore: 4751 </p> 4752 <ul> 4753 <li>Android Handheld device implementations MUST provide the Home, Recents, and Back functions. 4754 </li> 4755 <li>Android Television device implementations MUST provide the Home and Back functions. 4756 </li> 4757 <li>Android Watch device implementations MUST have the Home function available to the user, and the Back function except for when it is in <code>UI_MODE_TYPE_WATCH</code> . 4758 </li> 4759 <li>Android Watch device implementations, and no other Android device types, MAY consume the long press event on the key event <a href="http://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_BACK"><code>KEYCODE_BACK</code></a> and omit it from being sent to the foreground application. 4760 </li> 4761 <li>Android Automotive implementations MUST provide the Home function and MAY provide Back and Recent functions. 4762 </li> 4763 <li>All other types of device implementations MUST provide the Home and Back functions. 4764 </li> 4765 </ul> 4766 <p> 4767 These functions MAY be implemented via dedicated physical buttons (such as mechanical or capacitive touch buttons), or MAY be implemented using dedicated software keys on a distinct portion of the screen, gestures, touch panel, etc. Android supports both implementations. All of these functions MUST be accessible with a single action (e.g. tap, double-click or gesture) when visible. 4768 </p> 4769 <p> 4770 Recents function, if provided, MUST have a visible button or icon unless hidden together with other navigation functions in full-screen mode. This does not apply to devices upgrading from earlier Android versions that have physical buttons for navigation and no recents key. 4771 </p> 4772 <p> 4773 The Home and Back functions, if provided, MUST each have a visible button or icon unless hidden together with other navigation functions in full-screen mode or when the uiMode UI_MODE_TYPE_MASK is set to UI_MODE_TYPE_WATCH. 4774 </p> 4775 <p> 4776 The Menu function is deprecated in favor of action bar since Android 4.0. Therefore the new device implementations shipping with Android 7.1 and later MUST NOT implement a dedicated physical button for the Menu function. Older device implementations SHOULD NOT implement a dedicated physical button for the Menu function, but if the physical Menu button is implemented and the device is running applications with targetSdkVersion > 10, the device implementation: 4777 </p> 4778 <ul> 4779 <li>MUST display the action overflow button on the action bar when it is visible and the resulting action overflow menu popup is not empty. For a device implementation launched before Android 4.4 but upgrading to Android 7.1, this is RECOMMENDED. 4780 </li> 4781 <li>MUST NOT modify the position of the action overflow popup displayed by selecting the overflow button in the action bar. 4782 </li> 4783 <li>MAY render the action overflow popup at a modified position on the screen when it is displayed by selecting the physical menu button. 4784 </li> 4785 </ul> 4786 <p> 4787 For backwards compatibility, device implementations MUST make the Menu function available to applications when targetSdkVersion is less than 10, either by a physical button, a software key, or gestures. This Menu function should be presented unless hidden together with other navigation functions. 4788 </p> 4789 <p> 4790 Android device implementations supporting the <a href="http://developer.android.com/reference/android/content/Intent.html#ACTION_ASSIST">Assist action</a> and/or <a href="https://developer.android.com/reference/android/service/voice/VoiceInteractionService.html"><code>VoiceInteractionService</code></a> MUST be able to launch an assist app with a single interaction (e.g. tap, double-click, or gesture) when other navigation keys are visible. It is STRONGLY RECOMMENDED to use long press on home as this interaction. The designated interaction MUST launch the user-selected assist app, in other words the app that implements a VoiceInteractionService, or an activity handling the ACTION_ASSIST intent. 4791 </p> 4792 <p> 4793 Device implementations MAY use a distinct portion of the screen to display the navigation keys, but if so, MUST meet these requirements: 4794 </p> 4795 <ul> 4796 <li>Device implementation navigation keys MUST use a distinct portion of the screen, not available to applications, and MUST NOT obscure or otherwise interfere with the portion of the screen available to applications. 4797 </li> 4798 <li>Device implementations MUST make available a portion of the display to applications that meets the requirements defined in <a href="#7_1_1_screen_configuration">section 7.1.1</a> . 4799 </li> 4800 <li>Device implementations MUST display the navigation keys when applications do not specify a system UI mode, or specify SYSTEM_UI_FLAG_VISIBLE. 4801 </li> 4802 <li>Device implementations MUST present the navigation keys in an unobtrusive low profile (eg. dimmed) mode when applications specify SYSTEM_UI_FLAG_LOW_PROFILE. 4803 </li> 4804 <li>Device implementations MUST hide the navigation keys when applications specify SYSTEM_UI_FLAG_HIDE_NAVIGATION. 4805 </li> 4806 </ul> 4807 <h3 id="7_2_4_touchscreen_input"> 4808 7.2.4. Touchscreen Input 4809 </h3> 4810 <div class="note"> 4811 Android Handhelds and Watch Devices MUST support touchscreen input. 4812 </div> 4813 <p> 4814 Device implementations SHOULD have a pointer input system of some kind (either mouse-like or touch). However, if a device implementation does not support a pointer input system, it MUST NOT report the android.hardware.touchscreen or android.hardware.faketouch feature constant. Device implementations that do include a pointer input system: 4815 </p> 4816 <ul> 4817 <li>SHOULD support fully independently tracked pointers, if the device input system supports multiple pointers. 4818 </li> 4819 <li>MUST report the value of <a href="http://developer.android.com/reference/android/content/res/Configuration.html">android.content.res.Configuration.touchscreen</a> corresponding to the type of the specific touchscreen on the device. 4820 </li> 4821 </ul> 4822 <p> 4823 Android includes support for a variety of touchscreens, touch pads, and fake touch input devices. <a href="http://source.android.com/devices/tech/input/touch-devices.html">Touchscreen-based device implementations</a> are associated with a display such that the user has the impression of directly manipulating items on screen. Since the user is directly touching the screen, the system does not require any additional affordances to indicate the objects being manipulated. In contrast, a fake touch interface provides a user input system that approximates a subset of touchscreen capabilities. For example, a mouse or remote control that drives an on-screen cursor approximates touch, but requires the user to first point or focus then click. Numerous input devices like the mouse, trackpad, gyro-based air mouse, gyro-pointer, joystick, and multi-touch trackpad can support fake touch interactions. Android includes the feature constant android.hardware.faketouch, which corresponds to a high-fidelity non-touch (pointer-based) input device such as a mouse or trackpad that can adequately emulate touch-based input (including basic gesture support), and indicates that the device supports an emulated subset of touchscreen functionality. Device implementations that declare the fake touch feature MUST meet the fake touch requirements in <a href="#7_2_5_fake_touch_input">section 7.2.5</a> . 4824 </p> 4825 <p> 4826 Device implementations MUST report the correct feature corresponding to the type of input used. Device implementations that include a touchscreen (single-touch or better) MUST report the platform feature constant android.hardware.touchscreen. Device implementations that report the platform feature constant android.hardware.touchscreen MUST also report the platform feature constant android.hardware.faketouch. Device implementations that do not include a touchscreen (and rely on a pointer device only) MUST NOT report any touchscreen feature, and MUST report only android.hardware.faketouch if they meet the fake touch requirements in <a href="#7_2_5_fake_touch_input">section 7.2.5</a> . 4827 </p> 4828 <h3 id="7_2_5_fake_touch_input"> 4829 7.2.5. Fake Touch Input 4830 </h3> 4831 <p> 4832 Device implementations that declare support for android.hardware.faketouch: 4833 </p> 4834 <ul> 4835 <li>MUST report the <a href="http://developer.android.com/reference/android/view/MotionEvent.html">absolute X and Y screen positions</a> of the pointer location and display a visual pointer on the screen. 4836 </li> 4837 <li>MUST report touch event with the action code that specifies the state change that occurs on the pointer <a href="http://developer.android.com/reference/android/view/MotionEvent.html">going down or up on the screen</a> . 4838 </li> 4839 <li>MUST support pointer down and up on an object on the screen, which allows users to emulate tap on an object on the screen. 4840 </li> 4841 <li>MUST support pointer down, pointer up, pointer down then pointer up in the same place on an object on the screen within a time threshold, which allows users to <a href="http://developer.android.com/reference/android/view/MotionEvent.html">emulate double tap</a> on an object on the screen. 4842 </li> 4843 <li>MUST support pointer down on an arbitrary point on the screen, pointer move to any other arbitrary point on the screen, followed by a pointer up, which allows users to emulate a touch drag. 4844 </li> 4845 <li>MUST support pointer down then allow users to quickly move the object to a different position on the screen and then pointer up on the screen, which allows users to fling an object on the screen. 4846 </li> 4847 </ul> 4848 <p> 4849 Devices that declare support for android.hardware.faketouch.multitouch.distinct MUST meet the requirements for faketouch above, and MUST also support distinct tracking of two or more independent pointer inputs. 4850 </p> 4851 <h3 id="7_2_6_game_controller_support"> 4852 7.2.6. Game Controller Support 4853 </h3> 4854 <p> 4855 Android Television device implementations MUST support button mappings for game controllers as listed below. The upstream Android implementation includes implementation for game controllers that satisfies this requirement. 4856 </p> 4857 <h4 id="7_2_6_1_button_mappings"> 4858 7.2.6.1. Button Mappings 4859 </h4> 4860 <p> 4861 Android Television device implementations MUST support the following key mappings: 4862 </p> 4863 <table> 4864 <tr> 4865 <th> 4866 Button 4867 </th> 4868 <th> 4869 HID Usage <sup>2</sup> 4870 </th> 4871 <th> 4872 Android Button 4873 </th> 4874 </tr> 4875 <tr> 4876 <td> 4877 <a href="http://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_BUTTON_A">A</a> <sup>1</sup> 4878 </td> 4879 <td> 4880 0x09 0x0001 4881 </td> 4882 <td> 4883 KEYCODE_BUTTON_A (96) 4884 </td> 4885 </tr> 4886 <tr> 4887 <td> 4888 <a href="http://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_BUTTON_B">B</a> <sup>1</sup> 4889 </td> 4890 <td> 4891 0x09 0x0002 4892 </td> 4893 <td> 4894 KEYCODE_BUTTON_B (97) 4895 </td> 4896 </tr> 4897 <tr> 4898 <td> 4899 <a href="http://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_BUTTON_X">X</a> <sup>1</sup> 4900 </td> 4901 <td> 4902 0x09 0x0004 4903 </td> 4904 <td> 4905 KEYCODE_BUTTON_X (99) 4906 </td> 4907 </tr> 4908 <tr> 4909 <td> 4910 <a href="http://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_BUTTON_Y">Y</a> <sup>1</sup> 4911 </td> 4912 <td> 4913 0x09 0x0005 4914 </td> 4915 <td> 4916 KEYCODE_BUTTON_Y (100) 4917 </td> 4918 </tr> 4919 <tr> 4920 <td> 4921 <a href="http://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_DPAD_UP">D-pad up</a> <sup>1</sup><br /> 4922 <a href="http://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_DPAD_DOWN">D-pad down</a> <sup>1</sup> 4923 </td> 4924 <td> 4925 0x01 0x0039 <sup>3</sup> 4926 </td> 4927 <td> 4928 <a href="http://developer.android.com/reference/android/view/MotionEvent.html#AXIS_HAT_Y">AXIS_HAT_Y</a> <sup>4</sup> 4929 </td> 4930 </tr> 4931 <tr> 4932 <td> 4933 <a href="http://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_DPAD_LEFT">D-pad left</a> 1<br /> 4934 <a href="http://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_DPAD_RIGHT">D-pad right</a> <sup>1</sup> 4935 </td> 4936 <td> 4937 0x01 0x0039 <sup>3</sup> 4938 </td> 4939 <td> 4940 <a href="http://developer.android.com/reference/android/view/MotionEvent.html#AXIS_HAT_X">AXIS_HAT_X</a> <sup>4</sup> 4941 </td> 4942 </tr> 4943 <tr> 4944 <td> 4945 <a href="http://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_BUTTON_L1">Left shoulder button</a> <sup>1</sup> 4946 </td> 4947 <td> 4948 0x09 0x0007 4949 </td> 4950 <td> 4951 KEYCODE_BUTTON_L1 (102) 4952 </td> 4953 </tr> 4954 <tr> 4955 <td> 4956 <a href="http://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_BUTTON_R1">Right shoulder button</a> <sup>1</sup> 4957 </td> 4958 <td> 4959 0x09 0x0008 4960 </td> 4961 <td> 4962 KEYCODE_BUTTON_R1 (103) 4963 </td> 4964 </tr> 4965 <tr> 4966 <td> 4967 <a href="http://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_BUTTON_THUMBL">Left stick click</a> <sup>1</sup> 4968 </td> 4969 <td> 4970 0x09 0x000E 4971 </td> 4972 <td> 4973 KEYCODE_BUTTON_THUMBL (106) 4974 </td> 4975 </tr> 4976 <tr> 4977 <td> 4978 <a href="http://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_BUTTON_THUMBR">Right stick click</a> <sup>1</sup> 4979 </td> 4980 <td> 4981 0x09 0x000F 4982 </td> 4983 <td> 4984 KEYCODE_BUTTON_THUMBR (107) 4985 </td> 4986 </tr> 4987 <tr> 4988 <td> 4989 <a href="http://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_HOME">Home</a> <sup>1</sup> 4990 </td> 4991 <td> 4992 0x0c 0x0223 4993 </td> 4994 <td> 4995 KEYCODE_HOME (3) 4996 </td> 4997 </tr> 4998 <tr> 4999 <td> 5000 <a href="http://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_BACK">Back</a> <sup>1</sup> 5001 </td> 5002 <td> 5003 0x0c 0x0224 5004 </td> 5005 <td> 5006 KEYCODE_BACK (4) 5007 </td> 5008 </tr> 5009 </table> 5010 <p class="table_footnote"> 5011 1 <a href="http://developer.android.com/reference/android/view/KeyEvent.html">KeyEvent</a> 5012 </p> 5013 <p class="table_footnote"> 5014 2 The above HID usages must be declared within a Game pad CA (0x01 0x0005). 5015 </p> 5016 <p class="table_footnote"> 5017 3 This usage must have a Logical Minimum of 0, a Logical Maximum of 7, a Physical Minimum of 0, a Physical Maximum of 315, Units in Degrees, and a Report Size of 4. The logical value is defined to be the clockwise rotation away from the vertical axis; for example, a logical value of 0 represents no rotation and the up button being pressed, while a logical value of 1 represents a rotation of 45 degrees and both the up and left keys being pressed. 5018 </p> 5019 <p class="table_footnote"> 5020 4 <a href="http://developer.android.com/reference/android/view/MotionEvent.html">MotionEvent</a> 5021 </p> 5022 <table> 5023 <tr> 5024 <th> 5025 Analog Controls <sup>1</sup> 5026 </th> 5027 <th> 5028 HID Usage 5029 </th> 5030 <th> 5031 Android Button 5032 </th> 5033 </tr> 5034 <tr> 5035 <td> 5036 <a href="http://developer.android.com/reference/android/view/MotionEvent.html#AXIS_LTRIGGER">Left Trigger</a> 5037 </td> 5038 <td> 5039 0x02 0x00C5 5040 </td> 5041 <td> 5042 AXIS_LTRIGGER 5043 </td> 5044 </tr> 5045 <tr> 5046 <td> 5047 <a href="http://developer.android.com/reference/android/view/MotionEvent.html#AXIS_THROTTLE">Right Trigger</a> 5048 </td> 5049 <td> 5050 0x02 0x00C4 5051 </td> 5052 <td> 5053 AXIS_RTRIGGER 5054 </td> 5055 </tr> 5056 <tr> 5057 <td> 5058 <a href="http://developer.android.com/reference/android/view/MotionEvent.html#AXIS_Y">Left Joystick</a> 5059 </td> 5060 <td> 5061 0x01 0x0030<br /> 5062 0x01 0x0031 5063 </td> 5064 <td> 5065 AXIS_X<br /> 5066 AXIS_Y 5067 </td> 5068 </tr> 5069 <tr> 5070 <td> 5071 <a href="http://developer.android.com/reference/android/view/MotionEvent.html#AXIS_Z">Right Joystick</a> 5072 </td> 5073 <td> 5074 0x01 0x0032<br /> 5075 0x01 0x0035 5076 </td> 5077 <td> 5078 AXIS_Z<br /> 5079 AXIS_RZ 5080 </td> 5081 </tr> 5082 </table> 5083 <p class="table_footnote"> 5084 1 <a href="http://developer.android.com/reference/android/view/MotionEvent.html">MotionEvent</a> 5085 </p> 5086 <h3 id="7_2_7_remote_control"> 5087 7.2.7. Remote Control 5088 </h3> 5089 <p> 5090 Android Television device implementations SHOULD provide a remote control to allow users to access the TV interface. The remote control MAY be a physical remote or can be a software-based remote that is accessible from a mobile phone or tablet. The remote control MUST meet the requirements defined below. 5091 </p> 5092 <ul> 5093 <li> 5094 <strong>Search affordance</strong> . Device implementations MUST fire KEYCODE_SEARCH when the user invokes voice search either on the physical or software-based remote. 5095 </li> 5096 <li> 5097 <strong>Navigation</strong> . All Android Television remotes MUST include <a href="http://developer.android.com/reference/android/view/KeyEvent.html">Back, Home, and Select buttons and support for D-pad events</a> . 5098 </li> 5099 </ul> 5100 <h2 id="7_3_sensors"> 5101 7.3. Sensors 5102 </h2> 5103 <p> 5104 Android includes APIs for accessing a variety of sensor types. Devices implementations generally MAY omit these sensors, as provided for in the following subsections. If a device includes a particular sensor type that has a corresponding API for third-party developers, the device implementation MUST implement that API as described in the Android SDK documentation and the Android Open Source documentation on <a href="http://source.android.com/devices/sensors/">sensors</a> . For example, device implementations: 5105 </p> 5106 <ul> 5107 <li>MUST accurately report the presence or absence of sensors per the <a href="http://developer.android.com/reference/android/content/pm/PackageManager.html">android.content.pm.PackageManager</a> class. 5108 </li> 5109 <li>MUST return an accurate list of supported sensors via the SensorManager.getSensorList() and similar methods. 5110 </li> 5111 <li>MUST behave reasonably for all other sensor APIs (for example, by returning true or false as appropriate when applications attempt to register listeners, not calling sensor listeners when the corresponding sensors are not present; etc.). 5112 </li> 5113 <li>MUST <a href="http://developer.android.com/reference/android/hardware/SensorEvent.html">report all sensor measurements</a> using the relevant International System of Units (metric) values for each sensor type as defined in the Android SDK documentation. 5114 </li> 5115 <li>SHOULD <a href="http://developer.android.com/reference/android/hardware/SensorEvent.html#timestamp">report the event time</a> in nanoseconds as defined in the Android SDK documentation, representing the time the event happened and synchronized with the SystemClock.elapsedRealtimeNano() clock. Existing and new Android devices are <strong>STRONGLY RECOMMENDED</strong> to meet these requirements so they will be able to upgrade to the future platform releases where this might become a REQUIRED component. The synchronization error SHOULD be below 100 milliseconds. 5116 </li> 5117 <li>MUST report sensor data with a maximum latency of 100 milliseconds + 2 * sample_time for the case of a sensor streamed with a minimum required latency of 5 ms + 2 * sample_time when the application processor is active. This delay does not include any filtering delays. 5118 </li> 5119 <li>MUST report the first sensor sample within 400 milliseconds + 2 * sample_time of the sensor being activated. It is acceptable for this sample to have an accuracy of 0. 5120 </li> 5121 </ul> 5122 <p> 5123 The list above is not comprehensive; the documented behavior of the Android SDK and the Android Open Source Documentations on <a href="http://source.android.com/devices/sensors/">sensors</a> is to be considered authoritative. 5124 </p> 5125 <p> 5126 Some sensor types are composite, meaning they can be derived from data provided by one or more other sensors. (Examples include the orientation sensor and the linear acceleration sensor.) Device implementations SHOULD implement these sensor types, when they include the prerequisite physical sensors as described in <a href="https://source.android.com/devices/sensors/sensor-types.html">sensor types</a> . If a device implementation includes a composite sensor it MUST implement the sensor as described in the Android Open Source documentation on <a href="https://source.android.com/devices/sensors/sensor-types.html#composite_sensor_type_summary">composite sensors</a> . 5127 </p> 5128 <p> 5129 Some Android sensors support a <a href="https://source.android.com/devices/sensors/report-modes.html#continuous">continuous trigger mode</a> , which returns data continuously. For any API indicated by the Android SDK documentation to be a continuous sensor, device implementations MUST continuously provide periodic data samples that SHOULD have a jitter below 3%, where jitter is defined as the standard deviation of the difference of the reported timestamp values between consecutive events. 5130 </p> 5131 <p> 5132 Note that the device implementations MUST ensure that the sensor event stream MUST NOT prevent the device CPU from entering a suspend state or waking up from a suspend state. 5133 </p> 5134 <p> 5135 Finally, when several sensors are activated, the power consumption SHOULD NOT exceed the sum of the individual sensors reported power consumption. 5136 </p> 5137 <h3 id="7_3_1_accelerometer"> 5138 7.3.1. Accelerometer 5139 </h3> 5140 <p> 5141 Device implementations SHOULD include a 3-axis accelerometer. Android Handheld devices, Android Automotive implementations, and Android Watch devices are STRONGLY RECOMMENDED to include this sensor. If a device implementation does include a 3-axis accelerometer, it: 5142 </p> 5143 <ul> 5144 <li>MUST implement and report <a href="http://developer.android.com/reference/android/hardware/Sensor.html#TYPE_ACCELEROMETER">TYPE_ACCELEROMETER sensor</a> . 5145 </li> 5146 <li>MUST be able to report events up to a frequency of at least 50 Hz for Android Watch devices as such devices have a stricter power constraint and 100 Hz for all other device types. 5147 </li> 5148 <li>SHOULD report events up to at least 200 Hz. 5149 </li> 5150 <li>MUST comply with the <a href="http://developer.android.com/reference/android/hardware/SensorEvent.html">Android sensor coordinate system</a> as detailed in the Android APIs. Android Automotive implementations MUST comply with the Android <a href="http://source.android.com/devices/sensors/sensor-types.html#auto_axes">car sensor coordinate system</a> . 5151 </li> 5152 <li>MUST be capable of measuring from freefall up to four times the gravity (4g) or more on any axis. 5153 </li> 5154 <li>MUST have a resolution of at least 12-bits and SHOULD have a resolution of at least 16-bits. 5155 </li> 5156 <li>SHOULD be calibrated while in use if the characteristics changes over the life cycle and compensated, and preserve the compensation parameters between device reboots. 5157 </li> 5158 <li>SHOULD be temperature compensated. 5159 </li> 5160 <li>MUST have a standard deviation no greater than 0.05 m/s^, where the standard deviation should be calculated on a per axis basis on samples collected over a period of at least 3 seconds at the fastest sampling rate. 5161 </li> 5162 <li>SHOULD implement the TYPE_SIGNIFICANT_MOTION, TYPE_TILT_DETECTOR, TYPE_STEP_DETECTOR, TYPE_STEP_COUNTER composite sensors as described in the Android SDK document. Existing and new Android devices are <strong>STRONGLY RECOMMENDED</strong> to implement the TYPE_SIGNIFICANT_MOTION composite sensor. If any of these sensors are implemented, the sum of their power consumption MUST always be less than 4 mW and SHOULD each be below 2 mW and 0.5 mW for when the device is in a dynamic or static condition. 5163 </li> 5164 <li>If a gyroscope sensor is included, MUST implement the TYPE_GRAVITY and TYPE_LINEAR_ACCELERATION composite sensors and SHOULD implement the TYPE_GAME_ROTATION_VECTOR composite sensor. Existing and new Android devices are STRONGLY RECOMMENDED to implement the TYPE_GAME_ROTATION_VECTOR sensor. 5165 </li> 5166 <li>MUST implement a TYPE_ROTATION_VECTOR composite sensor, if a gyroscope sensor and a magnetometer sensor is also included. 5167 </li> 5168 </ul> 5169 <h3 id="7_3_2_magnetometer"> 5170 7.3.2. Magnetometer 5171 </h3> 5172 <p> 5173 Device implementations SHOULD include a 3-axis magnetometer (compass). If a device does include a 3-axis magnetometer, it: 5174 </p> 5175 <ul> 5176 <li>MUST implement the TYPE_MAGNETIC_FIELD sensor and SHOULD also implement TYPE_MAGNETIC_FIELD_UNCALIBRATED sensor. Existing and new Android devices are STRONGLY RECOMMENDED to implement the TYPE_MAGNETIC_FIELD_UNCALIBRATED sensor. 5177 </li> 5178 <li>MUST be able to report events up to a frequency of at least 10 Hz and SHOULD report events up to at least 50 Hz. 5179 </li> 5180 <li>MUST comply with the <a href="http://developer.android.com/reference/android/hardware/SensorEvent.html">Android sensor coordinate system</a> as detailed in the Android APIs. 5181 </li> 5182 <li>MUST be capable of measuring between -900 T and +900 T on each axis before saturating. 5183 </li> 5184 <li>MUST have a hard iron offset value less than 700 T and SHOULD have a value below 200 T, by placing the magnetometer far from dynamic (current-induced) and static (magnet-induced) magnetic fields. 5185 </li> 5186 <li>MUST have a resolution equal or denser than 0.6 T and SHOULD have a resolution equal or denser than 0.2 T. 5187 </li> 5188 <li>SHOULD be temperature compensated. 5189 </li> 5190 <li>MUST support online calibration and compensation of the hard iron bias, and preserve the compensation parameters between device reboots. 5191 </li> 5192 <li>MUST have the soft iron compensation appliedthe calibration can be done either while in use or during the production of the device. 5193 </li> 5194 <li>SHOULD have a standard deviation, calculated on a per axis basis on samples collected over a period of at least 3 seconds at the fastest sampling rate, no greater than 0.5 T. 5195 </li> 5196 <li>MUST implement a TYPE_ROTATION_VECTOR composite sensor, if an accelerometer sensor and a gyroscope sensor is also included. 5197 </li> 5198 <li>MAY implement the TYPE_GEOMAGNETIC_ROTATION_VECTOR sensor if an accelerometer sensor is also implemented. However if implemented, it MUST consume less than 10 mW and SHOULD consume less than 3 mW when the sensor is registered for batch mode at 10 Hz. 5199 </li> 5200 </ul> 5201 <h3 id="7_3_3_gps"> 5202 7.3.3. GPS 5203 </h3> 5204 <p> 5205 Device implementations SHOULD include a GPS/GNSS receiver. If a device implementation does include a GPS/GNSS receiver and reports the capability to applications through the <code>android.hardware.location.gps</code> feature flag: 5206 </p> 5207 <ul> 5208 <li>It is STRONGLY RECOMMENDED that the device continue to deliver normal GPS/GNSS outputs to applications during an emergency phone call and that location output not be blocked during an emergency phone call. 5209 </li> 5210 <li>It MUST support location outputs at a rate of at least 1 Hz when requested via <code>LocationManager#requestLocationUpdate</code> . 5211 </li> 5212 <li>It MUST be able to determine the location in open-sky conditions (strong signals, negligible multipath, HDOP < 2) within 10 seconds (fast time to first fix), when connected to a 0.5 Mbps or faster data speed internet connection. This requirement is typically met by the use of some form of Assisted or Predicted GPS/GNSS technique to minimize GPS/GNSS lock-on time (Assistance data includes Reference Time, Reference Location and Satellite Ephemeris/Clock). 5213 <ul> 5214 <li>After making such a location calculation, it is STRONGLY RECOMMENDED for the device to be able to determine its location, in open sky, within 10 seconds, when location requests are restarted, up to an hour after the initial location calculation, even when the subsequent request is made without a data connection, and/or after a power cycle. 5215 </li> 5216 </ul> 5217 </li> 5218 <li>In open sky conditions after determining the location, while stationary or moving with less than 1 meter per second squared of acceleration: 5219 <ul> 5220 <li>It MUST be able to determine location within 20 meters, and speed within 0.5 meters per second, at least 95% of the time. 5221 </li> 5222 <li>It MUST simultaneously track and report via <a href="https://developer.android.com/reference/android/location/GnssStatus.Callback.html#GnssStatus.Callback()'">GnssStatus.Callback</a> at least 8 satellites from one constellation. 5223 </li> 5224 <li>It SHOULD be able to simultaneously track at least 24 satellites, from multiple constellations (e.g. GPS + at least one of Glonass, Beidou, Galileo). 5225 </li> 5226 </ul> 5227 </li> 5228 <li>It MUST report the GNSS technology generation through the test API getGnssYearOfHardware. 5229 </li> 5230 <li>It is STRONGLY RECOMMENDED to meet and MUST meet all requirements below if the GNSS technology generation is reported as the year "2016" or newer. 5231 <ul> 5232 <li>It MUST report GPS measurements, as soon as they are found, even if a location calculated from GPS/GNSS is not yet reported. 5233 </li> 5234 <li>It MUST report GPS pseudoranges and pseudorange rates, that, in open-sky conditions after determining the location, while stationary or moving with less than 0.2 meter per second squared of acceleration, are sufficient to calculate position within 20 meters, and speed within 0.2 meters per second, at least 95% of the time. 5235 </li> 5236 </ul> 5237 </li> 5238 </ul> 5239 <p> 5240 Note that while some of the GPS requirements above are stated as STRONGLY RECOMMENDED, the Compatibility Definition for the next major version is expected to change these to a MUST. 5241 </p> 5242 <h3 id="7_3_4_gyroscope"> 5243 7.3.4. Gyroscope 5244 </h3> 5245 <p> 5246 Device implementations SHOULD include a gyroscope (angular change sensor). Devices SHOULD NOT include a gyroscope sensor unless a 3-axis accelerometer is also included. If a device implementation includes a gyroscope, it: 5247 </p> 5248 <ul> 5249 <li>MUST implement the TYPE_GYROSCOPE sensor and SHOULD also implement TYPE_GYROSCOPE_UNCALIBRATED sensor. Existing and new Android devices are STRONGLY RECOMMENDED to implement the SENSOR_TYPE_GYROSCOPE_UNCALIBRATED sensor. 5250 </li> 5251 <li>MUST be capable of measuring orientation changes up to 1,000 degrees per second. 5252 </li> 5253 <li>MUST be able to report events up to a frequency of at least 50 Hz for Android Watch devices as such devices have a stricter power constraint and 100 Hz for all other device types. 5254 </li> 5255 <li>SHOULD report events up to at least 200 Hz. 5256 </li> 5257 <li>MUST have a resolution of 12-bits or more and SHOULD have a resolution of 16-bits or more. 5258 </li> 5259 <li>MUST be temperature compensated. 5260 </li> 5261 <li>MUST be calibrated and compensated while in use, and preserve the compensation parameters between device reboots. 5262 </li> 5263 <li>MUST have a variance no greater than 1e-7 rad^2 / s^2 per Hz (variance per Hz, or rad^2 / s). The variance is allowed to vary with the sampling rate, but must be constrained by this value. In other words, if you measure the variance of the gyro at 1 Hz sampling rate it should be no greater than 1e-7 rad^2/s^2. 5264 </li> 5265 <li>MUST implement a TYPE_ROTATION_VECTOR composite sensor, if an accelerometer sensor and a magnetometer sensor is also included. 5266 </li> 5267 <li>If an accelerometer sensor is included, MUST implement the TYPE_GRAVITY and TYPE_LINEAR_ACCELERATION composite sensors and SHOULD implement the TYPE_GAME_ROTATION_VECTOR composite sensor. Existing and new Android devices are STRONGLY RECOMMENDED to implement the TYPE_GAME_ROTATION_VECTOR sensor. 5268 </li> 5269 </ul> 5270 <h3 id="7_3_5_barometer"> 5271 7.3.5. Barometer 5272 </h3> 5273 <p> 5274 Device implementations SHOULD include a barometer (ambient air pressure sensor). If a device implementation includes a barometer, it: 5275 </p> 5276 <ul> 5277 <li>MUST implement and report TYPE_PRESSURE sensor. 5278 </li> 5279 <li>MUST be able to deliver events at 5 Hz or greater. 5280 </li> 5281 <li>MUST have adequate precision to enable estimating altitude. 5282 </li> 5283 <li>MUST be temperature compensated. 5284 </li> 5285 </ul> 5286 <h3 id="7_3_6_thermometer"> 5287 7.3.6. Thermometer 5288 </h3> 5289 <p> 5290 Device implementations MAY include an ambient thermometer (temperature sensor). If present, it MUST be defined as SENSOR_TYPE_AMBIENT_TEMPERATURE and it MUST measure the ambient (room) temperature in degrees Celsius. 5291 </p> 5292 <p> 5293 Device implementations MAY but SHOULD NOT include a CPU temperature sensor. If present, it MUST be defined as SENSOR_TYPE_TEMPERATURE, it MUST measure the temperature of the device CPU, and it MUST NOT measure any other temperature. Note the SENSOR_TYPE_TEMPERATURE sensor type was deprecated in Android 4.0. 5294 </p> 5295 <div class="note"> 5296 For Android Automotive implementations, SENSOR_TYPE_AMBIENT_TEMPERATURE MUST measure the temperature inside the vehicle cabin. 5297 </div> 5298 <h3 id="7_3_7_photometer"> 5299 7.3.7. Photometer 5300 </h3> 5301 <p> 5302 Device implementations MAY include a photometer (ambient light sensor). 5303 </p> 5304 <h3 id="7_3_8_proximity_sensor"> 5305 7.3.8. Proximity Sensor 5306 </h3> 5307 <p> 5308 Device implementations MAY include a proximity sensor. Devices that can make a voice call and indicate any value other than PHONE_TYPE_NONE in getPhoneType SHOULD include a proximity sensor. If a device implementation does include a proximity sensor, it: 5309 </p> 5310 <ul> 5311 <li>MUST measure the proximity of an object in the same direction as the screen. That is, the proximity sensor MUST be oriented to detect objects close to the screen, as the primary intent of this sensor type is to detect a phone in use by the user. If a device implementation includes a proximity sensor with any other orientation, it MUST NOT be accessible through this API. 5312 </li> 5313 <li>MUST have 1-bit of accuracy or more. 5314 </li> 5315 </ul> 5316 <h3 id="7_3_9_high_fidelity_sensors"> 5317 7.3.9. High Fidelity Sensors 5318 </h3> 5319 <p> 5320 Device implementations supporting a set of higher quality sensors that can meet all the requirements listed in this section MUST identify the support through the <code>android.hardware.sensor.hifi_sensors</code> feature flag. 5321 </p> 5322 <p> 5323 A device declaring android.hardware.sensor.hifi_sensors MUST support all of the following sensor types meeting the quality requirements as below: 5324 </p> 5325 <ul> 5326 <li>SENSOR_TYPE_ACCELEROMETER 5327 <ul> 5328 <li>MUST have a measurement range between at least -8g and +8g. 5329 </li> 5330 <li>MUST have a measurement resolution of at least 1024 LSB/G. 5331 </li> 5332 <li>MUST have a minimum measurement frequency of 12.5 Hz or lower. 5333 </li> 5334 <li>MUST have a maximum measurement frequency of 400 Hz or higher. 5335 </li> 5336 <li>MUST have a measurement noise not above 400 uG/Hz. 5337 </li> 5338 <li>MUST implement a non-wake-up form of this sensor with a buffering capability of at least 3000 sensor events. 5339 </li> 5340 <li>MUST have a batching power consumption not worse than 3 mW. 5341 </li> 5342 <li>SHOULD have a stationary noise bias stability of \<15 g Hz from 24hr static dataset. 5343 </li> 5344 <li>SHOULD have a bias change vs. temperature of +/- 1mg / C. 5345 </li> 5346 <li>SHOULD have a best-fit line non-linearity of 0.5%, and sensitivity change vs. temperature of 0.03%/C. 5347 </li> 5348 </ul> 5349 </li> 5350 <li> 5351 <p> 5352 SENSOR_TYPE_GYROSCOPE 5353 </p> 5354 <ul> 5355 <li>MUST have a measurement range between at least -1000 and +1000 dps. 5356 </li> 5357 <li>MUST have a measurement resolution of at least 16 LSB/dps. 5358 </li> 5359 <li>MUST have a minimum measurement frequency of 12.5 Hz or lower. 5360 </li> 5361 <li>MUST have a maximum measurement frequency of 400 Hz or higher. 5362 </li> 5363 <li>MUST have a measurement noise not above 0.014/s/Hz. 5364 </li> 5365 <li>SHOULD have a stationary bias stability of < 0.0002 /s Hz from 24-hour static dataset. 5366 </li> 5367 <li>SHOULD have a bias change vs. temperature of +/- 0.05 / s / C. 5368 </li> 5369 <li>SHOULD have a sensitivity change vs. temperature of 0.02% / C. 5370 </li> 5371 <li>SHOULD have a best-fit line non-linearity of 0.2%. 5372 </li> 5373 <li>SHOULD have a noise density of 0.007 /s/Hz. 5374 </li> 5375 </ul> 5376 </li> 5377 <li> 5378 <p> 5379 SENSOR_TYPE_GYROSCOPE_UNCALIBRATED with the same quality requirements as SENSOR_TYPE_GYROSCOPE. 5380 </p> 5381 </li> 5382 <li>SENSOR_TYPE_GEOMAGNETIC_FIELD 5383 <ul> 5384 <li>MUST have a measurement range between at least -900 and +900 uT. 5385 </li> 5386 <li>MUST have a measurement resolution of at least 5 LSB/uT. 5387 </li> 5388 <li>MUST have a minimum measurement frequency of 5 Hz or lower. 5389 </li> 5390 <li>MUST have a maximum measurement frequency of 50 Hz or higher. 5391 </li> 5392 <li>MUST have a measurement noise not above 0.5 uT. 5393 </li> 5394 </ul> 5395 </li> 5396 <li>SENSOR_TYPE_MAGNETIC_FIELD_UNCALIBRATED with the same quality requirements as SENSOR_TYPE_GEOMAGNETIC_FIELD and in addition: 5397 <ul> 5398 <li>MUST implement a non-wake-up form of this sensor with a buffering capability of at least 600 sensor events. 5399 </li> 5400 </ul> 5401 </li> 5402 <li>SENSOR_TYPE_PRESSURE 5403 <ul> 5404 <li>MUST have a measurement range between at least 300 and 1100 hPa. 5405 </li> 5406 <li>MUST have a measurement resolution of at least 80 LSB/hPa. 5407 </li> 5408 <li>MUST have a minimum measurement frequency of 1 Hz or lower. 5409 </li> 5410 <li>MUST have a maximum measurement frequency of 10 Hz or higher. 5411 </li> 5412 <li>MUST have a measurement noise not above 2 Pa/Hz. 5413 </li> 5414 <li>MUST implement a non-wake-up form of this sensor with a buffering capability of at least 300 sensor events. 5415 </li> 5416 <li>MUST have a batching power consumption not worse than 2 mW. 5417 </li> 5418 </ul> 5419 </li> 5420 <li>SENSOR_TYPE_GAME_ROTATION_VECTOR 5421 <ul> 5422 <li>MUST implement a non-wake-up form of this sensor with a buffering capability of at least 300 sensor events. 5423 </li> 5424 <li>MUST have a batching power consumption not worse than 4 mW. 5425 </li> 5426 </ul> 5427 </li> 5428 <li>SENSOR_TYPE_SIGNIFICANT_MOTION 5429 <ul> 5430 <li>MUST have a power consumption not worse than 0.5 mW when device is static and 1.5 mW when device is moving. 5431 </li> 5432 </ul> 5433 </li> 5434 <li>SENSOR_TYPE_STEP_DETECTOR 5435 <ul> 5436 <li>MUST implement a non-wake-up form of this sensor with a buffering capability of at least 100 sensor events. 5437 </li> 5438 <li>MUST have a power consumption not worse than 0.5 mW when device is static and 1.5 mW when device is moving. 5439 </li> 5440 <li>MUST have a batching power consumption not worse than 4 mW. 5441 </li> 5442 </ul> 5443 </li> 5444 <li>SENSOR_TYPE_STEP_COUNTER 5445 <ul> 5446 <li>MUST have a power consumption not worse than 0.5 mW when device is static and 1.5 mW when device is moving. 5447 </li> 5448 </ul> 5449 </li> 5450 <li>SENSOR_TILT_DETECTOR 5451 <ul> 5452 <li>MUST have a power consumption not worse than 0.5 mW when device is static and 1.5 mW when device is moving. 5453 </li> 5454 </ul> 5455 </li> 5456 </ul> 5457 <p> 5458 Also such a device MUST meet the following sensor subsystem requirements: 5459 </p> 5460 <ul> 5461 <li>The event timestamp of the same physical event reported by the Accelerometer, Gyroscope sensor and Magnetometer MUST be within 2.5 milliseconds of each other. 5462 </li> 5463 <li>The Gyroscope sensor event timestamps MUST be on the same time base as the camera subsystem and within 1 milliseconds of error. 5464 </li> 5465 <li>High Fidelity sensors MUST deliver samples to applications within 5 milliseconds from the time when the data is available on the physical sensor to the application. 5466 </li> 5467 <li>The power consumption MUST not be higher than 0.5 mW when device is static and 2.0 mW when device is moving when any combination of the following sensors are enabled: 5468 <ul> 5469 <li>SENSOR_TYPE_SIGNIFICANT_MOTION 5470 </li> 5471 <li>SENSOR_TYPE_STEP_DETECTOR 5472 </li> 5473 <li>SENSOR_TYPE_STEP_COUNTER 5474 </li> 5475 <li>SENSOR_TILT_DETECTORS 5476 </li> 5477 </ul> 5478 </li> 5479 </ul> 5480 <p> 5481 Note that all power consumption requirements in this section do not include the power consumption of the Application Processor. It is inclusive of the power drawn by the entire sensor chainthe sensor, any supporting circuitry, any dedicated sensor processing system, etc. 5482 </p> 5483 <p> 5484 The following sensor types MAY also be supported on a device implementation declaring android.hardware.sensor.hifi_sensors, but if these sensor types are present they MUST meet the following minimum buffering capability requirement: 5485 </p> 5486 <ul> 5487 <li>SENSOR_TYPE_PROXIMITY: 100 sensor events 5488 </li> 5489 </ul> 5490 <h3 id="7_3_10_fingerprint_sensor"> 5491 7.3.10. Fingerprint Sensor 5492 </h3> 5493 <p> 5494 Device implementations with a secure lock screen SHOULD include a fingerprint sensor. If a device implementation includes a fingerprint sensor and has a corresponding API for third-party developers, it: 5495 </p> 5496 <ul> 5497 <li>MUST declare support for the android.hardware.fingerprint feature. 5498 </li> 5499 <li>MUST fully implement the <a href="https://developer.android.com/reference/android/hardware/fingerprint/package-summary.html">corresponding API</a> as described in the Android SDK documentation. 5500 </li> 5501 <li>MUST have a false acceptance rate not higher than 0.002%. 5502 </li> 5503 <li>Is STRONGLY RECOMMENDED to have a false rejection rate of less than 10%, as measured on the device 5504 </li> 5505 <li>Is STRONGLY RECOMMENDED to have a latency below 1 second, measured from when the fingerprint sensor is touched until the screen is unlocked, for one enrolled finger. 5506 </li> 5507 <li>MUST rate limit attempts for at least 30 seconds after five false trials for fingerprint verification. 5508 </li> 5509 <li>MUST have a hardware-backed keystore implementation, and perform the fingerprint matching in a Trusted Execution Environment (TEE) or on a chip with a secure channel to the TEE. 5510 </li> 5511 <li>MUST have all identifiable fingerprint data encrypted and cryptographically authenticated such that they cannot be acquired, read or altered outside of the Trusted Execution Environment (TEE) as documented in the <a href="https://source.android.com/devices/tech/security/authentication/fingerprint-hal.html">implementation guidelines</a> on the Android Open Source Project site. 5512 </li> 5513 <li>MUST prevent adding a fingerprint without first establishing a chain of trust by having the user confirm existing or add a new device credential (PIN/pattern/password) that's secured by TEE; the Android Open Source Project implementation provides the mechanism in the framework to do so. 5514 </li> 5515 <li>MUST NOT enable 3rd-party applications to distinguish between individual fingerprints. 5516 </li> 5517 <li>MUST honor the DevicePolicyManager.KEYGUARD_DISABLE_FINGERPRINT flag. 5518 </li> 5519 <li>MUST, when upgraded from a version earlier than Android 6.0, have the fingerprint data securely migrated to meet the above requirements or removed. 5520 </li> 5521 <li>SHOULD use the Android Fingerprint icon provided in the Android Open Source Project. 5522 </li> 5523 </ul> 5524 <h3 id="7_3_11_android_automotive-only_sensors"> 5525 7.3.11. Android Automotive-only sensors 5526 </h3> 5527 <p> 5528 Automotive-specific sensors are defined in the <code>android.car.CarSensorManager API</code> . 5529 </p> 5530 <h4 id="7_3_11_1_current_gear"> 5531 7.3.11.1. Current Gear 5532 </h4> 5533 <p> 5534 Android Automotive implementations SHOULD provide current gear as SENSOR_TYPE_GEAR. 5535 </p> 5536 <h4 id="7_3_11_2_day_night_mode"> 5537 7.3.11.2. Day Night Mode 5538 </h4> 5539 <p> 5540 Android Automotive implementations MUST support day/night mode defined as SENSOR_TYPE_NIGHT. The value of this flag MUST be consistent with dashboard day/night mode and SHOULD be based on ambient light sensor input. The underlying ambient light sensor MAY be the same as <a href="#7_3_7_photometer">Photometer</a> . 5541 </p> 5542 <h4 id="7_3_11_3_driving_status"> 5543 7.3.11.3. Driving Status 5544 </h4> 5545 <p> 5546 Android Automotive implementations MUST support driving status defined as SENSOR_TYPE_DRIVING_STATUS, with a default value of DRIVE_STATUS_UNRESTRICTED when the vehicle is fully stopped and parked. It is the responsibility of device manufacturers to configure SENSOR_TYPE_DRIVING_STATUS in compliance with all laws and regulations that apply to markets where the product is shipping. 5547 </p> 5548 <h4 id="7_3_11_4_wheel_speed"> 5549 7.3.11.4. Wheel Speed 5550 </h4> 5551 <p> 5552 Android Automotive implementations MUST provide vehicle speed defined as SENSOR_TYPE_CAR_SPEED. 5553 </p> 5554 <h2 id="7_3_12_pose_sensor"> 5555 7.3.12. Pose Sensor 5556 </h2> 5557 <p> 5558 Device implementations MAY support pose sensor with 6 degrees of freedom. Android Handheld devices are RECOMMENDED to support this sensor. If a device implementation does support pose sensor with 6 degrees of freedom, it: 5559 </p> 5560 <ul> 5561 <li>MUST implement and report <a href="https://developer.android.com/reference/android/hardware/Sensor.html#TYPE_POSE_6DOF"><code>TYPE_POSE_6DOF</code></a> sensor. 5562 </li> 5563 <li>MUST be more accurate than the rotation vector alone. 5564 </li> 5565 </ul> 5566 <h2 id="7_4_data_connectivity"> 5567 7.4. Data Connectivity 5568 </h2> 5569 <h3 id="7_4_1_telephony"> 5570 7.4.1. Telephony 5571 </h3> 5572 <p> 5573 Telephony as used by the Android APIs and this document refers specifically to hardware related to placing voice calls and sending SMS messages via a GSM or CDMA network. While these voice calls may or may not be packet-switched, they are for the purposes of Android considered independent of any data connectivity that may be implemented using the same network. In other words, the Android telephony functionality and APIs refer specifically to voice calls and SMS. For instance, device implementations that cannot place calls or send/receive SMS messages MUST NOT report the android.hardware.telephony feature or any subfeatures, regardless of whether they use a cellular network for data connectivity. 5574 </p> 5575 <p> 5576 Android MAY be used on devices that do not include telephony hardware. That is, Android is compatible with devices that are not phones. However, if a device implementation does include GSM or CDMA telephony, it MUST implement full support for the API for that technology. Device implementations that do not include telephony hardware MUST implement the full APIs as no-ops. 5577 </p> 5578 <h4 id="7_4_1_1_number_blocking_compatibility"> 5579 7.4.1.1. Number Blocking Compatibility 5580 </h4> 5581 <p> 5582 Android Telephony device implementations MUST include number blocking support and: 5583 </p> 5584 <ul> 5585 <li>MUST fully implement <a href="http://developer.android.com/reference/android/provider/BlockedNumberContract.html">BlockedNumberContract</a> and the corresponding API as described in the SDK documentation. 5586 </li> 5587 <li>MUST block all calls and messages from a phone number in 'BlockedNumberProvider' without any interaction with apps. The only exception is when number blocking is temporarily lifted as described in the SDK documentation. 5588 </li> 5589 <li>MUST NOT write to the <a href="http://developer.android.com/reference/android/provider/CallLog.html">platform call log provider</a> for a blocked call. 5590 </li> 5591 <li>MUST NOT write to the <a href="http://developer.android.com/reference/android/provider/Telephony.html">Telephony provider</a> for a blocked message. 5592 </li> 5593 <li>MUST implement a blocked numbers management UI, which is opened with the intent returned by TelecomManager.createManageBlockedNumbersIntent() method. 5594 </li> 5595 <li>MUST NOT allow secondary users to view or edit the blocked numbers on the device as the Android platform assumes the primary user to have full control of the telephony services, a single instance, on the device. All blocking related UI MUST be hidden for secondary users and the blocked list MUST still be respected. 5596 </li> 5597 <li>SHOULD migrate the blocked numbers into the provider when a device updates to Android 7.0. 5598 </li> 5599 </ul> 5600 <h3 id="7_4_2_ieee_802_11_(wi-fi)"> 5601 7.4.2. IEEE 802.11 (Wi-Fi) 5602 </h3> 5603 <p> 5604 All Android device implementations SHOULD include support for one or more forms of 802.11. If a device implementation does include support for 802.11 and exposes the functionality to a third-party application, it MUST implement the corresponding Android API and: 5605 </p> 5606 <ul> 5607 <li>MUST report the hardware feature flag android.hardware.wifi. 5608 </li> 5609 <li>MUST implement the <a href="http://developer.android.com/reference/android/net/wifi/WifiManager.MulticastLock.html">multicast API</a> as described in the SDK documentation. 5610 </li> 5611 <li>MUST support multicast DNS (mDNS) and MUST NOT filter mDNS packets (224.0.0.251) at any time of operation including: 5612 <ul> 5613 <li>Even when the screen is not in an active state. 5614 </li> 5615 <li>For Android Television device implementations, even when in standby power states. 5616 </li> 5617 </ul> 5618 </li> 5619 </ul> 5620 <h4 id="7_4_2_1_wi-fi_direct"> 5621 7.4.2.1. Wi-Fi Direct 5622 </h4> 5623 <p> 5624 Device implementations SHOULD include support for Wi-Fi Direct (Wi-Fi peer-to-peer). If a device implementation does include support for Wi-Fi Direct, it MUST implement the <a href="http://developer.android.com/reference/android/net/wifi/p2p/WifiP2pManager.html">corresponding Android API</a> as described in the SDK documentation. If a device implementation includes support for Wi-Fi Direct, then it: 5625 </p> 5626 <ul> 5627 <li>MUST report the hardware feature android.hardware.wifi.direct. 5628 </li> 5629 <li>MUST support regular Wi-Fi operation. 5630 </li> 5631 <li>SHOULD support concurrent Wi-Fi and Wi-Fi Direct operation. 5632 </li> 5633 </ul> 5634 <h4 id="7_4_2_2_wi-fi_tunneled_direct_link_setup"> 5635 7.4.2.2. Wi-Fi Tunneled Direct Link Setup 5636 </h4> 5637 <p> 5638 Device implementations SHOULD include support for <a href="http://developer.android.com/reference/android/net/wifi/WifiManager.html">Wi-Fi Tunneled Direct Link Setup (TDLS)</a> as described in the Android SDK Documentation. If a device implementation does include support for TDLS and TDLS is enabled by the WiFiManager API, the device: 5639 </p> 5640 <ul> 5641 <li>SHOULD use TDLS only when it is possible AND beneficial. 5642 </li> 5643 <li>SHOULD have some heuristic and NOT use TDLS when its performance might be worse than going through the Wi-Fi access point. 5644 </li> 5645 </ul> 5646 <h3 id="7_4_3_bluetooth"> 5647 7.4.3. Bluetooth 5648 </h3> 5649 <div class="note"> 5650 Android Watch implementations MUST support Bluetooth. Android Television implementations MUST support Bluetooth and Bluetooth LE. Android Automotive implementations MUST support Bluetooth and SHOULD support Bluetooth LE. 5651 </div> 5652 <p> 5653 Device implementations that support <code>android.hardware.vr.high_performance</code> feature MUST support Bluetooth 4.2 and Bluetooth LE Data Length Extension. 5654 </p> 5655 <p> 5656 Android includes support for <a href="http://developer.android.com/reference/android/bluetooth/package-summary.html">Bluetooth and Bluetooth Low Energy</a> . Device implementations that include support for Bluetooth and Bluetooth Low Energy MUST declare the relevant platform features (android.hardware.bluetooth and android.hardware.bluetooth_le respectively) and implement the platform APIs. Device implementations SHOULD implement relevant Bluetooth profiles such as A2DP, AVCP, OBEX, etc. as appropriate for the device. 5657 </p> 5658 <p> 5659 Android Automotive implementations SHOULD support Message Access Profile (MAP). Android Automotive implementations MUST support the following Bluetooth profiles: 5660 </p> 5661 <ul> 5662 <li>Phone calling over Hands-Free Profile (HFP). 5663 </li> 5664 <li>Media playback over Audio Distribution Profile (A2DP). 5665 </li> 5666 <li>Media playback control over Remote Control Profile (AVRCP). 5667 </li> 5668 <li>Contact sharing using the Phone Book Access Profile (PBAP). 5669 </li> 5670 </ul> 5671 <p> 5672 Device implementations including support for Bluetooth Low Energy: 5673 </p> 5674 <ul> 5675 <li>MUST declare the hardware feature android.hardware.bluetooth_le. 5676 </li> 5677 <li>MUST enable the GATT (generic attribute profile) based Bluetooth APIs as described in the SDK documentation and <a href="http://developer.android.com/reference/android/bluetooth/package-summary.html">android.bluetooth</a> . 5678 </li> 5679 <li>are STRONGLY RECOMMENDED to implement a Resolvable Private Address (RPA) timeout no longer than 15 minutes and rotate the address at timeout to protect user privacy. 5680 </li> 5681 <li>SHOULD support offloading of the filtering logic to the bluetooth chipset when implementing the <a href="https://developer.android.com/reference/android/bluetooth/le/ScanFilter.html">ScanFilter API</a> , and MUST report the correct value of where the filtering logic is implemented whenever queried via the android.bluetooth.BluetoothAdapter.isOffloadedFilteringSupported() method. 5682 </li> 5683 <li>SHOULD support offloading of the batched scanning to the bluetooth chipset, but if not supported, MUST report false whenever queried via the android.bluetooth.BluetoothAdapter.isOffloadedScanBatchingSupported() method. 5684 </li> 5685 <li>SHOULD support multi advertisement with at least 4 slots, but if not supported, MUST report false whenever queried via the android.bluetooth.BluetoothAdapter.isMultipleAdvertisementSupported() method. 5686 </li> 5687 </ul> 5688 <h3 id="7_4_4_near-field_communications"> 5689 7.4.4. Near-Field Communications 5690 </h3> 5691 <p> 5692 Device implementations SHOULD include a transceiver and related hardware for Near-Field Communications (NFC). If a device implementation does include NFC hardware and plans to make it available to third-party apps, then it: 5693 </p> 5694 <ul> 5695 <li>MUST report the android.hardware.nfc feature from the <a href="http://developer.android.com/reference/android/content/pm/PackageManager.html">android.content.pm.PackageManager.hasSystemFeature() method</a> . 5696 </li> 5697 <li>MUST be capable of reading and writing NDEF messages via the following NFC standards: 5698 <ul> 5699 <li>MUST be capable of acting as an NFC Forum reader/writer (as defined by the NFC Forum technical specification NFCForum-TS-DigitalProtocol-1.0) via the following NFC standards: 5700 <ul> 5701 <li>NfcA (ISO14443-3A) 5702 </li> 5703 <li>NfcB (ISO14443-3B) 5704 </li> 5705 <li>NfcF (JIS X 6319-4) 5706 </li> 5707 <li>IsoDep (ISO 14443-4) 5708 </li> 5709 <li>NFC Forum Tag Types 1, 2, 3, 4 (defined by the NFC Forum) 5710 </li> 5711 </ul> 5712 </li> 5713 <li>STRONGLY RECOMMENDED to be capable of reading and writing NDEF messages as well as raw data via the following NFC standards. Note that while the NFC standards below are stated as STRONGLY RECOMMENDED, the Compatibility Definition for a future version is planned to change these to MUST. These standards are optional in this version but will be required in future versions. Existing and new devices that run this version of Android are very strongly encouraged to meet these requirements now so they will be able to upgrade to the future platform releases. 5714 <ul> 5715 <li>NfcV (ISO 15693) 5716 </li> 5717 </ul> 5718 </li> 5719 <li>SHOULD be capable of reading the barcode and URL (if encoded) of <a href="http://developer.android.com/reference/android/nfc/tech/NfcBarcode.html">Thinfilm NFC Barcode</a> products. 5720 </li> 5721 <li>MUST be capable of transmitting and receiving data via the following peer-to-peer standards and protocols: 5722 <ul> 5723 <li>ISO 18092 5724 </li> 5725 <li>LLCP 1.2 (defined by the NFC Forum) 5726 </li> 5727 <li>SDP 1.0 (defined by the NFC Forum) 5728 </li> 5729 <li> 5730 <a href="http://static.googleusercontent.com/media/source.android.com/en/us/compatibility/ndef-push-protocol.pdf">NDEF Push Protocol</a> 5731 </li> 5732 <li>SNEP 1.0 (defined by the NFC Forum) 5733 </li> 5734 </ul> 5735 </li> 5736 <li>MUST include support for <a href="http://developer.android.com/guide/topics/connectivity/nfc/nfc.html">Android Beam</a> . 5737 </li> 5738 <li>MUST implement the SNEP default server. Valid NDEF messages received by the default SNEP server MUST be dispatched to applications using the android.nfc.ACTION_NDEF_DISCOVERED intent. Disabling Android Beam in settings MUST NOT disable dispatch of incoming NDEF message. 5739 </li> 5740 <li>MUST honor the android.settings.NFCSHARING_SETTINGS intent to show <a href="http://developer.android.com/reference/android/provider/Settings.html#ACTION_NFCSHARING_SETTINGS">NFC sharing settings</a> . 5741 </li> 5742 <li>MUST implement the NPP server. Messages received by the NPP server MUST be processed the same way as the SNEP default server. 5743 </li> 5744 <li>MUST implement a SNEP client and attempt to send outbound P2P NDEF to the default SNEP server when Android Beam is enabled. If no default SNEP server is found then the client MUST attempt to send to an NPP server. 5745 </li> 5746 <li>MUST allow foreground activities to set the outbound P2P NDEF message using android.nfc.NfcAdapter.setNdefPushMessage, and android.nfc.NfcAdapter.setNdefPushMessageCallback, and android.nfc.NfcAdapter.enableForegroundNdefPush. 5747 </li> 5748 <li>SHOULD use a gesture or on-screen confirmation, such as 'Touch to Beam', before sending outbound P2P NDEF messages. 5749 </li> 5750 <li>SHOULD enable Android Beam by default and MUST be able to send and receive using Android Beam, even when another proprietary NFC P2p mode is turned on. 5751 </li> 5752 <li>MUST support NFC Connection handover to Bluetooth when the device supports Bluetooth Object Push Profile. Device implementations MUST support connection handover to Bluetooth when using android.nfc.NfcAdapter.setBeamPushUris, by implementing the <a href="http://members.nfc-forum.org/specs/spec_list/#conn_handover">Connection Handover version 1.2</a> and <a href="http://members.nfc-forum.org/apps/group_public/download.php/18688/NFCForum-AD-BTSSP_1_1.pdf">Bluetooth Secure Simple Pairing Using NFC version 1.0</a> specs from the NFC Forum. Such an implementation MUST implement the handover LLCP service with service name urn:nfc:sn:handover for exchanging the handover request/select records over NFC, and it MUST use the Bluetooth Object Push Profile for the actual Bluetooth data transfer. For legacy reasons (to remain compatible with Android 4.1 devices), the implementation SHOULD still accept SNEP GET requests for exchanging the handover request/select records over NFC. However an implementation itself SHOULD NOT send SNEP GET requests for performing connection handover. 5753 </li> 5754 <li>MUST poll for all supported technologies while in NFC discovery mode. 5755 </li> 5756 <li>SHOULD be in NFC discovery mode while the device is awake with the screen active and the lock-screen unlocked. 5757 </li> 5758 </ul> 5759 </li> 5760 </ul> 5761 <p> 5762 (Note that publicly available links are not available for the JIS, ISO, and NFC Forum specifications cited above.) 5763 </p> 5764 <p> 5765 Android includes support for NFC Host Card Emulation (HCE) mode. If a device implementation does include an NFC controller chipset capable of HCE (for NfcA and/or NfcB) and it supports Application ID (AID) routing, then it: 5766 </p> 5767 <ul> 5768 <li>MUST report the android.hardware.nfc.hce feature constant. 5769 </li> 5770 <li>MUST support <a href="http://developer.android.com/guide/topics/connectivity/nfc/hce.html">NFC HCE APIs</a> as defined in the Android SDK. 5771 </li> 5772 </ul> 5773 <p> 5774 If a device implementation does include an NFC controller chipset capable of HCE for NfcF, and it implements the feature for third-party applications, then it: 5775 </p> 5776 <ul> 5777 <li>MUST report the android.hardware.nfc.hcef feature constant. 5778 </li> 5779 <li>MUST implement the [NfcF Card Emulation APIs] (https://developer.android.com/reference/android/nfc/cardemulation/NfcFCardEmulation.html) as defined in the Android SDK. 5780 </li> 5781 </ul> 5782 <p> 5783 Additionally, device implementations MAY include reader/writer support for the following MIFARE technologies. 5784 </p> 5785 <ul> 5786 <li>MIFARE Classic 5787 </li> 5788 <li>MIFARE Ultralight 5789 </li> 5790 <li>NDEF on MIFARE Classic 5791 </li> 5792 </ul> 5793 <p> 5794 Note that Android includes APIs for these MIFARE types. If a device implementation supports MIFARE in the reader/writer role, it: 5795 </p> 5796 <ul> 5797 <li>MUST implement the corresponding Android APIs as documented by the Android SDK. 5798 </li> 5799 <li>MUST report the feature com.nxp.mifare from the <a href="http://developer.android.com/reference/android/content/pm/PackageManager.html">android.content.pm.PackageManager.hasSystemFeature()</a> method. Note that this is not a standard Android feature and as such does not appear as a constant in the android.content.pm.PackageManager class. 5800 </li> 5801 <li>MUST NOT implement the corresponding Android APIs nor report the com.nxp.mifare feature unless it also implements general NFC support as described in this section. 5802 </li> 5803 </ul> 5804 <p> 5805 If a device implementation does not include NFC hardware, it MUST NOT declare the android.hardware.nfc feature from the <a href="http://developer.android.com/reference/android/content/pm/PackageManager.html">android.content.pm.PackageManager.hasSystemFeature()</a> method, and MUST implement the Android NFC API as a no-op. 5806 </p> 5807 <p> 5808 As the classes android.nfc.NdefMessage and android.nfc.NdefRecord represent a protocol-independent data representation format, device implementations MUST implement these APIs even if they do not include support for NFC or declare the android.hardware.nfc feature. 5809 </p> 5810 <h3 id="7_4_5_minimum_network_capability"> 5811 7.4.5. Minimum Network Capability 5812 </h3> 5813 <p> 5814 Device implementations MUST include support for one or more forms of data networking. Specifically, device implementations MUST include support for at least one data standard capable of 200Kbit/sec or greater. Examples of technologies that satisfy this requirement include EDGE, HSPA, EV-DO, 802.11g, Ethernet, Bluetooth PAN, etc. 5815 </p> 5816 <p> 5817 Device implementations where a physical networking standard (such as Ethernet) is the primary data connection SHOULD also include support for at least one common wireless data standard, such as 802.11 (Wi-Fi). 5818 </p> 5819 <p> 5820 Devices MAY implement more than one form of data connectivity. 5821 </p> 5822 <p> 5823 Devices MUST include an IPv6 networking stack and support IPv6 communication using the managed APIs, such as <code>java.net.Socket</code> and <code>java.net.URLConnection</code> , as well as the native APIs, such as <code>AF_INET6</code> sockets. The required level of IPv6 support depends on the network type, as follows: 5824 </p> 5825 <ul> 5826 <li>Devices that support Wi-Fi networks MUST support dual-stack and IPv6-only operation on Wi-Fi. 5827 </li> 5828 <li>Devices that support Ethernet networks MUST support dual-stack operation on Ethernet. 5829 </li> 5830 <li>Devices that support cellular data SHOULD support IPv6 operation (IPv6-only and possibly dual-stack) on cellular data. 5831 </li> 5832 <li>When a device is simultaneously connected to more than one network (e.g., Wi-Fi and cellular data), it MUST simultaneously meet these requirements on each network to which it is connected. 5833 </li> 5834 </ul> 5835 <p> 5836 IPv6 MUST be enabled by default. 5837 </p> 5838 <p> 5839 In order to ensure that IPv6 communication is as reliable as IPv4, unicast IPv6 packets sent to the device MUST NOT be dropped, even when the screen is not in an active state. Redundant multicast IPv6 packets, such as repeated identical Router Advertisements, MAY be rate-limited in hardware or firmware if doing so is necessary to save power. In such cases, rate-limiting MUST NOT cause the device to lose IPv6 connectivity on any IPv6-compliant network that uses RA lifetimes of at least 180 seconds. 5840 </p> 5841 <p> 5842 IPv6 connectivity MUST be maintained in doze mode. 5843 </p> 5844 <h3 id="7_4_6_sync_settings"> 5845 7.4.6. Sync Settings 5846 </h3> 5847 <p> 5848 Device implementations MUST have the master auto-sync setting on by default so that the method <a href="http://developer.android.com/reference/android/content/ContentResolver.html">getMasterSyncAutomatically()</a> returns true. 5849 </p> 5850 <h3 id="7_4_7_data_saver"> 5851 7.4.7. Data Saver 5852 </h3> 5853 <p> 5854 Device implementations with a metered connection are STRONGLY RECOMMENDED to provide the data saver mode. 5855 </p> 5856 <p> 5857 If a device implementation provides the data saver mode, it: 5858 </p> 5859 <ul> 5860 <li> 5861 <p> 5862 MUST support all the APIs in the <code>ConnectivityManager</code> class as described in the <a href="https://developer.android.com/training/basics/network-ops/data-saver.html">SDK documentation</a> 5863 </p> 5864 </li> 5865 <li> 5866 <p> 5867 MUST provide a user interface in the settings, allowing users to add applications to or remove applications from the whitelist. 5868 </p> 5869 </li> 5870 </ul> 5871 <p> 5872 Conversely if a device implementation does not provide the data saver mode, it: 5873 </p> 5874 <ul> 5875 <li> 5876 <p> 5877 MUST return the value <code>RESTRICT_BACKGROUND_STATUS_DISABLED</code> for <a href="https://developer.android.com/reference/android/net/ConnectivityManager.html#getRestrictBackgroundStatus%28%29"><code>ConnectivityManager.getRestrictBackgroundStatus()</code></a> 5878 </p> 5879 </li> 5880 <li> 5881 <p> 5882 MUST not broadcast <code>ConnectivityManager.ACTION_RESTRICT_BACKGROUND_CHANGED</code> 5883 </p> 5884 </li> 5885 <li> 5886 <p> 5887 MUST have an activity that handles the <code>Settings.ACTION_IGNORE_BACKGROUND_DATA_RESTRICTIONS_SETTINGS</code> intent but MAY implement it as a no-op. 5888 </p> 5889 </li> 5890 </ul> 5891 <h2 id="7_5_cameras"> 5892 7.5. Cameras 5893 </h2> 5894 <p> 5895 Device implementations SHOULD include a rear-facing camera and MAY include a front-facing camera. A rear-facing camera is a camera located on the side of the device opposite the display; that is, it images scenes on the far side of the device, like a traditional camera. A front-facing camera is a camera located on the same side of the device as the display; that is, a camera typically used to image the user, such as for video conferencing and similar applications. 5896 </p> 5897 <p> 5898 If a device implementation includes at least one camera, it MUST be possible for an application to simultaneously allocate 3 RGBA_8888 bitmaps equal to the size of the images produced by the largest-resolution camera sensor on the device, while camera is open for the purpose of basic preview and still capture. 5899 </p> 5900 <h3 id="7_5_1_rear-facing_camera"> 5901 7.5.1. Rear-Facing Camera 5902 </h3> 5903 <p> 5904 Device implementations SHOULD include a rear-facing camera. If a device implementation includes at least one rear-facing camera, it: 5905 </p> 5906 <ul> 5907 <li>MUST report the feature flag android.hardware.camera and android.hardware.camera.any. 5908 </li> 5909 <li>MUST have a resolution of at least 2 megapixels. 5910 </li> 5911 <li>SHOULD have either hardware auto-focus or software auto-focus implemented in the camera driver (transparent to application software). 5912 </li> 5913 <li>MAY have fixed-focus or EDOF (extended depth of field) hardware. 5914 </li> 5915 <li>MAY include a flash. If the Camera includes a flash, the flash lamp MUST NOT be lit while an android.hardware.Camera.PreviewCallback instance has been registered on a Camera preview surface, unless the application has explicitly enabled the flash by enabling the FLASH_MODE_AUTO or FLASH_MODE_ON attributes of a Camera.Parameters object. Note that this constraint does not apply to the devices built-in system camera application, but only to third-party applications using Camera.PreviewCallback. 5916 </li> 5917 </ul> 5918 <h3 id="7_5_2_front-facing_camera"> 5919 7.5.2. Front-Facing Camera 5920 </h3> 5921 <p> 5922 Device implementations MAY include a front-facing camera. If a device implementation includes at least one front-facing camera, it: 5923 </p> 5924 <ul> 5925 <li>MUST report the feature flag android.hardware.camera.any and android.hardware.camera.front. 5926 </li> 5927 <li>MUST have a resolution of at least VGA (640x480 pixels). 5928 </li> 5929 <li>MUST NOT use a front-facing camera as the default for the Camera API. The camera API in Android has specific support for front-facing cameras and device implementations MUST NOT configure the API to to treat a front-facing camera as the default rear-facing camera, even if it is the only camera on the device. 5930 </li> 5931 <li>MAY include features (such as auto-focus, flash, etc.) available to rear-facing cameras as described in <a href="#7_5_1_rear-facing_camera">section 7.5.1</a> . 5932 </li> 5933 <li>MUST horizontally reflect (i.e. mirror) the stream displayed by an app in a CameraPreview, as follows: 5934 <ul> 5935 <li>If the device implementation is capable of being rotated by user (such as automatically via an accelerometer or manually via user input), the camera preview MUST be mirrored horizontally relative to the devices current orientation. 5936 </li> 5937 <li>If the current application has explicitly requested that the Camera display be rotated via a call to the <a href="http://developer.android.com/reference/android/hardware/Camera.html#setDisplayOrientation(int)">android.hardware.Camera.setDisplayOrientation()</a> method, the camera preview MUST be mirrored horizontally relative to the orientation specified by the application. 5938 </li> 5939 <li>Otherwise, the preview MUST be mirrored along the devices default horizontal axis. 5940 </li> 5941 </ul> 5942 </li> 5943 <li>MUST mirror the image displayed by the postview in the same manner as the camera preview image stream. If the device implementation does not support postview, this requirement obviously does not apply. 5944 </li> 5945 <li>MUST NOT mirror the final captured still image or video streams returned to application callbacks or committed to media storage. 5946 </li> 5947 </ul> 5948 <h3 id="7_5_3_external_camera"> 5949 7.5.3. External Camera 5950 </h3> 5951 <p> 5952 Device implementations MAY include support for an external camera that is not necessarily always connected. If a device includes support for an external camera, it: 5953 </p> 5954 <ul> 5955 <li>MUST declare the platform feature flag <code>android.hardware.camera.external</code> and <code>android.hardware camera.any</code> . 5956 </li> 5957 <li>MAY support multiple cameras. 5958 </li> 5959 <li>MUST support USB Video Class (UVC 1.0 or higher) if the external camera connects through the USB port. 5960 </li> 5961 <li>SHOULD support video compressions such as MJPEG to enable transfer of high-quality unencoded streams (i.e. raw or independently compressed picture streams). 5962 </li> 5963 <li>MAY support camera-based video encoding. If supported, a simultaneous unencoded / MJPEG stream (QVGA or greater resolution) MUST be accessible to the device implementation. 5964 </li> 5965 </ul> 5966 <h3 id="7_5_4_camera_api_behavior"> 5967 7.5.4. Camera API Behavior 5968 </h3> 5969 <p> 5970 Android includes two API packages to access the camera, the newer android.hardware.camera2 API expose lower-level camera control to the app, including efficient zero-copy burst/streaming flows and per-frame controls of exposure, gain, white balance gains, color conversion, denoising, sharpening, and more. 5971 </p> 5972 <p> 5973 The older API package, android.hardware.Camera, is marked as deprecated in Android 5.0 but as it should still be available for apps to use Android device implementations MUST ensure the continued support of the API as described in this section and in the Android SDK. 5974 </p> 5975 <p> 5976 Device implementations MUST implement the following behaviors for the camera-related APIs, for all available cameras: 5977 </p> 5978 <ul> 5979 <li>If an application has never called android.hardware.Camera.Parameters.setPreviewFormat(int), then the device MUST use android.hardware.PixelFormat.YCbCr_420_SP for preview data provided to application callbacks. 5980 </li> 5981 <li>If an application registers an android.hardware.Camera.PreviewCallback instance and the system calls the onPreviewFrame() method when the preview format is YCbCr_420_SP, the data in the byte[] passed into onPreviewFrame() must further be in the NV21 encoding format. That is, NV21 MUST be the default. 5982 </li> 5983 <li>For android.hardware.Camera, device implementations MUST support the YV12 format (as denoted by the android.graphics.ImageFormat.YV12 constant) for camera previews for both front- and rear-facing cameras. (The hardware video encoder and camera may use any native pixel format, but the device implementation MUST support conversion to YV12.) 5984 </li> 5985 <li>For android.hardware.camera2, device implementations must support the android.hardware.ImageFormat.YUV_420_888 and android.hardware.ImageFormat.JPEG formats as outputs through the android.media.ImageReader API. 5986 </li> 5987 </ul> 5988 <p> 5989 Device implementations MUST still implement the full <a href="http://developer.android.com/reference/android/hardware/Camera.html">Camera API</a> included in the Android SDK documentation, regardless of whether the device includes hardware autofocus or other capabilities. For instance, cameras that lack autofocus MUST still call any registered android.hardware.Camera.AutoFocusCallback instances (even though this has no relevance to a non-autofocus camera.) Note that this does apply to front-facing cameras; for instance, even though most front-facing cameras do not support autofocus, the API callbacks must still be faked as described. 5990 </p> 5991 <p> 5992 Device implementations MUST recognize and honor each parameter name defined as a constant on the <a href="http://developer.android.com/reference/android/hardware/Camera.Parameters.html">android.hardware.Camera.Parameters</a> class, if the underlying hardware supports the feature. If the device hardware does not support a feature, the API must behave as documented. Conversely, device implementations MUST NOT honor or recognize string constants passed to the android.hardware.Camera.setParameters() method other than those documented as constants on the android.hardware.Camera.Parameters. That is, device implementations MUST support all standard Camera parameters if the hardware allows, and MUST NOT support custom Camera parameter types. For instance, device implementations that support image capture using high dynamic range (HDR) imaging techniques MUST support camera parameter Camera.SCENE_MODE_HDR. 5993 </p> 5994 <p> 5995 Because not all device implementations can fully support all the features of the android.hardware.camera2 API, device implementations MUST report the proper level of support with the <a href="https://developer.android.com/reference/android/hardware/camera2/CameraCharacteristics.html#INFO_SUPPORTED_HARDWARE_LEVEL">android.info.supportedHardwareLevel</a> property as described in the Android SDK and report the appropriate <a href="http://source.android.com/devices/camera/versioning.html">framework feature flags</a> . 5996 </p> 5997 <p> 5998 Device implementations MUST also declare its Individual camera capabilities of android.hardware.camera2 via the android.request.availableCapabilities property and declare the appropriate <a href="http://source.android.com/devices/camera/versioning.html">feature flags</a> ; a device must define the feature flag if any of its attached camera devices supports the feature. 5999 </p> 6000 <p> 6001 Device implementations MUST broadcast the Camera.ACTION_NEW_PICTURE intent whenever a new picture is taken by the camera and the entry of the picture has been added to the media store. 6002 </p> 6003 <p> 6004 Device implementations MUST broadcast the Camera.ACTION_NEW_VIDEO intent whenever a new video is recorded by the camera and the entry of the picture has been added to the media store. 6005 </p> 6006 <h3 id="7_5_5_camera_orientation"> 6007 7.5.5. Camera Orientation 6008 </h3> 6009 <p> 6010 Both front- and rear-facing cameras, if present, MUST be oriented so that the long dimension of the camera aligns with the screens long dimension. That is, when the device is held in the landscape orientation, cameras MUST capture images in the landscape orientation. This applies regardless of the devices natural orientation; that is, it applies to landscape-primary devices as well as portrait-primary devices. 6011 </p> 6012 <h2 id="7_6_memory_and_storage"> 6013 7.6. Memory and Storage 6014 </h2> 6015 <h3 id="7_6_1_minimum_memory_and_storage"> 6016 7.6.1. Minimum Memory and Storage 6017 </h3> 6018 <div class="note"> 6019 Android Television devices MUST have at least 4GB of non-volatile storage available for application private data. 6020 </div> 6021 <p> 6022 The memory available to the kernel and userspace on device implementations MUST be at least equal or larger than the minimum values specified by the following table. (See <a href="#7_1_1_screen_configuration">section 7.1.1</a> for screen size and density definitions.) 6023 </p> 6024 <table> 6025 <tr> 6026 <th> 6027 Density and screen size 6028 </th> 6029 <th> 6030 32-bit device 6031 </th> 6032 <th> 6033 64-bit device 6034 </th> 6035 </tr> 6036 <tr> 6037 <td> 6038 Android Watch devices (due to smaller screens) 6039 </td> 6040 <td> 6041 416MB 6042 </td> 6043 <td> 6044 Not applicable 6045 </td> 6046 </tr> 6047 <tr> 6048 <td> 6049 <ul> 6050 <li class="table_list">280dpi or lower on small/normal screens 6051 </li> 6052 <li class="table_list">mdpi or lower on large screens 6053 </li> 6054 <li class="table_list">ldpi or lower on extra large screens 6055 </li> 6056 </ul> 6057 </td> 6058 <td> 6059 512MB 6060 </td> 6061 <td> 6062 816MB 6063 </td> 6064 </tr> 6065 <tr> 6066 <td> 6067 <ul> 6068 <li class="table_list">xhdpi or higher on small/normal screens 6069 </li> 6070 <li class="table_list">hdpi or higher on large screens 6071 </li> 6072 <li class="table_list">mdpi or higher on extra large screens 6073 </li> 6074 </ul> 6075 </td> 6076 <td> 6077 608MB 6078 </td> 6079 <td> 6080 944MB 6081 </td> 6082 </tr> 6083 <tr> 6084 <td> 6085 <ul> 6086 <li class="table_list">400dpi or higher on small/normal screens 6087 </li> 6088 <li class="table_list">xhdpi or higher on large screens 6089 </li> 6090 <li class="table_list">tvdpi or higher on extra large screens 6091 </li> 6092 </ul> 6093 </td> 6094 <td> 6095 896MB 6096 </td> 6097 <td> 6098 1280MB 6099 </td> 6100 </tr> 6101 <tr> 6102 <td> 6103 <ul> 6104 <li class="table_list">560dpi or higher on small/normal screens 6105 </li> 6106 <li class="table_list">400dpi or higher on large screens 6107 </li> 6108 <li class="table_list">xhdpi or higher on extra large screens 6109 </li> 6110 </ul> 6111 </td> 6112 <td> 6113 1344MB 6114 </td> 6115 <td> 6116 1824MB 6117 </td> 6118 </tr> 6119 </table> 6120 <p> 6121 The minimum memory values MUST be in addition to any memory space already dedicated to hardware components such as radio, video, and so on that is not under the kernels control. 6122 </p> 6123 <p> 6124 Device implementations with less than 512MB of memory available to the kernel and userspace, unless an Android Watch, MUST return the value "true" for ActivityManager.isLowRamDevice(). 6125 </p> 6126 <p> 6127 Android Television devices MUST have at least 4GB and other device implementations MUST have at least 3GB of non-volatile storage available for application private data. That is, the /data partition MUST be at least 4GB for Android Television devices and at least 3GB for other device implementations. Device implementations that run Android are <strong>STRONGLY RECOMMENDED</strong> to have at least 4GB of non-volatile storage for application private data so they will be able to upgrade to the future platform releases. 6128 </p> 6129 <p> 6130 The Android APIs include a <a href="http://developer.android.com/reference/android/app/DownloadManager.html">Download Manager</a> that applications MAY use to download data files. The device implementation of the Download Manager MUST be capable of downloading individual files of at least 100MB in size to the default cache location. 6131 </p> 6132 <h3 id="7_6_2_application_shared_storage"> 6133 7.6.2. Application Shared Storage 6134 </h3> 6135 <p> 6136 Device implementations MUST offer shared storage for applications also often referred as shared external storage. 6137 </p> 6138 <p> 6139 Device implementations MUST be configured with shared storage mounted by default, out of the box. If the shared storage is not mounted on the Linuxpath /sdcard, then the device MUST include a Linux symbolic link from /sdcard to the actual mount point. 6140 </p> 6141 <p> 6142 Device implementations MAY have hardware for user-accessible removable storage, such as a Secure Digital (SD) card slot. If this slot is used to satisfy the shared storage requirement, the device implementation: 6143 </p> 6144 <ul> 6145 <li>MUST implement a toast or pop-up user interface warning the user when there is no SD card. 6146 </li> 6147 <li>MUST include a FAT-formatted SD card 1GB in size or larger OR show on the box and other material available at time of purchase that the SD card has to be separately purchased. 6148 </li> 6149 <li>MUST mount the SD card by default. 6150 </li> 6151 </ul> 6152 <p> 6153 Alternatively, device implementations MAY allocate internal (non-removable) storage as shared storage for apps as included in the upstream Android Open Source Project; device implementations SHOULD use this configuration and software implementation. If a device implementation uses internal (non-removable) storage to satisfy the shared storage requirement, while that storage MAY share space with the application private data, it MUST be at least 1GB in size and mounted on /sdcard (or /sdcard MUST be a symbolic link to the physical location if it is mounted elsewhere). 6154 </p> 6155 <p> 6156 Device implementations MUST enforce as documented the android.permission.WRITE_EXTERNAL_STORAGE permission on this shared storage. Shared storage MUST otherwise be writable by any application that obtains that permission. 6157 </p> 6158 <p> 6159 Device implementations that include multiple shared storage paths (such as both an SD card slot and shared internal storage) MUST allow only pre-installed & privileged Android applications with the WRITE_EXTERNAL_STORAGE permission to write to the secondary external storage, except when writing to their package-specific directories or within the <code>URI</code> returned by firing the <code>ACTION_OPEN_DOCUMENT_TREE</code> intent. 6160 </p> 6161 <p> 6162 However, device implementations SHOULD expose content from both storage paths transparently through Androids media scanner service and android.provider.MediaStore. 6163 </p> 6164 <p> 6165 Regardless of the form of shared storage used, if the device implementation has a USB port with USB peripheral mode support, it MUST provide some mechanism to access the contents of shared storage from a host computer. Device implementations MAY use USB mass storage, but SHOULD use Media Transfer Protocol to satisfy this requirement. If the device implementation supports Media Transfer Protocol, it: 6166 </p> 6167 <ul> 6168 <li>SHOULD be compatible with the reference Android MTP host, <a href="http://www.android.com/filetransfer">Android File Transfer</a> . 6169 </li> 6170 <li>SHOULD report a USB device class of 0x00. 6171 </li> 6172 <li>SHOULD report a USB interface name of 'MTP'. 6173 </li> 6174 </ul> 6175 <h3 id="7_6_3_adoptable_storage"> 6176 7.6.3. Adoptable Storage 6177 </h3> 6178 <p> 6179 Device implementations are STRONGLY RECOMMENDED to implement <a href="http://source.android.com/devices/storage/adoptable.html">adoptable storage</a> if the removable storage device port is in a long-term stable location, such as within the battery compartment or other protective cover. 6180 </p> 6181 <p> 6182 Device implementations such as a television, MAY enable adoption through USB ports as the device is expected to be static and not mobile. But for other device implementations that are mobile in nature, it is STRONGLY RECOMMENDED to implement the adoptable storage in a long-term stable location, since accidentally disconnecting them can cause data loss/corruption. 6183 </p> 6184 <h2 id="7_7_usb"> 6185 7.7. USB 6186 </h2> 6187 <p> 6188 Device implementations SHOULD support USB peripheral mode and SHOULD support USB host mode. 6189 </p> 6190 <h3 id="7_7_1_usb_peripheral_mode"> 6191 7.7.1. USB peripheral mode 6192 </h3> 6193 <p> 6194 If a device implementation includes a USB port supporting peripheral mode: 6195 </p> 6196 <ul> 6197 <li>The port MUST be connectable to a USB host that has a standard type-A or type-C USB port. 6198 </li> 6199 <li>The port SHOULD use micro-B, micro-AB or Type-C USB form factor. Existing and new Android devices are <strong>STRONGLY RECOMMENDED to meet these requirements</strong> so they will be able to upgrade to the future platform releases. 6200 </li> 6201 <li>The port SHOULD be located on the bottom of the device (according to natural orientation) or enable software screen rotation for all apps (including home screen), so that the display draws correctly when the device is oriented with the port at bottom. Existing and new Android devices are <strong>STRONGLY RECOMMENDED to meet these requirements</strong> so they will be able to upgrade to future platform releases. 6202 </li> 6203 <li>It MUST allow a USB host connected with the Android device to access the contents of the shared storage volume using either USB mass storage or Media Transfer Protocol. 6204 </li> 6205 <li>It SHOULD implement the Android Open Accessory (AOA) API and specification as documented in the Android SDK documentation, and if it is an Android Handheld device it MUST implement the AOA API. Device implementations implementing the AOA specification: 6206 <ul> 6207 <li>MUST declare support for the hardware feature <a href="http://developer.android.com/guide/topics/connectivity/usb/accessory.html">android.hardware.usb.accessory</a> . 6208 </li> 6209 <li>MUST implement the <a href="http://developer.android.com/reference/android/hardware/usb/UsbConstants.html#USB_CLASS_AUDIO">USB audio class</a> as documented in the Android SDK documentation. 6210 </li> 6211 <li>The USB mass storage class MUST include the string "android" at the end of the interface description <code>iInterface</code> string of the USB mass storage 6212 </li> 6213 </ul> 6214 </li> 6215 <li>It SHOULD implement support to draw 1.5 A current during HS chirp and traffic as specified in the <a href="http://www.usb.org/developers/docs/devclass_docs/BCv1.2_070312.zip">USB Battery Charging specification, revision 1.2</a> . Existing and new Android devices are <strong>STRONGLY RECOMMENDED to meet these requirements</strong> so they will be able to upgrade to the future platform releases. 6216 </li> 6217 <li>Type-C devices MUST detect 1.5A and 3.0A chargers per the Type-C resistor standard and it must detect changes in the advertisement. 6218 </li> 6219 <li>Type-C devices also supporting USB host mode are STRONGLY RECOMMENDED to support Power Delivery for data and power role swapping. 6220 </li> 6221 <li>Type-C devices SHOULD support Power Delivery for high-voltage charging and support for Alternate Modes such as display out. 6222 </li> 6223 <li>The value of iSerialNumber in USB standard device descriptor MUST be equal to the value of android.os.Build.SERIAL. 6224 </li> 6225 <li>Type-C devices are STRONGLY RECOMMENDED to not support proprietary charging methods that modify Vbus voltage beyond default levels, or alter sink/source roles as such may result in interoperability issues with the chargers or devices that support the standard USB Power Delivery methods. While this is called out as "STRONGLY RECOMMENDED", in future Android versions we might REQUIRE all type-C devices to support full interoperability with standard type-C chargers. 6226 </li> 6227 </ul> 6228 <h3 id="7_7_2_usb_host_mode"> 6229 7.7.2. USB host mode 6230 </h3> 6231 <p> 6232 If a device implementation includes a USB port supporting host mode, it: 6233 </p> 6234 <ul> 6235 <li>SHOULD use a type-C USB port, if the device implementation supports USB 3.1. 6236 </li> 6237 <li>MAY use a non-standard port form factor, but if so MUST ship with a cable or cables adapting the port to a standard type-A or type-C USB port. 6238 </li> 6239 <li>MAY use a micro-AB USB port, but if so SHOULD ship with a cable or cables adapting the port to a standard type-A or type-C USB port. 6240 </li> 6241 <li>is <strong>STRONGLY RECOMMENDED</strong> to implement the <a href="http://developer.android.com/reference/android/hardware/usb/UsbConstants.html#USB_CLASS_AUDIO">USB audio class</a> as documented in the Android SDK documentation. 6242 </li> 6243 <li>MUST implement the Android USB host API as documented in the Android SDK, and MUST declare support for the hardware feature <a href="http://developer.android.com/guide/topics/connectivity/usb/host.html">android.hardware.usb.host</a> . 6244 </li> 6245 <li>SHOULD support the Charging Downstream Port output current range of 1.5 A ~ 5 A as specified in the <a href="http://www.usb.org/developers/docs/devclass_docs/BCv1.2_070312.zip">USB Battery Charging specifications, revision 1.2</a> . 6246 </li> 6247 <li>USB Type-C devices are STRONGLY RECOMMENDED to support DisplayPort, SHOULD support USB SuperSpeed Data Rates, and are STRONGLY RECOMMENDED to support Power Delivery for data and power role swapping. 6248 </li> 6249 <li>Devices with any type-A or type-AB ports MUST NOT ship with an adapter converting from this port to a type-C receptacle. 6250 </li> 6251 <li>MUST recognize any remotely connected MTP (Media Transfer Protocol) devices and make their contents accessible through the <code>ACTION_GET_CONTENT</code> , <code>ACTION_OPEN_DOCUMENT</code> , and <code>ACTION_CREATE_DOCUMENT</code> intents, if the Storage Access Framework (SAF) is supported. 6252 </li> 6253 <li>MUST, if using a Type-C USB port and including support for peripheral mode, implement Dual Role Port functionality as defined by the USB Type-C specification (section 4.5.1.3.3). 6254 </li> 6255 <li>SHOULD, if the Dual Role Port functionality is supported, implement the Try.* model that is most appropriate for the device form factor. For example a handheld device SHOULD implement the Try.SNK model. 6256 </li> 6257 </ul> 6258 <h2 id="7_8_audio"> 6259 7.8. Audio 6260 </h2> 6261 <h3 id="7_8_1_microphone"> 6262 7.8.1. Microphone 6263 </h3> 6264 <div class="note"> 6265 Android Handheld, Watch, and Automotive implementations MUST include a microphone. 6266 </div> 6267 <p> 6268 Device implementations MAY omit a microphone. However, if a device implementation omits a microphone, it MUST NOT report the android.hardware.microphone feature constant, and MUST implement the audio recording API at least as no-ops, per <a href="#7_hardware_compatibility">section 7</a> . Conversely, device implementations that do possess a microphone: 6269 </p> 6270 <ul> 6271 <li>MUST report the android.hardware.microphone feature constant. 6272 </li> 6273 <li>MUST meet the audio recording requirements in <a href="#5_4_audio_recording">section 5.4</a> . 6274 </li> 6275 <li>MUST meet the audio latency requirements in <a href="#5_6_audio_latency">section 5.6</a> . 6276 </li> 6277 <li>STRONGLY RECOMMENDED to support near-ultrasound recording as described in <a href="#7_8_3_near_ultrasound">section 7.8.3</a> . 6278 </li> 6279 </ul> 6280 <h3 id="7_8_2_audio_output"> 6281 7.8.2. Audio Output 6282 </h3> 6283 <div class="note"> 6284 Android Watch devices MAY include an audio output. 6285 </div> 6286 <p> 6287 Device implementations including a speaker or with an audio/multimedia output port for an audio output peripheral as a headset or an external speaker: 6288 </p> 6289 <ul> 6290 <li>MUST report the android.hardware.audio.output feature constant. 6291 </li> 6292 <li>MUST meet the audio playback requirements in <a href="#5_5_audio_playback">section 5.5</a> . 6293 </li> 6294 <li>MUST meet the audio latency requirements in <a href="#5_6_audio_latency">section 5.6</a> . 6295 </li> 6296 <li>STRONGLY RECOMMENDED to support near-ultrasound playback as described in <a href="#7_8_3_near_ultrasound">section 7.8.3</a> . 6297 </li> 6298 </ul> 6299 <p> 6300 Conversely, if a device implementation does not include a speaker or audio output port, it MUST NOT report the android.hardware.audio output feature, and MUST implement the Audio Output related APIs as no-ops at least. 6301 </p> 6302 <p> 6303 Android Watch device implementation MAY but SHOULD NOT have audio output, but other types of Android device implementations MUST have an audio output and declare android.hardware.audio.output. 6304 </p> 6305 <h4 id="7_8_2_1_analog_audio_ports"> 6306 7.8.2.1. Analog Audio Ports 6307 </h4> 6308 <p> 6309 In order to be compatible with the <a href="http://source.android.com/accessories/headset-spec.html">headsets and other audio accessories</a> using the 3.5mm audio plug across the Android ecosystem, if a device implementation includes one or more analog audio ports, at least one of the audio port(s) SHOULD be a 4 conductor 3.5mm audio jack. If a device implementation has a 4 conductor 3.5mm audio jack, it: 6310 </p> 6311 <ul> 6312 <li>MUST support audio playback to stereo headphones and stereo headsets with a microphone, and SHOULD support audio recording from stereo headsets with a microphone. 6313 </li> 6314 <li>MUST support TRRS audio plugs with the CTIA pin-out order, and SHOULD support audio plugs with the OMTP pin-out order. 6315 </li> 6316 <li>MUST support the detection of microphone on the plugged in audio accessory, if the device implementation supports a microphone, and broadcast the android.intent.action.HEADSET_PLUG with the extra value microphone set as 1. 6317 </li> 6318 <li>MUST support the detection and mapping to the keycodes for the following 3 ranges of equivalent impedance between the microphone and ground conductors on the audio plug: 6319 <ul> 6320 <li> 6321 <strong>70 ohm or less</strong> : KEYCODE_HEADSETHOOK 6322 </li> 6323 <li> 6324 <strong>210-290 Ohm</strong> : KEYCODE_VOLUME_UP 6325 </li> 6326 <li> 6327 <strong>360-680 Ohm</strong> : KEYCODE_VOLUME_DOWN 6328 </li> 6329 </ul> 6330 </li> 6331 <li>STRONGLY RECOMMENDED to detect and map to the keycode for the following range of equivalent impedance between the microphone and ground conductors on the audio plug: 6332 <ul> 6333 <li> 6334 <strong>110-180 Ohm:</strong> KEYCODE_VOICE_ASSIST 6335 </li> 6336 </ul> 6337 </li> 6338 <li>MUST trigger ACTION_HEADSET_PLUG upon a plug insert, but only after all contacts on plug are touching their relevant segments on the jack. 6339 </li> 6340 <li>MUST be capable of driving at least 150mV 10% of output voltage on a 32 Ohm speaker impedance. 6341 </li> 6342 <li>MUST have a microphone bias voltage between 1.8V ~ 2.9V. 6343 </li> 6344 </ul> 6345 <h3 id="7_8_3_near-ultrasound"> 6346 7.8.3. Near-Ultrasound 6347 </h3> 6348 <p> 6349 Near-Ultrasound audio is the 18.5 kHz to 20 kHz band. Device implementations MUST correctly report the support of near-ultrasound audio capability via the <a href="http://developer.android.com/reference/android/media/AudioManager.html#getProperty%28java.lang.String%29">AudioManager.getProperty</a> API as follows: 6350 </p> 6351 <ul> 6352 <li>If <a href="http://developer.android.com/reference/android/media/AudioManager.html#PROPERTY_SUPPORT_MIC_NEAR_ULTRASOUND">PROPERTY_SUPPORT_MIC_NEAR_ULTRASOUND</a> is "true", then the following requirements must be met by the VOICE_RECOGNITION and UNPROCESSED audio sources: 6353 <ul> 6354 <li>The microphone's mean power response in the 18.5 kHz to 20 kHz band MUST be no more than 15 dB below the response at 2 kHz. 6355 </li> 6356 <li>The microphone's unweighted signal to noise ratio over 18.5 kHz to 20 kHz for a 19 kHz tone at -26 dBFS MUST be no lower than 50 dB. 6357 </li> 6358 </ul> 6359 </li> 6360 <li>If <a href="http://developer.android.com/reference/android/media/AudioManager.html#PROPERTY_SUPPORT_SPEAKER_NEAR_ULTRASOUND">PROPERTY_SUPPORT_SPEAKER_NEAR_ULTRASOUND</a> is "true", then the speaker's mean response in 18.5 kHz - 20 kHz MUST be no lower than 40 dB below the response at 2 kHz. 6361 </li> 6362 </ul> 6363 <h2 id="7_9_virtual_reality"> 6364 7.9. Virtual Reality 6365 </h2> 6366 <p> 6367 Android includes APIs and facilities to build "Virtual Reality" (VR) applications including high quality mobile VR experiences. Device implementations MUST properly implement these APIs and behaviors, as detailed in this section. 6368 </p> 6369 <h3 id="7_9_1_virtual_reality_mode"> 6370 7.9.1. Virtual Reality Mode 6371 </h3> 6372 <p> 6373 Android handheld device implementations that support a mode for VR applications that handles stereoscopic rendering of notifications and disable monocular system UI components while a VR application has user focus MUST declare <code>android.software.vr.mode</code> feature. Devices declaring this feature MUST include an application implementing <code>android.service.vr.VrListenerService</code> that can be enabled by VR applications via <code>android.app.Activity#setVrModeEnabled</code> . 6374 </p> 6375 <h3 id="7_9_2_virtual_reality_high_performance"> 6376 7.9.2. Virtual Reality High Performance 6377 </h3> 6378 <p> 6379 Android handheld device implementations MUST identify the support of high performance virtual reality for longer user periods through the <code>android.hardware.vr.high_performance</code> feature flag and meet the following requirements. 6380 </p> 6381 <ul> 6382 <li>Device implementations MUST have at least 2 physical cores. 6383 </li> 6384 <li>Device implementations MUST declare android.software.vr.mode feature. 6385 </li> 6386 <li>Device implementations MAY provide an exclusive core to the foreground application and MAY support the <code>Process.getExclusiveCores</code> API to return the numbers of the CPU cores that are exclusive to the top foreground application. If exclusive core is supported, then the core MUST not allow any other userspace processes to run on it (except device drivers used by the application), but MAY allow some kernel processes to run as necessary. 6387 </li> 6388 <li>Device implementations MUST support sustained performance mode. 6389 </li> 6390 <li>Device implementations MUST support OpenGL ES 3.2. 6391 </li> 6392 <li>Device implementations MUST support Vulkan Hardware Level 0 and SHOULD support Vulkan Hardware Level 1. 6393 </li> 6394 <li>Device implementations MUST implement EGL_KHR_mutable_render_buffer and EGL_ANDROID_front_buffer_auto_refresh, EGL_ANDROID_create_native_client_buffer, EGL_KHR_fence_sync and EGL_KHR_wait_sync so that they may be used for Shared Buffer Mode, and expose the extensions in the list of available EGL extensions. 6395 </li> 6396 <li>The GPU and display MUST be able to synchronize access to the shared front buffer such that alternating-eye rendering of VR content at 60fps with two render contexts will be displayed with no visible tearing artifacts. 6397 </li> 6398 <li>Device implementations MUST implement EGL_IMG_context_priority, and expose the extension in the list of available EGL extensions. 6399 </li> 6400 <li>Device implementations MUST implement GL_EXT_multisampled_render_to_texture, GL_OVR_multiview, GL_OVR_multiview2 and GL_OVR_multiview_multisampled_render_to_texture, and expose the extensions in the list of available GL extensions. 6401 </li> 6402 <li>Device implementations MUST implement EGL_EXT_protected_content and GL_EXT_protected_textures so that it may be used for Secure Texture Video Playback, and expose the extensions in the list of available EGL and GL extensions. 6403 </li> 6404 <li>Device implementations MUST support H.264 decoding at least 3840x2160@30fps-40Mbps (equivalent to 4 instances of 1920x1080@30fps-10Mbps or 2 instances of 1920x1080@60fps-20Mbps). 6405 </li> 6406 <li>Device implementations MUST support HEVC and VP9, MUST be capable to decode at least 1920x1080@30fps-10Mbps and SHOULD be capable to decode 3840x2160@30fps-20Mbps (equivalent to 4 instances of 1920x1080@30fps-5Mbps). 6407 </li> 6408 <li>The device implementations are STRONGLY RECOMMENDED to support android.hardware.sensor.hifi_sensors feature and MUST meet the gyroscope, accelerometer, and magnetometer related requirements for android.hardware.hifi_sensors. 6409 </li> 6410 <li>Device implementations MUST support HardwarePropertiesManager.getDeviceTemperatures API and return accurate values for skin temperature. 6411 </li> 6412 <li>The device implementation MUST have an embedded screen, and its resolution MUST be at least be FullHD(1080p) and STRONGLY RECOMMENDED TO BE be QuadHD (1440p) or higher. 6413 </li> 6414 <li>The display MUST measure between 4.7" and 6" diagonal. 6415 </li> 6416 <li>The display MUST update at least 60 Hz while in VR Mode. 6417 </li> 6418 <li>The display latency on Gray-to-Gray, White-to-Black, and Black-to-White switching time MUST be 3 ms. 6419 </li> 6420 <li>The display MUST support a low-persistence mode with 5 ms persistence,persistence being defined as the amount of time for which a pixel is emitting light. 6421 </li> 6422 <li>Device implementations MUST support Bluetooth 4.2 and Bluetooth LE Data Length Extension <a href="#7_4_3_bluetooth">section 7.4.3</a> . 6423 </li> 6424 </ul> 6425 <h1 id="8_performance_and_power"> 6426 8. Performance and Power 6427 </h1> 6428 <p> 6429 Some minimum performance and power criteria are critical to the user experience and impact the baseline assumptions developers would have when developing an app. Android Watch devices SHOULD and other type of device implementations MUST meet the following criteria. 6430 </p> 6431 <h2 id="8_1_user_experience_consistency"> 6432 8.1. User Experience Consistency 6433 </h2> 6434 <p> 6435 Device implementations MUST provide a smooth user interface by ensuring a consistent frame rate and response times for applications and games. Device implementations MUST meet the following requirements: 6436 </p> 6437 <ul> 6438 <li> 6439 <strong>Consistent frame latency</strong> . Inconsistent frame latency or a delay to render frames MUST NOT happen more often than 5 frames in a second, and SHOULD be below 1 frames in a second. 6440 </li> 6441 <li> 6442 <strong>User interface latency</strong> . Device implementations MUST ensure low latency user experience by scrolling a list of 10K list entries as defined by the Android Compatibility Test Suite (CTS) in less than 36 secs. 6443 </li> 6444 <li> 6445 <strong>Task switching</strong> . When multiple applications have been launched, re-launching an already-running application after it has been launched MUST take less than 1 second. 6446 </li> 6447 </ul> 6448 <h2 id="8_2_file_i/o_access_performance"> 6449 8.2. File I/O Access Performance 6450 </h2> 6451 <p> 6452 Device implementations MUST ensure internal storage file access performance consistency for read and write operations. 6453 </p> 6454 <ul> 6455 <li> 6456 <strong>Sequential write</strong> . Device implementations MUST ensure a sequential write performance of at least 5MB/s for a 256MB file using 10MB write buffer. 6457 </li> 6458 <li> 6459 <strong>Random write</strong> . Device implementations MUST ensure a random write performance of at least 0.5MB/s for a 256MB file using 4KB write buffer. 6460 </li> 6461 <li> 6462 <strong>Sequential read</strong> . Device implementations MUST ensure a sequential read performance of at least 15MB/s for a 256MB file using 10MB write buffer. 6463 </li> 6464 <li> 6465 <strong>Random read</strong> . Device implementations MUST ensure a random read performance of at least 3.5MB/s for a 256MB file using 4KB write buffer. 6466 </li> 6467 </ul> 6468 <h2 id="8_3_power-saving_modes"> 6469 8.3. Power-Saving Modes 6470 </h2> 6471 <p> 6472 Android 6.0 introduced App Standby and Doze power-saving modes to optimize battery usage. All Apps exempted from these modes MUST be made visible to the end user. Further, the triggering, maintenance, wakeup algorithms and the use of global system settings of these power-saving modes MUST not deviate from the Android Open Source Project. 6473 </p> 6474 <p> 6475 In addition to the power-saving modes, Android device implementations MAY implement any or all of the 4 sleeping power states as defined by the Advanced Configuration and Power Interface (ACPI), but if it implements S3 and S4 power states, it can only enter these states when closing a lid that is physically part of the device. 6476 </p> 6477 <h2 id="8_4_power_consumption_accounting"> 6478 8.4. Power Consumption Accounting 6479 </h2> 6480 <p> 6481 A more accurate accounting and reporting of the power consumption provides the app developer both the incentives and the tools to optimize the power usage pattern of the application. Therefore, device implementations: 6482 </p> 6483 <ul> 6484 <li>MUST be able to track hardware component power usage and attribute that power usage to specific applications. Specifically, implementations: 6485 <ul> 6486 <li>MUST provide a per-component power profile that defines the <a href="http://source.android.com/devices/tech/power/values.html">current consumption value</a> for each hardware component and the approximate battery drain caused by the components over time as documented in the Android Open Source Project site. 6487 </li> 6488 <li>MUST report all power consumption values in milliampere hours (mAh). 6489 </li> 6490 <li>SHOULD be attributed to the hardware component itself if unable to attribute hardware component power usage to an application. 6491 </li> 6492 <li>MUST report CPU power consumption per each process's UID. The Android Open Source Project meets the requirement through the <code>uid_cputime</code> kernel module implementation. 6493 </li> 6494 </ul> 6495 </li> 6496 <li>MUST make this power usage available via the <a href="http://source.android.com/devices/tech/power/batterystats.html"><code>adb shell dumpsys batterystats</code></a> shell command to the app developer. 6497 </li> 6498 <li>MUST honor the <a href="http://developer.android.com/reference/android/content/Intent.html#ACTION_POWER_USAGE_SUMMARY">android.intent.action.POWER_USAGE_SUMMARY</a> intent and display a settings menu that shows this power usage. 6499 </li> 6500 </ul> 6501 <h2 id="8_5_consistent_performance"> 6502 8.5. Consistent Performance 6503 </h2> 6504 <p> 6505 Performance can fluctuate dramatically for high-performance long-running apps, either because of the other apps running in the background or the CPU throttling due to temperature limits. Android includes programmatic interfaces so that when the device is capable, the top foreground application can request that the system optimize the allocation of the resources to address such fluctuations. 6506 </p> 6507 <p> 6508 Device implementations SHOULD support Sustained Performance Mode which can provide the top foreground application a consistent level of performance for a prolonged amount of time when requested through the <a href="https://developer.android.com/reference/android/view/Window.html#setSustainedPerformanceMode%28boolean%29"><code>Window.setSustainedPerformanceMode()</code></a> API method. A Device implementation MUST report the support of Sustained Performance Mode accurately through the <a href="https://developer.android.com/reference/android/os/PowerManager.html#isSustainedPerformanceModeSupported%28%29"><code>PowerManager.isSustainedPerformanceModeSupported()</code></a> API method. 6509 </p> 6510 <p> 6511 Device implementations with two or more CPU cores SHOULD provide at least one exclusive core that can be reserved by the top foreground application. If provided, implementations MUST meet the following requirements: 6512 </p> 6513 <ul> 6514 <li>Implementations MUST report through the <a href="https://developer.android.com/reference/android/os/Process.html#getExclusiveCores%28%29"><code>Process.getExclusiveCores()</code></a> API method the id numbers of the exclusive cores that can be reserved by the top foreground application. 6515 </li> 6516 <li>Device implementations MUST not allow any user space processes except the device drivers used by the application to run on the exclusive cores, but MAY allow some kernel processes to run as necessary. 6517 </li> 6518 </ul> 6519 <p> 6520 If a device implementation does not support an exclusive core, it MUST return an empty list through the <a href="https://developer.android.com/reference/android/os/Process.html#getExclusiveCores%28%29"><code>Process.getExclusiveCores()</code></a> API method. 6521 </p> 6522 <h1 id="9_security_model_compatibility"> 6523 9. Security Model Compatibility 6524 </h1> 6525 <p> 6526 Device implementations MUST implement a security model consistent with the Android platform security model as defined in <a href="http://developer.android.com/guide/topics/security/permissions.html">Security and Permissions reference document</a> in the APIs in the Android developer documentation. Device implementations MUST support installation of self-signed applications without requiring any additional permissions/certificates from any third parties/authorities. Specifically, compatible devices MUST support the security mechanisms described in the follow subsections. 6527 </p> 6528 <h2 id="9_1_permissions"> 6529 9.1. Permissions 6530 </h2> 6531 <p> 6532 Device implementations MUST support the <a href="http://developer.android.com/guide/topics/security/permissions.html">Android permissions model</a> as defined in the Android developer documentation. Specifically, implementations MUST enforce each permission defined as described in the SDK documentation; no permissions may be omitted, altered, or ignored. Implementations MAY add additional permissions, provided the new permission ID strings are not in the android.* namespace. 6533 </p> 6534 <p> 6535 Permissions with a <code>protectionLevel</code> of <a href="https://developer.android.com/reference/android/content/pm/PermissionInfo.html#PROTECTION_FLAG_PRIVILEGED">'PROTECTION_FLAG_PRIVILEGED'</a> MUST only be granted to apps preloaded in the whitelisted privileged path(s) of the system image, such as the <code>system/priv-app</code> path in the AOSP implementation. 6536 </p> 6537 <p> 6538 Permissions with a protection level of dangerous are runtime permissions. Applications with targetSdkVersion > 22 request them at runtime. Device implementations: 6539 </p> 6540 <ul> 6541 <li>MUST show a dedicated interface for the user to decide whether to grant the requested runtime permissions and also provide an interface for the user to manage runtime permissions. 6542 </li> 6543 <li>MUST have one and only one implementation of both user interfaces. 6544 </li> 6545 <li>MUST NOT grant any runtime permissions to preinstalled apps unless: 6546 <ul> 6547 <li>the user's consent can be obtained before the application uses it 6548 </li> 6549 <li>the runtime permissions are associated with an intent pattern for which the preinstalled application is set as the default handler 6550 </li> 6551 </ul> 6552 </li> 6553 </ul> 6554 <h2 id="9_2_uid_and_process_isolation"> 6555 9.2. UID and Process Isolation 6556 </h2> 6557 <p> 6558 Device implementations MUST support the Android application sandbox model, in which each application runs as a unique Unixstyle UID and in a separate process. Device implementations MUST support running multiple applications as the same Linux user ID, provided that the applications are properly signed and constructed, as defined in the <a href="http://developer.android.com/guide/topics/security/permissions.html">Security and Permissions reference</a> . 6559 </p> 6560 <h2 id="9_3_filesystem_permissions"> 6561 9.3. Filesystem Permissions 6562 </h2> 6563 <p> 6564 Device implementations MUST support the Android file access permissions model as defined in the <a href="http://developer.android.com/guide/topics/security/permissions.html">Security and Permissions reference</a> . 6565 </p> 6566 <h2 id="9_4_alternate_execution_environments"> 6567 9.4. Alternate Execution Environments 6568 </h2> 6569 <p> 6570 Device implementations MAY include runtime environments that execute applications using some other software or technology than the Dalvik Executable Format or native code. However, such alternate execution environments MUST NOT compromise the Android security model or the security of installed Android applications, as described in this section. 6571 </p> 6572 <p> 6573 Alternate runtimes MUST themselves be Android applications, and abide by the standard Android security model, as described elsewhere in <a href="#9_security_model_compatibility">section 9</a> . 6574 </p> 6575 <p> 6576 Alternate runtimes MUST NOT be granted access to resources protected by permissions not requested in the runtimes AndroidManifest.xml file via the <uses-permission> mechanism. 6577 </p> 6578 <p> 6579 Alternate runtimes MUST NOT permit applications to make use of features protected by Android permissions restricted to system applications. 6580 </p> 6581 <p> 6582 Alternate runtimes MUST abide by the Android sandbox model. Specifically, alternate runtimes: 6583 </p> 6584 <ul> 6585 <li>SHOULD install apps via the PackageManager into separate Android sandboxes (Linux user IDs, etc.). 6586 </li> 6587 <li>MAY provide a single Android sandbox shared by all applications using the alternate runtime. 6588 </li> 6589 <li>Installed applications using an alternate runtime MUST NOT reuse the sandbox of any other app installed on the device, except through the standard Android mechanisms of shared user ID and signing certificate. 6590 </li> 6591 <li>MUST NOT launch with, grant, or be granted access to the sandboxes corresponding to other Android applications. 6592 </li> 6593 <li>MUST NOT be launched with, be granted, or grant to other applications any privileges of the superuser (root), or of any other user ID. 6594 </li> 6595 </ul> 6596 <p> 6597 The .apk files of alternate runtimes MAY be included in the system image of a device implementation, but MUST be signed with a key distinct from the key used to sign other applications included with the device implementation. 6598 </p> 6599 <p> 6600 When installing applications, alternate runtimes MUST obtain user consent for the Android permissions used by the application. If an application needs to make use of a device resource for which there is a corresponding Android permission (such as Camera, GPS, etc.), the alternate runtime MUST inform the user that the application will be able to access that resource. If the runtime environment does not record application capabilities in this manner, the runtime environment MUST list all permissions held by the runtime itself when installing any application using that runtime. 6601 </p> 6602 <h2 id="9_5_multi-user_support"> 6603 9.5. Multi-User Support 6604 </h2> 6605 <div class="note"> 6606 This feature is optional for all device types. 6607 </div> 6608 <p> 6609 Android includes <a href="http://developer.android.com/reference/android/os/UserManager.html">support for multiple users</a> and provides support for full user isolation. Device implementations MAY enable multiple users, but when enabled MUST meet the following requirements related to <a href="http://source.android.com/devices/storage/traditional.html">multi-user support</a> : 6610 </p> 6611 <ul> 6612 <li>Android Automotive device implementations with multi-user support enabled MUST include a guest account that allows all functions provided by the vehicle system without requiring a user to log in. 6613 </li> 6614 <li>Device implementations that do not declare the android.hardware.telephony feature flag MUST support restricted profiles, a feature that allows device owners to manage additional users and their capabilities on the device. With restricted profiles, device owners can quickly set up separate environments for additional users to work in, with the ability to manage finer-grained restrictions in the apps that are available in those environments. 6615 </li> 6616 <li>Conversely device implementations that declare the android.hardware.telephony feature flag MUST NOT support restricted profiles but MUST align with the AOSP implementation of controls to enable /disable other users from accessing the voice calls and SMS. 6617 </li> 6618 <li>Device implementations MUST, for each user, implement a security model consistent with the Android platform security model as defined in <a href="http://developer.android.com/guide/topics/security/permissions.html">Security and Permissions reference document</a> in the APIs. 6619 </li> 6620 <li>Each user instance on an Android device MUST have separate and isolated external storage directories. Device implementations MAY store multiple users' data on the same volume or filesystem. However, the device implementation MUST ensure that applications owned by and running on behalf a given user cannot list, read, or write to data owned by any other user. Note that removable media, such as SD card slots, can allow one user to access anothers data by means of a host PC. For this reason, device implementations that use removable media for the external storage APIs MUST encrypt the contents of the SD card if multiuser is enabled using a key stored only on non-removable media accessible only to the system. As this will make the media unreadable by a host PC, device implementations will be required to switch to MTP or a similar system to provide host PCs with access to the current users data. Accordingly, device implementations MAY but SHOULD NOT enable multi-user if they use <a href="http://developer.android.com/reference/android/os/Environment.html">removable media</a> for primary external storage. 6621 </li> 6622 </ul> 6623 <h2 id="9_6_premium_sms_warning"> 6624 9.6. Premium SMS Warning 6625 </h2> 6626 <p> 6627 Android includes support for warning users of any outgoing <a href="http://en.wikipedia.org/wiki/Short_code">premium SMS message</a> . Premium SMS messages are text messages sent to a service registered with a carrier that may incur a charge to the user. Device implementations that declare support for android.hardware.telephony MUST warn users before sending a SMS message to numbers identified by regular expressions defined in /data/misc/sms/codes.xml file in the device. The upstream Android Open Source Project provides an implementation that satisfies this requirement. 6628 </p> 6629 <h2 id="9_7_kernel_security_features"> 6630 9.7. Kernel Security Features 6631 </h2> 6632 <p> 6633 The Android Sandbox includes features that use the Security-Enhanced Linux (SELinux) mandatory access control (MAC) system, seccomp sandboxing, and other security features in the Linux kernel. SELinux or any other security features implemented below the Android framework: 6634 </p> 6635 <ul> 6636 <li>MUST maintain compatibility with existing applications. 6637 </li> 6638 <li>MUST NOT have a visible user interface when a security violation is detected and successfully blocked, but MAY have a visible user interface when an unblocked security violation occurs resulting in a successful exploit. 6639 </li> 6640 <li>SHOULD NOT be user or developer configurable. 6641 </li> 6642 </ul> 6643 <p> 6644 If any API for configuration of policy is exposed to an application that can affect another application (such as a Device Administration API), the API MUST NOT allow configurations that break compatibility. 6645 </p> 6646 <p> 6647 Devices MUST implement SELinux or, if using a kernel other than Linux, an equivalent mandatory access control system. Devices MUST also meet the following requirements, which are satisfied by the reference implementation in the upstream Android Open Source Project. 6648 </p> 6649 <p> 6650 Device implementations: 6651 </p> 6652 <ul> 6653 <li>MUST set SELinux to global enforcing mode. 6654 </li> 6655 <li>MUST configure all domains in enforcing mode. No permissive mode domains are allowed, including domains specific to a device/vendor. 6656 </li> 6657 <li>MUST NOT modify, omit, or replace the neverallow rules present within the system/sepolicy folder provided in the upstream Android Open Source Project (AOSP) and the policy MUST compile with all neverallow rules present, for both AOSP SELinux domains as well as device/vendor specific domains. 6658 </li> 6659 <li>MUST split the media framework into multiple processes so that it is possible to more narrowly grant access for each process as <a href="https://source.android.com/devices/media/framework-hardening.html#arch_changes">described</a> in the Android Open Source Project site. 6660 </li> 6661 </ul> 6662 <p> 6663 Device implementations SHOULD retain the default SELinux policy provided in the system/sepolicy folder of the upstream Android Open Source Project and only further add to this policy for their own device-specific configuration. Device implementations MUST be compatible with the upstream Android Open Source Project. 6664 </p> 6665 <p> 6666 Devices MUST implement a kernel application sandboxing mechanism which allows filtering of system calls using a configurable policy from multithreaded programs. The upstream Android Open Source Project meets this requirement through enabling the seccomp-BPF with threadgroup synchronization (TSYNC) as described <a href="http://source.android.com/devices/tech/config/kernel.html#Seccomp-BPF-TSYNC">in the Kernel Configuration section of source.android.com</a> . 6667 </p> 6668 <h2 id="9_8_privacy"> 6669 9.8. Privacy 6670 </h2> 6671 <p> 6672 If the device implements functionality in the system that captures the contents displayed on the screen and/or records the audio stream played on the device, it MUST continuously notify the user whenever this functionality is enabled and actively capturing/recording. 6673 </p> 6674 <p> 6675 If a device implementation has a mechanism that routes network data traffic through a proxy server or VPN gateway by default (for example, preloading a VPN service with android.permission.CONTROL_VPN granted), the device implementation MUST ask for the user's consent before enabling that mechanism, unless that VPN is enabled by the Device Policy Controller via the <a href="https://developer.android.com/reference/android/app/admin/DevicePolicyManager.html#setAlwaysOnVpnPackage(android.content.ComponentName,%20java.lang.String,%20boolean)"><code>DevicePolicyManager.setAlwaysOnVpnPackage()</code></a> , in which case the user does not need to provide a separate consent, but MUST only be notified. 6676 </p> 6677 <p> 6678 Device implementations MUST ship with an empty user-added Certificate Authority (CA) store, and MUST preinstall the same root certificates for the system-trusted CA store as <a href="https://source.android.com/security/overview/app-security.html#certificate-authorities">provided</a> in the upstream Android Open Source Project. 6679 </p> 6680 <p> 6681 When devices are routed through a VPN, or a user root CA is installed, the implementation MUST display a warning indicating the network traffic may be monitored to the user. 6682 </p> 6683 <p> 6684 If a device implementation has a USB port with USB peripheral mode support, it MUST present a user interface asking for the user's consent before allowing access to the contents of the shared storage over the USB port. 6685 </p> 6686 <h2 id="9_9_data_storage_encryption"> 6687 9.9. Data Storage Encryption 6688 </h2> 6689 <div class="note"> 6690 Optional for Android device implementations without a secure lock screen. 6691 </div> 6692 <p> 6693 If the device implementation supports a secure lock screen as described in section 9.11.1, then the device MUST support data storage encryption of the application private data (/data partition), as well as the application shared storage partition (/sdcard partition) if it is a permanent, non-removable part of the device. 6694 </p> 6695 <p> 6696 For device implementations supporting data storage encryption and with Advanced Encryption Standard (AES) crypto performance above 50MiB/sec, the data storage encryption MUST be enabled by default at the time the user has completed the out-of-box setup experience. If a device implementation is already launched on an earlier Android version with encryption disabled by default, such a device cannot meet the requirement through a system software update and thus MAY be exempted. 6697 </p> 6698 <p> 6699 Device implementations SHOULD meet the above data storage encryption requirement via implementing <a href="https://source.android.com/security/encryption/file-based.html">File Based Encryption</a> (FBE). 6700 </p> 6701 <h3 id="9_9_1_direct_boot"> 6702 9.9.1. Direct Boot 6703 </h3> 6704 <p> 6705 All devices MUST implement the <a href="http://developer.android.com/preview/features/direct-boot.html">Direct Boot mode</a> APIs even if they do not support Storage Encryption. In particular, the <a href="https://developer.android.com/reference/android/content/Intent.html#LOCKED_BOOT_COMPLETED">LOCKED_BOOT_COMPLETED</a> and <a href="https://developer.android.com/reference/android/content/Intent.html#ACTION_USER_UNLOCKED">ACTION_USER_UNLOCKED</a> Intents must still be broadcast to signal Direct Boot aware applications that Device Encrypted (DE) and Credential Encrypted (CE) storage locations are available for user. 6706 </p> 6707 <h3 id="9_9_2_file_based_encryption"> 6708 9.9.2. File Based Encryption 6709 </h3> 6710 <p> 6711 Device implementations supporting FBE: 6712 </p> 6713 <ul> 6714 <li>MUST boot up without challenging the user for credentials and allow Direct Boot aware apps to access to the Device Encrypted (DE) storage after the LOCKED_BOOT_COMPLETED message is broadcasted. 6715 </li> 6716 <li>MUST only allow access to Credential Encrypted (CE) storage after the user has unlocked the device by supplying their credentials (eg. passcode, pin, pattern or fingerprint) and the ACTION_USER_UNLOCKED message is broadcasted. Device implementations MUST NOT offer any method to unlock the CE protected storage without the user supplied credentials. 6717 </li> 6718 <li>MUST support Verified Boot and ensure that DE keys are cryptographically bound to the device's hardware root of trust. 6719 </li> 6720 <li>MUST support encrypting file contents using AES with a key length of 256-bits in XTS mode. 6721 </li> 6722 <li>MUST support encrypting file name using AES with a key length of 256-bits in CBC-CTS mode. 6723 </li> 6724 <li>MAY support alternative ciphers, key lengths and modes for file content and file name encryption, but MUST use the mandatorily supported ciphers, key lengths and modes by default. 6725 </li> 6726 <li>SHOULD make preloaded essential apps (e.g. Alarm, Phone, Messenger) Direct Boot aware. 6727 </li> 6728 </ul> 6729 <p> 6730 The keys protecting CE and DE storage areas: 6731 </p> 6732 <ul> 6733 <li>MUST be cryptographically bound to a hardware-backed Keystore. CE keys must be bound to a user's lock screen credentials. If the user has specified no lock screen credentials then the CE keys MUST be bound to a default passcode. 6734 </li> 6735 <li>MUST be unique and distinct, in other words no user's CE or DE key may match any other user's CE or DE keys. 6736 </li> 6737 </ul> 6738 <p> 6739 The upstream Android Open Source project provides a preferred implementation of this feature based on the Linux kernel ext4 encryption feature. 6740 </p> 6741 <h3 id="9_9_3_full_disk_encryption"> 6742 9.9.3. Full Disk Encryption 6743 </h3> 6744 <p> 6745 Device implementations supporting <a href="http://source.android.com/devices/tech/security/encryption/index.html">full disk encryption</a> (FDE). MUST use AES with a key of 128-bits (or greater) and a mode designed for storage (for example, AES-XTS, AES-CBC-ESSIV). The encryption key MUST NOT be written to storage at any time without being encrypted. The user MUST be provided with the possibility to AES encrypt the encryption key, except when it is in active use, with the lock screen credentials stretched using a slow stretching algorithm (e.g. PBKDF2 or scrypt). If the user has not specified a lock screen credentials or has disabled use of the passcode for encryption, the system SHOULD use a default passcode to wrap the encryption key. If the device provides a hardware-backed keystore, the password stretching algorithm MUST be cryptographically bound to that keystore. The encryption key MUST NOT be sent off the device (even when wrapped with the user passcode and/or hardware bound key). The upstream Android Open Source project provides a preferred implementation of this feature based on the Linux kernel feature dm-crypt. 6746 </p> 6747 <h2 id="9_10_device_integrity"> 6748 9.10. Device Integrity 6749 </h2> 6750 <p> 6751 The following requirements ensures there is transparancy to the status of the device integrity. 6752 </p> 6753 <p> 6754 Device implementations MUST correctly report through the System API method PersistentDataBlockManager.getFlashLockState() whether their bootloader state permits flashing of the system image. The <code>FLASH_LOCK_UNKNOWN</code> state is reserved for device implementations upgrading from an earlier version of Android where this new system API method did not exist. 6755 </p> 6756 <p> 6757 Verified boot is a feature that guarantees the integrity of the device software. If a device implementation supports the feature, it MUST: 6758 </p> 6759 <ul> 6760 <li>Declare the platform feature flag android.software.verified_boot. 6761 </li> 6762 <li>Perform verification on every boot sequence. 6763 </li> 6764 <li>Start verification from an immutable hardware key that is the root of trust and go all the way up to the system partition. 6765 </li> 6766 <li>Implement each stage of verification to check the integrity and authenticity of all the bytes in the next stage before executing the code in the next stage. 6767 </li> 6768 <li>Use verification algorithms as strong as current recommendations from NIST for hashing algorithms (SHA-256) and public key sizes (RSA-2048). 6769 </li> 6770 <li>MUST NOT allow boot to complete when system verification fails, unless the user consents to attempt booting anyway, in which case the data from any non-verified storage blocks MUST not be used. 6771 </li> 6772 <li>MUST NOT allow verified partitions on the device to be modified unless the user has explicitly unlocked the boot loader. 6773 </li> 6774 </ul> 6775 <p> 6776 The upstream Android Open Source Project provides a preferred implementation of this feature based on the Linux kernel feature dm-verity. 6777 </p> 6778 <p> 6779 Starting from Android 6.0, device implementations with Advanced Encryption Standard (AES) crypto performance above 50 MiB/seconds MUST support verified boot for device integrity. 6780 </p> 6781 <p> 6782 If a device implementation is already launched without supporting verified boot on an earlier version of Android, such a device can not add support for this feature with a system software update and thus are exempted from the requirement. 6783 </p> 6784 <h2 id="9_11_keys_and_credentials"> 6785 9.11. Keys and Credentials 6786 </h2> 6787 <p> 6788 The <a href="https://developer.android.com/training/articles/keystore.html">Android Keystore System</a> allows app developers to store cryptographic keys in a container and use them in cryptographic operations through the <a href="https://developer.android.com/reference/android/security/KeyChain.html">KeyChain API</a> or the <a href="https://developer.android.com/reference/java/security/KeyStore.html">Keystore API</a> . 6789 </p> 6790 <p> 6791 All Android device implementations MUST meet the following requirements: 6792 </p> 6793 <ul> 6794 <li>SHOULD not limit the number of keys that can be generated, and MUST at least allow more than 8,192 keys to be imported. 6795 </li> 6796 <li>The lock screen authentication MUST rate limit attempts and MUST have an exponential backoff algorithm. Beyond 150 failed attempts, the delay MUST be at least 24 hours per attempt. 6797 </li> 6798 <li>When the device implementation supports a secure lock screen it MUST back up the keystore implementation with secure hardware and meet following requirements: 6799 <ul> 6800 <li>MUST have hardware backed implementations of RSA, AES, ECDSA and HMAC cryptographic algorithms and MD5, SHA1, SHA-2 Family hash functions to properly support the <a href="https://developer.android.com/training/articles/keystore.html#SupportedAlgorithms">Android Keystore system's supported algorithms</a> . 6801 </li> 6802 <li>MUST perform the lock screen authentication in the secure hardware and only when successful allow the authentication-bound keys to be used. The upstream Android Open Source Project provides the <a href="http://source.android.com/devices/tech/security/authentication/gatekeeper.html">Gatekeeper Hardware Abstraction Layer (HAL)</a> that can be used to satisfy this requirement. 6803 </li> 6804 </ul> 6805 </li> 6806 </ul> 6807 <p> 6808 Note that if a device implementation is already launched on an earlier Android version, and does not have a fingerprint scanner, such a device is exempted from the requirement to have a hardware-backed keystore. 6809 </p> 6810 <h3 id="9_11_1_secure_lock_screen"> 6811 9.11.1. Secure Lock Screen 6812 </h3> 6813 <p> 6814 Device implementations MAY add or modify the authentication methods to unlock the lock screen, but MUST still meet the following requirements: 6815 </p> 6816 <ul> 6817 <li>The authentication method, if based on a known secret, MUST NOT be treated as a secure lock screen unless it meets all following requirements: 6818 <ul> 6819 <li>The entropy of the shortest allowed length of inputs MUST be greater than 10 bits. 6820 </li> 6821 <li>The maximum entropy of all possible inputs MUST be greater than 18 bits. 6822 </li> 6823 <li>MUST not replace any of the existing authentication methods (PIN, pattern, password) implemented and provided in AOSP. 6824 </li> 6825 <li>MUST be disabled when the Device Policy Controller (DPC) application has set the password quality policy via the <a href="https://developer.android.com/reference/android/app/admin/DevicePolicyManager.html#setPasswordQuality%28android.content.ComponentName,%20int%29"><code>DevicePolicyManager.setPasswordQuality()</code></a> method with a more restrictive quality constant than <code>PASSWORD_QUALITY_SOMETHING</code> . 6826 </li> 6827 </ul> 6828 </li> 6829 <li>The authenticaion method, if based on a physical token or the location, MUST NOT be treated as a secure lock screen unless it meets all following requirements: 6830 <ul> 6831 <li>It MUST have a fall-back mechanism to use one of the primary authentication methods which is based on a known secret and meets the requirements to be treated as a secure lock screen. 6832 </li> 6833 <li>It MUST be disabled and only allow the primary authentication to unlock the screen when the Device Policy Controller (DPC) application has set the policy with either the <a href="http://developer.android.com/reference/android/app/admin/DevicePolicyManager.html#setKeyguardDisabledFeatures%28android.content.ComponentName,%20int%29"><code>DevicePolicyManager.setKeyguardDisabledFeatures(KEYGUARD_DISABLE_TRUST_AGENTS)</code></a> method or the <a href="https://developer.android.com/reference/android/app/admin/DevicePolicyManager.html#setPasswordQuality%28android.content.ComponentName,%20int%29"><code>DevicePolicyManager.setPasswordQuality()</code></a> method with a more restrictive quality constant than <code>PASSWORD_QUALITY_UNSPECIFIED</code> . 6834 </li> 6835 </ul> 6836 </li> 6837 <li>The authentication method, if based on biometrics, MUST NOT be treated as a secure lock screen unless it meets all following requirements: 6838 <ul> 6839 <li>It MUST have a fall-back mechanism to use one of the primary authentication methods which is based on a known secret and meets the requirements to be treated as a secure lock screen. 6840 </li> 6841 <li>It MUST be disabled and only allow the primary authentication to unlock the screen when the Device Policy Controller (DPC) application has set the keguard feature policy by calling the method <a href="http://developer.android.com/reference/android/app/admin/DevicePolicyManager.html#setKeyguardDisabledFeatures%28android.content.ComponentName,%20int%29"><code>DevicePolicyManager.setKeyguardDisabledFeatures(KEYGUARD_DISABLE_FINGERPRINT)</code></a> . 6842 </li> 6843 <li>It MUST have a false acceptance rate that is equal or stronger than what is required for a fingerprint sensor as described in section 7.3.10, or otherwise MUST be disabled and only allow the primary authentication to unlock the screen when the Device Policy Controller (DPC) application has set the password quality policy via the <a href="https://developer.android.com/reference/android/app/admin/DevicePolicyManager.html#setPasswordQuality%28android.content.ComponentName,%20int%29"><code>DevicePolicyManager.setPasswordQuality()</code></a> method with a more restrictive quality constant than <code>PASSWORD_QUALITY_BIOMETRIC_WEAK</code> . 6844 </li> 6845 </ul> 6846 </li> 6847 <li>If the authentication method can not be treated as a secure lock screen, it: 6848 <ul> 6849 <li>MUST return <code>false</code> for both the <a href="http://developer.android.com/reference/android/app/KeyguardManager.html#isKeyguardSecure%28%29"><code>KeyguardManager.isKeyguardSecure()</code></a> and the <a href="https://developer.android.com/reference/android/app/KeyguardManager.html#isDeviceSecure%28%29"><code>KeyguardManager.isDeviceSecure()</code></a> methods. 6850 </li> 6851 <li>MUST be disabled when the Device Policy Controller (DPC) application has set the password quality policy via the <a href="https://developer.android.com/reference/android/app/admin/DevicePolicyManager.html#setPasswordQuality%28android.content.ComponentName,%20int%29"><code>DevicePolicyManager.setPasswordQuality()</code></a> method with a more restrictive quality constant than <code>PASSWORD_QUALITY_UNSPECIFIED</code> . 6852 </li> 6853 <li>MUST NOT reset the password expiration timers set by <a href="http://developer.android.com/reference/android/app/admin/DevicePolicyManager.html#setPasswordExpirationTimeout%28android.content.ComponentName,%20long%29"><code>DevicePolicyManager.setPasswordExpirationTimeout()</code></a> . 6854 </li> 6855 <li>MUST NOT authenticate access to keystores if the application has called <a href="https://developer.android.com/reference/android/security/keystore/KeyGenParameterSpec.Builder.html#setUserAuthenticationRequired%28boolean%29"><code>KeyGenParameterSpec.Builder.setUserAuthenticationRequired(true)</code></a> ). 6856 </li> 6857 </ul> 6858 </li> 6859 <li>If the authentication method is based on a physical token, the location, or biometrics that has higher false acceptance rate than what is required for fingerprint sensors as described in section 7.3.10, then it: 6860 <ul> 6861 <li>MUST NOT reset the password expiration timers set by <a href="http://developer.android.com/reference/android/app/admin/DevicePolicyManager.html#setPasswordExpirationTimeout%28android.content.ComponentName,%20long%29"><code>DevicePolicyManager.setPasswordExpirationTimeout()</code></a> . 6862 </li> 6863 <li>MUST NOT authenticate access to keystores if the application has called <a href="https://developer.android.com/reference/android/security/keystore/KeyGenParameterSpec.Builder.html#setUserAuthenticationRequired%28boolean%29"><code>KeyGenParameterSpec.Builder.setUserAuthenticationRequired(true)</code></a> . 6864 </li> 6865 </ul> 6866 </li> 6867 </ul> 6868 <h2 id="9_12_data_deletion"> 6869 9.12. Data Deletion 6870 </h2> 6871 <p> 6872 Devices MUST provide users with a mechanism to perform a "Factory Data Reset" that allows logical and physical deletion of all data except for the following: 6873 </p> 6874 <ul> 6875 <li>The system image 6876 </li> 6877 <li>Any operating system files required by the system image 6878 </li> 6879 </ul> 6880 <p> 6881 All user-generated data MUST be deleted. This MUST satisfy relevant industry standards for data deletion such as NIST SP800-88. This MUST be used for the implementation of the wipeData() API (part of the Android Device Administration API) described in <a href="#3_9_device_administration">section 3.9 Device Administration</a> . 6882 </p> 6883 <p> 6884 Devices MAY provide a fast data wipe that conducts a logical data erase. 6885 </p> 6886 <h2 id="9_13_safe_boot_mode"> 6887 9.13. Safe Boot Mode 6888 </h2> 6889 <p> 6890 Android provides a mode enabling users to boot up into a mode where only preinstalled system apps are allowed to run and all third-party apps are disabled. This mode, known as "Safe Boot Mode", provides the user the capability to uninstall potentially harmful third-party apps. 6891 </p> 6892 <p> 6893 Android device implementations are STRONGLY RECOMENDED to implement Safe Boot Mode and meet following requirements: 6894 </p> 6895 <ul> 6896 <li> 6897 <p> 6898 Device implementations SHOULD provide the user an option to enter Safe Boot Mode from the boot menu which is reachable through a workflow that is different from that of normal boot. 6899 </p> 6900 </li> 6901 <li> 6902 <p> 6903 Device implementations MUST provide the user an option to enter Safe Boot Mode in such a way that is uninterruptible from third-party apps installed on the device, except for when the third party app is a Device Policy Controller and has set the <a href="https://developer.android.com/reference/android/os/UserManager.html#DISALLOW_SAFE_BOOT"><code>UserManager.DISALLOW_SAFE_BOOT</code></a> flag as true. 6904 </p> 6905 </li> 6906 <li> 6907 <p> 6908 Device implementations MUST provide the user the capability to uninstall any third-party apps within Safe Mode. 6909 </p> 6910 </li> 6911 </ul> 6912 <h2 id="9_14_automotive_vehicle_system_isolation"> 6913 9.14. Automotive Vehicle System Isolation 6914 </h2> 6915 <p> 6916 Android Automotive devices are expected to exchange data with critical vehicle subsystems, e.g., by using the <a href="http://source.android.com/devices/automotive.html">vehicle HAL</a> to send and receive messages over vehicle networks such as CAN bus. Android Automotive device implementations MUST implement security features below the Android framework layers to prevent malicious or unintentional interaction between the Android framework or third-party apps and vehicle subsystems. These security features are as follows: 6917 </p> 6918 <ul> 6919 <li>Gatekeeping messages from Android framework vehicle subsystems, e.g., whitelisting permitted message types and message sources. 6920 </li> 6921 <li>Watchdog against denial of service attacks from the Android framework or third-party apps. This guards against malicious software flooding the vehicle network with traffic, which may lead to malfunctioning vehicle subsystems. 6922 </li> 6923 </ul> 6924 <h1 id="10_software_compatibility_testing"> 6925 10. Software Compatibility Testing 6926 </h1> 6927 <p> 6928 Device implementations MUST pass all tests described in this section. 6929 </p> 6930 <p> 6931 However, note that no software test package is fully comprehensive. For this reason, device implementers are <strong>STRONGLY RECOMMENDED</strong> to make the minimum number of changes as possible to the reference and preferred implementation of Android available from the Android Open Source Project. This will minimize the risk of introducing bugs that create incompatibilities requiring rework and potential device updates. 6932 </p> 6933 <h2 id="10_1_compatibility_test_suite"> 6934 10.1. Compatibility Test Suite 6935 </h2> 6936 <p> 6937 Device implementations MUST pass the <a href="http://source.android.com/compatibility/index.html">Android Compatibility Test Suite (CTS)</a> available from the Android Open Source Project, using the final shipping software on the device. Additionally, device implementers SHOULD use the reference implementation in the Android Open Source tree as much as possible, and MUST ensure compatibility in cases of ambiguity in CTS and for any reimplementations of parts of the reference source code. 6938 </p> 6939 <p> 6940 The CTS is designed to be run on an actual device. Like any software, the CTS may itself contain bugs. The CTS will be versioned independently of this Compatibility Definition, and multiple revisions of the CTS may be released for Android 7.1. Device implementations MUST pass the latest CTS version available at the time the device software is completed. 6941 </p> 6942 <h2 id="10_2_cts_verifier"> 6943 10.2. CTS Verifier 6944 </h2> 6945 <p> 6946 Device implementations MUST correctly execute all applicable cases in the CTS Verifier. The CTS Verifier is included with the Compatibility Test Suite, and is intended to be run by a human operator to test functionality that cannot be tested by an automated system, such as correct functioning of a camera and sensors. 6947 </p> 6948 <p> 6949 The CTS Verifier has tests for many kinds of hardware, including some hardware that is optional. Device implementations MUST pass all tests for hardware that they possess; for instance, if a device possesses an accelerometer, it MUST correctly execute the Accelerometer test case in the CTS Verifier. Test cases for features noted as optional by this Compatibility Definition Document MAY be skipped or omitted. 6950 </p> 6951 <p> 6952 Every device and every build MUST correctly run the CTS Verifier, as noted above. However, since many builds are very similar, device implementers are not expected to explicitly run the CTS Verifier on builds that differ only in trivial ways. Specifically, device implementations that differ from an implementation that has passed the CTS Verifier only by the set of included locales, branding, etc. MAY omit the CTS Verifier test. 6953 </p> 6954 <h1 id="11_updatable_software"> 6955 11. Updatable Software 6956 </h1> 6957 <p> 6958 Device implementations MUST include a mechanism to replace the entirety of the system software. The mechanism need not perform live upgradesthat is, a device restart MAY be required. 6959 </p> 6960 <p> 6961 Any method can be used, provided that it can replace the entirety of the software preinstalled on the device. For instance, any of the following approaches will satisfy this requirement: 6962 </p> 6963 <ul> 6964 <li>Over-the-air (OTA) downloads with offline update via reboot. 6965 </li> 6966 <li>Tethered updates over USB from a host PC. 6967 </li> 6968 <li>Offline updates via a reboot and update from a file on removable storage. 6969 </li> 6970 </ul> 6971 <p> 6972 However, if the device implementation includes support for an unmetered data connection such as 802.11 or Bluetooth PAN (Personal Area Network) profile, it MUST support OTA downloads with offline update via reboot. 6973 </p> 6974 <p> 6975 The update mechanism used MUST support updates without wiping user data. That is, the update mechanism MUST preserve application private data and application shared data. Note that the upstream Android software includes an update mechanism that satisfies this requirement. 6976 </p> 6977 <p> 6978 For device implementations that are launching with Android 6.0 and later, the update mechanism SHOULD support verifying that the system image is binary identical to expected result following an OTA. The block-based OTA implementation in the upstream Android Open Source Project, added since Android 5.1, satisfies this requirement. 6979 </p> 6980 <p> 6981 Also, device implementations SHOULD support <a href="https://source.android.com/devices/tech/ota/ab_updates.html">A/B system updates</a> . The AOSP implements this feature using the boot control HAL. 6982 </p> 6983 <p> 6984 If an error is found in a device implementation after it has been released but within its reasonable product lifetime that is determined in consultation with the Android Compatibility Team to affect the compatibility of third-party applications, the device implementer MUST correct the error via a software update available that can be applied per the mechanism just described. 6985 </p> 6986 <p> 6987 Android includes features that allow the Device Owner app (if present) to control the installation of system updates. To facilitate this, the system update subsystem for devices that report android.software.device_admin MUST implement the behavior described in the <a href="http://developer.android.com/reference/android/app/admin/SystemUpdatePolicy.html">SystemUpdatePolicy</a> class. 6988 </p> 6989 <h1 id="12_document_changelog"> 6990 12. Document Changelog 6991 </h1> 6992 <p> 6993 For a summary of changes to the Compatibility Definition in this release: 6994 </p> 6995 <ul> 6996 <li> 6997 <a href="https://android.googlesource.com/platform/compatibility/cdd/+log/nougat-mr1-dev/?pretty=full&no-merges">Document changelog</a> 6998 </li> 6999 </ul> 7000 <p> 7001 For a summary of changes to individuals sections: 7002 </p> 7003 <ol> 7004 <li> 7005 <a href="https://android.googlesource.com/platform/compatibility/cdd/+log/nougat-mr1-dev/1_introduction?pretty=full&no-merges">Introduction</a> 7006 </li> 7007 <li> 7008 <a href="https://android.googlesource.com/platform/compatibility/cdd/+log/nougat-mr1-dev/2_device_types?pretty=full&no-merges">Device Types</a> 7009 </li> 7010 <li> 7011 <a href="https://android.googlesource.com/platform/compatibility/cdd/+log/nougat-mr1-dev/3_software?pretty=full&no-merges">Software</a> 7012 </li> 7013 <li> 7014 <a href="https://android.googlesource.com/platform/compatibility/cdd/+log/nougat-mr1-dev/4_application-packaging?pretty=full&no-merges">Application Packaging</a> 7015 </li> 7016 <li> 7017 <a href="https://android.googlesource.com/platform/compatibility/cdd/+log/nougat-mr1-dev/5_multimedia?pretty=full&no-merges">Multimedia</a> 7018 </li> 7019 <li> 7020 <a href="https://android.googlesource.com/platform/compatibility/cdd/+log/nougat-mr1-dev/6_dev-tools-and-options?pretty=full&no-merges">Developer Tools and Options</a> 7021 </li> 7022 <li> 7023 <a href="https://android.googlesource.com/platform/compatibility/cdd/+log/nougat-mr1-dev/7_hardware-compatibility?pretty=full&no-merges">Hardware Compatibility</a> 7024 </li> 7025 <li> 7026 <a href="https://android.googlesource.com/platform/compatibility/cdd/+log/nougat-mr1-dev/8_performance-and-power?pretty=full&no-merges">Performance and Power</a> 7027 </li> 7028 <li> 7029 <a href="https://android.googlesource.com/platform/compatibility/cdd/+log/nougat-mr1-dev/9_security-model?pretty=full&no-merges">Security Model</a> 7030 </li> 7031 <li> 7032 <a href="https://android.googlesource.com/platform/compatibility/cdd/+log/nougat-mr1-dev/10_software-compatibility-testing?pretty=full&no-merges">Software Compatibility Testing</a> 7033 </li> 7034 <li> 7035 <a href="https://android.googlesource.com/platform/compatibility/cdd/+log/nougat-mr1-dev/11_updatable-software?pretty=full&no-merges">Updatable Software</a> 7036 </li> 7037 <li> 7038 <a href="https://android.googlesource.com/platform/compatibility/cdd/+log/nougat-mr1-dev/12_document-changelog?pretty=full&no-merges">Document Changelog</a> 7039 </li> 7040 <li> 7041 <a href="https://android.googlesource.com/platform/compatibility/cdd/+log/nougat-mr1-dev/13_contact-us?pretty=full&no-merges">Contact Us</a> 7042 </li> 7043 </ol> 7044 <h2 id="12_1_changelog_viewing_tips"> 7045 12.1. Changelog Viewing Tips 7046 </h2> 7047 <p> 7048 Changes are marked as follows: 7049 </p> 7050 <ul> 7051 <li> 7052 <p> 7053 <strong>CDD</strong><br /> 7054 Substantive changes to the compatibility requirements. 7055 </p> 7056 </li> 7057 <li> 7058 <p> 7059 <strong>Docs</strong><br /> 7060 Cosmetic or build related changes. 7061 </p> 7062 </li> 7063 </ul> 7064 <p> 7065 For best viewing, append the <code>pretty=full</code> and <code>no-merges</code> URL parameters to your changelog URLs. 7066 </p> 7067 <h1 id="13_contact_us"> 7068 13. Contact Us 7069 </h1> 7070 <p> 7071 You can join the <a href="https://groups.google.com/forum/#!forum/android-compatibility">android-compatibility forum</a> and ask for clarifications or bring up any issues that you think the document does not cover. 7072 </p> 7073 </div> 7074 </body> 7075 </html> 7076