1 page.title=Android 7.1 Compatibility Definition 2 fullpage=true 3 @jd:body 4 5 <!-- 6 Copyright 2017 The Android Open Source Project 7 8 Licensed under the Apache License, Version 2.0 (the "License"); 9 you may not use this file except in compliance with the License. 10 You may obtain a copy of the License at 11 12 http://www.apache.org/licenses/LICENSE-2.0 13 14 Unless required by applicable law or agreed to in writing, software 15 distributed under the License is distributed on an "AS IS" BASIS, 16 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 See the License for the specific language governing permissions and 18 limitations under the License. 19 --> 20 <div id="qv-wrapper"> 21 <div id="qv"> 22 <h2>In this document</h2> 23 <ol id="auto-toc"> 24 </ol> 25 </div> 26 </div> 27 <h1>Android 7.1 Compatibility Definition Document</h1> 28 <h2 id="1_introduction"> 29 1. Introduction 30 </h2> 31 <p> 32 This document enumerates the requirements that must be met in order for devices to be compatible with Android 7.1. 33 </p> 34 <p> 35 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> . 36 </p> 37 <p> 38 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. 39 </p> 40 <p> 41 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. 42 </p> 43 <p> 44 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. 45 </p> 46 <p> 47 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. 48 </p> 49 <p> 50 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. 51 </p> 52 <h2 id="2_device_types"> 53 2. Device Types 54 </h2> 55 <p> 56 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. 57 </p> 58 <p> 59 <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: 60 </p> 61 <ul> 62 <li>MUST have a touchscreen embedded in the device. 63 </li> 64 <li>MUST have a power source that provides mobility, such as a battery. 65 </li> 66 </ul> 67 <p> 68 <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: 69 </p> 70 <ul> 71 <li>MUST have an embedded screen OR include a video output port, such as VGA, HDMI, or a wireless port for display. 72 </li> 73 <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. 74 </li> 75 </ul> 76 <p> 77 <strong>Android Watch device</strong> refers to an Android device implementation intended to be worn on the body, perhaps on the wrist, and: 78 </p> 79 <ul> 80 <li>MUST have a screen with the physical diagonal length in the range from 1.1 to 2.5 inches. 81 </li> 82 <li>MUST declare the feature android.hardware.type.watch. 83 </li> 84 <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> . 85 </li> 86 </ul> 87 <p> 88 <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: 89 </p> 90 <ul> 91 <li>MUST have a screen with the physical diagonal length equal to or greater than 6 inches. 92 </li> 93 <li>MUST declare the feature android.hardware.type.automotive. 94 </li> 95 <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> . 96 </li> 97 <li>Android Automotive implementations MUST support all public APIs in the <code>android.car.*</code> namespace. 98 </li> 99 </ul> 100 <p> 101 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. 102 </p> 103 <h3 id="2_1_device_configurations"> 104 2.1 Device Configurations 105 </h3> 106 <p> 107 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. 108 </p> 109 <table> 110 <tr> 111 <th> 112 Category 113 </th> 114 <th> 115 Feature 116 </th> 117 <th> 118 Section 119 </th> 120 <th> 121 Handheld 122 </th> 123 <th> 124 Television 125 </th> 126 <th> 127 Watch 128 </th> 129 <th> 130 Automotive 131 </th> 132 <th> 133 Other 134 </th> 135 </tr> 136 <tr> 137 <td rowspan="3"> 138 Input 139 </td> 140 <td> 141 D-pad 142 </td> 143 <td> 144 <a href="#7_2_2_non-touch-navigation">7.2.2. Non-touch Navigation</a> 145 </td> 146 <td></td> 147 <td> 148 MUST 149 </td> 150 <td></td> 151 <td></td> 152 <td></td> 153 </tr> 154 <tr> 155 <td> 156 Touchscreen 157 </td> 158 <td> 159 <a href="#7_2_4_touchscreen_input">7.2.4. Touchscreen input</a> 160 </td> 161 <td> 162 MUST 163 </td> 164 <td></td> 165 <td> 166 MUST 167 </td> 168 <td></td> 169 <td> 170 SHOULD 171 </td> 172 </tr> 173 <tr> 174 <td> 175 Microphone 176 </td> 177 <td> 178 <a href="#7_8_1_microphone">7.8.1. Microphone</a> 179 </td> 180 <td> 181 MUST 182 </td> 183 <td> 184 SHOULD 185 </td> 186 <td> 187 MUST 188 </td> 189 <td> 190 MUST 191 </td> 192 <td> 193 SHOULD 194 </td> 195 </tr> 196 <tr> 197 <td rowspan="2"> 198 Sensors 199 </td> 200 <td> 201 Accelerometer 202 </td> 203 <td> 204 <a href="#7_3_1_accelerometer">7.3.1 Accelerometer</a> 205 </td> 206 <td> 207 SHOULD 208 </td> 209 <td></td> 210 <td> 211 SHOULD 212 </td> 213 <td></td> 214 <td> 215 SHOULD 216 </td> 217 </tr> 218 <tr> 219 <td> 220 GPS 221 </td> 222 <td> 223 <a href="#7_3_3_gps">7.3.3. GPS</a> 224 </td> 225 <td> 226 SHOULD 227 </td> 228 <td></td> 229 <td></td> 230 <td> 231 SHOULD 232 </td> 233 <td></td> 234 </tr> 235 <tr> 236 <td rowspan="6"> 237 Connectivity 238 </td> 239 <td> 240 Wi-Fi 241 </td> 242 <td> 243 <a href="#7_4_2_ieee_802.11">7.4.2. IEEE 802.11</a> 244 </td> 245 <td> 246 SHOULD 247 </td> 248 <td> 249 SHOULD 250 </td> 251 <td></td> 252 <td> 253 SHOULD 254 </td> 255 <td> 256 SHOULD 257 </td> 258 </tr> 259 <tr> 260 <td> 261 Wi-Fi Direct 262 </td> 263 <td> 264 <a href="#7_4_2_1_wi-fi-direct">7.4.2.1. Wi-Fi Direct</a> 265 </td> 266 <td> 267 SHOULD 268 </td> 269 <td> 270 SHOULD 271 </td> 272 <td></td> 273 <td></td> 274 <td> 275 SHOULD 276 </td> 277 </tr> 278 <tr> 279 <td> 280 Bluetooth 281 </td> 282 <td> 283 <a href="#7_4_3_bluetooth">7.4.3. Bluetooth</a> 284 </td> 285 <td> 286 SHOULD 287 </td> 288 <td> 289 MUST 290 </td> 291 <td> 292 MUST 293 </td> 294 <td> 295 MUST 296 </td> 297 <td> 298 SHOULD 299 </td> 300 </tr> 301 <tr> 302 <td> 303 Bluetooth Low Energy 304 </td> 305 <td> 306 <a href="#7_4_3_bluetooth">7.4.3. Bluetooth</a> 307 </td> 308 <td> 309 SHOULD 310 </td> 311 <td> 312 MUST 313 </td> 314 <td> 315 SHOULD 316 </td> 317 <td> 318 SHOULD 319 </td> 320 <td> 321 SHOULD 322 </td> 323 </tr> 324 <tr> 325 <td> 326 Cellular radio 327 </td> 328 <td> 329 <a href="#7_4_5_minimum_network_capability">7.4.5. Minimum Network Capability</a> 330 </td> 331 <td></td> 332 <td></td> 333 <td></td> 334 <td> 335 SHOULD 336 </td> 337 <td></td> 338 </tr> 339 <tr> 340 <td> 341 USB peripheral/host mode 342 </td> 343 <td> 344 <a href="#7_7_usb">7.7. USB</a> 345 </td> 346 <td> 347 SHOULD 348 </td> 349 <td></td> 350 <td></td> 351 <td> 352 SHOULD 353 </td> 354 <td> 355 SHOULD 356 </td> 357 </tr> 358 <tr> 359 <td> 360 Output 361 </td> 362 <td> 363 Speaker and/or Audio output ports 364 </td> 365 <td> 366 <a href="#7_8_2_audio_output">7.8.2. Audio Output</a> 367 </td> 368 <td> 369 MUST 370 </td> 371 <td> 372 MUST 373 </td> 374 <td></td> 375 <td> 376 MUST 377 </td> 378 <td> 379 MUST 380 </td> 381 </tr> 382 </table> 383 <h2 id="3_software"> 384 3. Software 385 </h2> 386 <h3 id="3_1_managed_api_compatibility"> 387 3.1. Managed API Compatibility 388 </h3> 389 <p> 390 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. 391 </p> 392 <p> 393 Device implementations MUST support/preserve all classes, methods, and associated elements marked by the TestApi annotation (@TestApi). 394 </p> 395 <p> 396 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. 397 </p> 398 <p> 399 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. 400 </p> 401 <h3 id="3_1_1_android_extensions"> 402 3.1.1. Android Extensions 403 </h3> 404 <p> 405 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. 406 </p> 407 <h3 id="3_2_soft_api_compatibility"> 408 3.2. Soft API Compatibility 409 </h3> 410 <p> 411 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. 412 </p> 413 <h4 id="3_2_1_permissions"> 414 3.2.1. Permissions 415 </h4> 416 <p> 417 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. 418 </p> 419 <h4 id="3_2_2_build_parameters"> 420 3.2.2. Build Parameters 421 </h4> 422 <p> 423 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. 424 </p> 425 <table> 426 <tr> 427 <th> 428 Parameter 429 </th> 430 <th> 431 Details 432 </th> 433 </tr> 434 <tr> 435 <td> 436 VERSION.RELEASE 437 </td> 438 <td> 439 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> . 440 </td> 441 </tr> 442 <tr> 443 <td> 444 VERSION.SDK 445 </td> 446 <td> 447 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. 448 </td> 449 </tr> 450 <tr> 451 <td> 452 VERSION.SDK_INT 453 </td> 454 <td> 455 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. 456 </td> 457 </tr> 458 <tr> 459 <td> 460 VERSION.INCREMENTAL 461 </td> 462 <td> 463 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 (""). 464 </td> 465 </tr> 466 <tr> 467 <td> 468 BOARD 469 </td> 470 <td> 471 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_-]+$. 472 </td> 473 </tr> 474 <tr> 475 <td> 476 BRAND 477 </td> 478 <td> 479 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_-]+$. 480 </td> 481 </tr> 482 <tr> 483 <td> 484 SUPPORTED_ABIS 485 </td> 486 <td> 487 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> . 488 </td> 489 </tr> 490 <tr> 491 <td> 492 SUPPORTED_32_BIT_ABIS 493 </td> 494 <td> 495 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> . 496 </td> 497 </tr> 498 <tr> 499 <td> 500 SUPPORTED_64_BIT_ABIS 501 </td> 502 <td> 503 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> . 504 </td> 505 </tr> 506 <tr> 507 <td> 508 CPU_ABI 509 </td> 510 <td> 511 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> . 512 </td> 513 </tr> 514 <tr> 515 <td> 516 CPU_ABI2 517 </td> 518 <td> 519 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> . 520 </td> 521 </tr> 522 <tr> 523 <td> 524 DEVICE 525 </td> 526 <td> 527 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. 528 </td> 529 </tr> 530 <tr> 531 <td> 532 FINGERPRINT 533 </td> 534 <td> 535 A string that uniquely identifies this build. It SHOULD be reasonably human-readable. It MUST follow this template: 536 <p class="small"> 537 $(BRAND)/$(PRODUCT)/<br /> 538 $(DEVICE):$(VERSION.RELEASE)/$(ID)/$(VERSION.INCREMENTAL):$(TYPE)/$(TAGS) 539 </p> 540 <p> 541 For example: 542 </p> 543 <p class="small"> 544 acme/myproduct/<br /> 545 mydevice:7.1/LMYXX/3359:userdebug/test-keys 546 </p> 547 <p> 548 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. 549 </p> 550 </td> 551 </tr> 552 <tr> 553 <td> 554 HARDWARE 555 </td> 556 <td> 557 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_-]+$. 558 </td> 559 </tr> 560 <tr> 561 <td> 562 HOST 563 </td> 564 <td> 565 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 (""). 566 </td> 567 </tr> 568 <tr> 569 <td> 570 ID 571 </td> 572 <td> 573 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._-]+$. 574 </td> 575 </tr> 576 <tr> 577 <td> 578 MANUFACTURER 579 </td> 580 <td> 581 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 (""). 582 </td> 583 </tr> 584 <tr> 585 <td> 586 MODEL 587 </td> 588 <td> 589 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 (""). 590 </td> 591 </tr> 592 <tr> 593 <td> 594 PRODUCT 595 </td> 596 <td> 597 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. 598 </td> 599 </tr> 600 <tr> 601 <td> 602 SERIAL 603 </td> 604 <td> 605 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})$. 606 </td> 607 </tr> 608 <tr> 609 <td> 610 TAGS 611 </td> 612 <td> 613 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. 614 </td> 615 </tr> 616 <tr> 617 <td> 618 TIME 619 </td> 620 <td> 621 A value representing the timestamp of when the build occurred. 622 </td> 623 </tr> 624 <tr> 625 <td> 626 TYPE 627 </td> 628 <td> 629 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. 630 </td> 631 </tr> 632 <tr> 633 <td> 634 USER 635 </td> 636 <td> 637 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 (""). 638 </td> 639 </tr> 640 <tr> 641 <td> 642 SECURITY_PATCH 643 </td> 644 <td> 645 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". 646 </td> 647 </tr> 648 <tr> 649 <td> 650 BASE_OS 651 </td> 652 <td> 653 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 (""). 654 </td> 655 </tr> 656 </table> 657 <h4 id="3_2_3_intent_compatibility"> 658 3.2.3. Intent Compatibility 659 </h4> 660 <h5 id="3_2_3_1_core_application_intents"> 661 3.2.3.1. Core Application Intents 662 </h5> 663 <p> 664 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: 665 </p> 666 <ul> 667 <li>Desk Clock 668 </li> 669 <li>Browser 670 </li> 671 <li>Calendar 672 </li> 673 <li>Contacts 674 </li> 675 <li>Gallery 676 </li> 677 <li>GlobalSearch 678 </li> 679 <li>Launcher 680 </li> 681 <li>Music 682 </li> 683 <li>Settings 684 </li> 685 </ul> 686 <p> 687 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. 688 </p> 689 <h5 id="3_2_3_2_intent_resolution"> 690 3.2.3.2. Intent Resolution 691 </h5> 692 <p> 693 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. 694 </p> 695 <p> 696 Device implementations MUST provide a user interface for users to modify the default activity for intents. 697 </p> 698 <p> 699 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://. 700 </p> 701 <p> 702 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: 703 </p> 704 <ul> 705 <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. 706 </li> 707 <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. 708 </li> 709 <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. 710 </li> 711 <li>MUST provide the user with per-app App Links controls in Settings as follows: 712 <ul> 713 <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. 714 </li> 715 <li>The user MUST be able to see a list of the candidate URI intent filters. 716 </li> 717 <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. 718 </li> 719 <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. 720 </li> 721 </ul> 722 </li> 723 </ul> 724 <h5 id="3_2_3_3_intent_namespaces"> 725 3.2.3.3. Intent Namespaces 726 </h5> 727 <p> 728 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> . 729 </p> 730 <h5 id="3_2_3_4_broadcast_intents"> 731 3.2.3.4. Broadcast Intents 732 </h5> 733 <p> 734 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. 735 </p> 736 <h5 id="3_2_3_5_default_app_settings"> 737 3.2.3.5. Default App Settings 738 </h5> 739 <p> 740 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. 741 </p> 742 <p> 743 Device implementations: 744 </p> 745 <ul> 746 <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. 747 </li> 748 <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. 749 </li> 750 <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. 751 </li> 752 <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> . 753 </li> 754 <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. 755 </li> 756 </ul> 757 <h3 id="3_3_native_api_compatibility"> 758 3.3. Native API Compatibility 759 </h3> 760 <p> 761 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. 762 </p> 763 <h4 id="3_3_1_application_binary_interfaces"> 764 3.3.1. Application Binary Interfaces 765 </h4> 766 <p> 767 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. 768 </p> 769 <p> 770 If a device implementation includes support for an Android ABI, it: 771 </p> 772 <ul> 773 <li>MUST include support for code running in the managed environment to call into native code, using the standard Java Native Interface (JNI) semantics. 774 </li> 775 <li>MUST be source-compatible (i.e. header compatible) and binary-compatible (for the ABI) with each required library in the list below. 776 </li> 777 <li>MUST support the equivalent 32-bit ABI if any 64-bit ABI is supported. 778 </li> 779 <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. 780 </li> 781 <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. 782 </li> 783 <li>SHOULD be built using the source code and header files available in the upstream Android Open Source Project 784 </li> 785 </ul> 786 <p> 787 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. 788 </p> 789 <p> 790 The following native code APIs MUST be available to apps that include native code: 791 </p> 792 <ul> 793 <li>libandroid.so (native Android activity support) 794 </li> 795 <li>libc (C library) 796 </li> 797 <li>libcamera2ndk.so 798 </li> 799 <li>libdl (dynamic linker) 800 </li> 801 <li>libEGL.so (native OpenGL surface management) 802 </li> 803 <li>libGLESv1_CM.so (OpenGL ES 1.x) 804 </li> 805 <li>libGLESv2.so (OpenGL ES 2.0) 806 </li> 807 <li>libGLESv3.so (OpenGL ES 3.x) 808 </li> 809 <li>libicui18n.so 810 </li> 811 <li>libicuuc.so 812 </li> 813 <li>libjnigraphics.so 814 </li> 815 <li>liblog (Android logging) 816 </li> 817 <li>libmediandk.so (native media APIs support) 818 </li> 819 <li>libm (math library) 820 </li> 821 <li>libOpenMAXAL.so (OpenMAX AL 1.0.1 support) 822 </li> 823 <li>libOpenSLES.so (OpenSL ES 1.0.1 audio support) 824 </li> 825 <li>libRS.so 826 </li> 827 <li>libstdc++ (Minimal support for C++) 828 </li> 829 <li>libvulkan.so (Vulkan) 830 </li> 831 <li>libz (Zlib compression) 832 </li> 833 <li>JNI interface 834 </li> 835 <li>Support for OpenGL, as described below 836 </li> 837 </ul> 838 <p> 839 For the native libraries listed above, the device implementation MUST NOT add or remove the public functions. 840 </p> 841 <p> 842 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. 843 </p> 844 <p> 845 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> . 846 </p> 847 <p> 848 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. 849 </p> 850 <h5 id="3_3_1_1_graphic_libraries"> 851 3.3.1.1. Graphic Libraries 852 </h5> 853 <p> 854 <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: 855 </p> 856 <ul> 857 <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. 858 </li> 859 </ul> 860 <p> 861 Device implementations, if including support of the Vulkan APIs: 862 </p> 863 <ul> 864 <li>MUST report, one or more <code>VkPhysicalDevices</code> through the <code>vkEnumeratePhysicalDevices</code> call. 865 </li> 866 <li>Each enumerated <code>VkPhysicalDevices</code> MUST fully implement the Vulkan 1.0 API. 867 </li> 868 <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. 869 </li> 870 <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> 871 </li> 872 <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. 873 </li> 874 </ul> 875 <p> 876 Device implementations, if not including support of the Vulkan APIs: 877 </p> 878 <ul> 879 <li>MUST report 0 <code>VkPhysicalDevices</code> through the <code>vkEnumeratePhysicalDevices</code> call. 880 </li> 881 <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> . 882 </li> 883 </ul> 884 <h4 id="3_3_2_32-bit_arm_native_code_compatibility"> 885 3.3.2. 32-bit ARM Native Code Compatibility 886 </h4> 887 <p> 888 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: 889 </p> 890 <ul> 891 <li>SWP and SWPB instructions 892 </li> 893 <li>SETEND instruction 894 </li> 895 <li>CP15ISB, CP15DSB, and CP15DMB barrier operations 896 </li> 897 </ul> 898 <p> 899 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: 900 </p> 901 <ul> 902 <li>"Features: ", followed by a list of any optional ARMv7 CPU features supported by the device. 903 </li> 904 <li>"CPU architecture: ", followed by an integer describing the device's highest supported ARM architecture (e.g., "8" for ARMv8 devices). 905 </li> 906 </ul> 907 <p> 908 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. 909 </p> 910 <h3 id="3_4_web_compatibility"> 911 3.4. Web Compatibility 912 </h3> 913 <h4 id="3_4_1_webview_compatibility"> 914 3.4.1. WebView Compatibility 915 </h4> 916 <div class="note"> 917 Android Watch devices MAY, but all other device implementations MUST provide a complete implementation of the android.webkit.Webview API. 918 </div> 919 <p> 920 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: 921 </p> 922 <ul> 923 <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. 924 </li> 925 <li> 926 <p> 927 The user agent string reported by the WebView MUST be in this format: 928 </p> 929 <p> 930 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 931 </p> 932 <ul> 933 <li>The value of the $(VERSION) string MUST be the same as the value for android.os.Build.VERSION.RELEASE. 934 </li> 935 <li>The value of the $(MODEL) string MUST be the same as the value for android.os.Build.MODEL. 936 </li> 937 <li>The value of the $(BUILD) string MUST be the same as the value for android.os.Build.ID. 938 </li> 939 <li>The value of the $(CHROMIUM_VER) string MUST be the version of Chromium in the upstream Android Open Source Project. 940 </li> 941 <li>Device implementations MAY omit Mobile in the user agent string. 942 </li> 943 </ul> 944 </li> 945 </ul> 946 <p> 947 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> . 948 </p> 949 <h4 id="3_4_2_browser_compatibility"> 950 3.4.2. Browser Compatibility 951 </h4> 952 <div class="note"> 953 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. 954 </div> 955 <p> 956 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> . 957 </p> 958 <p> 959 Implementations MAY ship a custom user agent string in the standalone Browser application. 960 </p> 961 <p> 962 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: 963 </p> 964 <ul> 965 <li> 966 <a href="http://www.w3.org/html/wg/drafts/html/master/browsers.html#offline">application cache/offline operation</a> 967 </li> 968 <li> 969 <a href="http://www.w3.org/html/wg/drafts/html/master/semantics.html#video"><video> tag</a> 970 </li> 971 <li> 972 <a href="http://www.w3.org/TR/geolocation-API/">geolocation</a> 973 </li> 974 </ul> 975 <p> 976 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. 977 </p> 978 <h3 id="3_5_api_behavioral_compatibility"> 979 3.5. API Behavioral Compatibility 980 </h3> 981 <p> 982 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: 983 </p> 984 <ul> 985 <li>Devices MUST NOT change the behavior or semantics of a standard intent. 986 </li> 987 <li>Devices MUST NOT alter the lifecycle or lifecycle semantics of a particular type of system component (such as Service, Activity, ContentProvider, etc.). 988 </li> 989 <li>Devices MUST NOT change the semantics of a standard permission. 990 </li> 991 </ul> 992 <p> 993 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. 994 </p> 995 <h3 id="3_6_api_namespaces"> 996 3.6. API Namespaces 997 </h3> 998 <p> 999 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: 1000 </p> 1001 <ul> 1002 <li>java.* 1003 </li> 1004 <li>javax.* 1005 </li> 1006 <li>sun.* 1007 </li> 1008 <li>android.* 1009 </li> 1010 <li>com.android.* 1011 </li> 1012 </ul> 1013 <p> 1014 <strong>Prohibited modifications include</strong> : 1015 </p> 1016 <ul> 1017 <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. 1018 </li> 1019 <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. 1020 </li> 1021 <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. 1022 </li> 1023 </ul> 1024 <p> 1025 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. 1026 </p> 1027 <p> 1028 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. 1029 </p> 1030 <p> 1031 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. 1032 </p> 1033 <p> 1034 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. 1035 </p> 1036 <h3 id="3_7_runtime_compatibility"> 1037 3.7. Runtime Compatibility 1038 </h3> 1039 <p> 1040 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. 1041 </p> 1042 <p> 1043 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. 1044 </p> 1045 <table> 1046 <tr> 1047 <th> 1048 Screen Layout 1049 </th> 1050 <th> 1051 Screen Density 1052 </th> 1053 <th> 1054 Minimum Application Memory 1055 </th> 1056 </tr> 1057 <tr> 1058 <td rowspan="12"> 1059 Android Watch 1060 </td> 1061 <td> 1062 120 dpi (ldpi) 1063 </td> 1064 <td rowspan="3"> 1065 32MB 1066 </td> 1067 </tr> 1068 <tr> 1069 <td> 1070 160 dpi (mdpi) 1071 </td> 1072 </tr> 1073 <tr> 1074 <td> 1075 213 dpi (tvdpi) 1076 </td> 1077 </tr> 1078 <tr> 1079 <td> 1080 240 dpi (hdpi) 1081 </td> 1082 <td rowspan="2"> 1083 36MB 1084 </td> 1085 </tr> 1086 <tr> 1087 <td> 1088 280 dpi (280dpi) 1089 </td> 1090 </tr> 1091 <tr> 1092 <td> 1093 320 dpi (xhdpi) 1094 </td> 1095 <td rowspan="2"> 1096 48MB 1097 </td> 1098 </tr> 1099 <tr> 1100 <td> 1101 360 dpi (360dpi) 1102 </td> 1103 </tr> 1104 <tr> 1105 <td> 1106 400 dpi (400dpi) 1107 </td> 1108 <td> 1109 56MB 1110 </td> 1111 </tr> 1112 <tr> 1113 <td> 1114 420 dpi (420dpi) 1115 </td> 1116 <td> 1117 64MB 1118 </td> 1119 </tr> 1120 <tr> 1121 <td> 1122 480 dpi (xxhdpi) 1123 </td> 1124 <td> 1125 88MB 1126 </td> 1127 </tr> 1128 <tr> 1129 <td> 1130 560 dpi (560dpi) 1131 </td> 1132 <td> 1133 112MB 1134 </td> 1135 </tr> 1136 <tr> 1137 <td> 1138 640 dpi (xxxhdpi) 1139 </td> 1140 <td> 1141 154MB 1142 </td> 1143 </tr> 1144 <tr> 1145 <td rowspan="12"> 1146 small/normal 1147 </td> 1148 <td> 1149 120 dpi (ldpi) 1150 </td> 1151 <td rowspan="2"> 1152 32MB 1153 </td> 1154 </tr> 1155 <tr> 1156 <td> 1157 160 dpi (mdpi) 1158 </td> 1159 </tr> 1160 <tr> 1161 <td> 1162 213 dpi (tvdpi) 1163 </td> 1164 <td rowspan="3"> 1165 48MB 1166 </td> 1167 </tr> 1168 <tr> 1169 <td> 1170 240 dpi (hdpi) 1171 </td> 1172 </tr> 1173 <tr> 1174 <td> 1175 280 dpi (280dpi) 1176 </td> 1177 </tr> 1178 <tr> 1179 <td> 1180 320 dpi (xhdpi) 1181 </td> 1182 <td rowspan="2"> 1183 80MB 1184 </td> 1185 </tr> 1186 <tr> 1187 <td> 1188 360 dpi (360dpi) 1189 </td> 1190 </tr> 1191 <tr> 1192 <td> 1193 400 dpi (400dpi) 1194 </td> 1195 <td> 1196 96MB 1197 </td> 1198 </tr> 1199 <tr> 1200 <td> 1201 420 dpi (420dpi) 1202 </td> 1203 <td> 1204 112MB 1205 </td> 1206 </tr> 1207 <tr> 1208 <td> 1209 480 dpi (xxhdpi) 1210 </td> 1211 <td> 1212 128MB 1213 </td> 1214 </tr> 1215 <tr> 1216 <td> 1217 560 dpi (560dpi) 1218 </td> 1219 <td> 1220 192MB 1221 </td> 1222 </tr> 1223 <tr> 1224 <td> 1225 640 dpi (xxxhdpi) 1226 </td> 1227 <td> 1228 256MB 1229 </td> 1230 </tr> 1231 <tr> 1232 <td rowspan="12"> 1233 large 1234 </td> 1235 <td> 1236 120 dpi (ldpi) 1237 </td> 1238 <td> 1239 32MB 1240 </td> 1241 </tr> 1242 <tr> 1243 <td> 1244 160 dpi (mdpi) 1245 </td> 1246 <td> 1247 48MB 1248 </td> 1249 </tr> 1250 <tr> 1251 <td> 1252 213 dpi (tvdpi) 1253 </td> 1254 <td rowspan="2"> 1255 80MB 1256 </td> 1257 </tr> 1258 <tr> 1259 <td> 1260 240 dpi (hdpi) 1261 </td> 1262 </tr> 1263 <tr> 1264 <td> 1265 280 dpi (280dpi) 1266 </td> 1267 <td> 1268 96MB 1269 </td> 1270 </tr> 1271 <tr> 1272 <td> 1273 320 dpi (xhdpi) 1274 </td> 1275 <td> 1276 128MB 1277 </td> 1278 </tr> 1279 <tr> 1280 <td> 1281 360 dpi (360dpi) 1282 </td> 1283 <td> 1284 160MB 1285 </td> 1286 </tr> 1287 <tr> 1288 <td> 1289 400 dpi (400dpi) 1290 </td> 1291 <td> 1292 192MB 1293 </td> 1294 </tr> 1295 <tr> 1296 <td> 1297 420 dpi (420dpi) 1298 </td> 1299 <td> 1300 228MB 1301 </td> 1302 </tr> 1303 <tr> 1304 <td> 1305 480 dpi (xxhdpi) 1306 </td> 1307 <td> 1308 256MB 1309 </td> 1310 </tr> 1311 <tr> 1312 <td> 1313 560 dpi (560dpi) 1314 </td> 1315 <td> 1316 384MB 1317 </td> 1318 </tr> 1319 <tr> 1320 <td> 1321 640 dpi (xxxhdpi) 1322 </td> 1323 <td> 1324 512MB 1325 </td> 1326 </tr> 1327 <tr> 1328 <td rowspan="12"> 1329 xlarge 1330 </td> 1331 <td> 1332 120 dpi (ldpi) 1333 </td> 1334 <td> 1335 48MB 1336 </td> 1337 </tr> 1338 <tr> 1339 <td> 1340 160 dpi (mdpi) 1341 </td> 1342 <td> 1343 80MB 1344 </td> 1345 </tr> 1346 <tr> 1347 <td> 1348 213 dpi (tvdpi) 1349 </td> 1350 <td rowspan="2"> 1351 96MB 1352 </td> 1353 </tr> 1354 <tr> 1355 <td> 1356 240 dpi (hdpi) 1357 </td> 1358 </tr> 1359 <tr> 1360 <td> 1361 280 dpi (280dpi) 1362 </td> 1363 <td> 1364 144MB 1365 </td> 1366 </tr> 1367 <tr> 1368 <td> 1369 320 dpi (xhdpi) 1370 </td> 1371 <td> 1372 192MB 1373 </td> 1374 </tr> 1375 <tr> 1376 <td> 1377 360 dpi (360dpi) 1378 </td> 1379 <td> 1380 240MB 1381 </td> 1382 </tr> 1383 <tr> 1384 <td> 1385 400 dpi (400dpi) 1386 </td> 1387 <td> 1388 288MB 1389 </td> 1390 </tr> 1391 <tr> 1392 <td> 1393 420 dpi (420dpi) 1394 </td> 1395 <td> 1396 336MB 1397 </td> 1398 </tr> 1399 <tr> 1400 <td> 1401 480 dpi (xxhdpi) 1402 </td> 1403 <td> 1404 384MB 1405 </td> 1406 </tr> 1407 <tr> 1408 <td> 1409 560 dpi (560dpi) 1410 </td> 1411 <td> 1412 576MB 1413 </td> 1414 </tr> 1415 <tr> 1416 <td> 1417 640 dpi (xxxhdpi) 1418 </td> 1419 <td> 1420 768MB 1421 </td> 1422 </tr> 1423 </table> 1424 <h3 id="3_8_user_interface_compatibility"> 1425 3.8. User Interface Compatibility 1426 </h3> 1427 <h4 id="3_8_1_launcher_(home_screen)"> 1428 3.8.1. Launcher (Home Screen) 1429 </h4> 1430 <p> 1431 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. 1432 </p> 1433 <h4 id="3_8_2_widgets"> 1434 3.8.2. Widgets 1435 </h4> 1436 <div class="note"> 1437 Widgets are optional for all Android device implementations, but SHOULD be supported on Android Handheld devices. 1438 </div> 1439 <p> 1440 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. 1441 </p> 1442 <ul> 1443 <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. 1444 </li> 1445 <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. 1446 </li> 1447 <li>Device implementations that include support for lock screen MAY support application widgets on the lock screen. 1448 </li> 1449 <li>SHOULD trigger the fast-switch action between the two most recently used apps, when the recents function key is tapped twice. 1450 </li> 1451 <li>SHOULD trigger the split-screen multiwindow-mode, if supported, when the recents functions key is long pressed. 1452 </li> 1453 </ul> 1454 <h4 id="3_8_3_notifications"> 1455 3.8.3. Notifications 1456 </h4> 1457 <p> 1458 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. 1459 </p> 1460 <p> 1461 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> . 1462 </p> 1463 <p> 1464 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. 1465 </p> 1466 <div class="note"> 1467 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. 1468 </div> 1469 <p> 1470 Android includes support for various notifications, such as: 1471 </p> 1472 <ul> 1473 <li> 1474 <strong>Rich notifications</strong> . Interactive Views for ongoing notifications. 1475 </li> 1476 <li> 1477 <strong>Heads-up notifications</strong> . Interactive Views users can act on or dismiss without leaving the current app. 1478 </li> 1479 <li> 1480 <strong>Lock screen notifications</strong> . Notifications shown over a lock screen with granular control on visibility. 1481 </li> 1482 </ul> 1483 <p> 1484 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> . 1485 </p> 1486 <p> 1487 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. 1488 </p> 1489 <p> 1490 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> . 1491 </p> 1492 <p> 1493 Also, handheld device implementations MUST provide: 1494 </p> 1495 <ul> 1496 <li>The ability to control notifications directly in the notification shade. 1497 </li> 1498 <li>The visual affordance to trigger the control panel in the notification shade. 1499 </li> 1500 <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. 1501 </li> 1502 </ul> 1503 <p> 1504 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> . 1505 </p> 1506 <p> 1507 Device implementations that support the DND (Do not Disturb) feature MUST meet the following requirements: 1508 </p> 1509 <ul> 1510 <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> . 1511 </li> 1512 <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. 1513 </li> 1514 <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. 1515 </li> 1516 </ul> 1517 <h4 id="3_8_4_search"> 1518 3.8.4. Search 1519 </h4> 1520 <p> 1521 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. 1522 </p> 1523 <p> 1524 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. 1525 </p> 1526 <p> 1527 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> . 1528 </p> 1529 <p> 1530 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. 1531 </p> 1532 <p> 1533 This indication MAY be disabled by default for preinstalled apps using the Assist and VoiceInteractionService API, if all following requirements are met: 1534 </p> 1535 <ul> 1536 <li> 1537 <p> 1538 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: 1539 </p> 1540 <ul> 1541 <li>hotword invocation 1542 </li> 1543 <li>input of the ASSIST navigation key/button/gesture 1544 </li> 1545 </ul> 1546 </li> 1547 <li> 1548 <p> 1549 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> . 1550 </p> 1551 </li> 1552 </ul> 1553 <h4 id="3_8_5_toasts"> 1554 3.8.5. Toasts 1555 </h4> 1556 <p> 1557 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. 1558 </p> 1559 <h4 id="3_8_6_themes"> 1560 3.8.6. Themes 1561 </h4> 1562 <p> 1563 Android provides themes as a mechanism for applications to apply styles across an entire Activity or application. 1564 </p> 1565 <p> 1566 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. 1567 </p> 1568 <p> 1569 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. 1570 </p> 1571 <p> 1572 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. 1573 </p> 1574 <p> 1575 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> ). 1576 </p> 1577 <h4 id="3_8_7_live_wallpapers"> 1578 3.8.7. Live Wallpapers 1579 </h4> 1580 <p> 1581 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. 1582 </p> 1583 <p> 1584 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. 1585 </p> 1586 <p> 1587 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. 1588 </p> 1589 <h4 id="3_8_8_activity_switching"> 1590 3.8.8. Activity Switching 1591 </h4> 1592 <div class="note"> 1593 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. 1594 </div> 1595 <p> 1596 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: 1597 </p> 1598 <ul> 1599 <li>MUST support at least up to 20 displayed activities. 1600 </li> 1601 <li>SHOULD display the titles of at least 4 activities at a time. 1602 </li> 1603 <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. 1604 </li> 1605 <li>SHOULD display highlight color, icon, screen title in recents. 1606 </li> 1607 <li>SHOULD display a closing affordance ("x") but MAY delay this until user interacts with screens. 1608 </li> 1609 <li>SHOULD implement a shortcut to switch easily to the previous activity 1610 </li> 1611 <li>MAY display affiliated recents as a group that moves together. 1612 </li> 1613 </ul> 1614 <p> 1615 Device implementations are STRONGLY RECOMMENDED to use the upstream Android user interface (or a similar thumbnail-based interface) for the overview screen. 1616 </p> 1617 <h4 id="3_8_9_input_management"> 1618 3.8.9. Input Management 1619 </h4> 1620 <p> 1621 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. 1622 </p> 1623 <p> 1624 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. 1625 </p> 1626 <h4 id="3_8_10_lock_screen_media_control"> 1627 3.8.10. Lock Screen Media Control 1628 </h4> 1629 <p> 1630 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. 1631 </p> 1632 <h4 id="3_8_11_screen_savers_(previously_dreams)"> 1633 3.8.11. Screen savers (previously Dreams) 1634 </h4> 1635 <p> 1636 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. 1637 </p> 1638 <h4 id="3_8_12_location"> 1639 3.8.12. Location 1640 </h4> 1641 <p> 1642 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. 1643 </p> 1644 <h4 id="3_8_13_unicode_and_font"> 1645 3.8.13. Unicode and Font 1646 </h4> 1647 <p> 1648 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. 1649 </p> 1650 <p> 1651 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> . 1652 </p> 1653 <p> 1654 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. 1655 </p> 1656 <h4 id="3_8_14_multi-windows"> 1657 3.8.14. Multi-windows 1658 </h4> 1659 <p> 1660 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: 1661 </p> 1662 <ul> 1663 <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. 1664 </li> 1665 <li>Device implementations MUST NOT offer split-screen or freeform mode if both the screen height and width is less than 440 dp. 1666 </li> 1667 <li>Device implementations with screen size <code>xlarge</code> SHOULD support freeform mode. 1668 </li> 1669 <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. 1670 </li> 1671 <li>Device implementations with PIP mode multi-window support MUST allocate at least 240x135 dp for the PIP window. 1672 </li> 1673 <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. 1674 </li> 1675 </ul> 1676 <h3 id="3_9_device_administration"> 1677 3.9. Device Administration 1678 </h3> 1679 <p> 1680 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. 1681 </p> 1682 <h4 id="3_9_1_device_provisioning"> 1683 3.9.1 Device Provisioning 1684 </h4> 1685 <h5 id="3_9_1_1_device_owner_provisioning"> 1686 3.9.1.1 Device owner provisioning 1687 </h5> 1688 <p> 1689 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: 1690 </p> 1691 <ul> 1692 <li>When the device implementation has no user data configured yet, it: 1693 <ul> 1694 <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> . 1695 </li> 1696 <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> . 1697 </li> 1698 <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> . 1699 </li> 1700 </ul> 1701 </li> 1702 <li>When the device implementation has user data, it: 1703 <ul> 1704 <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> . 1705 </li> 1706 <li>MUST not enroll any DPC application as the Device Owner App any more. 1707 </li> 1708 </ul> 1709 </li> 1710 </ul> 1711 <p> 1712 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. 1713 </p> 1714 <h5 id="3_9_1_2_managed_profile_provisioning"> 1715 3.9.1.2 Managed profile provisioning 1716 </h5> 1717 <p> 1718 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> . 1719 </p> 1720 <p> 1721 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. 1722 </p> 1723 <p> 1724 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): 1725 </p> 1726 <ul> 1727 <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. 1728 </li> 1729 <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> . 1730 </li> 1731 <li>The DPC applications icon. 1732 </li> 1733 </ul> 1734 <h3 id="3_9_2_managed_profile_support"> 1735 3.9.2 Managed Profile Support 1736 </h3> 1737 <p> 1738 Managed profile capable devices are those devices that: 1739 </p> 1740 <ul> 1741 <li>Declare android.software.device_admin (see <a href="#3_9_device_administration">section 3.9 Device Administration</a> ). 1742 </li> 1743 <li>Are not low RAM devices (see <a href="#7_6_1_minimum_memory_and_storage">section 7.6.1</a> ). 1744 </li> 1745 <li>Allocate internal (non-removable) storage as shared storage (see <a href="#7_6_2_application_shared_storage">section 7.6.2</a> ). 1746 </li> 1747 </ul> 1748 <p> 1749 Managed profile capable devices MUST: 1750 </p> 1751 <ul> 1752 <li>Declare the platform feature flag <code>android.software.managed_users</code> . 1753 </li> 1754 <li>Support managed profiles via the <code>android.app.admin.DevicePolicyManager</code> APIs. 1755 </li> 1756 <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> . 1757 </li> 1758 <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. 1759 </li> 1760 <li>Display a notification icon (similar to the AOSP upstream work badge) to indicate when user is within a managed profile application. 1761 </li> 1762 <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. 1763 </li> 1764 <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. 1765 </li> 1766 <li>Where a managed profile exists, expose the following user affordances for both the primary user and the managed profile: 1767 <ul> 1768 <li>Separate accounting for battery, location, mobile data and storage usage for the primary user and managed profile. 1769 </li> 1770 <li>Independent management of VPN Applications installed within the primary user or managed profile. 1771 </li> 1772 <li>Independent management of applications installed within the primary user or managed profile. 1773 </li> 1774 <li>Independent management of accounts within the primary user or managed profile. 1775 </li> 1776 </ul> 1777 </li> 1778 <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. 1779 </li> 1780 <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. 1781 </li> 1782 <li>Support the ability to specify a separate lock screen meeting the following requirements to grant access to apps running in a managed profile. 1783 <ul> 1784 <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. 1785 </li> 1786 <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> 1787 </li> 1788 <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> . 1789 </li> 1790 </ul> 1791 </li> 1792 </ul> 1793 <h3 id="3_10_accessibility"> 1794 3.10. Accessibility 1795 </h3> 1796 <p> 1797 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. 1798 </p> 1799 <p> 1800 Device implementations include the following requirements: 1801 </p> 1802 <ul> 1803 <li>Android Automotive implementations SHOULD provide an implementation of the Android accessibility framework consistent with the default Android implementation. 1804 </li> 1805 <li>Device implementations (Android Automotive excluded) MUST provide an implementation of the Android accessibility framework consistent with the default Android implementation. 1806 </li> 1807 <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> . 1808 </li> 1809 <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 1810 </li> 1811 <li> 1812 <p> 1813 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. 1814 </p> 1815 </li> 1816 <li> 1817 <p> 1818 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). 1819 </p> 1820 </li> 1821 <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). 1822 </li> 1823 <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. 1824 </li> 1825 </ul> 1826 <p> 1827 ** For languages supported by Text-to-speech. 1828 </p> 1829 <p> 1830 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). 1831 </p> 1832 <h3 id="3_11_text-to-speech"> 1833 3.11. Text-to-Speech 1834 </h3> 1835 <p> 1836 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> . 1837 </p> 1838 <p> 1839 Android Automotive implementations: 1840 </p> 1841 <ul> 1842 <li>MUST support the Android TTS framework APIs. 1843 </li> 1844 <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. 1845 </li> 1846 </ul> 1847 <p> 1848 All other device implementations: 1849 </p> 1850 <ul> 1851 <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. 1852 </li> 1853 <li>MUST support installation of third-party TTS engines. 1854 </li> 1855 <li>MUST provide a user-accessible interface that allows users to select a TTS engine for use at the system level. 1856 </li> 1857 </ul> 1858 <h3 id="3_12_tv_input_framework"> 1859 3.12. TV Input Framework 1860 </h3> 1861 <p> 1862 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. 1863 </p> 1864 <p> 1865 Device implementations that support TIF MUST declare the platform feature android.software.live_tv. 1866 </p> 1867 <h4 id="3_12_1_tv_app"> 1868 3.12.1. TV App 1869 </h4> 1870 <p> 1871 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. 1872 </p> 1873 <p> 1874 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: 1875 </p> 1876 <ul> 1877 <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. 1878 </li> 1879 <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. 1880 </li> 1881 <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). 1882 </li> 1883 </ul> 1884 <h5 id="3_12_1_1_electronic_program_guide"> 1885 3.12.1.1. Electronic Program Guide 1886 </h5> 1887 <p> 1888 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: 1889 </p> 1890 <ul> 1891 <li>The EPG MUST display information from all installed inputs and third-party inputs. 1892 </li> 1893 <li>The EPG MAY provide visual separation between the installed inputs and third-party inputs. 1894 </li> 1895 <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. 1896 </li> 1897 <li>On channel change, device implementations MUST display EPG data for the currently playing program. 1898 </li> 1899 </ul> 1900 <h5 id="3_12_1_2_navigation"> 1901 3.12.1.2. Navigation 1902 </h5> 1903 <p> 1904 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): 1905 </p> 1906 <ul> 1907 <li>Changing TV channels 1908 </li> 1909 <li>Opening EPG 1910 </li> 1911 <li>Configuring and tuning to third-party TIF-based inputs 1912 </li> 1913 <li>Opening Settings menu 1914 </li> 1915 </ul> 1916 <p> 1917 The TV App SHOULD pass key events to HDMI inputs through CEC. 1918 </p> 1919 <h5 id="3_12_1_3_tv_input_app_linking"> 1920 3.12.1.3. TV input app linking 1921 </h5> 1922 <p> 1923 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. 1924 </p> 1925 <h5 id="3_12_1_4_time_shifting"> 1926 3.12.1.4. Time shifting 1927 </h5> 1928 <p> 1929 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> . 1930 </p> 1931 <h5 id="3_12_1_5_tv_recording"> 1932 3.12.1.5. TV recording 1933 </h5> 1934 <p> 1935 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. 1936 </p> 1937 <h3 id="3_13_quick_settings"> 1938 3.13. Quick Settings 1939 </h3> 1940 <p> 1941 Android device implementations SHOULD include a Quick Settings UI component that allow quick access to frequently used or urgently needed actions. 1942 </p> 1943 <p> 1944 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: 1945 </p> 1946 <ul> 1947 <li>MUST allow the user to add or remove tiles from a third-party app to Quick Settings. 1948 </li> 1949 <li>MUST NOT automatically add a tile from a third-party app directly to Quick Settings. 1950 </li> 1951 <li>MUST display all the user-added tiles from third-party apps alongside the system-provided quick setting tiles. 1952 </li> 1953 </ul> 1954 <h3 id="3_14_vehicle_ui_apis"> 1955 3.14. Vehicle UI APIs 1956 </h3> 1957 <h4 id="3_14_1__vehicle_media_ui"> 1958 3.14.1. Vehicle Media UI 1959 </h4> 1960 <p> 1961 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. 1962 </p> 1963 <p> 1964 The UI framework supporting third-party apps that depend on MediaBrowser and MediaSession has the following visual requirements: 1965 </p> 1966 <ul> 1967 <li>MUST display <a href="http://developer.android.com/reference/android/media/browse/MediaBrowser.MediaItem.html">MediaItem</a> icons and notification icons unaltered. 1968 </li> 1969 <li>MUST display those items as described by MediaSession, e.g., metadata, icons, imagery. 1970 </li> 1971 <li>MUST show app title. 1972 </li> 1973 <li>MUST have drawer to present <a href="http://developer.android.com/reference/android/media/browse/MediaBrowser.html">MediaBrowser</a> hierarchy. 1974 </li> 1975 </ul> 1976 <h2 id="4_application_packaging_compatibility"> 1977 4. Application Packaging Compatibility 1978 </h2> 1979 <p> 1980 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. 1981 </p> 1982 <p> 1983 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> . 1984 </p> 1985 <p> 1986 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. 1987 </p> 1988 <p> 1989 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. 1990 </p> 1991 <h2 id="5_multimedia_compatibility"> 1992 5. Multimedia Compatibility 1993 </h2> 1994 <h3 id="5_1_media_codecs"> 1995 5.1. Media Codecs 1996 </h3> 1997 <p> 1998 Device implementations 1999 </p> 2000 <ul> 2001 <li> 2002 <p> 2003 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. 2004 </p> 2005 </li> 2006 <li> 2007 <p> 2008 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> . 2009 </p> 2010 </li> 2011 <li> 2012 <p> 2013 MUST also be able to decode all profiles reported in its <a href="http://developer.android.com/reference/android/media/CamcorderProfile.html">CamcorderProfile</a> 2014 </p> 2015 </li> 2016 <li> 2017 <p> 2018 MUST be able to decode all formats it can encode. This includes all bitstreams that its encoders generate. 2019 </p> 2020 </li> 2021 </ul> 2022 <p> 2023 Codecs SHOULD aim for minimum codec latency, in other words, codecs 2024 </p> 2025 <ul> 2026 <li>SHOULD NOT consume and store input buffers and return input buffers only once processed 2027 </li> 2028 <li>SHOULD NOT hold onto decoded buffers for longer than as specified by the standard (e.g. SPS). 2029 </li> 2030 <li>SHOULD NOT hold onto encoded buffers longer than required by the GOP structure. 2031 </li> 2032 </ul> 2033 <p> 2034 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. 2035 </p> 2036 <p> 2037 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. 2038 </p> 2039 <h4 id="5_1_1_audio_codecs"> 2040 5.1.1. Audio Codecs 2041 </h4> 2042 <table> 2043 <tr> 2044 <th> 2045 Format/Codec 2046 </th> 2047 <th> 2048 Encoder 2049 </th> 2050 <th> 2051 Decoder 2052 </th> 2053 <th> 2054 Details 2055 </th> 2056 <th> 2057 Supported File Types/Container Formats 2058 </th> 2059 </tr> 2060 <tr> 2061 <td> 2062 MPEG-4 AAC Profile<br /> 2063 (AAC LC) 2064 </td> 2065 <td> 2066 REQUIRED <sup>1</sup> 2067 </td> 2068 <td> 2069 REQUIRED 2070 </td> 2071 <td> 2072 Support for mono/stereo/5.0/5.1 <sup>2</sup> content with standard sampling rates from 8 to 48 kHz. 2073 </td> 2074 <td> 2075 <ul> 2076 <li class="table_list">3GPP (.3gp) 2077 </li> 2078 <li class="table_list">MPEG-4 (.mp4, .m4a) 2079 </li> 2080 <li class="table_list">ADTS raw AAC (.aac, decode in Android 3.1+, encode in Android 4.0+, ADIF not supported) 2081 </li> 2082 <li class="table_list">MPEG-TS (.ts, not seekable, Android 3.0+) 2083 </li> 2084 </ul> 2085 </td> 2086 </tr> 2087 <tr> 2088 <td> 2089 MPEG-4 HE AAC Profile (AAC+) 2090 </td> 2091 <td> 2092 REQUIRED <sup>1</sup><br /> 2093 (Android 4.1+) 2094 </td> 2095 <td> 2096 REQUIRED 2097 </td> 2098 <td> 2099 Support for mono/stereo/5.0/5.1 <sup>2</sup> content with standard sampling rates from 16 to 48 kHz. 2100 </td> 2101 <td></td> 2102 </tr> 2103 <tr> 2104 <td> 2105 MPEG-4 HE AACv2<br /> 2106 Profile (enhanced AAC+) 2107 </td> 2108 <td></td> 2109 <td> 2110 REQUIRED 2111 </td> 2112 <td> 2113 Support for mono/stereo/5.0/5.1 <sup>2</sup> content with standard sampling rates from 16 to 48 kHz. 2114 </td> 2115 <td></td> 2116 </tr> 2117 <tr> 2118 <td> 2119 AAC ELD (enhanced low delay AAC) 2120 </td> 2121 <td> 2122 REQUIRED <sup>1</sup><br /> 2123 (Android 4.1+) 2124 </td> 2125 <td> 2126 REQUIRED<br /> 2127 (Android 4.1+) 2128 </td> 2129 <td> 2130 Support for mono/stereo content with standard sampling rates from 16 to 48 kHz. 2131 </td> 2132 <td></td> 2133 </tr> 2134 <tr> 2135 <td> 2136 AMR-NB 2137 </td> 2138 <td> 2139 REQUIRED <sup>3</sup> 2140 </td> 2141 <td> 2142 REQUIRED <sup>3</sup> 2143 </td> 2144 <td> 2145 4.75 to 12.2 kbps sampled @ 8 kHz 2146 </td> 2147 <td> 2148 3GPP (.3gp) 2149 </td> 2150 </tr> 2151 <tr> 2152 <td> 2153 AMR-WB 2154 </td> 2155 <td> 2156 REQUIRED <sup>3</sup> 2157 </td> 2158 <td> 2159 REQUIRED <sup>3</sup> 2160 </td> 2161 <td> 2162 9 rates from 6.60 kbit/s to 23.85 kbit/s sampled @ 16 kHz 2163 </td> 2164 <td></td> 2165 </tr> 2166 <tr> 2167 <td> 2168 FLAC 2169 </td> 2170 <td></td> 2171 <td> 2172 REQUIRED<br /> 2173 (Android 3.1+) 2174 </td> 2175 <td> 2176 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. 2177 </td> 2178 <td> 2179 FLAC (.flac) only 2180 </td> 2181 </tr> 2182 <tr> 2183 <td> 2184 MP3 2185 </td> 2186 <td></td> 2187 <td> 2188 REQUIRED 2189 </td> 2190 <td> 2191 Mono/Stereo 8-320Kbps constant (CBR) or variable bitrate (VBR) 2192 </td> 2193 <td> 2194 MP3 (.mp3) 2195 </td> 2196 </tr> 2197 <tr> 2198 <td> 2199 MIDI 2200 </td> 2201 <td></td> 2202 <td> 2203 REQUIRED 2204 </td> 2205 <td> 2206 MIDI Type 0 and 1. DLS Version 1 and 2. XMF and Mobile XMF. Support for ringtone formats RTTTL/RTX, OTA, and iMelody 2207 </td> 2208 <td> 2209 <ul> 2210 <li class="table_list">Type 0 and 1 (.mid, .xmf, .mxmf) 2211 </li> 2212 <li class="table_list">RTTTL/RTX (.rtttl, .rtx) 2213 </li> 2214 <li class="table_list">OTA (.ota) 2215 </li> 2216 <li class="table_list">iMelody (.imy) 2217 </li> 2218 </ul> 2219 </td> 2220 </tr> 2221 <tr> 2222 <td> 2223 Vorbis 2224 </td> 2225 <td></td> 2226 <td> 2227 REQUIRED 2228 </td> 2229 <td></td> 2230 <td> 2231 <ul> 2232 <li class="table_list">Ogg (.ogg) 2233 </li> 2234 <li class="table_list">Matroska (.mkv, Android 4.0+) 2235 </li> 2236 </ul> 2237 </td> 2238 </tr> 2239 <tr> 2240 <td> 2241 PCM/WAVE 2242 </td> 2243 <td> 2244 REQUIRED <sup>4</sup><br /> 2245 (Android 4.1+) 2246 </td> 2247 <td> 2248 REQUIRED 2249 </td> 2250 <td> 2251 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. 2252 </td> 2253 <td> 2254 WAVE (.wav) 2255 </td> 2256 </tr> 2257 <tr> 2258 <td> 2259 Opus 2260 </td> 2261 <td></td> 2262 <td> 2263 REQUIRED<br /> 2264 (Android 5.0+) 2265 </td> 2266 <td></td> 2267 <td> 2268 Matroska (.mkv), Ogg(.ogg) 2269 </td> 2270 </tr> 2271 </table> 2272 <p class="table_footnote"> 2273 1 Required for device implementations that define android.hardware.microphone but optional for Android Watch device implementations. 2274 </p> 2275 <p class="table_footnote"> 2276 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: 2277 </p> 2278 <ul> 2279 <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), 2280 </li> 2281 <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 2282 </li> 2283 </ul> 2284 <p class="table_footnote"> 2285 3 Required for Android Handheld device implementations. 2286 </p> 2287 <p class="table_footnote"> 2288 4 Required for device implementations that define android.hardware.microphone, including Android Watch device implementations. 2289 </p> 2290 <h4 id="5_1_2_image_codecs"> 2291 5.1.2. Image Codecs 2292 </h4> 2293 <table> 2294 <tr> 2295 <th> 2296 Format/Codec 2297 </th> 2298 <th> 2299 Encoder 2300 </th> 2301 <th> 2302 Decoder 2303 </th> 2304 <th> 2305 Details 2306 </th> 2307 <th> 2308 Supported File Types/Container Formats 2309 </th> 2310 </tr> 2311 <tr> 2312 <td> 2313 JPEG 2314 </td> 2315 <td> 2316 REQUIRED 2317 </td> 2318 <td> 2319 REQUIRED 2320 </td> 2321 <td> 2322 Base+progressive 2323 </td> 2324 <td> 2325 JPEG (.jpg) 2326 </td> 2327 </tr> 2328 <tr> 2329 <td> 2330 GIF 2331 </td> 2332 <td></td> 2333 <td> 2334 REQUIRED 2335 </td> 2336 <td></td> 2337 <td> 2338 GIF (.gif) 2339 </td> 2340 </tr> 2341 <tr> 2342 <td> 2343 PNG 2344 </td> 2345 <td> 2346 REQUIRED 2347 </td> 2348 <td> 2349 REQUIRED 2350 </td> 2351 <td></td> 2352 <td> 2353 PNG (.png) 2354 </td> 2355 </tr> 2356 <tr> 2357 <td> 2358 BMP 2359 </td> 2360 <td></td> 2361 <td> 2362 REQUIRED 2363 </td> 2364 <td></td> 2365 <td> 2366 BMP (.bmp) 2367 </td> 2368 </tr> 2369 <tr> 2370 <td> 2371 WebP 2372 </td> 2373 <td> 2374 REQUIRED 2375 </td> 2376 <td> 2377 REQUIRED 2378 </td> 2379 <td></td> 2380 <td> 2381 WebP (.webp) 2382 </td> 2383 </tr> 2384 <tr> 2385 <td> 2386 Raw 2387 </td> 2388 <td></td> 2389 <td> 2390 REQUIRED 2391 </td> 2392 <td></td> 2393 <td> 2394 ARW (.arw), CR2 (.cr2), DNG (.dng), NEF (.nef), NRW (.nrw), ORF (.orf), PEF (.pef), RAF (.raf), RW2 (.rw2), SRW (.srw) 2395 </td> 2396 </tr> 2397 </table> 2398 <h4 id="5_1_3_video_codecs"> 2399 5.1.3. Video Codecs 2400 </h4> 2401 <ul> 2402 <li> 2403 <p> 2404 Codecs advertising HDR profile support MUST support HDR static metadata parsing and handling. 2405 </p> 2406 </li> 2407 <li> 2408 <p> 2409 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. 2410 </p> 2411 </li> 2412 <li> 2413 <p> 2414 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. 2415 </p> 2416 </li> 2417 <li> 2418 <p> 2419 Video encoders and decoders MUST support YUV420 flexible color format (COLOR_FormatYUV420Flexible). 2420 </p> 2421 </li> 2422 </ul> 2423 <table> 2424 <tr> 2425 <th> 2426 Format/Codec 2427 </th> 2428 <th> 2429 Encoder 2430 </th> 2431 <th> 2432 Decoder 2433 </th> 2434 <th> 2435 Details 2436 </th> 2437 <th> 2438 Supported File Types/<br /> 2439 Container Formats 2440 </th> 2441 </tr> 2442 <tr> 2443 <td> 2444 H.263 2445 </td> 2446 <td> 2447 MAY 2448 </td> 2449 <td> 2450 MAY 2451 </td> 2452 <td></td> 2453 <td> 2454 <ul> 2455 <li class="table_list">3GPP (.3gp) 2456 </li> 2457 <li class="table_list">MPEG-4 (.mp4) 2458 </li> 2459 </ul> 2460 </td> 2461 </tr> 2462 <tr> 2463 <td> 2464 H.264 AVC 2465 </td> 2466 <td> 2467 REQUIRED <sup>2</sup> 2468 </td> 2469 <td> 2470 REQUIRED <sup>2</sup> 2471 </td> 2472 <td> 2473 See <a href="#5_2_video_encoding">section 5.2</a> and <a href="#5_3_video_decoding">5.3</a> for details 2474 </td> 2475 <td> 2476 <ul> 2477 <li class="table_list">3GPP (.3gp) 2478 </li> 2479 <li class="table_list">MPEG-4 (.mp4) 2480 </li> 2481 <li class="table_list">MPEG-2 TS (.ts, AAC audio only, not seekable, Android 3.0+) 2482 </li> 2483 </ul> 2484 </td> 2485 </tr> 2486 <tr> 2487 <td> 2488 H.265 HEVC 2489 </td> 2490 <td></td> 2491 <td> 2492 REQUIRED <sup>5</sup> 2493 </td> 2494 <td> 2495 See <a href="#5_3_video_decoding">section 5.3</a> for details 2496 </td> 2497 <td> 2498 MPEG-4 (.mp4) 2499 </td> 2500 </tr> 2501 <tr> 2502 <td> 2503 MPEG-2 2504 </td> 2505 <td></td> 2506 <td> 2507 STRONGLY RECOMMENDED <sup>6</sup> 2508 </td> 2509 <td> 2510 Main Profile 2511 </td> 2512 <td> 2513 MPEG2-TS 2514 </td> 2515 </tr> 2516 <tr> 2517 <td> 2518 MPEG-4 SP 2519 </td> 2520 <td></td> 2521 <td> 2522 REQUIRED <sup>2</sup> 2523 </td> 2524 <td></td> 2525 <td> 2526 3GPP (.3gp) 2527 </td> 2528 </tr> 2529 <tr> 2530 <td> 2531 VP8 <sup>3</sup> 2532 </td> 2533 <td> 2534 REQUIRED <sup>2</sup><br /> 2535 (Android 4.3+) 2536 </td> 2537 <td> 2538 REQUIRED <sup>2</sup><br /> 2539 (Android 2.3.3+) 2540 </td> 2541 <td> 2542 See <a href="#5_2_video_encoding">section 5.2</a> and <a href="#5_3_video_decoding">5.3</a> for details 2543 </td> 2544 <td> 2545 <ul> 2546 <li class="table_list"> 2547 <a href="http://www.webmproject.org/">WebM (.webm)</a> 2548 </li> 2549 <li class="table_list">Matroska (.mkv, Android 4.0+) <sup>4</sup> 2550 </li> 2551 </ul> 2552 </td> 2553 </tr> 2554 <tr> 2555 <td> 2556 VP9 2557 </td> 2558 <td></td> 2559 <td> 2560 REQUIRED <sup>2</sup><br /> 2561 (Android 4.4+) 2562 </td> 2563 <td> 2564 See <a href="#5_3_video_decoding">section 5.3</a> for details 2565 </td> 2566 <td> 2567 <ul> 2568 <li class="table_list"> 2569 <a href="http://www.webmproject.org/">WebM (.webm)</a> 2570 </li> 2571 <li class="table_list">Matroska (.mkv, Android 4.0+) <sup>4</sup> 2572 </li> 2573 </ul> 2574 </td> 2575 </tr> 2576 </table> 2577 <p class="table_footnote"> 2578 1 Required for device implementations that include camera hardware and define android.hardware.camera or android.hardware.camera.front. 2579 </p> 2580 <p class="table_footnote"> 2581 2 Required for device implementations except Android Watch devices. 2582 </p> 2583 <p class="table_footnote"> 2584 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> . 2585 </p> 2586 <p class="table_footnote"> 2587 4 Device implementations SHOULD support writing Matroska WebM files. 2588 </p> 2589 <p class="table_footnote"> 2590 5 STRONGLY RECOMMENDED for Android Automotive, optional for Android Watch, and required for all other device types. 2591 </p> 2592 <p class="table_footnote"> 2593 6 Applies only to Android Television device implementations. 2594 </p> 2595 <h3 id="5_2_video_encoding"> 2596 5.2. Video Encoding 2597 </h3> 2598 <div class="note"> 2599 Video codecs are optional for Android Watch device implementations. 2600 </div> 2601 <p> 2602 H.264, VP8, VP9 and HEVC video encoders 2603 </p> 2604 <ul> 2605 <li>MUST support dynamically configurable bitrates. 2606 </li> 2607 <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. 2608 </li> 2609 </ul> 2610 <p> 2611 H.263 and MPEG-4 video encoder SHOULD support dynamically configurable bitrates. 2612 </p> 2613 <p> 2614 All video encoders SHOULD meet the following bitrate targets over two sliding windows: 2615 </p> 2616 <ul> 2617 <li>It SHOULD be not more than ~15% over the bitrate between intraframe (I-frame) intervals. 2618 </li> 2619 <li>It SHOULD be not more than ~100% over the bitrate over a sliding window of 1 second. 2620 </li> 2621 </ul> 2622 <h4 id="5_2_1_h_263"> 2623 5.2.1. H.263 2624 </h4> 2625 <p> 2626 Android device implementations with H.263 encoders MUST support Baseline Profile Level 45. 2627 </p> 2628 <h4 id="5_2_2_h-264"> 2629 5.2.2. H-264 2630 </h4> 2631 <p> 2632 Android device implementations with H.264 codec support: 2633 </p> 2634 <ul> 2635 <li>MUST support Baseline Profile Level 3.<br /> 2636 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. 2637 </li> 2638 <li>MUST support the SD (Standard Definition) video encoding profiles in the following table. 2639 </li> 2640 <li>SHOULD support Main Profile Level 4. 2641 </li> 2642 <li>SHOULD support the HD (High Definition) video encoding profiles as indicated in the following table. 2643 </li> 2644 <li>In addition, Android Television devices are STRONGLY RECOMMENDED to encode HD 1080p video at 30 fps. 2645 </li> 2646 </ul> 2647 <table> 2648 <tr> 2649 <th></th> 2650 <th> 2651 SD (Low quality) 2652 </th> 2653 <th> 2654 SD (High quality) 2655 </th> 2656 <th> 2657 HD 720p <sup>1</sup> 2658 </th> 2659 <th> 2660 HD 1080p <sup>1</sup> 2661 </th> 2662 </tr> 2663 <tr> 2664 <th> 2665 Video resolution 2666 </th> 2667 <td> 2668 320 x 240 px 2669 </td> 2670 <td> 2671 720 x 480 px 2672 </td> 2673 <td> 2674 1280 x 720 px 2675 </td> 2676 <td> 2677 1920 x 1080 px 2678 </td> 2679 </tr> 2680 <tr> 2681 <th> 2682 Video frame rate 2683 </th> 2684 <td> 2685 20 fps 2686 </td> 2687 <td> 2688 30 fps 2689 </td> 2690 <td> 2691 30 fps 2692 </td> 2693 <td> 2694 30 fps 2695 </td> 2696 </tr> 2697 <tr> 2698 <th> 2699 Video bitrate 2700 </th> 2701 <td> 2702 384 Kbps 2703 </td> 2704 <td> 2705 2 Mbps 2706 </td> 2707 <td> 2708 4 Mbps 2709 </td> 2710 <td> 2711 10 Mbps 2712 </td> 2713 </tr> 2714 </table> 2715 <p class="table_footnote"> 2716 1 When supported by hardware, but STRONGLY RECOMMENDED for Android Television devices. 2717 </p> 2718 <h4 id="5_2_3_vp8"> 2719 5.2.3. VP8 2720 </h4> 2721 <p> 2722 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. 2723 </p> 2724 <table> 2725 <tr> 2726 <th></th> 2727 <th> 2728 SD (Low quality) 2729 </th> 2730 <th> 2731 SD (High quality) 2732 </th> 2733 <th> 2734 HD 720p <sup>1</sup> 2735 </th> 2736 <th> 2737 HD 1080p <sup>1</sup> 2738 </th> 2739 </tr> 2740 <tr> 2741 <th> 2742 Video resolution 2743 </th> 2744 <td> 2745 320 x 180 px 2746 </td> 2747 <td> 2748 640 x 360 px 2749 </td> 2750 <td> 2751 1280 x 720 px 2752 </td> 2753 <td> 2754 1920 x 1080 px 2755 </td> 2756 </tr> 2757 <tr> 2758 <th> 2759 Video frame rate 2760 </th> 2761 <td> 2762 30 fps 2763 </td> 2764 <td> 2765 30 fps 2766 </td> 2767 <td> 2768 30 fps 2769 </td> 2770 <td> 2771 30 fps 2772 </td> 2773 </tr> 2774 <tr> 2775 <th> 2776 Video bitrate 2777 </th> 2778 <td> 2779 800 Kbps 2780 </td> 2781 <td> 2782 2 Mbps 2783 </td> 2784 <td> 2785 4 Mbps 2786 </td> 2787 <td> 2788 10 Mbps 2789 </td> 2790 </tr> 2791 </table> 2792 <p class="table_footnote"> 2793 1 When supported by hardware. 2794 </p> 2795 <h3 id="5_3_video_decoding"> 2796 5.3. Video Decoding 2797 </h3> 2798 <div class="note"> 2799 Video codecs are optional for Android Watch device implementations. 2800 </div> 2801 <p> 2802 Device implementations 2803 </p> 2804 <ul> 2805 <li> 2806 <p> 2807 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. 2808 </p> 2809 </li> 2810 <li> 2811 <p> 2812 Implementations that support the Dolby Vision decoder 2813 </p> 2814 </li> 2815 <li>MUST provide a Dolby Vision-capable extractor. 2816 </li> 2817 <li> 2818 <p> 2819 MUST properly display Dolby Vision content on the device screen or on a standard video output port (e.g., HDMI). 2820 </p> 2821 </li> 2822 <li> 2823 <p> 2824 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. 2825 </p> 2826 </li> 2827 </ul> 2828 <h4 id="5_3_1_mpeg-2"> 2829 5.3.1. MPEG-2 2830 </h4> 2831 <p> 2832 Android device implementations with MPEG-2 decoders must support the Main Profile High Level. 2833 </p> 2834 <h4 id="5_3_2_h_263"> 2835 5.3.2. H.263 2836 </h4> 2837 <p> 2838 Android device implementations with H.263 decoders MUST support Baseline Profile Level 30 and Level 45. 2839 </p> 2840 <h4 id="5_3_3_mpeg-4"> 2841 5.3.3. MPEG-4 2842 </h4> 2843 <p> 2844 Android device implementations with MPEG-4 decoders MUST support Simple Profile Level 3. 2845 </p> 2846 <h4 id="5_3_4_h_264"> 2847 5.3.4. H.264 2848 </h4> 2849 <p> 2850 Android device implementations with H.264 decoders: 2851 </p> 2852 <ul> 2853 <li>MUST support Main Profile Level 3.1 and Baseline Profile.<br /> 2854 Support for ASO (Arbitrary Slice Ordering), FMO (Flexible Macroblock Ordering) and RS (Redundant Slices) is OPTIONAL. 2855 </li> 2856 <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). 2857 </li> 2858 <li>SHOULD be capable of decoding videos with the HD (High Definition) profiles as indicated in the following table. 2859 </li> 2860 <li>In addition, Android Television devices 2861 <ul> 2862 <li>MUST support High Profile Level 4.2 and the HD 1080p60 decoding profile. 2863 </li> 2864 <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 2865 </li> 2866 </ul> 2867 </li> 2868 </ul> 2869 <table> 2870 <tr> 2871 <th></th> 2872 <th> 2873 SD (Low quality) 2874 </th> 2875 <th> 2876 SD (High quality) 2877 </th> 2878 <th> 2879 HD 720p <sup>1</sup> 2880 </th> 2881 <th> 2882 HD 1080p <sup>1</sup> 2883 </th> 2884 </tr> 2885 <tr> 2886 <th> 2887 Video resolution 2888 </th> 2889 <td> 2890 320 x 240 px 2891 </td> 2892 <td> 2893 720 x 480 px 2894 </td> 2895 <td> 2896 1280 x 720 px 2897 </td> 2898 <td> 2899 1920 x 1080 px 2900 </td> 2901 </tr> 2902 <tr> 2903 <th> 2904 Video frame rate 2905 </th> 2906 <td> 2907 30 fps 2908 </td> 2909 <td> 2910 30 fps 2911 </td> 2912 <td> 2913 60 fps 2914 </td> 2915 <td> 2916 30 fps (60 fps <sup>2</sup> ) 2917 </td> 2918 </tr> 2919 <tr> 2920 <th> 2921 Video bitrate 2922 </th> 2923 <td> 2924 800 Kbps 2925 </td> 2926 <td> 2927 2 Mbps 2928 </td> 2929 <td> 2930 8 Mbps 2931 </td> 2932 <td> 2933 20 Mbps 2934 </td> 2935 </tr> 2936 </table> 2937 <p class="table_footnote"> 2938 1 REQUIRED for when the height as reported by the Display.getSupportedModes() method is equal or greater than the video resolution. 2939 </p> 2940 <p class="table_footnote"> 2941 2 REQUIRED for Android Television device implementations. 2942 </p> 2943 <h4 id="5_3_5_h_265_(hevc)"> 2944 5.3.5. H.265 (HEVC) 2945 </h4> 2946 <p> 2947 Android device implementations, when supporting H.265 codec as described in <a href="#5_1_3_video_codecs">section 5.1.3</a> : 2948 </p> 2949 <ul> 2950 <li>MUST support the Main Profile Level 3 Main tier and the SD video decoding profiles as indicated in the following table. 2951 </li> 2952 <li>SHOULD support the HD decoding profiles as indicated in the following table. 2953 </li> 2954 <li>MUST support the HD decoding profiles as indicated in the following table if there is a hardware decoder. 2955 </li> 2956 <li>In addition, Android Television devices: 2957 </li> 2958 <li>MUST support the HD 720p decoding profile. 2959 </li> 2960 <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. 2961 </li> 2962 <li>SHOULD support the UHD decoding profile. If the UHD decoding profile is supported the codec MUST support Main10 Level 5 Main Tier profile. 2963 </li> 2964 </ul> 2965 <table> 2966 <tr> 2967 <th></th> 2968 <th> 2969 SD (Low quality) 2970 </th> 2971 <th> 2972 SD (High quality) 2973 </th> 2974 <th> 2975 HD 720p 2976 </th> 2977 <th> 2978 HD 1080p 2979 </th> 2980 <th> 2981 UHD 2982 </th> 2983 </tr> 2984 <tr> 2985 <th> 2986 Video resolution 2987 </th> 2988 <td> 2989 352 x 288 px 2990 </td> 2991 <td> 2992 720 x 480 px 2993 </td> 2994 <td> 2995 1280 x 720 px 2996 </td> 2997 <td> 2998 1920 x 1080 px 2999 </td> 3000 <td> 3001 3840 x 2160 px 3002 </td> 3003 </tr> 3004 <tr> 3005 <th> 3006 Video frame rate 3007 </th> 3008 <td> 3009 30 fps 3010 </td> 3011 <td> 3012 30 fps 3013 </td> 3014 <td> 3015 30 fps 3016 </td> 3017 <td> 3018 30 fps (60 fps <sup>1</sup> ) 3019 </td> 3020 <td> 3021 60 fps 3022 </td> 3023 </tr> 3024 <tr> 3025 <th> 3026 Video bitrate 3027 </th> 3028 <td> 3029 600 Kbps 3030 </td> 3031 <td> 3032 1.6 Mbps 3033 </td> 3034 <td> 3035 4 Mbps 3036 </td> 3037 <td> 3038 5 Mbps 3039 </td> 3040 <td> 3041 20 Mbps 3042 </td> 3043 </tr> 3044 </table> 3045 <p class="table_footnote"> 3046 1 REQUIRED for Android Television device implementations with H.265 hardware decoding. 3047 </p> 3048 <h4 id="5_3_6_vp8"> 3049 5.3.6. VP8 3050 </h4> 3051 <p> 3052 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> : 3053 </p> 3054 <ul> 3055 <li>MUST support the SD decoding profiles in the following table. 3056 </li> 3057 <li>SHOULD support the HD decoding profiles in the following table. 3058 </li> 3059 <li>Android Television devices MUST support the HD 1080p60 decoding profile. 3060 </li> 3061 </ul> 3062 <table> 3063 <tr> 3064 <th></th> 3065 <th> 3066 SD (Low quality) 3067 </th> 3068 <th> 3069 SD (High quality) 3070 </th> 3071 <th> 3072 HD 720p <sup>1</sup> 3073 </th> 3074 <th> 3075 HD 1080p <sup>1</sup> 3076 </th> 3077 </tr> 3078 <tr> 3079 <th> 3080 Video resolution 3081 </th> 3082 <td> 3083 320 x 180 px 3084 </td> 3085 <td> 3086 640 x 360 px 3087 </td> 3088 <td> 3089 1280 x 720 px 3090 </td> 3091 <td> 3092 1920 x 1080 px 3093 </td> 3094 </tr> 3095 <tr> 3096 <th> 3097 Video frame rate 3098 </th> 3099 <td> 3100 30 fps 3101 </td> 3102 <td> 3103 30 fps 3104 </td> 3105 <td> 3106 30 fps (60 fps <sup>2</sup> ) 3107 </td> 3108 <td> 3109 30 (60 fps <sup>2</sup> ) 3110 </td> 3111 </tr> 3112 <tr> 3113 <th> 3114 Video bitrate 3115 </th> 3116 <td> 3117 800 Kbps 3118 </td> 3119 <td> 3120 2 Mbps 3121 </td> 3122 <td> 3123 8 Mbps 3124 </td> 3125 <td> 3126 20 Mbps 3127 </td> 3128 </tr> 3129 </table> 3130 <p class="table_footnote"> 3131 1 REQUIRED for when the height as reported by the Display.getSupportedModes() method is equal or greater than the video resolution. 3132 </p> 3133 <p class="table_footnote"> 3134 2 REQUIRED for Android Television device implementations. 3135 </p> 3136 <h4 id="5_3_7_vp9"> 3137 5.3.7. VP9 3138 </h4> 3139 <p> 3140 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> : 3141 </p> 3142 <ul> 3143 <li>MUST support the SD video decoding profiles as indicated in the following table. 3144 </li> 3145 <li>SHOULD support the HD decoding profiles as indicated in the following table. 3146 </li> 3147 <li>MUST support the HD decoding profiles as indicated in the following table, if there is a hardware decoder. 3148 </li> 3149 <li> 3150 <p> 3151 In addition, Android Television devices: 3152 </p> 3153 <ul> 3154 <li>MUST support the HD 720p decoding profile. 3155 </li> 3156 <li>STRONGLY RECOMMENDED to support the HD 1080p decoding profile. 3157 </li> 3158 <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). 3159 </li> 3160 </ul> 3161 </li> 3162 </ul> 3163 <table> 3164 <tr> 3165 <th></th> 3166 <th> 3167 SD (Low quality) 3168 </th> 3169 <th> 3170 SD (High quality) 3171 </th> 3172 <th> 3173 HD 720p 3174 </th> 3175 <th> 3176 HD 1080p 3177 </th> 3178 <th> 3179 UHD 3180 </th> 3181 </tr> 3182 <tr> 3183 <th> 3184 Video resolution 3185 </th> 3186 <td> 3187 320 x 180 px 3188 </td> 3189 <td> 3190 640 x 360 px 3191 </td> 3192 <td> 3193 1280 x 720 px 3194 </td> 3195 <td> 3196 1920 x 1080 px 3197 </td> 3198 <td> 3199 3840 x 2160 px 3200 </td> 3201 </tr> 3202 <tr> 3203 <th> 3204 Video frame rate 3205 </th> 3206 <td> 3207 30 fps 3208 </td> 3209 <td> 3210 30 fps 3211 </td> 3212 <td> 3213 30 fps 3214 </td> 3215 <td> 3216 30 fps (60 fps <sup>1</sup> ) 3217 </td> 3218 <td> 3219 60 fps 3220 </td> 3221 </tr> 3222 <tr> 3223 <th> 3224 Video bitrate 3225 </th> 3226 <td> 3227 600 Kbps 3228 </td> 3229 <td> 3230 1.6 Mbps 3231 </td> 3232 <td> 3233 4 Mbps 3234 </td> 3235 <td> 3236 5 Mbps 3237 </td> 3238 <td> 3239 20 Mbps 3240 </td> 3241 </tr> 3242 </table> 3243 <p class="table_footnote"> 3244 1 REQUIRED for Android Television device implementations with VP9 hardware decoding. 3245 </p> 3246 <h3 id="5_4_audio_recording"> 3247 5.4. Audio Recording 3248 </h3> 3249 <p> 3250 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. 3251 </p> 3252 <h4 id="5_4_1_raw_audio_capture"> 3253 5.4.1. Raw Audio Capture 3254 </h4> 3255 <p> 3256 Device implementations that declare android.hardware.microphone MUST allow capture of raw audio content with the following characteristics: 3257 </p> 3258 <ul> 3259 <li> 3260 <strong>Format</strong> : Linear PCM, 16-bit 3261 </li> 3262 <li> 3263 <strong>Sampling rates</strong> : 8000, 11025, 16000, 44100 3264 </li> 3265 <li> 3266 <strong>Channels</strong> : Mono 3267 </li> 3268 </ul> 3269 <p> 3270 The capture for the above sample rates MUST be done without up-sampling, and any down-sampling MUST include an appropriate anti-aliasing filter. 3271 </p> 3272 <p> 3273 Device implementations that declare android.hardware.microphone SHOULD allow capture of raw audio content with the following characteristics: 3274 </p> 3275 <ul> 3276 <li> 3277 <strong>Format</strong> : Linear PCM, 16-bit 3278 </li> 3279 <li> 3280 <strong>Sampling rates</strong> : 22050, 48000 3281 </li> 3282 <li> 3283 <strong>Channels</strong> : Stereo 3284 </li> 3285 </ul> 3286 <p> 3287 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. 3288 </p> 3289 <h4 id="5_4_2_capture_for_voice_recognition"> 3290 5.4.2. Capture for Voice Recognition 3291 </h4> 3292 <p> 3293 The android.media.MediaRecorder.AudioSource.VOICE_RECOGNITION audio source MUST support capture at one of the sampling rates, 44100 and 48000. 3294 </p> 3295 <p> 3296 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: 3297 </p> 3298 <ul> 3299 <li>The device SHOULD exhibit approximately flat amplitude versus frequency characteristics: specifically, 3 dB, from 100 Hz to 4000 Hz. 3300 </li> 3301 <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. 3302 </li> 3303 <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. 3304 </li> 3305 <li>Total harmonic distortion SHOULD be less than 1% for 1 kHz at 90 dB SPL input level at the microphone. 3306 </li> 3307 <li>Noise reduction processing, if present, MUST be disabled. 3308 </li> 3309 <li>Automatic gain control, if present, MUST be disabled. 3310 </li> 3311 </ul> 3312 <p> 3313 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. 3314 </p> 3315 <h4 id="5_4_3_capture_for_rerouting_of_playback"> 3316 5.4.3. Capture for Rerouting of Playback 3317 </h4> 3318 <p> 3319 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: 3320 </p> 3321 <ul> 3322 <li>STREAM_RING 3323 </li> 3324 <li>STREAM_ALARM 3325 </li> 3326 <li>STREAM_NOTIFICATION 3327 </li> 3328 </ul> 3329 <h3 id="5_5_audio_playback"> 3330 5.5. Audio Playback 3331 </h3> 3332 <p> 3333 Device implementations that declare android.hardware.audio.output MUST conform to the requirements in this section. 3334 </p> 3335 <h4 id="5_5_1_raw_audio_playback"> 3336 5.5.1. Raw Audio Playback 3337 </h4> 3338 <p> 3339 The device MUST allow playback of raw audio content with the following characteristics: 3340 </p> 3341 <ul> 3342 <li> 3343 <strong>Format</strong> : Linear PCM, 16-bit 3344 </li> 3345 <li> 3346 <strong>Sampling rates</strong> : 8000, 11025, 16000, 22050, 32000, 44100 3347 </li> 3348 <li> 3349 <strong>Channels</strong> : Mono, Stereo 3350 </li> 3351 </ul> 3352 <p> 3353 The device SHOULD allow playback of raw audio content with the following characteristics: 3354 </p> 3355 <ul> 3356 <li> 3357 <strong>Sampling rates</strong> : 24000, 48000 3358 </li> 3359 </ul> 3360 <h4 id="5_5_2_audio_effects"> 3361 5.5.2. Audio Effects 3362 </h4> 3363 <p> 3364 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: 3365 </p> 3366 <ul> 3367 <li>MUST support the EFFECT_TYPE_EQUALIZER and EFFECT_TYPE_LOUDNESS_ENHANCER implementations controllable through the AudioEffect subclasses Equalizer, LoudnessEnhancer. 3368 </li> 3369 <li>MUST support the visualizer API implementation, controllable through the Visualizer class. 3370 </li> 3371 <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. 3372 </li> 3373 </ul> 3374 <h4 id="5_5_3_audio_output_volume"> 3375 5.5.3. Audio Output Volume 3376 </h4> 3377 <p> 3378 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). 3379 </p> 3380 <p> 3381 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> . 3382 </p> 3383 <h3 id="5_6_audio_latency"> 3384 5.6. Audio Latency 3385 </h3> 3386 <p> 3387 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. 3388 </p> 3389 <p> 3390 For the purposes of this section, use the following definitions: 3391 </p> 3392 <ul> 3393 <li> 3394 <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. 3395 </li> 3396 <li> 3397 <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. 3398 </li> 3399 <li> 3400 <strong>continuous output latency</strong> . The output latency for subsequent frames, after the device is playing audio. 3401 </li> 3402 <li> 3403 <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. 3404 </li> 3405 <li> 3406 <strong>lost input</strong> . The initial portion of an input signal that is unusable or unavailable. 3407 </li> 3408 <li> 3409 <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. 3410 </li> 3411 <li> 3412 <strong>continuous input latency</strong> . The input latency for subsequent frames, while the device is capturing audio. 3413 </li> 3414 <li> 3415 <strong>cold output jitter</strong> . The variability among separate measurements of cold output latency values. 3416 </li> 3417 <li> 3418 <strong>cold input jitter</strong> . The variability among separate measurements of cold input latency values. 3419 </li> 3420 <li> 3421 <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. 3422 </li> 3423 <li> 3424 <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> . 3425 </li> 3426 </ul> 3427 <p> 3428 Device implementations that declare android.hardware.audio.output are STRONGLY RECOMMENDED to meet or exceed these audio output requirements: 3429 </p> 3430 <ul> 3431 <li>cold output latency of 100 milliseconds or less 3432 </li> 3433 <li>continuous output latency of 45 milliseconds or less 3434 </li> 3435 <li>minimize the cold output jitter 3436 </li> 3437 </ul> 3438 <p> 3439 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. 3440 </p> 3441 <p> 3442 Device implementations that include android.hardware.microphone are STRONGLY RECOMMENDED to meet these input audio requirements: 3443 </p> 3444 <ul> 3445 <li>cold input latency of 100 milliseconds or less 3446 </li> 3447 <li>continuous input latency of 30 milliseconds or less 3448 </li> 3449 <li>continuous round-trip latency of 50 milliseconds or less 3450 </li> 3451 <li>minimize the cold input jitter 3452 </li> 3453 </ul> 3454 <h3 id="5_7_network_protocols"> 3455 5.7. Network Protocols 3456 </h3> 3457 <p> 3458 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: 3459 </p> 3460 <ul> 3461 <li> 3462 <p> 3463 HTTP(S) progressive streaming<br /> 3464 All required codecs and container formats in <a href="#5_1_media_codecs">section 5.1</a> MUST be supported over HTTP(S) 3465 </p> 3466 </li> 3467 <li> 3468 <p> 3469 <a href="http://tools.ietf.org/html/draft-pantos-http-live-streaming-07">HTTP Live Streaming draft protocol, Version 7</a><br /> 3470 The following media segment formats MUST be supported: 3471 </p> 3472 </li> 3473 </ul> 3474 <table> 3475 <tr> 3476 <th> 3477 Segment formats 3478 </th> 3479 <th> 3480 Reference(s) 3481 </th> 3482 <th> 3483 Required codec support 3484 </th> 3485 </tr> 3486 <tr id="mp2t"> 3487 <td> 3488 MPEG-2 Transport Stream 3489 </td> 3490 <td> 3491 <a href="http://www.iso.org/iso/catalogue_detail?csnumber=44169">ISO 13818</a> 3492 </td> 3493 <td> 3494 Video codecs: 3495 <ul> 3496 <li class="table_list">H264 AVC 3497 </li> 3498 <li class="table_list">MPEG-4 SP 3499 </li> 3500 <li class="table_list">MPEG-2 3501 </li> 3502 </ul>See <a href="#5_1_3_video_codecs">section 5.1.3</a> for details on H264 AVC, MPEG2-4 SP,<br /> 3503 and MPEG-2. 3504 <p> 3505 Audio codecs: 3506 </p> 3507 <ul> 3508 <li class="table_list">AAC 3509 </li> 3510 </ul>See <a href="#5_1_1_audio_codecs">section 5.1.1</a> for details on AAC and its variants. 3511 </td> 3512 </tr> 3513 <tr> 3514 <td> 3515 AAC with ADTS framing and ID3 tags 3516 </td> 3517 <td> 3518 <a href="http://www.iso.org/iso/home/store/catalogue_tc/catalogue_detail.htm?csnumber=43345">ISO 13818-7</a> 3519 </td> 3520 <td> 3521 See <a href="#5_1_1_audio_codecs">section 5.1.1</a> for details on AAC and its variants 3522 </td> 3523 </tr> 3524 <tr> 3525 <td> 3526 WebVTT 3527 </td> 3528 <td> 3529 <a href="http://dev.w3.org/html5/webvtt/">WebVTT</a> 3530 </td> 3531 <td></td> 3532 </tr> 3533 </table> 3534 <ul> 3535 <li> 3536 <p> 3537 RTSP (RTP, SDP) 3538 </p> 3539 <p> 3540 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> . 3541 </p> 3542 </li> 3543 </ul> 3544 <table> 3545 <tr> 3546 <th> 3547 Profile name 3548 </th> 3549 <th> 3550 Reference(s) 3551 </th> 3552 <th> 3553 Required codec support 3554 </th> 3555 </tr> 3556 <tr> 3557 <td> 3558 H264 AVC 3559 </td> 3560 <td> 3561 <a href="https://tools.ietf.org/html/rfc6184">RFC 6184</a> 3562 </td> 3563 <td> 3564 See <a href="#5_1_3_video_codecs">section 5.1.3</a> for details on H264 AVC 3565 </td> 3566 </tr> 3567 <tr> 3568 <td> 3569 MP4A-LATM 3570 </td> 3571 <td> 3572 <a href="https://tools.ietf.org/html/rfc6416">RFC 6416</a> 3573 </td> 3574 <td> 3575 See <a href="#5_1_1_audio_codecs">section 5.1.1</a> for details on AAC and its variants 3576 </td> 3577 </tr> 3578 <tr> 3579 <td> 3580 H263-1998 3581 </td> 3582 <td> 3583 <a href="https://tools.ietf.org/html/rfc3551">RFC 3551</a><br /> 3584 <a href="https://tools.ietf.org/html/rfc4629">RFC 4629</a><br /> 3585 <a href="https://tools.ietf.org/html/rfc2190">RFC 2190</a> 3586 </td> 3587 <td> 3588 See <a href="#5_1_3_video_codecs">section 5.1.3</a> for details on H263 3589 </td> 3590 </tr> 3591 <tr> 3592 <td> 3593 H263-2000 3594 </td> 3595 <td> 3596 <a href="https://tools.ietf.org/html/rfc4629">RFC 4629</a> 3597 </td> 3598 <td> 3599 See <a href="#5_1_3_video_codecs">section 5.1.3</a> for details on H263 3600 </td> 3601 </tr> 3602 <tr> 3603 <td> 3604 AMR 3605 </td> 3606 <td> 3607 <a href="https://tools.ietf.org/html/rfc4867">RFC 4867</a> 3608 </td> 3609 <td> 3610 See <a href="#5_1_1_audio_codecs">section 5.1.1</a> for details on AMR-NB 3611 </td> 3612 </tr> 3613 <tr> 3614 <td> 3615 AMR-WB 3616 </td> 3617 <td> 3618 <a href="https://tools.ietf.org/html/rfc4867">RFC 4867</a> 3619 </td> 3620 <td> 3621 See <a href="#5_1_1_audio_codecs">section 5.1.1</a> for details on AMR-WB 3622 </td> 3623 </tr> 3624 <tr> 3625 <td> 3626 MP4V-ES 3627 </td> 3628 <td> 3629 <a href="https://tools.ietf.org/html/rfc6416">RFC 6416</a> 3630 </td> 3631 <td> 3632 See <a href="#5_1_3_video_codecs">section 5.1.3</a> for details on MPEG-4 SP 3633 </td> 3634 </tr> 3635 <tr> 3636 <td> 3637 mpeg4-generic 3638 </td> 3639 <td> 3640 <a href="https://tools.ietf.org/html/rfc3640">RFC 3640</a> 3641 </td> 3642 <td> 3643 See <a href="#5_1_1_audio_codecs">section 5.1.1</a> for details on AAC and its variants 3644 </td> 3645 </tr> 3646 <tr> 3647 <td> 3648 MP2T 3649 </td> 3650 <td> 3651 <a href="https://tools.ietf.org/html/rfc2250">RFC 2250</a> 3652 </td> 3653 <td> 3654 See <a href="#mp2t">MPEG-2 Transport Stream</a> underneath HTTP Live Streaming for details 3655 </td> 3656 </tr> 3657 </table> 3658 <h3 id="5_8_secure_media"> 3659 5.8. Secure Media 3660 </h3> 3661 <p> 3662 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. 3663 </p> 3664 <h3 id="5_9_musical_instrument_digital_interface_(midi)"> 3665 5.9. Musical Instrument Digital Interface (MIDI) 3666 </h3> 3667 <p> 3668 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. 3669 </p> 3670 <p> 3671 The MIDI-capable hardware transports are: 3672 </p> 3673 <ul> 3674 <li>USB host mode (section 7.7 USB) 3675 </li> 3676 <li>USB peripheral mode (section 7.7 USB) 3677 </li> 3678 <li>MIDI over Bluetooth LE acting in central role (section 7.4.3 Bluetooth) 3679 </li> 3680 </ul> 3681 <p> 3682 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. 3683 </p> 3684 <h3 id="5_10_professional_audio"> 3685 5.10. Professional Audio 3686 </h3> 3687 <p> 3688 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. 3689 </p> 3690 <ul> 3691 <li>The device implementation MUST report support for feature android.hardware.audio.low_latency. 3692 </li> 3693 <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. 3694 </li> 3695 <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. 3696 </li> 3697 <li>The device implementation MUST include a USB port(s) supporting USB host mode and USB peripheral mode. 3698 </li> 3699 <li>The USB host mode MUST implement the USB audio class. 3700 </li> 3701 <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. 3702 </li> 3703 <li>The device implementation MUST report support for feature android.software.midi. 3704 </li> 3705 <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> . 3706 </li> 3707 </ul> 3708 <p> 3709 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. 3710 </p> 3711 <p> 3712 In addition, a device implementation that reports support for this feature SHOULD: 3713 </p> 3714 <ul> 3715 <li>Provide a sustainable level of CPU performance while audio is active. 3716 </li> 3717 <li>Minimize audio clock inaccuracy and drift relative to standard time. 3718 </li> 3719 <li>Minimize audio clock drift relative to the CPU <code>CLOCK_MONOTONIC</code> when both are active. 3720 </li> 3721 <li>Minimize audio latency over on-device transducers. 3722 </li> 3723 <li>Minimize audio latency over USB digital audio. 3724 </li> 3725 <li>Document audio latency measurements over all paths. 3726 </li> 3727 <li>Minimize jitter in audio buffer completion callback entry times, as this affects usable percentage of full CPU bandwidth by the callback. 3728 </li> 3729 <li>Provide zero audio underruns (output) or overruns (input) under normal use at reported latency. 3730 </li> 3731 <li>Provide zero inter-channel latency difference. 3732 </li> 3733 <li>Minimize MIDI mean latency over all transports. 3734 </li> 3735 <li>Minimize MIDI latency variability under load (jitter) over all transports. 3736 </li> 3737 <li>Provide accurate MIDI timestamps over all transports. 3738 </li> 3739 <li>Minimize audio signal noise over on-device transducers, including the period immediately after cold start. 3740 </li> 3741 <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. 3742 </li> 3743 <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. 3744 </li> 3745 <li>Minimize the phase difference between HAL audio buffering for the input and output sides of corresponding end-points. 3746 </li> 3747 <li>Minimize touch latency. 3748 </li> 3749 <li>Minimize touch latency variability under load (jitter). 3750 </li> 3751 </ul> 3752 <h3 id="5_11_capture_for_unprocessed"> 3753 5.11. Capture for Unprocessed 3754 </h3> 3755 <p> 3756 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> . 3757 </p> 3758 <p> 3759 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> : 3760 </p> 3761 <ul> 3762 <li> 3763 <p> 3764 The device MUST exhibit approximately flat amplitude-versus-frequency characteristics in the mid-frequency range: specifically 10dB from 100 Hz to 7000 Hz. 3765 </p> 3766 </li> 3767 <li> 3768 <p> 3769 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. 3770 </p> 3771 </li> 3772 <li> 3773 <p> 3774 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. 3775 </p> 3776 </li> 3777 <li> 3778 <p> 3779 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). 3780 </p> 3781 </li> 3782 <li> 3783 <p> 3784 SNR > 60 dB (difference between 94 dB SPL and equivalent SPL of self noise, A-weighted). 3785 </p> 3786 </li> 3787 <li> 3788 <p> 3789 Total harmonic distortion MUST be less than 1% for 1 kHZ at 90 dB SPL input level at the microphone. 3790 </p> 3791 </li> 3792 <li> 3793 <p> 3794 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. 3795 </p> 3796 </li> 3797 <li> 3798 <p> 3799 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. 3800 </p> 3801 </li> 3802 </ul> 3803 <p> 3804 All SPL measurements are made directly next to the microphone under test. 3805 </p> 3806 <p> 3807 For multiple microphone configurations, these requirements apply to each microphone. 3808 </p> 3809 <p> 3810 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. 3811 </p> 3812 <h2 id="6_developer_tools_and_options_compatibility"> 3813 6. Developer Tools and Options Compatibility 3814 </h2> 3815 <h3 id="6_1_developer_tools"> 3816 6.1. Developer Tools 3817 </h3> 3818 <p> 3819 Device implementations MUST support the Android Developer Tools provided in the Android SDK. Android compatible devices MUST be compatible with: 3820 </p> 3821 <ul> 3822 <li> 3823 <a href="http://developer.android.com/tools/help/adb.html"><strong>Android Debug Bridge (adb)</strong></a> 3824 <ul> 3825 <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> . 3826 </li> 3827 <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). 3828 </li> 3829 <li>Android includes support for secure adb. Secure adb enables adb on known authenticated hosts. Device implementations MUST support secure adb. 3830 </li> 3831 </ul> 3832 </li> 3833 <li> 3834 <a href="http://developer.android.com/tools/debugging/ddms.html"><strong>Dalvik Debug Monitor Service (ddms)</strong></a> 3835 <ul> 3836 <li>Device implementations MUST support all ddms features as documented in the Android SDK. 3837 </li> 3838 <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. 3839 </li> 3840 </ul> 3841 </li> 3842 <li> 3843 <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. 3844 </li> 3845 <li> 3846 <a href="http://developer.android.com/tools/help/systrace.html"><strong>SysTrace</strong></a> 3847 <ul> 3848 <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. 3849 </li> 3850 <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.) 3851 </li> 3852 <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. 3853 </li> 3854 </ul> 3855 </li> 3856 </ul> 3857 <h3 id="6_2_developer_options"> 3858 6.2. Developer Options 3859 </h3> 3860 <p> 3861 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. 3862 </p> 3863 <div class="note"> 3864 Android Automotive implementations MAY limit access to the Developer Options menu by visually hiding or disabling the menu when the vehicle is in motion. 3865 </div> 3866 <h2 id="7_hardware_compatibility"> 3867 7. Hardware Compatibility 3868 </h2> 3869 <p> 3870 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: 3871 </p> 3872 <ul> 3873 <li>Complete class definitions (as documented by the SDK) for the component APIs MUST still be presented. 3874 </li> 3875 <li>The APIs behaviors MUST be implemented as no-ops in some reasonable fashion. 3876 </li> 3877 <li>API methods MUST return null values where permitted by the SDK documentation. 3878 </li> 3879 <li>API methods MUST return no-op implementations of classes where null values are not permitted by the SDK documentation. 3880 </li> 3881 <li>API methods MUST NOT throw exceptions not documented by the SDK documentation. 3882 </li> 3883 </ul> 3884 <p> 3885 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. 3886 </p> 3887 <p> 3888 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. 3889 </p> 3890 <h3 id="7_1_display_and_graphics"> 3891 7.1. Display and Graphics 3892 </h3> 3893 <p> 3894 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. 3895 </p> 3896 <p> 3897 The units referenced by the requirements in this section are defined as follows: 3898 </p> 3899 <ul> 3900 <li> 3901 <strong>physical diagonal size</strong> . The distance in inches between two opposing corners of the illuminated portion of the display. 3902 </li> 3903 <li> 3904 <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. 3905 </li> 3906 <li> 3907 <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. 3908 </li> 3909 <li> 3910 <strong>density-independent pixel (dp)</strong> . The virtual pixel unit normalized to a 160 dpi screen, calculated as: pixels = dps * (density/160). 3911 </li> 3912 </ul> 3913 <h4 id="7_1_1_screen_configuration"> 3914 7.1.1. Screen Configuration 3915 </h4> 3916 <h5 id="7_1_1_1_screen_size"> 3917 7.1.1.1. Screen Size 3918 </h5> 3919 <div class="note"> 3920 Android Watch devices (detailed in <a href="#2_device_types">section 2</a> ) MAY have smaller screen sizes as described in this section. 3921 </div> 3922 <p> 3923 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. 3924 </p> 3925 <ul> 3926 <li>Devices MUST have screen sizes of at least 426 dp x 320 dp (small), unless it is an Android Watch device. 3927 </li> 3928 <li>Devices that report screen size normal MUST have screen sizes of at least 480 dp x 320 dp. 3929 </li> 3930 <li>Devices that report screen size large MUST have screen sizes of at least 640 dp x 480 dp. 3931 </li> 3932 <li>Devices that report screen size xlarge MUST have screen sizes of at least 960 dp x 720 dp. 3933 </li> 3934 </ul> 3935 <p> 3936 In addition: 3937 </p> 3938 <ul> 3939 <li>Android Watch devices MUST have a screen with the physical diagonal size in the range from 1.1 to 2.5 inches. 3940 </li> 3941 <li>Android Automotive devices MUST have a screen with the physical diagonal size greater than or equal to 6 inches. 3942 </li> 3943 <li>Android Automotive devices MUST have a screen size of at least 750 dp x 480 dp. 3944 </li> 3945 <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. 3946 </li> 3947 </ul> 3948 <p> 3949 Devices MUST NOT change their reported screen size at any time. 3950 </p> 3951 <p> 3952 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. 3953 </p> 3954 <h5 id="7_1_1_2_screen_aspect_ratio"> 3955 7.1.1.2. Screen Aspect Ratio 3956 </h5> 3957 <div class="note"> 3958 Android Watch devices MAY have an aspect ratio of 1.0 (1:1). 3959 </div> 3960 <p> 3961 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. 3962 </p> 3963 <h5 id="7_1_1_3_screen_density"> 3964 7.1.1.3. Screen Density 3965 </h5> 3966 <p> 3967 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. 3968 </p> 3969 <ul> 3970 <li>120 dpi (ldpi) 3971 </li> 3972 <li>160 dpi (mdpi) 3973 </li> 3974 <li>213 dpi (tvdpi) 3975 </li> 3976 <li>240 dpi (hdpi) 3977 </li> 3978 <li>280 dpi (280dpi) 3979 </li> 3980 <li>320 dpi (xhdpi) 3981 </li> 3982 <li>360 dpi (360dpi) 3983 </li> 3984 <li>400 dpi (400dpi) 3985 </li> 3986 <li>420 dpi (420dpi) 3987 </li> 3988 <li>480 dpi (xxhdpi) 3989 </li> 3990 <li>560 dpi (560dpi) 3991 </li> 3992 <li>640 dpi (xxxhdpi) 3993 </li> 3994 </ul> 3995 <p> 3996 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. 3997 </p> 3998 <p> 3999 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: 4000 </p> 4001 <ul> 4002 <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. 4003 </li> 4004 <li>Display size MUST NOT be scaled any smaller than 0.85 times the native density. 4005 </li> 4006 <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) 4007 </li> 4008 <li>Small: 0.85x 4009 </li> 4010 <li>Default: 1x (Native display scale) 4011 </li> 4012 <li>Large: 1.15x 4013 </li> 4014 <li>Larger: 1.3x 4015 </li> 4016 <li>Largest 1.45x 4017 </li> 4018 </ul> 4019 <h4 id="7_1_2_display_metrics"> 4020 7.1.2. Display Metrics 4021 </h4> 4022 <p> 4023 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. 4024 </p> 4025 <h4 id="7_1_3_screen_orientation"> 4026 7.1.3. Screen Orientation 4027 </h4> 4028 <p> 4029 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. 4030 </p> 4031 <p> 4032 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. 4033 </p> 4034 <p> 4035 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. 4036 </p> 4037 <p> 4038 Devices MUST NOT change the reported screen size or density when changing orientation. 4039 </p> 4040 <h4 id="7_1_4_2d_and_3d_graphics_acceleration"> 4041 7.1.4. 2D and 3D Graphics Acceleration 4042 </h4> 4043 <p> 4044 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. 4045 </p> 4046 <p> 4047 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: 4048 </p> 4049 <ul> 4050 <li>The managed APIs (such as via the GLES10.getString() method) MUST report support for OpenGL ES 1.0 and OpenGL ES 2.0. 4051 </li> 4052 <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. 4053 </li> 4054 <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. 4055 </li> 4056 </ul> 4057 <p> 4058 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. 4059 </p> 4060 <p> 4061 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. 4062 </p> 4063 <p> 4064 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. 4065 </p> 4066 <p> 4067 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. 4068 </p> 4069 <p> 4070 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. 4071 </p> 4072 <p> 4073 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> . 4074 </p> 4075 <p> 4076 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. 4077 </p> 4078 <p> 4079 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. 4080 </p> 4081 <h4 id="7_1_5_legacy_application_compatibility_mode"> 4082 7.1.5. Legacy Application Compatibility Mode 4083 </h4> 4084 <p> 4085 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. 4086 </p> 4087 <ul> 4088 <li>Android Automotive does not support legacy compatibility mode. 4089 </li> 4090 <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. 4091 </li> 4092 </ul> 4093 <h4 id="7_1_6_screen_technology"> 4094 7.1.6. Screen Technology 4095 </h4> 4096 <p> 4097 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. 4098 </p> 4099 <ul> 4100 <li>Devices MUST support displays capable of rendering 16-bit color graphics and SHOULD support displays capable of 24-bit color graphics. 4101 </li> 4102 <li>Devices MUST support displays capable of rendering animations. 4103 </li> 4104 <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. 4105 </li> 4106 </ul> 4107 <h4 id="7_1_7_secondary_displays"> 4108 7.1.7. Secondary Displays 4109 </h4> 4110 <p> 4111 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. 4112 </p> 4113 <h3 id="7_2_input_devices"> 4114 7.2. Input Devices 4115 </h3> 4116 <p> 4117 Devices MUST support a touchscreen or meet the requirements listed in 7.2.2 for non-touch navigation. 4118 </p> 4119 <h4 id="7_2_1_keyboard"> 4120 7.2.1. Keyboard 4121 </h4> 4122 <div class="note"> 4123 Android Watch and Android Automotive implementations MAY implement a soft keyboard. All other device implementations MUST implement a soft keyboard and: 4124 </div> 4125 <p> 4126 Device implementations: 4127 </p> 4128 <ul> 4129 <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> . 4130 </li> 4131 <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. 4132 </li> 4133 <li>MAY include additional soft keyboard implementations. 4134 </li> 4135 <li>MAY include a hardware keyboard. 4136 </li> 4137 <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). 4138 </li> 4139 </ul> 4140 <h4 id="7_2_2_non-touch_navigation"> 4141 7.2.2. Non-touch Navigation 4142 </h4> 4143 <div class="note"> 4144 Android Television devices MUST support D-pad. 4145 </div> 4146 <p> 4147 Device implementations: 4148 </p> 4149 <ul> 4150 <li>MAY omit a non-touch navigation option (trackball, d-pad, or wheel) if the device implementation is not an Android Television device. 4151 </li> 4152 <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> . 4153 </li> 4154 <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. 4155 </li> 4156 </ul> 4157 <h4 id="7_2_3_navigation_keys"> 4158 7.2.3. Navigation Keys 4159 </h4> 4160 <div class="note"> 4161 The availability and visibility requirement of the Home, Recents, and Back functions differ between device types as described in this section. 4162 </div> 4163 <p> 4164 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: 4165 </p> 4166 <ul> 4167 <li>Android Handheld device implementations MUST provide the Home, Recents, and Back functions. 4168 </li> 4169 <li>Android Television device implementations MUST provide the Home and Back functions. 4170 </li> 4171 <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> . 4172 </li> 4173 <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. 4174 </li> 4175 <li>Android Automotive implementations MUST provide the Home function and MAY provide Back and Recent functions. 4176 </li> 4177 <li>All other types of device implementations MUST provide the Home and Back functions. 4178 </li> 4179 </ul> 4180 <p> 4181 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. 4182 </p> 4183 <p> 4184 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. 4185 </p> 4186 <p> 4187 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. 4188 </p> 4189 <p> 4190 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: 4191 </p> 4192 <ul> 4193 <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. 4194 </li> 4195 <li>MUST NOT modify the position of the action overflow popup displayed by selecting the overflow button in the action bar. 4196 </li> 4197 <li>MAY render the action overflow popup at a modified position on the screen when it is displayed by selecting the physical menu button. 4198 </li> 4199 </ul> 4200 <p> 4201 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. 4202 </p> 4203 <p> 4204 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. 4205 </p> 4206 <p> 4207 Device implementations MAY use a distinct portion of the screen to display the navigation keys, but if so, MUST meet these requirements: 4208 </p> 4209 <ul> 4210 <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. 4211 </li> 4212 <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> . 4213 </li> 4214 <li>Device implementations MUST display the navigation keys when applications do not specify a system UI mode, or specify SYSTEM_UI_FLAG_VISIBLE. 4215 </li> 4216 <li>Device implementations MUST present the navigation keys in an unobtrusive low profile (eg. dimmed) mode when applications specify SYSTEM_UI_FLAG_LOW_PROFILE. 4217 </li> 4218 <li>Device implementations MUST hide the navigation keys when applications specify SYSTEM_UI_FLAG_HIDE_NAVIGATION. 4219 </li> 4220 </ul> 4221 <h4 id="7_2_4_touchscreen_input"> 4222 7.2.4. Touchscreen Input 4223 </h4> 4224 <div class="note"> 4225 Android Handhelds and Watch Devices MUST support touchscreen input. 4226 </div> 4227 <p> 4228 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: 4229 </p> 4230 <ul> 4231 <li>SHOULD support fully independently tracked pointers, if the device input system supports multiple pointers. 4232 </li> 4233 <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. 4234 </li> 4235 </ul> 4236 <p> 4237 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> . 4238 </p> 4239 <p> 4240 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> . 4241 </p> 4242 <h4 id="7_2_5_fake_touch_input"> 4243 7.2.5. Fake Touch Input 4244 </h4> 4245 <p> 4246 Device implementations that declare support for android.hardware.faketouch: 4247 </p> 4248 <ul> 4249 <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. 4250 </li> 4251 <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> . 4252 </li> 4253 <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. 4254 </li> 4255 <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. 4256 </li> 4257 <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. 4258 </li> 4259 <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. 4260 </li> 4261 </ul> 4262 <p> 4263 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. 4264 </p> 4265 <h4 id="7_2_6_game_controller_support"> 4266 7.2.6. Game Controller Support 4267 </h4> 4268 <p> 4269 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. 4270 </p> 4271 <h5 id="7_2_6_1_button_mappings"> 4272 7.2.6.1. Button Mappings 4273 </h5> 4274 <p> 4275 Android Television device implementations MUST support the following key mappings: 4276 </p> 4277 <table> 4278 <tr> 4279 <th> 4280 Button 4281 </th> 4282 <th> 4283 HID Usage <sup>2</sup> 4284 </th> 4285 <th> 4286 Android Button 4287 </th> 4288 </tr> 4289 <tr> 4290 <td> 4291 <a href="http://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_BUTTON_A">A</a> <sup>1</sup> 4292 </td> 4293 <td> 4294 0x09 0x0001 4295 </td> 4296 <td> 4297 KEYCODE_BUTTON_A (96) 4298 </td> 4299 </tr> 4300 <tr> 4301 <td> 4302 <a href="http://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_BUTTON_B">B</a> <sup>1</sup> 4303 </td> 4304 <td> 4305 0x09 0x0002 4306 </td> 4307 <td> 4308 KEYCODE_BUTTON_B (97) 4309 </td> 4310 </tr> 4311 <tr> 4312 <td> 4313 <a href="http://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_BUTTON_X">X</a> <sup>1</sup> 4314 </td> 4315 <td> 4316 0x09 0x0004 4317 </td> 4318 <td> 4319 KEYCODE_BUTTON_X (99) 4320 </td> 4321 </tr> 4322 <tr> 4323 <td> 4324 <a href="http://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_BUTTON_Y">Y</a> <sup>1</sup> 4325 </td> 4326 <td> 4327 0x09 0x0005 4328 </td> 4329 <td> 4330 KEYCODE_BUTTON_Y (100) 4331 </td> 4332 </tr> 4333 <tr> 4334 <td> 4335 <a href="http://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_DPAD_UP">D-pad up</a> <sup>1</sup><br /> 4336 <a href="http://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_DPAD_DOWN">D-pad down</a> <sup>1</sup> 4337 </td> 4338 <td> 4339 0x01 0x0039 <sup>3</sup> 4340 </td> 4341 <td> 4342 <a href="http://developer.android.com/reference/android/view/MotionEvent.html#AXIS_HAT_Y">AXIS_HAT_Y</a> <sup>4</sup> 4343 </td> 4344 </tr> 4345 <tr> 4346 <td> 4347 <a href="http://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_DPAD_LEFT">D-pad left</a> 1<br /> 4348 <a href="http://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_DPAD_RIGHT">D-pad right</a> <sup>1</sup> 4349 </td> 4350 <td> 4351 0x01 0x0039 <sup>3</sup> 4352 </td> 4353 <td> 4354 <a href="http://developer.android.com/reference/android/view/MotionEvent.html#AXIS_HAT_X">AXIS_HAT_X</a> <sup>4</sup> 4355 </td> 4356 </tr> 4357 <tr> 4358 <td> 4359 <a href="http://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_BUTTON_L1">Left shoulder button</a> <sup>1</sup> 4360 </td> 4361 <td> 4362 0x09 0x0007 4363 </td> 4364 <td> 4365 KEYCODE_BUTTON_L1 (102) 4366 </td> 4367 </tr> 4368 <tr> 4369 <td> 4370 <a href="http://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_BUTTON_R1">Right shoulder button</a> <sup>1</sup> 4371 </td> 4372 <td> 4373 0x09 0x0008 4374 </td> 4375 <td> 4376 KEYCODE_BUTTON_R1 (103) 4377 </td> 4378 </tr> 4379 <tr> 4380 <td> 4381 <a href="http://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_BUTTON_THUMBL">Left stick click</a> <sup>1</sup> 4382 </td> 4383 <td> 4384 0x09 0x000E 4385 </td> 4386 <td> 4387 KEYCODE_BUTTON_THUMBL (106) 4388 </td> 4389 </tr> 4390 <tr> 4391 <td> 4392 <a href="http://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_BUTTON_THUMBR">Right stick click</a> <sup>1</sup> 4393 </td> 4394 <td> 4395 0x09 0x000F 4396 </td> 4397 <td> 4398 KEYCODE_BUTTON_THUMBR (107) 4399 </td> 4400 </tr> 4401 <tr> 4402 <td> 4403 <a href="http://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_HOME">Home</a> <sup>1</sup> 4404 </td> 4405 <td> 4406 0x0c 0x0223 4407 </td> 4408 <td> 4409 KEYCODE_HOME (3) 4410 </td> 4411 </tr> 4412 <tr> 4413 <td> 4414 <a href="http://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_BACK">Back</a> <sup>1</sup> 4415 </td> 4416 <td> 4417 0x0c 0x0224 4418 </td> 4419 <td> 4420 KEYCODE_BACK (4) 4421 </td> 4422 </tr> 4423 </table> 4424 <p class="table_footnote"> 4425 1 <a href="http://developer.android.com/reference/android/view/KeyEvent.html">KeyEvent</a> 4426 </p> 4427 <p class="table_footnote"> 4428 2 The above HID usages must be declared within a Game pad CA (0x01 0x0005). 4429 </p> 4430 <p class="table_footnote"> 4431 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. 4432 </p> 4433 <p class="table_footnote"> 4434 4 <a href="http://developer.android.com/reference/android/view/MotionEvent.html">MotionEvent</a> 4435 </p> 4436 <table> 4437 <tr> 4438 <th> 4439 Analog Controls <sup>1</sup> 4440 </th> 4441 <th> 4442 HID Usage 4443 </th> 4444 <th> 4445 Android Button 4446 </th> 4447 </tr> 4448 <tr> 4449 <td> 4450 <a href="http://developer.android.com/reference/android/view/MotionEvent.html#AXIS_LTRIGGER">Left Trigger</a> 4451 </td> 4452 <td> 4453 0x02 0x00C5 4454 </td> 4455 <td> 4456 AXIS_LTRIGGER 4457 </td> 4458 </tr> 4459 <tr> 4460 <td> 4461 <a href="http://developer.android.com/reference/android/view/MotionEvent.html#AXIS_THROTTLE">Right Trigger</a> 4462 </td> 4463 <td> 4464 0x02 0x00C4 4465 </td> 4466 <td> 4467 AXIS_RTRIGGER 4468 </td> 4469 </tr> 4470 <tr> 4471 <td> 4472 <a href="http://developer.android.com/reference/android/view/MotionEvent.html#AXIS_Y">Left Joystick</a> 4473 </td> 4474 <td> 4475 0x01 0x0030<br /> 4476 0x01 0x0031 4477 </td> 4478 <td> 4479 AXIS_X<br /> 4480 AXIS_Y 4481 </td> 4482 </tr> 4483 <tr> 4484 <td> 4485 <a href="http://developer.android.com/reference/android/view/MotionEvent.html#AXIS_Z">Right Joystick</a> 4486 </td> 4487 <td> 4488 0x01 0x0032<br /> 4489 0x01 0x0035 4490 </td> 4491 <td> 4492 AXIS_Z<br /> 4493 AXIS_RZ 4494 </td> 4495 </tr> 4496 </table> 4497 <p class="table_footnote"> 4498 1 <a href="http://developer.android.com/reference/android/view/MotionEvent.html">MotionEvent</a> 4499 </p> 4500 <h4 id="7_2_7_remote_control"> 4501 7.2.7. Remote Control 4502 </h4> 4503 <p> 4504 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. 4505 </p> 4506 <ul> 4507 <li> 4508 <strong>Search affordance</strong> . Device implementations MUST fire KEYCODE_SEARCH when the user invokes voice search either on the physical or software-based remote. 4509 </li> 4510 <li> 4511 <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> . 4512 </li> 4513 </ul> 4514 <h3 id="7_3_sensors"> 4515 7.3. Sensors 4516 </h3> 4517 <p> 4518 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: 4519 </p> 4520 <ul> 4521 <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. 4522 </li> 4523 <li>MUST return an accurate list of supported sensors via the SensorManager.getSensorList() and similar methods. 4524 </li> 4525 <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.). 4526 </li> 4527 <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. 4528 </li> 4529 <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. 4530 </li> 4531 <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. 4532 </li> 4533 <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. 4534 </li> 4535 </ul> 4536 <p> 4537 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. 4538 </p> 4539 <p> 4540 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> . 4541 </p> 4542 <p> 4543 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. 4544 </p> 4545 <p> 4546 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. 4547 </p> 4548 <p> 4549 Finally, when several sensors are activated, the power consumption SHOULD NOT exceed the sum of the individual sensors reported power consumption. 4550 </p> 4551 <h4 id="7_3_1_accelerometer"> 4552 7.3.1. Accelerometer 4553 </h4> 4554 <p> 4555 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: 4556 </p> 4557 <ul> 4558 <li>MUST implement and report <a href="http://developer.android.com/reference/android/hardware/Sensor.html#TYPE_ACCELEROMETER">TYPE_ACCELEROMETER sensor</a> . 4559 </li> 4560 <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. 4561 </li> 4562 <li>SHOULD report events up to at least 200 Hz. 4563 </li> 4564 <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> . 4565 </li> 4566 <li>MUST be capable of measuring from freefall up to four times the gravity (4g) or more on any axis. 4567 </li> 4568 <li>MUST have a resolution of at least 12-bits and SHOULD have a resolution of at least 16-bits. 4569 </li> 4570 <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. 4571 </li> 4572 <li>SHOULD be temperature compensated. 4573 </li> 4574 <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. 4575 </li> 4576 <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. 4577 </li> 4578 <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. 4579 </li> 4580 <li>MUST implement a TYPE_ROTATION_VECTOR composite sensor, if a gyroscope sensor and a magnetometer sensor is also included. 4581 </li> 4582 </ul> 4583 <h4 id="7_3_2_magnetometer"> 4584 7.3.2. Magnetometer 4585 </h4> 4586 <p> 4587 Device implementations SHOULD include a 3-axis magnetometer (compass). If a device does include a 3-axis magnetometer, it: 4588 </p> 4589 <ul> 4590 <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. 4591 </li> 4592 <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. 4593 </li> 4594 <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. 4595 </li> 4596 <li>MUST be capable of measuring between -900 T and +900 T on each axis before saturating. 4597 </li> 4598 <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. 4599 </li> 4600 <li>MUST have a resolution equal or denser than 0.6 T and SHOULD have a resolution equal or denser than 0.2 T. 4601 </li> 4602 <li>SHOULD be temperature compensated. 4603 </li> 4604 <li>MUST support online calibration and compensation of the hard iron bias, and preserve the compensation parameters between device reboots. 4605 </li> 4606 <li>MUST have the soft iron compensation appliedthe calibration can be done either while in use or during the production of the device. 4607 </li> 4608 <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. 4609 </li> 4610 <li>MUST implement a TYPE_ROTATION_VECTOR composite sensor, if an accelerometer sensor and a gyroscope sensor is also included. 4611 </li> 4612 <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. 4613 </li> 4614 </ul> 4615 <h4 id="7_3_3_gps"> 4616 7.3.3. GPS 4617 </h4> 4618 <p> 4619 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: 4620 </p> 4621 <ul> 4622 <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. 4623 </li> 4624 <li>It MUST support location outputs at a rate of at least 1 Hz when requested via <code>LocationManager#requestLocationUpdate</code> . 4625 </li> 4626 <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). 4627 <ul> 4628 <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. 4629 </li> 4630 </ul> 4631 </li> 4632 <li>In open sky conditions after determining the location, while stationary or moving with less than 1 meter per second squared of acceleration: 4633 <ul> 4634 <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. 4635 </li> 4636 <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. 4637 </li> 4638 <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). 4639 </li> 4640 </ul> 4641 </li> 4642 <li>It MUST report the GNSS technology generation through the test API getGnssYearOfHardware. 4643 </li> 4644 <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. 4645 <ul> 4646 <li>It MUST report GPS measurements, as soon as they are found, even if a location calculated from GPS/GNSS is not yet reported. 4647 </li> 4648 <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. 4649 </li> 4650 </ul> 4651 </li> 4652 </ul> 4653 <p> 4654 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. 4655 </p> 4656 <h4 id="7_3_4_gyroscope"> 4657 7.3.4. Gyroscope 4658 </h4> 4659 <p> 4660 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: 4661 </p> 4662 <ul> 4663 <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. 4664 </li> 4665 <li>MUST be capable of measuring orientation changes up to 1,000 degrees per second. 4666 </li> 4667 <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. 4668 </li> 4669 <li>SHOULD report events up to at least 200 Hz. 4670 </li> 4671 <li>MUST have a resolution of 12-bits or more and SHOULD have a resolution of 16-bits or more. 4672 </li> 4673 <li>MUST be temperature compensated. 4674 </li> 4675 <li>MUST be calibrated and compensated while in use, and preserve the compensation parameters between device reboots. 4676 </li> 4677 <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. 4678 </li> 4679 <li>MUST implement a TYPE_ROTATION_VECTOR composite sensor, if an accelerometer sensor and a magnetometer sensor is also included. 4680 </li> 4681 <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. 4682 </li> 4683 </ul> 4684 <h4 id="7_3_5_barometer"> 4685 7.3.5. Barometer 4686 </h4> 4687 <p> 4688 Device implementations SHOULD include a barometer (ambient air pressure sensor). If a device implementation includes a barometer, it: 4689 </p> 4690 <ul> 4691 <li>MUST implement and report TYPE_PRESSURE sensor. 4692 </li> 4693 <li>MUST be able to deliver events at 5 Hz or greater. 4694 </li> 4695 <li>MUST have adequate precision to enable estimating altitude. 4696 </li> 4697 <li>MUST be temperature compensated. 4698 </li> 4699 </ul> 4700 <h4 id="7_3_6_thermometer"> 4701 7.3.6. Thermometer 4702 </h4> 4703 <p> 4704 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. 4705 </p> 4706 <p> 4707 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. 4708 </p> 4709 <div class="note"> 4710 For Android Automotive implementations, SENSOR_TYPE_AMBIENT_TEMPERATURE MUST measure the temperature inside the vehicle cabin. 4711 </div> 4712 <h4 id="7_3_7_photometer"> 4713 7.3.7. Photometer 4714 </h4> 4715 <p> 4716 Device implementations MAY include a photometer (ambient light sensor). 4717 </p> 4718 <h4 id="7_3_8_proximity_sensor"> 4719 7.3.8. Proximity Sensor 4720 </h4> 4721 <p> 4722 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: 4723 </p> 4724 <ul> 4725 <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. 4726 </li> 4727 <li>MUST have 1-bit of accuracy or more. 4728 </li> 4729 </ul> 4730 <h4 id="7_3_9_high_fidelity_sensors"> 4731 7.3.9. High Fidelity Sensors 4732 </h4> 4733 <p> 4734 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. 4735 </p> 4736 <p> 4737 A device declaring android.hardware.sensor.hifi_sensors MUST support all of the following sensor types meeting the quality requirements as below: 4738 </p> 4739 <ul> 4740 <li>SENSOR_TYPE_ACCELEROMETER 4741 <ul> 4742 <li>MUST have a measurement range between at least -8g and +8g. 4743 </li> 4744 <li>MUST have a measurement resolution of at least 1024 LSB/G. 4745 </li> 4746 <li>MUST have a minimum measurement frequency of 12.5 Hz or lower. 4747 </li> 4748 <li>MUST have a maximum measurement frequency of 400 Hz or higher. 4749 </li> 4750 <li>MUST have a measurement noise not above 400 uG/Hz. 4751 </li> 4752 <li>MUST implement a non-wake-up form of this sensor with a buffering capability of at least 3000 sensor events. 4753 </li> 4754 <li>MUST have a batching power consumption not worse than 3 mW. 4755 </li> 4756 <li>SHOULD have a stationary noise bias stability of \<15 g Hz from 24hr static dataset. 4757 </li> 4758 <li>SHOULD have a bias change vs. temperature of +/- 1mg / C. 4759 </li> 4760 <li>SHOULD have a best-fit line non-linearity of 0.5%, and sensitivity change vs. temperature of 0.03%/C. 4761 </li> 4762 </ul> 4763 </li> 4764 <li> 4765 <p> 4766 SENSOR_TYPE_GYROSCOPE 4767 </p> 4768 <ul> 4769 <li>MUST have a measurement range between at least -1000 and +1000 dps. 4770 </li> 4771 <li>MUST have a measurement resolution of at least 16 LSB/dps. 4772 </li> 4773 <li>MUST have a minimum measurement frequency of 12.5 Hz or lower. 4774 </li> 4775 <li>MUST have a maximum measurement frequency of 400 Hz or higher. 4776 </li> 4777 <li>MUST have a measurement noise not above 0.014/s/Hz. 4778 </li> 4779 <li>SHOULD have a stationary bias stability of < 0.0002 /s Hz from 24-hour static dataset. 4780 </li> 4781 <li>SHOULD have a bias change vs. temperature of +/- 0.05 / s / C. 4782 </li> 4783 <li>SHOULD have a sensitivity change vs. temperature of 0.02% / C. 4784 </li> 4785 <li>SHOULD have a best-fit line non-linearity of 0.2%. 4786 </li> 4787 <li>SHOULD have a noise density of 0.007 /s/Hz. 4788 </li> 4789 </ul> 4790 </li> 4791 <li> 4792 <p> 4793 SENSOR_TYPE_GYROSCOPE_UNCALIBRATED with the same quality requirements as SENSOR_TYPE_GYROSCOPE. 4794 </p> 4795 </li> 4796 <li>SENSOR_TYPE_GEOMAGNETIC_FIELD 4797 <ul> 4798 <li>MUST have a measurement range between at least -900 and +900 uT. 4799 </li> 4800 <li>MUST have a measurement resolution of at least 5 LSB/uT. 4801 </li> 4802 <li>MUST have a minimum measurement frequency of 5 Hz or lower. 4803 </li> 4804 <li>MUST have a maximum measurement frequency of 50 Hz or higher. 4805 </li> 4806 <li>MUST have a measurement noise not above 0.5 uT. 4807 </li> 4808 </ul> 4809 </li> 4810 <li>SENSOR_TYPE_MAGNETIC_FIELD_UNCALIBRATED with the same quality requirements as SENSOR_TYPE_GEOMAGNETIC_FIELD and in addition: 4811 <ul> 4812 <li>MUST implement a non-wake-up form of this sensor with a buffering capability of at least 600 sensor events. 4813 </li> 4814 </ul> 4815 </li> 4816 <li>SENSOR_TYPE_PRESSURE 4817 <ul> 4818 <li>MUST have a measurement range between at least 300 and 1100 hPa. 4819 </li> 4820 <li>MUST have a measurement resolution of at least 80 LSB/hPa. 4821 </li> 4822 <li>MUST have a minimum measurement frequency of 1 Hz or lower. 4823 </li> 4824 <li>MUST have a maximum measurement frequency of 10 Hz or higher. 4825 </li> 4826 <li>MUST have a measurement noise not above 2 Pa/Hz. 4827 </li> 4828 <li>MUST implement a non-wake-up form of this sensor with a buffering capability of at least 300 sensor events. 4829 </li> 4830 <li>MUST have a batching power consumption not worse than 2 mW. 4831 </li> 4832 </ul> 4833 </li> 4834 <li>SENSOR_TYPE_GAME_ROTATION_VECTOR 4835 <ul> 4836 <li>MUST implement a non-wake-up form of this sensor with a buffering capability of at least 300 sensor events. 4837 </li> 4838 <li>MUST have a batching power consumption not worse than 4 mW. 4839 </li> 4840 </ul> 4841 </li> 4842 <li>SENSOR_TYPE_SIGNIFICANT_MOTION 4843 <ul> 4844 <li>MUST have a power consumption not worse than 0.5 mW when device is static and 1.5 mW when device is moving. 4845 </li> 4846 </ul> 4847 </li> 4848 <li>SENSOR_TYPE_STEP_DETECTOR 4849 <ul> 4850 <li>MUST implement a non-wake-up form of this sensor with a buffering capability of at least 100 sensor events. 4851 </li> 4852 <li>MUST have a power consumption not worse than 0.5 mW when device is static and 1.5 mW when device is moving. 4853 </li> 4854 <li>MUST have a batching power consumption not worse than 4 mW. 4855 </li> 4856 </ul> 4857 </li> 4858 <li>SENSOR_TYPE_STEP_COUNTER 4859 <ul> 4860 <li>MUST have a power consumption not worse than 0.5 mW when device is static and 1.5 mW when device is moving. 4861 </li> 4862 </ul> 4863 </li> 4864 <li>SENSOR_TILT_DETECTOR 4865 <ul> 4866 <li>MUST have a power consumption not worse than 0.5 mW when device is static and 1.5 mW when device is moving. 4867 </li> 4868 </ul> 4869 </li> 4870 </ul> 4871 <p> 4872 Also such a device MUST meet the following sensor subsystem requirements: 4873 </p> 4874 <ul> 4875 <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. 4876 </li> 4877 <li>The Gyroscope sensor event timestamps MUST be on the same time base as the camera subsystem and within 1 milliseconds of error. 4878 </li> 4879 <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. 4880 </li> 4881 <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: 4882 <ul> 4883 <li>SENSOR_TYPE_SIGNIFICANT_MOTION 4884 </li> 4885 <li>SENSOR_TYPE_STEP_DETECTOR 4886 </li> 4887 <li>SENSOR_TYPE_STEP_COUNTER 4888 </li> 4889 <li>SENSOR_TILT_DETECTORS 4890 </li> 4891 </ul> 4892 </li> 4893 </ul> 4894 <p> 4895 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. 4896 </p> 4897 <p> 4898 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: 4899 </p> 4900 <ul> 4901 <li>SENSOR_TYPE_PROXIMITY: 100 sensor events 4902 </li> 4903 </ul> 4904 <h4 id="7_3_10_fingerprint_sensor"> 4905 7.3.10. Fingerprint Sensor 4906 </h4> 4907 <p> 4908 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: 4909 </p> 4910 <ul> 4911 <li>MUST declare support for the android.hardware.fingerprint feature. 4912 </li> 4913 <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. 4914 </li> 4915 <li>MUST have a false acceptance rate not higher than 0.002%. 4916 </li> 4917 <li>Is STRONGLY RECOMMENDED to have a false rejection rate of less than 10%, as measured on the device 4918 </li> 4919 <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. 4920 </li> 4921 <li>MUST rate limit attempts for at least 30 seconds after five false trials for fingerprint verification. 4922 </li> 4923 <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. 4924 </li> 4925 <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. 4926 </li> 4927 <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. 4928 </li> 4929 <li>MUST NOT enable 3rd-party applications to distinguish between individual fingerprints. 4930 </li> 4931 <li>MUST honor the DevicePolicyManager.KEYGUARD_DISABLE_FINGERPRINT flag. 4932 </li> 4933 <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. 4934 </li> 4935 <li>SHOULD use the Android Fingerprint icon provided in the Android Open Source Project. 4936 </li> 4937 </ul> 4938 <h4 id="7_3_11_android_automotive-only_sensors"> 4939 7.3.11. Android Automotive-only sensors 4940 </h4> 4941 <p> 4942 Automotive-specific sensors are defined in the <code>android.car.CarSensorManager API</code> . 4943 </p> 4944 <h5 id="7_3_11_1_current_gear"> 4945 7.3.11.1. Current Gear 4946 </h5> 4947 <p> 4948 Android Automotive implementations SHOULD provide current gear as SENSOR_TYPE_GEAR. 4949 </p> 4950 <h5 id="7_3_11_2_day_night_mode"> 4951 7.3.11.2. Day Night Mode 4952 </h5> 4953 <p> 4954 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> . 4955 </p> 4956 <h5 id="7_3_11_3_driving_status"> 4957 7.3.11.3. Driving Status 4958 </h5> 4959 <p> 4960 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. 4961 </p> 4962 <h5 id="7_3_11_4_wheel_speed"> 4963 7.3.11.4. Wheel Speed 4964 </h5> 4965 <p> 4966 Android Automotive implementations MUST provide vehicle speed defined as SENSOR_TYPE_CAR_SPEED. 4967 </p> 4968 <h3 id="7_3_12_pose_sensor"> 4969 7.3.12. Pose Sensor 4970 </h3> 4971 <p> 4972 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: 4973 </p> 4974 <ul> 4975 <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. 4976 </li> 4977 <li>MUST be more accurate than the rotation vector alone. 4978 </li> 4979 </ul> 4980 <h3 id="7_4_data_connectivity"> 4981 7.4. Data Connectivity 4982 </h3> 4983 <h4 id="7_4_1_telephony"> 4984 7.4.1. Telephony 4985 </h4> 4986 <p> 4987 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. 4988 </p> 4989 <p> 4990 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. 4991 </p> 4992 <h5 id="7_4_1_1_number_blocking_compatibility"> 4993 7.4.1.1. Number Blocking Compatibility 4994 </h5> 4995 <p> 4996 Android Telephony device implementations MUST include number blocking support and: 4997 </p> 4998 <ul> 4999 <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. 5000 </li> 5001 <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. 5002 </li> 5003 <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. 5004 </li> 5005 <li>MUST NOT write to the <a href="http://developer.android.com/reference/android/provider/Telephony.html">Telephony provider</a> for a blocked message. 5006 </li> 5007 <li>MUST implement a blocked numbers management UI, which is opened with the intent returned by TelecomManager.createManageBlockedNumbersIntent() method. 5008 </li> 5009 <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. 5010 </li> 5011 <li>SHOULD migrate the blocked numbers into the provider when a device updates to Android 7.0. 5012 </li> 5013 </ul> 5014 <h4 id="7_4_2_ieee_802_11_(wi-fi)"> 5015 7.4.2. IEEE 802.11 (Wi-Fi) 5016 </h4> 5017 <p> 5018 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: 5019 </p> 5020 <ul> 5021 <li>MUST report the hardware feature flag android.hardware.wifi. 5022 </li> 5023 <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. 5024 </li> 5025 <li>MUST support multicast DNS (mDNS) and MUST NOT filter mDNS packets (224.0.0.251) at any time of operation including: 5026 <ul> 5027 <li>Even when the screen is not in an active state. 5028 </li> 5029 <li>For Android Television device implementations, even when in standby power states. 5030 </li> 5031 </ul> 5032 </li> 5033 </ul> 5034 <h5 id="7_4_2_1_wi-fi_direct"> 5035 7.4.2.1. Wi-Fi Direct 5036 </h5> 5037 <p> 5038 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: 5039 </p> 5040 <ul> 5041 <li>MUST report the hardware feature android.hardware.wifi.direct. 5042 </li> 5043 <li>MUST support regular Wi-Fi operation. 5044 </li> 5045 <li>SHOULD support concurrent Wi-Fi and Wi-Fi Direct operation. 5046 </li> 5047 </ul> 5048 <h5 id="7_4_2_2_wi-fi_tunneled_direct_link_setup"> 5049 7.4.2.2. Wi-Fi Tunneled Direct Link Setup 5050 </h5> 5051 <p> 5052 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: 5053 </p> 5054 <ul> 5055 <li>SHOULD use TDLS only when it is possible AND beneficial. 5056 </li> 5057 <li>SHOULD have some heuristic and NOT use TDLS when its performance might be worse than going through the Wi-Fi access point. 5058 </li> 5059 </ul> 5060 <h4 id="7_4_3_bluetooth"> 5061 7.4.3. Bluetooth 5062 </h4> 5063 <div class="note"> 5064 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. 5065 </div> 5066 <p> 5067 Device implementations that support <code>android.hardware.vr.high_performance</code> feature MUST support Bluetooth 4.2 and Bluetooth LE Data Length Extension. 5068 </p> 5069 <p> 5070 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. 5071 </p> 5072 <p> 5073 Android Automotive implementations SHOULD support Message Access Profile (MAP). Android Automotive implementations MUST support the following Bluetooth profiles: 5074 </p> 5075 <ul> 5076 <li>Phone calling over Hands-Free Profile (HFP). 5077 </li> 5078 <li>Media playback over Audio Distribution Profile (A2DP). 5079 </li> 5080 <li>Media playback control over Remote Control Profile (AVRCP). 5081 </li> 5082 <li>Contact sharing using the Phone Book Access Profile (PBAP). 5083 </li> 5084 </ul> 5085 <p> 5086 Device implementations including support for Bluetooth Low Energy: 5087 </p> 5088 <ul> 5089 <li>MUST declare the hardware feature android.hardware.bluetooth_le. 5090 </li> 5091 <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> . 5092 </li> 5093 <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. 5094 </li> 5095 <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. 5096 </li> 5097 <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. 5098 </li> 5099 <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. 5100 </li> 5101 </ul> 5102 <h4 id="7_4_4_near-field_communications"> 5103 7.4.4. Near-Field Communications 5104 </h4> 5105 <p> 5106 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: 5107 </p> 5108 <ul> 5109 <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> . 5110 </li> 5111 <li>MUST be capable of reading and writing NDEF messages via the following NFC standards: 5112 <ul> 5113 <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: 5114 <ul> 5115 <li>NfcA (ISO14443-3A) 5116 </li> 5117 <li>NfcB (ISO14443-3B) 5118 </li> 5119 <li>NfcF (JIS X 6319-4) 5120 </li> 5121 <li>IsoDep (ISO 14443-4) 5122 </li> 5123 <li>NFC Forum Tag Types 1, 2, 3, 4 (defined by the NFC Forum) 5124 </li> 5125 </ul> 5126 </li> 5127 <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. 5128 <ul> 5129 <li>NfcV (ISO 15693) 5130 </li> 5131 </ul> 5132 </li> 5133 <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. 5134 </li> 5135 <li>MUST be capable of transmitting and receiving data via the following peer-to-peer standards and protocols: 5136 <ul> 5137 <li>ISO 18092 5138 </li> 5139 <li>LLCP 1.2 (defined by the NFC Forum) 5140 </li> 5141 <li>SDP 1.0 (defined by the NFC Forum) 5142 </li> 5143 <li> 5144 <a href="http://static.googleusercontent.com/media/source.android.com/en/us/compatibility/ndef-push-protocol.pdf">NDEF Push Protocol</a> 5145 </li> 5146 <li>SNEP 1.0 (defined by the NFC Forum) 5147 </li> 5148 </ul> 5149 </li> 5150 <li>MUST include support for <a href="http://developer.android.com/guide/topics/connectivity/nfc/nfc.html">Android Beam</a> . 5151 </li> 5152 <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. 5153 </li> 5154 <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> . 5155 </li> 5156 <li>MUST implement the NPP server. Messages received by the NPP server MUST be processed the same way as the SNEP default server. 5157 </li> 5158 <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. 5159 </li> 5160 <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. 5161 </li> 5162 <li>SHOULD use a gesture or on-screen confirmation, such as 'Touch to Beam', before sending outbound P2P NDEF messages. 5163 </li> 5164 <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. 5165 </li> 5166 <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. 5167 </li> 5168 <li>MUST poll for all supported technologies while in NFC discovery mode. 5169 </li> 5170 <li>SHOULD be in NFC discovery mode while the device is awake with the screen active and the lock-screen unlocked. 5171 </li> 5172 </ul> 5173 </li> 5174 </ul> 5175 <p> 5176 (Note that publicly available links are not available for the JIS, ISO, and NFC Forum specifications cited above.) 5177 </p> 5178 <p> 5179 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: 5180 </p> 5181 <ul> 5182 <li>MUST report the android.hardware.nfc.hce feature constant. 5183 </li> 5184 <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. 5185 </li> 5186 </ul> 5187 <p> 5188 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: 5189 </p> 5190 <ul> 5191 <li>MUST report the android.hardware.nfc.hcef feature constant. 5192 </li> 5193 <li>MUST implement the [NfcF Card Emulation APIs] (https://developer.android.com/reference/android/nfc/cardemulation/NfcFCardEmulation.html) as defined in the Android SDK. 5194 </li> 5195 </ul> 5196 <p> 5197 Additionally, device implementations MAY include reader/writer support for the following MIFARE technologies. 5198 </p> 5199 <ul> 5200 <li>MIFARE Classic 5201 </li> 5202 <li>MIFARE Ultralight 5203 </li> 5204 <li>NDEF on MIFARE Classic 5205 </li> 5206 </ul> 5207 <p> 5208 Note that Android includes APIs for these MIFARE types. If a device implementation supports MIFARE in the reader/writer role, it: 5209 </p> 5210 <ul> 5211 <li>MUST implement the corresponding Android APIs as documented by the Android SDK. 5212 </li> 5213 <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. 5214 </li> 5215 <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. 5216 </li> 5217 </ul> 5218 <p> 5219 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. 5220 </p> 5221 <p> 5222 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. 5223 </p> 5224 <h4 id="7_4_5_minimum_network_capability"> 5225 7.4.5. Minimum Network Capability 5226 </h4> 5227 <p> 5228 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. 5229 </p> 5230 <p> 5231 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). 5232 </p> 5233 <p> 5234 Devices MAY implement more than one form of data connectivity. 5235 </p> 5236 <p> 5237 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: 5238 </p> 5239 <ul> 5240 <li>Devices that support Wi-Fi networks MUST support dual-stack and IPv6-only operation on Wi-Fi. 5241 </li> 5242 <li>Devices that support Ethernet networks MUST support dual-stack operation on Ethernet. 5243 </li> 5244 <li>Devices that support cellular data SHOULD support IPv6 operation (IPv6-only and possibly dual-stack) on cellular data. 5245 </li> 5246 <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. 5247 </li> 5248 </ul> 5249 <p> 5250 IPv6 MUST be enabled by default. 5251 </p> 5252 <p> 5253 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. 5254 </p> 5255 <p> 5256 IPv6 connectivity MUST be maintained in doze mode. 5257 </p> 5258 <h4 id="7_4_6_sync_settings"> 5259 7.4.6. Sync Settings 5260 </h4> 5261 <p> 5262 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. 5263 </p> 5264 <h4 id="7_4_7_data_saver"> 5265 7.4.7. Data Saver 5266 </h4> 5267 <p> 5268 Device implementations with a metered connection are STRONGLY RECOMMENDED to provide the data saver mode. 5269 </p> 5270 <p> 5271 If a device implementation provides the data saver mode, it: 5272 </p> 5273 <ul> 5274 <li> 5275 <p> 5276 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> 5277 </p> 5278 </li> 5279 <li> 5280 <p> 5281 MUST provide a user interface in the settings, allowing users to add applications to or remove applications from the whitelist. 5282 </p> 5283 </li> 5284 </ul> 5285 <p> 5286 Conversely if a device implementation does not provide the data saver mode, it: 5287 </p> 5288 <ul> 5289 <li> 5290 <p> 5291 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> 5292 </p> 5293 </li> 5294 <li> 5295 <p> 5296 MUST not broadcast <code>ConnectivityManager.ACTION_RESTRICT_BACKGROUND_CHANGED</code> 5297 </p> 5298 </li> 5299 <li> 5300 <p> 5301 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. 5302 </p> 5303 </li> 5304 </ul> 5305 <h3 id="7_5_cameras"> 5306 7.5. Cameras 5307 </h3> 5308 <p> 5309 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. 5310 </p> 5311 <p> 5312 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. 5313 </p> 5314 <h4 id="7_5_1_rear-facing_camera"> 5315 7.5.1. Rear-Facing Camera 5316 </h4> 5317 <p> 5318 Device implementations SHOULD include a rear-facing camera. If a device implementation includes at least one rear-facing camera, it: 5319 </p> 5320 <ul> 5321 <li>MUST report the feature flag android.hardware.camera and android.hardware.camera.any. 5322 </li> 5323 <li>MUST have a resolution of at least 2 megapixels. 5324 </li> 5325 <li>SHOULD have either hardware auto-focus or software auto-focus implemented in the camera driver (transparent to application software). 5326 </li> 5327 <li>MAY have fixed-focus or EDOF (extended depth of field) hardware. 5328 </li> 5329 <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. 5330 </li> 5331 </ul> 5332 <h4 id="7_5_2_front-facing_camera"> 5333 7.5.2. Front-Facing Camera 5334 </h4> 5335 <p> 5336 Device implementations MAY include a front-facing camera. If a device implementation includes at least one front-facing camera, it: 5337 </p> 5338 <ul> 5339 <li>MUST report the feature flag android.hardware.camera.any and android.hardware.camera.front. 5340 </li> 5341 <li>MUST have a resolution of at least VGA (640x480 pixels). 5342 </li> 5343 <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. 5344 </li> 5345 <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> . 5346 </li> 5347 <li>MUST horizontally reflect (i.e. mirror) the stream displayed by an app in a CameraPreview, as follows: 5348 <ul> 5349 <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. 5350 </li> 5351 <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. 5352 </li> 5353 <li>Otherwise, the preview MUST be mirrored along the devices default horizontal axis. 5354 </li> 5355 </ul> 5356 </li> 5357 <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. 5358 </li> 5359 <li>MUST NOT mirror the final captured still image or video streams returned to application callbacks or committed to media storage. 5360 </li> 5361 </ul> 5362 <h4 id="7_5_3_external_camera"> 5363 7.5.3. External Camera 5364 </h4> 5365 <p> 5366 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: 5367 </p> 5368 <ul> 5369 <li>MUST declare the platform feature flag <code>android.hardware.camera.external</code> and <code>android.hardware camera.any</code> . 5370 </li> 5371 <li>MAY support multiple cameras. 5372 </li> 5373 <li>MUST support USB Video Class (UVC 1.0 or higher) if the external camera connects through the USB port. 5374 </li> 5375 <li>SHOULD support video compressions such as MJPEG to enable transfer of high-quality unencoded streams (i.e. raw or independently compressed picture streams). 5376 </li> 5377 <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. 5378 </li> 5379 </ul> 5380 <h4 id="7_5_4_camera_api_behavior"> 5381 7.5.4. Camera API Behavior 5382 </h4> 5383 <p> 5384 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. 5385 </p> 5386 <p> 5387 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. 5388 </p> 5389 <p> 5390 Device implementations MUST implement the following behaviors for the camera-related APIs, for all available cameras: 5391 </p> 5392 <ul> 5393 <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. 5394 </li> 5395 <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. 5396 </li> 5397 <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.) 5398 </li> 5399 <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. 5400 </li> 5401 </ul> 5402 <p> 5403 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. 5404 </p> 5405 <p> 5406 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. 5407 </p> 5408 <p> 5409 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> . 5410 </p> 5411 <p> 5412 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. 5413 </p> 5414 <p> 5415 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. 5416 </p> 5417 <p> 5418 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. 5419 </p> 5420 <h4 id="7_5_5_camera_orientation"> 5421 7.5.5. Camera Orientation 5422 </h4> 5423 <p> 5424 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. 5425 </p> 5426 <h3 id="7_6_memory_and_storage"> 5427 7.6. Memory and Storage 5428 </h3> 5429 <h4 id="7_6_1_minimum_memory_and_storage"> 5430 7.6.1. Minimum Memory and Storage 5431 </h4> 5432 <div class="note"> 5433 Android Television devices MUST have at least 4GB of non-volatile storage available for application private data. 5434 </div> 5435 <p> 5436 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.) 5437 </p> 5438 <table> 5439 <tr> 5440 <th> 5441 Density and screen size 5442 </th> 5443 <th> 5444 32-bit device 5445 </th> 5446 <th> 5447 64-bit device 5448 </th> 5449 </tr> 5450 <tr> 5451 <td> 5452 Android Watch devices (due to smaller screens) 5453 </td> 5454 <td> 5455 416MB 5456 </td> 5457 <td> 5458 Not applicable 5459 </td> 5460 </tr> 5461 <tr> 5462 <td> 5463 <ul> 5464 <li class="table_list">280dpi or lower on small/normal screens 5465 </li> 5466 <li class="table_list">mdpi or lower on large screens 5467 </li> 5468 <li class="table_list">ldpi or lower on extra large screens 5469 </li> 5470 </ul> 5471 </td> 5472 <td> 5473 512MB 5474 </td> 5475 <td> 5476 816MB 5477 </td> 5478 </tr> 5479 <tr> 5480 <td> 5481 <ul> 5482 <li class="table_list">xhdpi or higher on small/normal screens 5483 </li> 5484 <li class="table_list">hdpi or higher on large screens 5485 </li> 5486 <li class="table_list">mdpi or higher on extra large screens 5487 </li> 5488 </ul> 5489 </td> 5490 <td> 5491 608MB 5492 </td> 5493 <td> 5494 944MB 5495 </td> 5496 </tr> 5497 <tr> 5498 <td> 5499 <ul> 5500 <li class="table_list">400dpi or higher on small/normal screens 5501 </li> 5502 <li class="table_list">xhdpi or higher on large screens 5503 </li> 5504 <li class="table_list">tvdpi or higher on extra large screens 5505 </li> 5506 </ul> 5507 </td> 5508 <td> 5509 896MB 5510 </td> 5511 <td> 5512 1280MB 5513 </td> 5514 </tr> 5515 <tr> 5516 <td> 5517 <ul> 5518 <li class="table_list">560dpi or higher on small/normal screens 5519 </li> 5520 <li class="table_list">400dpi or higher on large screens 5521 </li> 5522 <li class="table_list">xhdpi or higher on extra large screens 5523 </li> 5524 </ul> 5525 </td> 5526 <td> 5527 1344MB 5528 </td> 5529 <td> 5530 1824MB 5531 </td> 5532 </tr> 5533 </table> 5534 <p> 5535 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. 5536 </p> 5537 <p> 5538 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(). 5539 </p> 5540 <p> 5541 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. 5542 </p> 5543 <p> 5544 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. 5545 </p> 5546 <h4 id="7_6_2_application_shared_storage"> 5547 7.6.2. Application Shared Storage 5548 </h4> 5549 <p> 5550 Device implementations MUST offer shared storage for applications also often referred as shared external storage. 5551 </p> 5552 <p> 5553 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. 5554 </p> 5555 <p> 5556 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: 5557 </p> 5558 <ul> 5559 <li>MUST implement a toast or pop-up user interface warning the user when there is no SD card. 5560 </li> 5561 <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. 5562 </li> 5563 <li>MUST mount the SD card by default. 5564 </li> 5565 </ul> 5566 <p> 5567 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). 5568 </p> 5569 <p> 5570 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. 5571 </p> 5572 <p> 5573 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. 5574 </p> 5575 <p> 5576 However, device implementations SHOULD expose content from both storage paths transparently through Androids media scanner service and android.provider.MediaStore. 5577 </p> 5578 <p> 5579 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: 5580 </p> 5581 <ul> 5582 <li>SHOULD be compatible with the reference Android MTP host, <a href="http://www.android.com/filetransfer">Android File Transfer</a> . 5583 </li> 5584 <li>SHOULD report a USB device class of 0x00. 5585 </li> 5586 <li>SHOULD report a USB interface name of 'MTP'. 5587 </li> 5588 </ul> 5589 <h4 id="7_6_3_adoptable_storage"> 5590 7.6.3. Adoptable Storage 5591 </h4> 5592 <p> 5593 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. 5594 </p> 5595 <p> 5596 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. 5597 </p> 5598 <h3 id="7_7_usb"> 5599 7.7. USB 5600 </h3> 5601 <p> 5602 Device implementations SHOULD support USB peripheral mode and SHOULD support USB host mode. 5603 </p> 5604 <h4 id="7_7_1_usb_peripheral_mode"> 5605 7.7.1. USB peripheral mode 5606 </h4> 5607 <p> 5608 If a device implementation includes a USB port supporting peripheral mode: 5609 </p> 5610 <ul> 5611 <li>The port MUST be connectable to a USB host that has a standard type-A or type-C USB port. 5612 </li> 5613 <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. 5614 </li> 5615 <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. 5616 </li> 5617 <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. 5618 </li> 5619 <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: 5620 <ul> 5621 <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> . 5622 </li> 5623 <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. 5624 </li> 5625 <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 5626 </li> 5627 </ul> 5628 </li> 5629 <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. 5630 </li> 5631 <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. 5632 </li> 5633 <li>Type-C devices also supporting USB host mode are STRONGLY RECOMMENDED to support Power Delivery for data and power role swapping. 5634 </li> 5635 <li>Type-C devices SHOULD support Power Delivery for high-voltage charging and support for Alternate Modes such as display out. 5636 </li> 5637 <li>The value of iSerialNumber in USB standard device descriptor MUST be equal to the value of android.os.Build.SERIAL. 5638 </li> 5639 <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. 5640 </li> 5641 </ul> 5642 <h4 id="7_7_2_usb_host_mode"> 5643 7.7.2. USB host mode 5644 </h4> 5645 <p> 5646 If a device implementation includes a USB port supporting host mode, it: 5647 </p> 5648 <ul> 5649 <li>SHOULD use a type-C USB port, if the device implementation supports USB 3.1. 5650 </li> 5651 <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. 5652 </li> 5653 <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. 5654 </li> 5655 <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. 5656 </li> 5657 <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> . 5658 </li> 5659 <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> . 5660 </li> 5661 <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. 5662 </li> 5663 <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. 5664 </li> 5665 <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. 5666 </li> 5667 <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). 5668 </li> 5669 <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. 5670 </li> 5671 </ul> 5672 <h3 id="7_8_audio"> 5673 7.8. Audio 5674 </h3> 5675 <h4 id="7_8_1_microphone"> 5676 7.8.1. Microphone 5677 </h4> 5678 <div class="note"> 5679 Android Handheld, Watch, and Automotive implementations MUST include a microphone. 5680 </div> 5681 <p> 5682 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: 5683 </p> 5684 <ul> 5685 <li>MUST report the android.hardware.microphone feature constant. 5686 </li> 5687 <li>MUST meet the audio recording requirements in <a href="#5_4_audio_recording">section 5.4</a> . 5688 </li> 5689 <li>MUST meet the audio latency requirements in <a href="#5_6_audio_latency">section 5.6</a> . 5690 </li> 5691 <li>STRONGLY RECOMMENDED to support near-ultrasound recording as described in <a href="#7_8_3_near_ultrasound">section 7.8.3</a> . 5692 </li> 5693 </ul> 5694 <h4 id="7_8_2_audio_output"> 5695 7.8.2. Audio Output 5696 </h4> 5697 <div class="note"> 5698 Android Watch devices MAY include an audio output. 5699 </div> 5700 <p> 5701 Device implementations including a speaker or with an audio/multimedia output port for an audio output peripheral as a headset or an external speaker: 5702 </p> 5703 <ul> 5704 <li>MUST report the android.hardware.audio.output feature constant. 5705 </li> 5706 <li>MUST meet the audio playback requirements in <a href="#5_5_audio_playback">section 5.5</a> . 5707 </li> 5708 <li>MUST meet the audio latency requirements in <a href="#5_6_audio_latency">section 5.6</a> . 5709 </li> 5710 <li>STRONGLY RECOMMENDED to support near-ultrasound playback as described in <a href="#7_8_3_near_ultrasound">section 7.8.3</a> . 5711 </li> 5712 </ul> 5713 <p> 5714 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. 5715 </p> 5716 <p> 5717 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. 5718 </p> 5719 <h5 id="7_8_2_1_analog_audio_ports"> 5720 7.8.2.1. Analog Audio Ports 5721 </h5> 5722 <p> 5723 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: 5724 </p> 5725 <ul> 5726 <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. 5727 </li> 5728 <li>MUST support TRRS audio plugs with the CTIA pin-out order, and SHOULD support audio plugs with the OMTP pin-out order. 5729 </li> 5730 <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. 5731 </li> 5732 <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: 5733 <ul> 5734 <li> 5735 <strong>70 ohm or less</strong> : KEYCODE_HEADSETHOOK 5736 </li> 5737 <li> 5738 <strong>210-290 Ohm</strong> : KEYCODE_VOLUME_UP 5739 </li> 5740 <li> 5741 <strong>360-680 Ohm</strong> : KEYCODE_VOLUME_DOWN 5742 </li> 5743 </ul> 5744 </li> 5745 <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: 5746 <ul> 5747 <li> 5748 <strong>110-180 Ohm:</strong> KEYCODE_VOICE_ASSIST 5749 </li> 5750 </ul> 5751 </li> 5752 <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. 5753 </li> 5754 <li>MUST be capable of driving at least 150mV 10% of output voltage on a 32 Ohm speaker impedance. 5755 </li> 5756 <li>MUST have a microphone bias voltage between 1.8V ~ 2.9V. 5757 </li> 5758 </ul> 5759 <h4 id="7_8_3_near-ultrasound"> 5760 7.8.3. Near-Ultrasound 5761 </h4> 5762 <p> 5763 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: 5764 </p> 5765 <ul> 5766 <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: 5767 <ul> 5768 <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. 5769 </li> 5770 <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. 5771 </li> 5772 </ul> 5773 </li> 5774 <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. 5775 </li> 5776 </ul> 5777 <h3 id="7_9_virtual_reality"> 5778 7.9. Virtual Reality 5779 </h3> 5780 <p> 5781 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. 5782 </p> 5783 <h4 id="7_9_1_virtual_reality_mode"> 5784 7.9.1. Virtual Reality Mode 5785 </h4> 5786 <p> 5787 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> . 5788 </p> 5789 <h4 id="7_9_2_virtual_reality_high_performance"> 5790 7.9.2. Virtual Reality High Performance 5791 </h4> 5792 <p> 5793 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. 5794 </p> 5795 <ul> 5796 <li>Device implementations MUST have at least 2 physical cores. 5797 </li> 5798 <li>Device implementations MUST declare android.software.vr.mode feature. 5799 </li> 5800 <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. 5801 </li> 5802 <li>Device implementations MUST support sustained performance mode. 5803 </li> 5804 <li>Device implementations MUST support OpenGL ES 3.2. 5805 </li> 5806 <li>Device implementations MUST support Vulkan Hardware Level 0 and SHOULD support Vulkan Hardware Level 1. 5807 </li> 5808 <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. 5809 </li> 5810 <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. 5811 </li> 5812 <li>Device implementations MUST implement EGL_IMG_context_priority, and expose the extension in the list of available EGL extensions. 5813 </li> 5814 <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. 5815 </li> 5816 <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. 5817 </li> 5818 <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). 5819 </li> 5820 <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). 5821 </li> 5822 <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. 5823 </li> 5824 <li>Device implementations MUST support HardwarePropertiesManager.getDeviceTemperatures API and return accurate values for skin temperature. 5825 </li> 5826 <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. 5827 </li> 5828 <li>The display MUST measure between 4.7" and 6" diagonal. 5829 </li> 5830 <li>The display MUST update at least 60 Hz while in VR Mode. 5831 </li> 5832 <li>The display latency on Gray-to-Gray, White-to-Black, and Black-to-White switching time MUST be 3 ms. 5833 </li> 5834 <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. 5835 </li> 5836 <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> . 5837 </li> 5838 </ul> 5839 <h2 id="8_performance_and_power"> 5840 8. Performance and Power 5841 </h2> 5842 <p> 5843 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. 5844 </p> 5845 <h3 id="8_1_user_experience_consistency"> 5846 8.1. User Experience Consistency 5847 </h3> 5848 <p> 5849 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: 5850 </p> 5851 <ul> 5852 <li> 5853 <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. 5854 </li> 5855 <li> 5856 <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. 5857 </li> 5858 <li> 5859 <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. 5860 </li> 5861 </ul> 5862 <h3 id="8_2_file_i/o_access_performance"> 5863 8.2. File I/O Access Performance 5864 </h3> 5865 <p> 5866 Device implementations MUST ensure internal storage file access performance consistency for read and write operations. 5867 </p> 5868 <ul> 5869 <li> 5870 <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. 5871 </li> 5872 <li> 5873 <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. 5874 </li> 5875 <li> 5876 <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. 5877 </li> 5878 <li> 5879 <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. 5880 </li> 5881 </ul> 5882 <h3 id="8_3_power-saving_modes"> 5883 8.3. Power-Saving Modes 5884 </h3> 5885 <p> 5886 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. 5887 </p> 5888 <p> 5889 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. 5890 </p> 5891 <h3 id="8_4_power_consumption_accounting"> 5892 8.4. Power Consumption Accounting 5893 </h3> 5894 <p> 5895 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: 5896 </p> 5897 <ul> 5898 <li>MUST be able to track hardware component power usage and attribute that power usage to specific applications. Specifically, implementations: 5899 <ul> 5900 <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. 5901 </li> 5902 <li>MUST report all power consumption values in milliampere hours (mAh). 5903 </li> 5904 <li>SHOULD be attributed to the hardware component itself if unable to attribute hardware component power usage to an application. 5905 </li> 5906 <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. 5907 </li> 5908 </ul> 5909 </li> 5910 <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. 5911 </li> 5912 <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. 5913 </li> 5914 </ul> 5915 <h3 id="8_5_consistent_performance"> 5916 8.5. Consistent Performance 5917 </h3> 5918 <p> 5919 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. 5920 </p> 5921 <p> 5922 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. 5923 </p> 5924 <p> 5925 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: 5926 </p> 5927 <ul> 5928 <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. 5929 </li> 5930 <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. 5931 </li> 5932 </ul> 5933 <p> 5934 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. 5935 </p> 5936 <h2 id="9_security_model_compatibility"> 5937 9. Security Model Compatibility 5938 </h2> 5939 <p> 5940 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. 5941 </p> 5942 <h3 id="9_1_permissions"> 5943 9.1. Permissions 5944 </h3> 5945 <p> 5946 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. 5947 </p> 5948 <p> 5949 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. 5950 </p> 5951 <p> 5952 Permissions with a protection level of dangerous are runtime permissions. Applications with targetSdkVersion > 22 request them at runtime. Device implementations: 5953 </p> 5954 <ul> 5955 <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. 5956 </li> 5957 <li>MUST have one and only one implementation of both user interfaces. 5958 </li> 5959 <li>MUST NOT grant any runtime permissions to preinstalled apps unless: 5960 <ul> 5961 <li>the user's consent can be obtained before the application uses it 5962 </li> 5963 <li>the runtime permissions are associated with an intent pattern for which the preinstalled application is set as the default handler 5964 </li> 5965 </ul> 5966 </li> 5967 </ul> 5968 <h3 id="9_2_uid_and_process_isolation"> 5969 9.2. UID and Process Isolation 5970 </h3> 5971 <p> 5972 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> . 5973 </p> 5974 <h3 id="9_3_filesystem_permissions"> 5975 9.3. Filesystem Permissions 5976 </h3> 5977 <p> 5978 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> . 5979 </p> 5980 <h3 id="9_4_alternate_execution_environments"> 5981 9.4. Alternate Execution Environments 5982 </h3> 5983 <p> 5984 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. 5985 </p> 5986 <p> 5987 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> . 5988 </p> 5989 <p> 5990 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. 5991 </p> 5992 <p> 5993 Alternate runtimes MUST NOT permit applications to make use of features protected by Android permissions restricted to system applications. 5994 </p> 5995 <p> 5996 Alternate runtimes MUST abide by the Android sandbox model. Specifically, alternate runtimes: 5997 </p> 5998 <ul> 5999 <li>SHOULD install apps via the PackageManager into separate Android sandboxes (Linux user IDs, etc.). 6000 </li> 6001 <li>MAY provide a single Android sandbox shared by all applications using the alternate runtime. 6002 </li> 6003 <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. 6004 </li> 6005 <li>MUST NOT launch with, grant, or be granted access to the sandboxes corresponding to other Android applications. 6006 </li> 6007 <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. 6008 </li> 6009 </ul> 6010 <p> 6011 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. 6012 </p> 6013 <p> 6014 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. 6015 </p> 6016 <h3 id="9_5_multi-user_support"> 6017 9.5. Multi-User Support 6018 </h3> 6019 <div class="note"> 6020 This feature is optional for all device types. 6021 </div> 6022 <p> 6023 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> : 6024 </p> 6025 <ul> 6026 <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. 6027 </li> 6028 <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. 6029 </li> 6030 <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. 6031 </li> 6032 <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. 6033 </li> 6034 <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. 6035 </li> 6036 </ul> 6037 <h3 id="9_6_premium_sms_warning"> 6038 9.6. Premium SMS Warning 6039 </h3> 6040 <p> 6041 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. 6042 </p> 6043 <h3 id="9_7_kernel_security_features"> 6044 9.7. Kernel Security Features 6045 </h3> 6046 <p> 6047 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: 6048 </p> 6049 <ul> 6050 <li>MUST maintain compatibility with existing applications. 6051 </li> 6052 <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. 6053 </li> 6054 <li>SHOULD NOT be user or developer configurable. 6055 </li> 6056 </ul> 6057 <p> 6058 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. 6059 </p> 6060 <p> 6061 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. 6062 </p> 6063 <p> 6064 Device implementations: 6065 </p> 6066 <ul> 6067 <li>MUST set SELinux to global enforcing mode. 6068 </li> 6069 <li>MUST configure all domains in enforcing mode. No permissive mode domains are allowed, including domains specific to a device/vendor. 6070 </li> 6071 <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. 6072 </li> 6073 <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. 6074 </li> 6075 </ul> 6076 <p> 6077 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. 6078 </p> 6079 <p> 6080 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> . 6081 </p> 6082 <h3 id="9_8_privacy"> 6083 9.8. Privacy 6084 </h3> 6085 <p> 6086 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. 6087 </p> 6088 <p> 6089 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. 6090 </p> 6091 <p> 6092 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. 6093 </p> 6094 <p> 6095 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. 6096 </p> 6097 <p> 6098 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. 6099 </p> 6100 <h3 id="9_9_data_storage_encryption"> 6101 9.9. Data Storage Encryption 6102 </h3> 6103 <div class="note"> 6104 Optional for Android device implementations without a secure lock screen. 6105 </div> 6106 <p> 6107 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. 6108 </p> 6109 <p> 6110 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. 6111 </p> 6112 <p> 6113 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). 6114 </p> 6115 <h4 id="9_9_1_direct_boot"> 6116 9.9.1. Direct Boot 6117 </h4> 6118 <p> 6119 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. 6120 </p> 6121 <h4 id="9_9_2_file_based_encryption"> 6122 9.9.2. File Based Encryption 6123 </h4> 6124 <p> 6125 Device implementations supporting FBE: 6126 </p> 6127 <ul> 6128 <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. 6129 </li> 6130 <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. 6131 </li> 6132 <li>MUST support Verified Boot and ensure that DE keys are cryptographically bound to the device's hardware root of trust. 6133 </li> 6134 <li>MUST support encrypting file contents using AES with a key length of 256-bits in XTS mode. 6135 </li> 6136 <li>MUST support encrypting file name using AES with a key length of 256-bits in CBC-CTS mode. 6137 </li> 6138 <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. 6139 </li> 6140 <li>SHOULD make preloaded essential apps (e.g. Alarm, Phone, Messenger) Direct Boot aware. 6141 </li> 6142 </ul> 6143 <p> 6144 The keys protecting CE and DE storage areas: 6145 </p> 6146 <ul> 6147 <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. 6148 </li> 6149 <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. 6150 </li> 6151 </ul> 6152 <p> 6153 The upstream Android Open Source project provides a preferred implementation of this feature based on the Linux kernel ext4 encryption feature. 6154 </p> 6155 <h4 id="9_9_3_full_disk_encryption"> 6156 9.9.3. Full Disk Encryption 6157 </h4> 6158 <p> 6159 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. 6160 </p> 6161 <h3 id="9_10_device_integrity"> 6162 9.10. Device Integrity 6163 </h3> 6164 <p> 6165 The following requirements ensures there is transparancy to the status of the device integrity. 6166 </p> 6167 <p> 6168 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. 6169 </p> 6170 <p> 6171 Verified boot is a feature that guarantees the integrity of the device software. If a device implementation supports the feature, it MUST: 6172 </p> 6173 <ul> 6174 <li>Declare the platform feature flag android.software.verified_boot. 6175 </li> 6176 <li>Perform verification on every boot sequence. 6177 </li> 6178 <li>Start verification from an immutable hardware key that is the root of trust and go all the way up to the system partition. 6179 </li> 6180 <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. 6181 </li> 6182 <li>Use verification algorithms as strong as current recommendations from NIST for hashing algorithms (SHA-256) and public key sizes (RSA-2048). 6183 </li> 6184 <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. 6185 </li> 6186 <li>MUST NOT allow verified partitions on the device to be modified unless the user has explicitly unlocked the boot loader. 6187 </li> 6188 </ul> 6189 <p> 6190 The upstream Android Open Source Project provides a preferred implementation of this feature based on the Linux kernel feature dm-verity. 6191 </p> 6192 <p> 6193 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. 6194 </p> 6195 <p> 6196 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. 6197 </p> 6198 <h3 id="9_11_keys_and_credentials"> 6199 9.11. Keys and Credentials 6200 </h3> 6201 <p> 6202 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> . 6203 </p> 6204 <p> 6205 All Android device implementations MUST meet the following requirements: 6206 </p> 6207 <ul> 6208 <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. 6209 </li> 6210 <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. 6211 </li> 6212 <li>When the device implementation supports a secure lock screen it MUST back up the keystore implementation with secure hardware and meet following requirements: 6213 <ul> 6214 <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> . 6215 </li> 6216 <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. 6217 </li> 6218 </ul> 6219 </li> 6220 </ul> 6221 <p> 6222 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. 6223 </p> 6224 <h4 id="9_11_1_secure_lock_screen"> 6225 9.11.1. Secure Lock Screen 6226 </h4> 6227 <p> 6228 Device implementations MAY add or modify the authentication methods to unlock the lock screen, but MUST still meet the following requirements: 6229 </p> 6230 <ul> 6231 <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: 6232 <ul> 6233 <li>The entropy of the shortest allowed length of inputs MUST be greater than 10 bits. 6234 </li> 6235 <li>The maximum entropy of all possible inputs MUST be greater than 18 bits. 6236 </li> 6237 <li>MUST not replace any of the existing authentication methods (PIN, pattern, password) implemented and provided in AOSP. 6238 </li> 6239 <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> . 6240 </li> 6241 </ul> 6242 </li> 6243 <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: 6244 <ul> 6245 <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. 6246 </li> 6247 <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> . 6248 </li> 6249 </ul> 6250 </li> 6251 <li>The authentication method, if based on biometrics, MUST NOT be treated as a secure lock screen unless it meets all following requirements: 6252 <ul> 6253 <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. 6254 </li> 6255 <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> . 6256 </li> 6257 <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> . 6258 </li> 6259 </ul> 6260 </li> 6261 <li>If the authentication method can not be treated as a secure lock screen, it: 6262 <ul> 6263 <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. 6264 </li> 6265 <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> . 6266 </li> 6267 <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> . 6268 </li> 6269 <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> ). 6270 </li> 6271 </ul> 6272 </li> 6273 <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: 6274 <ul> 6275 <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> . 6276 </li> 6277 <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> . 6278 </li> 6279 </ul> 6280 </li> 6281 </ul> 6282 <h3 id="9_12_data_deletion"> 6283 9.12. Data Deletion 6284 </h3> 6285 <p> 6286 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: 6287 </p> 6288 <ul> 6289 <li>The system image 6290 </li> 6291 <li>Any operating system files required by the system image 6292 </li> 6293 </ul> 6294 <p> 6295 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> . 6296 </p> 6297 <p> 6298 Devices MAY provide a fast data wipe that conducts a logical data erase. 6299 </p> 6300 <h3 id="9_13_safe_boot_mode"> 6301 9.13. Safe Boot Mode 6302 </h3> 6303 <p> 6304 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. 6305 </p> 6306 <p> 6307 Android device implementations are STRONGLY RECOMENDED to implement Safe Boot Mode and meet following requirements: 6308 </p> 6309 <ul> 6310 <li> 6311 <p> 6312 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. 6313 </p> 6314 </li> 6315 <li> 6316 <p> 6317 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. 6318 </p> 6319 </li> 6320 <li> 6321 <p> 6322 Device implementations MUST provide the user the capability to uninstall any third-party apps within Safe Mode. 6323 </p> 6324 </li> 6325 </ul> 6326 <h3 id="9_14_automotive_vehicle_system_isolation"> 6327 9.14. Automotive Vehicle System Isolation 6328 </h3> 6329 <p> 6330 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: 6331 </p> 6332 <ul> 6333 <li>Gatekeeping messages from Android framework vehicle subsystems, e.g., whitelisting permitted message types and message sources. 6334 </li> 6335 <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. 6336 </li> 6337 </ul> 6338 <h2 id="10_software_compatibility_testing"> 6339 10. Software Compatibility Testing 6340 </h2> 6341 <p> 6342 Device implementations MUST pass all tests described in this section. 6343 </p> 6344 <p> 6345 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. 6346 </p> 6347 <h3 id="10_1_compatibility_test_suite"> 6348 10.1. Compatibility Test Suite 6349 </h3> 6350 <p> 6351 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. 6352 </p> 6353 <p> 6354 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. 6355 </p> 6356 <h3 id="10_2_cts_verifier"> 6357 10.2. CTS Verifier 6358 </h3> 6359 <p> 6360 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. 6361 </p> 6362 <p> 6363 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. 6364 </p> 6365 <p> 6366 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. 6367 </p> 6368 <h2 id="11_updatable_software"> 6369 11. Updatable Software 6370 </h2> 6371 <p> 6372 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. 6373 </p> 6374 <p> 6375 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: 6376 </p> 6377 <ul> 6378 <li>Over-the-air (OTA) downloads with offline update via reboot. 6379 </li> 6380 <li>Tethered updates over USB from a host PC. 6381 </li> 6382 <li>Offline updates via a reboot and update from a file on removable storage. 6383 </li> 6384 </ul> 6385 <p> 6386 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. 6387 </p> 6388 <p> 6389 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. 6390 </p> 6391 <p> 6392 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. 6393 </p> 6394 <p> 6395 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. 6396 </p> 6397 <p> 6398 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. 6399 </p> 6400 <p> 6401 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. 6402 </p> 6403 <h2 id="12_document_changelog"> 6404 12. Document Changelog 6405 </h2> 6406 <p> 6407 For a summary of changes to the Compatibility Definition in this release: 6408 </p> 6409 <ul> 6410 <li> 6411 <a href="https://android.googlesource.com/platform/compatibility/cdd/+log/nougat-mr1-dev/?pretty=full&no-merges">Document changelog</a> 6412 </li> 6413 </ul> 6414 <p> 6415 For a summary of changes to individuals sections: 6416 </p> 6417 <ol> 6418 <li> 6419 <a href="https://android.googlesource.com/platform/compatibility/cdd/+log/nougat-mr1-dev/1_introduction?pretty=full&no-merges">Introduction</a> 6420 </li> 6421 <li> 6422 <a href="https://android.googlesource.com/platform/compatibility/cdd/+log/nougat-mr1-dev/2_device_types?pretty=full&no-merges">Device Types</a> 6423 </li> 6424 <li> 6425 <a href="https://android.googlesource.com/platform/compatibility/cdd/+log/nougat-mr1-dev/3_software?pretty=full&no-merges">Software</a> 6426 </li> 6427 <li> 6428 <a href="https://android.googlesource.com/platform/compatibility/cdd/+log/nougat-mr1-dev/4_application-packaging?pretty=full&no-merges">Application Packaging</a> 6429 </li> 6430 <li> 6431 <a href="https://android.googlesource.com/platform/compatibility/cdd/+log/nougat-mr1-dev/5_multimedia?pretty=full&no-merges">Multimedia</a> 6432 </li> 6433 <li> 6434 <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> 6435 </li> 6436 <li> 6437 <a href="https://android.googlesource.com/platform/compatibility/cdd/+log/nougat-mr1-dev/7_hardware-compatibility?pretty=full&no-merges">Hardware Compatibility</a> 6438 </li> 6439 <li> 6440 <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> 6441 </li> 6442 <li> 6443 <a href="https://android.googlesource.com/platform/compatibility/cdd/+log/nougat-mr1-dev/9_security-model?pretty=full&no-merges">Security Model</a> 6444 </li> 6445 <li> 6446 <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> 6447 </li> 6448 <li> 6449 <a href="https://android.googlesource.com/platform/compatibility/cdd/+log/nougat-mr1-dev/11_updatable-software?pretty=full&no-merges">Updatable Software</a> 6450 </li> 6451 <li> 6452 <a href="https://android.googlesource.com/platform/compatibility/cdd/+log/nougat-mr1-dev/12_document-changelog?pretty=full&no-merges">Document Changelog</a> 6453 </li> 6454 <li> 6455 <a href="https://android.googlesource.com/platform/compatibility/cdd/+log/nougat-mr1-dev/13_contact-us?pretty=full&no-merges">Contact Us</a> 6456 </li> 6457 </ol> 6458 <h3 id="12_1_changelog_viewing_tips"> 6459 12.1. Changelog Viewing Tips 6460 </h3> 6461 <p> 6462 Changes are marked as follows: 6463 </p> 6464 <ul> 6465 <li> 6466 <p> 6467 <strong>CDD</strong><br /> 6468 Substantive changes to the compatibility requirements. 6469 </p> 6470 </li> 6471 <li> 6472 <p> 6473 <strong>Docs</strong><br /> 6474 Cosmetic or build related changes. 6475 </p> 6476 </li> 6477 </ul> 6478 <p> 6479 For best viewing, append the <code>pretty=full</code> and <code>no-merges</code> URL parameters to your changelog URLs. 6480 </p> 6481 <h2 id="13_contact_us"> 6482 13. Contact Us 6483 </h2> 6484 <p> 6485 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. 6486 </p> 6487