1 <html devsite> 2 <head> 3 <title>Android 7.1 Compatibility Definition</title> 4 <meta name="project_path" value="/_project.yaml" /> 5 <meta name="book_path" value="/_book.yaml" /> 6 </head> 7 <body> 8 <!-- 9 Copyright 2017 The Android Open Source Project 10 11 Licensed under the Apache License, Version 2.0 (the "License"); 12 you may not use this file except in compliance with the License. 13 You may obtain a copy of the License at 14 15 http://www.apache.org/licenses/LICENSE-2.0 16 17 Unless required by applicable law or agreed to in writing, software 18 distributed under the License is distributed on an "AS IS" BASIS, 19 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 20 See the License for the specific language governing permissions and 21 limitations under the License. 22 --> 23 24 <body> 25 <h2 id="1_introduction"> 26 1. Introduction 27 </h2> 28 <p> 29 This document enumerates the requirements that must be met in order for devices 30 to be compatible with Android 7.1. 31 </p> 32 <p> 33 The use of “MUST”, “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”, 34 “SHOULD NOT”, “RECOMMENDED”, “MAY”, and “OPTIONAL” is per the IETF standard 35 defined in 36 <a href="http://www.ietf.org/rfc/rfc2119.txt"> 37 RFC2119 38 </a>. 39 </p> 40 <p> 41 As used in this document, a “device implementer” or “implementer” is a person 42 or organization developing a hardware/software solution running Android 43 7.1. A “device implementation” or “implementation is the 44 hardware/software solution so developed. 45 </p> 46 <p> 47 To be considered compatible with Android 7.1, device 48 implementations MUST meet the requirements presented in this Compatibility 49 Definition, including any documents incorporated via reference. 50 </p> 51 <p> 52 Where this definition or the software tests described in 53 <a href="#10_software_compatibility_testing"> 54 section 55 10 56 </a> 57 is silent, ambiguous, or incomplete, it 58 is the responsibility of the device implementer to ensure compatibility with 59 existing implementations. 60 </p> 61 <p> 62 For this reason, the 63 <a href="http://source.android.com/"> 64 Android Open Source Project 65 </a> 66 is both the reference and preferred implementation of Android. Device 67 implementers are STRONGLY RECOMMENDED to base their implementations to the 68 greatest extent possible on the “upstream” source code available from the 69 Android Open Source Project. While some components can hypothetically be 70 replaced with alternate implementations, it is STRONGLY RECOMMENDED to not 71 follow this practice, as passing the software tests will become substantially 72 more difficult. It is the implementer’s responsibility to ensure full 73 behavioral compatibility with the standard Android implementation, including 74 and beyond the Compatibility Test Suite. Finally, note that certain component 75 substitutions and modifications are explicitly forbidden by this document. 76 </p> 77 <p> 78 Many of the resources linked to in this document are derived directly or 79 indirectly from the Android SDK and will be functionally identical to the 80 information in that SDK’s documentation. In any cases where this Compatibility 81 Definition or the Compatibility Test Suite disagrees with the SDK 82 documentation, the SDK documentation is considered authoritative. Any technical 83 details provided in the linked resources throughout this document are 84 considered by inclusion to be part of this Compatibility Definition. 85 </p> 86 <h2 id="2_device_types"> 87 2. Device Types 88 </h2> 89 <p> 90 While the Android Open Source Project has been used in the implementation of a 91 variety of device types and form factors, many aspects of the architecture and 92 compatibility requirements were optimized for handheld devices. Starting from 93 Android 5.0, the Android Open Source Project aims to embrace a wider variety of 94 device types as described in this section. 95 </p> 96 <p> 97 <strong> 98 Android Handheld device 99 </strong> 100 refers to an Android device implementation that is 101 typically used by holding it in the hand, such as mp3 players, phones, and 102 tablets. Android Handheld device implementations: 103 </p> 104 <ul> 105 <li> 106 MUST have a touchscreen embedded in the device. 107 </li> 108 <li> 109 MUST have a power source that provides mobility, such as a battery. 110 </li> 111 </ul> 112 <p> 113 <strong> 114 Android Television device 115 </strong> 116 refers to an Android device implementation that 117 is an entertainment interface for consuming digital media, movies, games, apps, 118 and/or live TV for users sitting about ten feet away (a “lean back” or “10-foot 119 user interface”). Android Television devices: 120 </p> 121 <ul> 122 <li> 123 MUST have an embedded screen OR include a video output port, such as VGA, 124 HDMI, or a wireless port for display. 125 </li> 126 <li> 127 MUST declare the features 128 <a href="http://developer.android.com/reference/android/content/pm/PackageManager.html#FEATURE_LEANBACK"> 129 android.software.leanback 130 </a> 131 and android.hardware.type.television. 132 </li> 133 </ul> 134 <p> 135 <strong> 136 Android Watch device 137 </strong> 138 refers to an Android device implementation intended to 139 be worn on the body, perhaps on the wrist, and: 140 </p> 141 <ul> 142 <li> 143 MUST have a screen with the physical diagonal length in the range from 1.1 144 to 2.5 inches. 145 </li> 146 <li> 147 MUST declare the feature android.hardware.type.watch. 148 </li> 149 <li> 150 MUST support uiMode = 151 <a href="http://developer.android.com/reference/android/content/res/Configuration.html#UI_MODE_TYPE_WATCH"> 152 UI_MODE_TYPE_WATCH 153 </a>. 154 </li> 155 </ul> 156 <p> 157 <strong> 158 Android Automotive implementation 159 </strong> 160 refers to a vehicle head unit running 161 Android as an operating system for part or all of the system and/or 162 infotainment functionality. Android Automotive implementations: 163 </p> 164 <ul> 165 <li> 166 MUST have a screen with the physical diagonal length equal to or greater 167 than 6 inches. 168 </li> 169 <li> 170 MUST declare the feature android.hardware.type.automotive. 171 </li> 172 <li> 173 MUST support uiMode = 174 <a href="http://developer.android.com/reference/android/content/res/Configuration.html#UI_MODE_TYPE_CAR"> 175 UI_MODE_TYPE_CAR 176 </a>. 177 </li> 178 <li> 179 Android Automotive implementations MUST support all public APIs in the 180 <code> 181 android.car.* 182 </code> 183 namespace. 184 </li> 185 </ul> 186 <p> 187 All Android device implementations that do not fit into any of the above device 188 types still MUST meet all requirements in this document to be Android 189 7.1 compatible, unless the requirement is explicitly described to 190 be only applicable to a specific Android device type from above. 191 </p> 192 <h3 id="2_1_device_configurations"> 193 2.1 Device Configurations 194 </h3> 195 <p> 196 This is a summary of major differences in hardware configuration by device 197 type. (Empty cells denote a “MAY”). Not all configurations are covered in this 198 table; see relevant hardware sections for more detail. 199 </p> 200 <table> 201 <tr> 202 <th> 203 Category 204 </th> 205 <th> 206 Feature 207 </th> 208 <th> 209 Section 210 </th> 211 <th> 212 Handheld 213 </th> 214 <th> 215 Television 216 </th> 217 <th> 218 Watch 219 </th> 220 <th> 221 Automotive 222 </th> 223 <th> 224 Other 225 </th> 226 </tr> 227 <tr> 228 <td rowspan="3"> 229 Input 230 </td> 231 <td> 232 D-pad 233 </td> 234 <td> 235 <a href="#7_2_2_non-touch-navigation"> 236 7.2.2. Non-touch Navigation 237 </a> 238 </td> 239 <td> 240 </td> 241 <td> 242 MUST 243 </td> 244 <td> 245 </td> 246 <td> 247 </td> 248 <td> 249 </td> 250 </tr> 251 <tr> 252 <td> 253 Touchscreen 254 </td> 255 <td> 256 <a href="#7_2_4_touchscreen_input"> 257 7.2.4. Touchscreen input 258 </a> 259 </td> 260 <td> 261 MUST 262 </td> 263 <td> 264 </td> 265 <td> 266 MUST 267 </td> 268 <td> 269 </td> 270 <td> 271 SHOULD 272 </td> 273 </tr> 274 <tr> 275 <td> 276 Microphone 277 </td> 278 <td> 279 <a href="#7_8_1_microphone"> 280 7.8.1. Microphone 281 </a> 282 </td> 283 <td> 284 MUST 285 </td> 286 <td> 287 SHOULD 288 </td> 289 <td> 290 MUST 291 </td> 292 <td> 293 MUST 294 </td> 295 <td> 296 SHOULD 297 </td> 298 </tr> 299 <tr> 300 <td rowspan="2"> 301 Sensors 302 </td> 303 <td> 304 Accelerometer 305 </td> 306 <td> 307 <a href="#7_3_1_accelerometer"> 308 7.3.1 Accelerometer 309 </a> 310 </td> 311 <td> 312 SHOULD 313 </td> 314 <td> 315 </td> 316 <td> 317 SHOULD 318 </td> 319 <td> 320 </td> 321 <td> 322 SHOULD 323 </td> 324 </tr> 325 <tr> 326 <td> 327 GPS 328 </td> 329 <td> 330 <a href="#7_3_3_gps"> 331 7.3.3. GPS 332 </a> 333 </td> 334 <td> 335 SHOULD 336 </td> 337 <td> 338 </td> 339 <td> 340 </td> 341 <td> 342 SHOULD 343 </td> 344 <td> 345 </td> 346 </tr> 347 <tr> 348 <td rowspan="6"> 349 Connectivity 350 </td> 351 <td> 352 Wi-Fi 353 </td> 354 <td> 355 <a href="#7_4_2_ieee_802.11"> 356 7.4.2. IEEE 802.11 357 </a> 358 </td> 359 <td> 360 SHOULD 361 </td> 362 <td> 363 SHOULD 364 </td> 365 <td> 366 </td> 367 <td> 368 SHOULD 369 </td> 370 <td> 371 SHOULD 372 </td> 373 </tr> 374 <tr> 375 <td> 376 Wi-Fi Direct 377 </td> 378 <td> 379 <a href="#7_4_2_1_wi-fi-direct"> 380 7.4.2.1. Wi-Fi Direct 381 </a> 382 </td> 383 <td> 384 SHOULD 385 </td> 386 <td> 387 SHOULD 388 </td> 389 <td> 390 </td> 391 <td> 392 </td> 393 <td> 394 SHOULD 395 </td> 396 </tr> 397 <tr> 398 <td> 399 Bluetooth 400 </td> 401 <td> 402 <a href="#7_4_3_bluetooth"> 403 7.4.3. Bluetooth 404 </a> 405 </td> 406 <td> 407 SHOULD 408 </td> 409 <td> 410 MUST 411 </td> 412 <td> 413 MUST 414 </td> 415 <td> 416 MUST 417 </td> 418 <td> 419 SHOULD 420 </td> 421 </tr> 422 <tr> 423 <td> 424 Bluetooth Low Energy 425 </td> 426 <td> 427 <a href="#7_4_3_bluetooth"> 428 7.4.3. Bluetooth 429 </a> 430 </td> 431 <td> 432 SHOULD 433 </td> 434 <td> 435 MUST 436 </td> 437 <td> 438 SHOULD 439 </td> 440 <td> 441 SHOULD 442 </td> 443 <td> 444 SHOULD 445 </td> 446 </tr> 447 <tr> 448 <td> 449 Cellular radio 450 </td> 451 <td> 452 <a href="#7_4_5_minimum_network_capability"> 453 7.4.5. Minimum Network Capability 454 </a> 455 </td> 456 <td> 457 </td> 458 <td> 459 </td> 460 <td> 461 </td> 462 <td> 463 SHOULD 464 </td> 465 <td> 466 </td> 467 </tr> 468 <tr> 469 <td> 470 USB peripheral/host mode 471 </td> 472 <td> 473 <a href="#7_7_usb"> 474 7.7. USB 475 </a> 476 </td> 477 <td> 478 SHOULD 479 </td> 480 <td> 481 </td> 482 <td> 483 </td> 484 <td> 485 SHOULD 486 </td> 487 <td> 488 SHOULD 489 </td> 490 </tr> 491 <tr> 492 <td> 493 Output 494 </td> 495 <td> 496 Speaker and/or Audio output ports 497 </td> 498 <td> 499 <a href="#7_8_2_audio_output"> 500 7.8.2. Audio Output 501 </a> 502 </td> 503 <td> 504 MUST 505 </td> 506 <td> 507 MUST 508 </td> 509 <td> 510 </td> 511 <td> 512 MUST 513 </td> 514 <td> 515 MUST 516 </td> 517 </tr> 518 </table> 519 <h2 id="3_software"> 520 3. Software 521 </h2> 522 <h3 id="3_1_managed_api_compatibility"> 523 3.1. Managed API Compatibility 524 </h3> 525 <p> 526 The managed Dalvik bytecode execution environment is the primary vehicle for 527 Android applications. The Android application programming interface (API) is the 528 set of Android platform interfaces exposed to applications running in the 529 managed runtime environment. Device implementations MUST provide complete 530 implementations, including all documented behaviors, of any documented API 531 exposed by the 532 <a href="http://developer.android.com/reference/packages.html"> 533 Android SDK 534 </a> 535 or any API decorated with the “@SystemApi” marker in the upstream Android source code. 536 </p> 537 <p> 538 Device implementations MUST support/preserve all classes, methods, and 539 associated elements marked by the TestApi annotation (@TestApi). 540 </p> 541 <p> 542 Device implementations MUST NOT omit any managed APIs, alter API interfaces or 543 signatures, deviate from the documented behavior, or include no-ops, except 544 where specifically allowed by this Compatibility Definition. 545 </p> 546 <p> 547 This Compatibility Definition permits some types of hardware for which Android 548 includes APIs to be omitted by device implementations. In such cases, the APIs 549 MUST still be present and behave in a reasonable way. See 550 <a href="#7_hardware_compatibility"> 551 section 7 552 </a> 553 for specific requirements for this scenario. 554 </p> 555 <h3 id="3_1_1_android_extensions"> 556 3.1.1. Android Extensions 557 </h3> 558 <p> 559 Android includes the support of extending the managed APIs while keeping the same API 560 level version. Android device implementations MUST preload the AOSP implementation 561 of both the shared library 562 <code> 563 ExtShared 564 </code> 565 and services 566 <code> 567 ExtServices 568 </code> 569 with versions higher 570 than or equal to the minimum versions allowed per each API level. 571 For example, Android 7.0 device implementations, running API level 24 MUST include 572 at least version 1. 573 </p> 574 <h3 id="3_2_soft_api_compatibility"> 575 3.2. Soft API Compatibility 576 </h3> 577 <p> 578 In addition to the managed APIs from 579 <a href="#3_1_managed_api_compatibility"> 580 section 3.1 581 </a>, 582 Android also includes a significant runtime-only “soft” API, in the form of such 583 things as intents, permissions, and similar aspects of Android applications that 584 cannot be enforced at application compile time. 585 </p> 586 <h4 id="3_2_1_permissions"> 587 3.2.1. Permissions 588 </h4> 589 <p> 590 Device implementers MUST support and enforce all permission constants as 591 documented by the 592 <a href="http://developer.android.com/reference/android/Manifest.permission.html"> 593 Permission reference page 594 </a>. 595 Note that 596 <a href="#9_security_model_compatibility"> 597 section 9 598 </a> 599 lists additional 600 requirements related to the Android security model. 601 </p> 602 <h4 id="3_2_2_build_parameters"> 603 3.2.2. Build Parameters 604 </h4> 605 <p> 606 The Android APIs include a number of constants on the 607 <a href="http://developer.android.com/reference/android/os/Build.html"> 608 android.os.Build class 609 </a> 610 that are intended to describe the current device. To provide consistent, 611 meaningful values across device implementations, the table below includes 612 additional restrictions on the formats of these values to which device 613 implementations MUST conform. 614 </p> 615 <table> 616 <tr> 617 <th> 618 Parameter 619 </th> 620 <th> 621 Details 622 </th> 623 </tr> 624 <tr> 625 <td> 626 VERSION.RELEASE 627 </td> 628 <td> 629 The version of the currently-executing Android system, in human-readable 630 format. This field MUST have one of the string values defined in 631 <a href="http://source.android.com/compatibility/7.1/versions.html"> 632 7.1 633 </a>. 634 </td> 635 </tr> 636 <tr> 637 <td> 638 VERSION.SDK 639 </td> 640 <td> 641 The version of the currently-executing Android system, in a format 642 accessible to third-party application code. For Android 7.1, 643 this field MUST have the integer value 7.1_INT. 644 </td> 645 </tr> 646 <tr> 647 <td> 648 VERSION.SDK_INT 649 </td> 650 <td> 651 The version of the currently-executing Android system, in a format 652 accessible to third-party application code. For Android 7.1, 653 this field MUST have the integer value 7.1_INT. 654 </td> 655 </tr> 656 <tr> 657 <td> 658 VERSION.INCREMENTAL 659 </td> 660 <td> 661 A value chosen by the device implementer designating the specific build 662 of the currently-executing Android system, in human-readable format. This 663 value MUST NOT be reused for different builds made available to end users. A 664 typical use of this field is to indicate which build number or 665 source-control change identifier was used to generate the build. There are 666 no requirements on the specific format of this field, except that it MUST 667 NOT be null or the empty string (""). 668 </td> 669 </tr> 670 <tr> 671 <td> 672 BOARD 673 </td> 674 <td> 675 A value chosen by the device implementer identifying the specific 676 internal hardware used by the device, in human-readable format. A possible 677 use of this field is to indicate the specific revision of the board powering 678 the device. The value of this field MUST be encodable as 7-bit ASCII and 679 match the regular expression “^[a-zA-Z0-9_-]+$”. 680 </td> 681 </tr> 682 <tr> 683 <td> 684 BRAND 685 </td> 686 <td> 687 A value reflecting the brand name associated with the device as known to 688 the end users. MUST be in human-readable format and SHOULD represent the 689 manufacturer of the device or the company brand under which the device is 690 marketed. The value of this field MUST be encodable as 7-bit ASCII and match 691 the regular expression “^[a-zA-Z0-9_-]+$”. 692 </td> 693 </tr> 694 <tr> 695 <td> 696 SUPPORTED_ABIS 697 </td> 698 <td> 699 The name of the instruction set (CPU type + ABI convention) of native 700 code. See 701 <a href="#3_3_native_api_compatibility"> 702 section 3.3. Native API 703 Compatibility 704 </a>. 705 </td> 706 </tr> 707 <tr> 708 <td> 709 SUPPORTED_32_BIT_ABIS 710 </td> 711 <td> 712 The name of the instruction set (CPU type + ABI convention) of native 713 code. See 714 <a href="#3_3_native_api_compatibility"> 715 section 3.3. Native API 716 Compatibility 717 </a>. 718 </td> 719 </tr> 720 <tr> 721 <td> 722 SUPPORTED_64_BIT_ABIS 723 </td> 724 <td> 725 The name of the second instruction set (CPU type + ABI convention) of 726 native code. See 727 <a href="#3_3_native_api_compatibility"> 728 section 3.3. Native 729 API Compatibility 730 </a>. 731 </td> 732 </tr> 733 <tr> 734 <td> 735 CPU_ABI 736 </td> 737 <td> 738 The name of the instruction set (CPU type + ABI convention) of native 739 code. See 740 <a href="#3_3_native_api_compatibility"> 741 section 3.3. Native API 742 Compatibility 743 </a>. 744 </td> 745 </tr> 746 <tr> 747 <td> 748 CPU_ABI2 749 </td> 750 <td> 751 The name of the second instruction set (CPU type + ABI convention) of 752 native code. See 753 <a href="#3_3_native_api_compatibility"> 754 section 3.3. Native 755 API Compatibility 756 </a>. 757 </td> 758 </tr> 759 <tr> 760 <td> 761 DEVICE 762 </td> 763 <td> 764 A value chosen by the device implementer containing the development name 765 or code name identifying the configuration of the hardware features and 766 industrial design of the device. The value of this field MUST be encodable 767 as 7-bit ASCII and match the regular expression 768 “^[a-zA-Z0-9_-]+$”. This device name MUST NOT change during the 769 lifetime of the product. 770 </td> 771 </tr> 772 <tr> 773 <td> 774 FINGERPRINT 775 </td> 776 <td> 777 A string that uniquely identifies this build. It SHOULD be reasonably 778 human-readable. It MUST follow this template: 779 <p class="small"> 780 $(BRAND)/$(PRODUCT)/ 781 <br/> 782 $(DEVICE):$(VERSION.RELEASE)/$(ID)/$(VERSION.INCREMENTAL):$(TYPE)/$(TAGS) 783 </p> 784 <p> 785 For example: 786 </p> 787 <p class="small"> 788 acme/myproduct/ 789 <br/> 790 mydevice:7.1/LMYXX/3359:userdebug/test-keys 791 </p> 792 <p> 793 The fingerprint MUST NOT include whitespace characters. If other fields 794 included in the template above have whitespace characters, they MUST be 795 replaced in the build fingerprint with another character, such as the 796 underscore ("_") character. The value of this field MUST be encodable as 797 7-bit ASCII. 798 </p> 799 </td> 800 </tr> 801 <tr> 802 <td> 803 HARDWARE 804 </td> 805 <td> 806 The name of the hardware (from the kernel command line or /proc). It 807 SHOULD be reasonably human-readable. The value of this field MUST be 808 encodable as 7-bit ASCII and match the regular expression 809 “^[a-zA-Z0-9_-]+$”. 810 </td> 811 </tr> 812 <tr> 813 <td> 814 HOST 815 </td> 816 <td> 817 A string that uniquely identifies the host the build was built on, in 818 human-readable format. There are no requirements on the specific format of 819 this field, except that it MUST NOT be null or the empty string (""). 820 </td> 821 </tr> 822 <tr> 823 <td> 824 ID 825 </td> 826 <td> 827 An identifier chosen by the device implementer to refer to a specific 828 release, in human-readable format. This field can be the same as 829 android.os.Build.VERSION.INCREMENTAL, but SHOULD be a value sufficiently 830 meaningful for end users to distinguish between software builds. The value 831 of this field MUST be encodable as 7-bit ASCII and match the regular 832 expression “^[a-zA-Z0-9._-]+$”. 833 </td> 834 </tr> 835 <tr> 836 <td> 837 MANUFACTURER 838 </td> 839 <td> 840 The trade name of the Original Equipment Manufacturer (OEM) of the 841 product. There are no requirements on the specific format of this field, 842 except that it MUST NOT be null or the empty string (""). 843 </td> 844 </tr> 845 <tr> 846 <td> 847 MODEL 848 </td> 849 <td> 850 A value chosen by the device implementer containing the name of the 851 device as known to the end user. This SHOULD be the same name under which 852 the device is marketed and sold to end users. There are no requirements on 853 the specific format of this field, except that it MUST NOT be null or the 854 empty string (""). 855 </td> 856 </tr> 857 <tr> 858 <td> 859 PRODUCT 860 </td> 861 <td> 862 A value chosen by the device implementer containing the development name 863 or code name of the specific product (SKU) that MUST be unique within the 864 same brand. MUST be human-readable, but is not necessarily intended for view 865 by end users. The value of this field MUST be encodable as 7-bit ASCII and 866 match the regular expression “^[a-zA-Z0-9_-]+$”. This product 867 name MUST NOT change during the lifetime of the product. 868 </td> 869 </tr> 870 <tr> 871 <td> 872 SERIAL 873 </td> 874 <td> 875 A hardware serial number, which MUST be available and unique across 876 devices with the same MODEL and MANUFACTURER. The value of this field MUST 877 be encodable as 7-bit ASCII and match the regular expression 878 “^([a-zA-Z0-9]{6,20})$”. 879 </td> 880 </tr> 881 <tr> 882 <td> 883 TAGS 884 </td> 885 <td> 886 A comma-separated list of tags chosen by the device implementer that 887 further distinguishes the build. This field MUST have one of the values 888 corresponding to the three typical Android platform signing configurations: 889 release-keys, dev-keys, test-keys. 890 </td> 891 </tr> 892 <tr> 893 <td> 894 TIME 895 </td> 896 <td> 897 A value representing the timestamp of when the build occurred. 898 </td> 899 </tr> 900 <tr> 901 <td> 902 TYPE 903 </td> 904 <td> 905 A value chosen by the device implementer specifying the runtime 906 configuration of the build. This field MUST have one of the values 907 corresponding to the three typical Android runtime configurations: user, 908 userdebug, or eng. 909 </td> 910 </tr> 911 <tr> 912 <td> 913 USER 914 </td> 915 <td> 916 A name or user ID of the user (or automated user) that generated the 917 build. There are no requirements on the specific format of this field, 918 except that it MUST NOT be null or the empty string (""). 919 </td> 920 </tr> 921 <tr> 922 <td> 923 SECURITY_PATCH 924 </td> 925 <td> 926 A value indicating the security patch level of a build. It MUST signify 927 that the build is not in any way vulnerable to any of the issues described 928 up through the designated Android Public Security Bulletin. It MUST be in 929 the format [YYYY-MM-DD], matching a defined string documented in the 930 <a href="source.android.com/security/bulletin"> 931 Android Public Security 932 Bulletin 933 </a> 934 or in the 935 <a href="http://source.android.com/security/advisory"> 936 Android Security Advisory 937 </a>, for example "2015-11-01". 938 </td> 939 </tr> 940 <tr> 941 <td> 942 BASE_OS 943 </td> 944 <td> 945 A value representing the FINGERPRINT parameter of the build that is 946 otherwise identical to this build except for the patches provided in the 947 Android Public Security Bulletin. It MUST report the correct value and if 948 such a build does not exist, report an empty string (""). 949 </td> 950 </tr> 951 </table> 952 <h4 id="3_2_3_intent_compatibility"> 953 3.2.3. Intent Compatibility 954 </h4> 955 <h5 id="3_2_3_1_core_application_intents"> 956 3.2.3.1. Core Application Intents 957 </h5> 958 <p> 959 Android intents allow application components to request functionality from 960 other Android components. The Android upstream project includes a list of 961 applications considered core Android applications, which implements several 962 intent patterns to perform common actions. The core Android applications are: 963 </p> 964 <ul> 965 <li> 966 Desk Clock 967 </li> 968 <li> 969 Browser 970 </li> 971 <li> 972 Calendar 973 </li> 974 <li> 975 Contacts 976 </li> 977 <li> 978 Gallery 979 </li> 980 <li> 981 GlobalSearch 982 </li> 983 <li> 984 Launcher 985 </li> 986 <li> 987 Music 988 </li> 989 <li> 990 Settings 991 </li> 992 </ul> 993 <p> 994 Device implementations MUST include the core Android applications as 995 appropriate or a component implementing the same intent patterns defined by 996 all the Activity or Service components of these core Android applications 997 exposed to other applications, implicitly or explicitly, through the 998 <code> 999 android:exported 1000 </code> 1001 attribute. 1002 </p> 1003 <h5 id="3_2_3_2_intent_resolution"> 1004 3.2.3.2. Intent Resolution 1005 </h5> 1006 <p> 1007 As Android is an extensible platform, device implementations MUST allow each 1008 intent pattern referenced in 1009 <a href="#3_2_3_1_core_application_intents"> 1010 section 3.2.3.1 1011 </a> 1012 to be overridden by third-party 1013 applications. The upstream Android open source implementation allows this by 1014 default; device implementers MUST NOT attach special privileges to system 1015 applications' use of these intent patterns, or prevent third-party applications 1016 from binding to and assuming control of these patterns. This prohibition 1017 specifically includes but is not limited to disabling the “Chooser” user 1018 interface that allows the user to select between multiple applications that all 1019 handle the same intent pattern. 1020 </p> 1021 <p> 1022 Device implementations MUST provide a user interface for users to modify the 1023 default activity for intents. 1024 </p> 1025 <p> 1026 However, device implementations MAY provide default activities for specific URI 1027 patterns (e.g. http://play.google.com) when the default activity provides a 1028 more specific attribute for the data URI. For example, an intent filter pattern 1029 specifying the data URI “http://www.android.com” is more specific than the 1030 browser's core intent pattern for “http://”. 1031 </p> 1032 <p> 1033 Android also includes a mechanism for third-party apps to declare an 1034 authoritative default 1035 <a href="https://developer.android.com/training/app-links"> 1036 app linking behavior 1037 </a> 1038 for certain types of web URI intents. When such authoritative declarations are 1039 defined in an app's intent filter patterns, device implementations: 1040 </p> 1041 <ul> 1042 <li> 1043 MUST attempt to validate any intent filters by performing the validation 1044 steps defined in the 1045 <a href="https://developers.google.com/digital-asset-links"> 1046 Digital Asset Links specification 1047 </a> 1048 as implemented by the Package Manager in the upstream Android Open Source 1049 Project. 1050 </li> 1051 <li> 1052 MUST attempt validation of the intent filters during the installation of 1053 the application and set all successfully validated UIR intent filters as 1054 default app handlers for their UIRs. 1055 </li> 1056 <li> 1057 MAY set specific URI intent filters as default app handlers for their URIs, 1058 if they are successfully verified but other candidate URI filters fail 1059 verification. If a device implementation does this, it MUST provide the 1060 user appropriate per-URI pattern overrides in the settings menu. 1061 </li> 1062 <li> 1063 MUST provide the user with per-app App Links controls in Settings as 1064 follows: 1065 <ul> 1066 <li> 1067 The user MUST be able to override holistically the default app links 1068 behavior for an app to be: always open, always ask, or never open, 1069 which must apply to all candidate URI intent filters equally. 1070 </li> 1071 <li> 1072 The user MUST be able to see a list of the candidate URI intent filters. 1073 </li> 1074 <li> 1075 The device implementation MAY provide the user with the ability to 1076 override specific candidate URI intent filters that were successfully 1077 verified, on a per-intent filter basis. 1078 </li> 1079 <li> 1080 The device implementation MUST provide users with the ability to view 1081 and override specific candidate URI intent filters if the device 1082 implementation lets some candidate URI intent filters succeed 1083 verification while some others can fail. 1084 </li> 1085 </ul> 1086 </li> 1087 </ul> 1088 <h5 id="3_2_3_3_intent_namespaces"> 1089 3.2.3.3. Intent Namespaces 1090 </h5> 1091 <p> 1092 Device implementations MUST NOT include any Android component that honors any 1093 new intent or broadcast intent patterns using an ACTION, CATEGORY, or other key 1094 string in the android. 1095 <em> 1096 or com.android. 1097 </em> 1098 namespace. Device implementers MUST 1099 NOT include any Android components that honor any new intent or broadcast 1100 intent patterns using an ACTION, CATEGORY, or other key string in a package 1101 space belonging to another organization. Device implementers MUST NOT alter or 1102 extend any of the intent patterns used by the core apps listed in 1103 <a href="#3_2_3_1_core_application_intents"> 1104 section 3.2.3.1 1105 </a>. Device implementations MAY 1106 include intent patterns using namespaces clearly and obviously associated with 1107 their own organization. This prohibition is analogous to that specified for Java 1108 language classes in 1109 <a href="#3_6_api_namespaces"> 1110 section 3.6 1111 </a>. 1112 </p> 1113 <h5 id="3_2_3_4_broadcast_intents"> 1114 3.2.3.4. Broadcast Intents 1115 </h5> 1116 <p> 1117 Third-party applications rely on the platform to broadcast certain intents to 1118 notify them of changes in the hardware or software environment. 1119 Android-compatible devices MUST broadcast the public broadcast intents in 1120 response to appropriate system events. Broadcast intents are described in the 1121 SDK documentation. 1122 </p> 1123 <h5 id="3_2_3_5_default_app_settings"> 1124 3.2.3.5. Default App Settings 1125 </h5> 1126 <p> 1127 Android includes settings that provide users an easy way to select their 1128 default applications, for example for Home screen or SMS. Where it makes sense, 1129 device implementations MUST provide a similar settings menu and be compatible 1130 with the intent filter pattern and API methods described in the SDK 1131 documentation as below. 1132 </p> 1133 <p> 1134 Device implementations: 1135 </p> 1136 <ul> 1137 <li> 1138 MUST honor the 1139 <a href="http://developer.android.com/reference/android/provider/Settings.html#ACTION_HOME_SETTINGS"> 1140 android.settings.HOME_SETTINGS 1141 </a> 1142 intent to show a default app settings menu for Home Screen, if the device 1143 implementation reports android.software.home_screen. 1144 </li> 1145 <li> 1146 MUST provide a settings menu that will call the 1147 <a href="http://developer.android.com/reference/android/provider/Telephony.Sms.Intents.html"> 1148 android.provider.Telephony.ACTION_CHANGE_DEFAULT 1149 </a> 1150 intent to show a dialog to change the default SMS application, if the 1151 device implementation reports android.hardware.telephony. 1152 </li> 1153 <li> 1154 MUST honor the 1155 <a href="http://developer.android.com/reference/android/provider/Settings.html#ACTION_NFC_PAYMENT_SETTINGS"> 1156 android.settings.NFC_PAYMENT_SETTINGS 1157 </a> 1158 intent to show a default app settings menu for Tap and Pay, if the device 1159 implementation reports android.hardware.nfc.hce. 1160 </li> 1161 <li> 1162 MUST honor the 1163 <a href="https://developer.android.com/reference/android/telecom/TelecomManager.html#ACTION_CHANGE_DEFAULT_DIALER"> 1164 android.telecom.action.CHANGE_DEFAULT_DIALER 1165 </a> 1166 intent to show a dialog to allow the user to change the default Phone application, if the 1167 device implementation reports 1168 <code> 1169 android.hardware.telephony 1170 </code> 1171 . 1172 </li> 1173 <li> 1174 MUST honor the 1175 <a href="https://developer.android.com/reference/android/provider/Settings.html#ACTION_VOICE_INPUT_SETTINGS"> 1176 android.settings.ACTION_VOICE_INPUT_SETTINGS 1177 </a> 1178 intent when the device supports the VoiceInteractionService and show a 1179 default app settings menu for voice input and assist. 1180 </li> 1181 </ul> 1182 <h3 id="3_3_native_api_compatibility"> 1183 3.3. Native API Compatibility 1184 </h3> 1185 <p> 1186 Native code compatibility is challenging. For this reason, device implementers 1187 are 1188 <strong> 1189 STRONGLY RECOMMENDED 1190 </strong> 1191 to use the implementations of the libraries listed 1192 below from the upstream Android Open Source Project. 1193 </p> 1194 <h4 id="3_3_1_application_binary_interfaces"> 1195 3.3.1. Application Binary Interfaces 1196 </h4> 1197 <p> 1198 Managed Dalvik bytecode can call into native code provided in the application 1199 .apk file as an ELF .so file compiled for the appropriate device hardware 1200 architecture. As native code is highly dependent on the underlying processor 1201 technology, Android defines a number of Application Binary Interfaces (ABIs) in 1202 the Android NDK. Device implementations MUST be compatible with one or more 1203 defined ABIs, and MUST implement compatibility with the Android NDK, as below. 1204 </p> 1205 <p> 1206 If a device implementation includes support for an Android ABI, it: 1207 </p> 1208 <ul> 1209 <li> 1210 MUST include support for code running in the managed environment to call 1211 into native code, using the standard Java Native Interface (JNI) semantics. 1212 </li> 1213 <li> 1214 MUST be source-compatible (i.e. header compatible) and binary-compatible 1215 (for the ABI) with each required library in the list below. 1216 </li> 1217 <li> 1218 MUST support the equivalent 32-bit ABI if any 64-bit ABI is supported. 1219 </li> 1220 <li> 1221 MUST accurately report the native Application Binary Interface (ABI) 1222 supported by the device, via the android.os.Build.SUPPORTED_ABIS, 1223 android.os.Build.SUPPORTED_32_BIT_ABIS, and 1224 android.os.Build.SUPPORTED_64_BIT_ABIS parameters, each a comma separated 1225 list of ABIs ordered from the most to the least preferred one. 1226 </li> 1227 <li> 1228 MUST report, via the above parameters, only those ABIs documented and 1229 described in the latest version of the 1230 <a href="https://developer.android.com/ndk/guides/abis.html"> 1231 Android NDK ABI Management documentation 1232 </a>, and MUST 1233 include support for the 1234 <a href="http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0388f/Beijfcja.html"> 1235 Advanced SIMD 1236 </a> 1237 (a.k.a. NEON) extension. 1238 </li> 1239 <li> 1240 SHOULD be built using the source code and header files available in the 1241 upstream Android Open Source Project 1242 </li> 1243 </ul> 1244 <p> 1245 Note that future releases of the Android NDK may introduce support for 1246 additional ABIs. If a device implementation is not compatible with an existing 1247 predefined ABI, it MUST NOT report support for any ABIs at all. 1248 </p> 1249 <p> 1250 The following native code APIs MUST be available to apps that include native code: 1251 </p> 1252 <ul> 1253 <li> 1254 libandroid.so (native Android activity support) 1255 </li> 1256 <li> 1257 libc (C library) 1258 </li> 1259 <li> 1260 libcamera2ndk.so 1261 </li> 1262 <li> 1263 libdl (dynamic linker) 1264 </li> 1265 <li> 1266 libEGL.so (native OpenGL surface management) 1267 </li> 1268 <li> 1269 libGLESv1_CM.so (OpenGL ES 1.x) 1270 </li> 1271 <li> 1272 libGLESv2.so (OpenGL ES 2.0) 1273 </li> 1274 <li> 1275 libGLESv3.so (OpenGL ES 3.x) 1276 </li> 1277 <li> 1278 libicui18n.so 1279 </li> 1280 <li> 1281 libicuuc.so 1282 </li> 1283 <li> 1284 libjnigraphics.so 1285 </li> 1286 <li> 1287 liblog (Android logging) 1288 </li> 1289 <li> 1290 libmediandk.so (native media APIs support) 1291 </li> 1292 <li> 1293 libm (math library) 1294 </li> 1295 <li> 1296 libOpenMAXAL.so (OpenMAX AL 1.0.1 support) 1297 </li> 1298 <li> 1299 libOpenSLES.so (OpenSL ES 1.0.1 audio support) 1300 </li> 1301 <li> 1302 libRS.so 1303 </li> 1304 <li> 1305 libstdc++ (Minimal support for C++) 1306 </li> 1307 <li> 1308 libvulkan.so (Vulkan) 1309 </li> 1310 <li> 1311 libz (Zlib compression) 1312 </li> 1313 <li> 1314 JNI interface 1315 </li> 1316 <li> 1317 Support for OpenGL, as described below 1318 </li> 1319 </ul> 1320 <p> 1321 For the native libraries listed above, the device implementation MUST NOT add 1322 or remove the public functions. 1323 </p> 1324 <p> 1325 Native libraries not listed above but implemented and provided in AOSP as system 1326 libraries are reserved and MUST NOT be exposed to third-party apps targeting API 1327 level 24 or higher. 1328 </p> 1329 <p> 1330 Device implementations MAY add non-AOSP libraries and expose them directly as 1331 an API to third-party apps but the additional libraries SHOULD be in 1332 <code> 1333 /vendor/lib 1334 </code> 1335 or 1336 <code> 1337 /vendor/lib64 1338 </code> 1339 and MUST be listed in 1340 <code> 1341 /vendor/etc/public.libraries.txt 1342 </code> 1343 . 1344 </p> 1345 <p> 1346 Note that device implementations MUST include libGLESv3.so and in turn, MUST export 1347 all the OpenGL ES 3.1 and 1348 <a href="http://developer.android.com/guide/topics/graphics/opengl.html#aep"> 1349 Android Extension Pack 1350 </a> 1351 function symbols as defined in the NDK release android-24. Although all the 1352 symbols must be present, only the corresponding functions for OpenGL ES versions 1353 and extensions actually supported by the device must be fully implemented. 1354 </p> 1355 <h5 id="3_3_1_1_graphic_libraries"> 1356 3.3.1.1. Graphic Libraries 1357 </h5> 1358 <p> 1359 <a href="https://www.khronos.org/registry/vulkan/specs/1.0-wsi_extensions/xhtml/vkspec.html"> 1360 Vulkan 1361 </a> 1362 is a low-overhead, cross-platform API for high-performance 3D graphics. Device 1363 implementations, even if not including support of the Vulkan APIs, MUST satisfy 1364 the following requirements: 1365 </p> 1366 <ul> 1367 <li> 1368 It MUST always provide a native library named 1369 <code> 1370 libvulkan.so 1371 </code> 1372 which exports 1373 function symbols for the core Vulkan 1.0 API as well as the 1374 <code> 1375 VK_KHR_surface 1376 </code> 1377 , 1378 <code> 1379 VK_KHR_android_surface 1380 </code> 1381 , and 1382 <code> 1383 VK_KHR_swapchain 1384 </code> 1385 extensions. 1386 </li> 1387 </ul> 1388 <p> 1389 Device implementations, if including support of the Vulkan APIs: 1390 </p> 1391 <ul> 1392 <li> 1393 MUST report, one or more 1394 <code> 1395 VkPhysicalDevices 1396 </code> 1397 through the 1398 <code> 1399 vkEnumeratePhysicalDevices 1400 </code> 1401 call. 1402 </li> 1403 <li> 1404 Each enumerated 1405 <code> 1406 VkPhysicalDevices 1407 </code> 1408 MUST fully implement the Vulkan 1.0 API. 1409 </li> 1410 <li> 1411 MUST report the correct 1412 <a href="https://developer.android.com/reference/android/content/pm/PackageManager.html#FEATURE_VULKAN_HARDWARE_LEVEL"> 1413 <code> 1414 PackageManager#FEATURE_VULKAN_HARDWARE_LEVEL 1415 </code> 1416 </a> 1417 and 1418 <a href="https://developer.android.com/reference/android/content/pm/PackageManager.html#FEATURE_VULKAN_HARDWARE_VERSION"> 1419 <code> 1420 PackageManager#FEATURE_VULKAN_HARDWARE_VERSION 1421 </code> 1422 </a> 1423 feature flags. 1424 </li> 1425 <li> 1426 MUST enumerate layers, contained in native libraries named 1427 <code> 1428 libVkLayer*.so 1429 </code> 1430 in the application package’s native library directory, through the 1431 <code> 1432 vkEnumerateInstanceLayerProperties 1433 </code> 1434 and 1435 <code> 1436 vkEnumerateDeviceLayerProperties 1437 </code> 1438 functions in 1439 <code> 1440 libvulkan.so 1441 </code> 1442 </li> 1443 <li> 1444 MUST NOT enumerate layers provided by libraries outside of the application 1445 package, or provide other ways of tracing or intercepting the Vulkan API, 1446 unless the application has the 1447 <code> 1448 android:debuggable=”true” 1449 </code> 1450 attribute. 1451 </li> 1452 </ul> 1453 <p> 1454 Device implementations, if not including support of the Vulkan APIs: 1455 </p> 1456 <ul> 1457 <li> 1458 MUST report 0 1459 <code> 1460 VkPhysicalDevices 1461 </code> 1462 through the 1463 <code> 1464 vkEnumeratePhysicalDevices 1465 </code> 1466 call. 1467 </li> 1468 <li> 1469 MUST NOT declare any of the Vulkan feature flags 1470 <a href="https://developer.android.com/reference/android/content/pm/PackageManager.html#FEATURE_VULKAN_HARDWARE_LEVEL"> 1471 <code> 1472 PackageManager#FEATURE_VULKAN_HARDWARE_LEVEL 1473 </code> 1474 </a> 1475 and 1476 <a href="https://developer.android.com/reference/android/content/pm/PackageManager.html#FEATURE_VULKAN_HARDWARE_VERSION"> 1477 <code> 1478 PackageManager#FEATURE_VULKAN_HARDWARE_VERSION 1479 </code> 1480 </a>. 1481 </li> 1482 </ul> 1483 <h4 id="3_3_2_32-bit_arm_native_code_compatibility"> 1484 3.3.2. 32-bit ARM Native Code Compatibility 1485 </h4> 1486 <p> 1487 The ARMv8 architecture deprecates several CPU operations, including some 1488 operations used in existing native code. On 64-bit ARM devices, the following 1489 deprecated operations MUST remain available to 32-bit native ARM code, either 1490 through native CPU support or through software emulation: 1491 </p> 1492 <ul> 1493 <li> 1494 SWP and SWPB instructions 1495 </li> 1496 <li> 1497 SETEND instruction 1498 </li> 1499 <li> 1500 CP15ISB, CP15DSB, and CP15DMB barrier operations 1501 </li> 1502 </ul> 1503 <p> 1504 Legacy versions of the Android NDK used /proc/cpuinfo to discover CPU features 1505 from 32-bit ARM native code. For compatibility with applications built using 1506 this NDK, devices MUST include the following lines in /proc/cpuinfo when it is 1507 read by 32-bit ARM applications: 1508 </p> 1509 <ul> 1510 <li> 1511 "Features: ", followed by a list of any optional ARMv7 CPU features supported by the device. 1512 </li> 1513 <li> 1514 "CPU architecture: ", followed by an integer describing the device's highest 1515 supported ARM architecture (e.g., "8" for ARMv8 devices). 1516 </li> 1517 </ul> 1518 <p> 1519 These requirements only apply when /proc/cpuinfo is read by 32-bit ARM 1520 applications. Devices SHOULD not alter /proc/cpuinfo when read by 64-bit ARM or 1521 non-ARM applications. 1522 </p> 1523 <h3 id="3_4_web_compatibility"> 1524 3.4. Web Compatibility 1525 </h3> 1526 <h4 id="3_4_1_webview_compatibility"> 1527 3.4.1. WebView Compatibility 1528 </h4> 1529 <div class="note"> 1530 Android Watch devices MAY, but all other device implementations MUST provide a 1531 complete implementation of the android.webkit.Webview API. 1532 </div> 1533 <p> 1534 The platform feature android.software.webview MUST be reported on any device 1535 that provides a complete implementation of the android.webkit.WebView API, and 1536 MUST NOT be reported on devices without a complete implementation of the API. 1537 The Android Open Source implementation uses code from the Chromium Project to 1538 implement the 1539 <a href="http://developer.android.com/reference/android/webkit/WebView.html"> 1540 android.webkit.WebView 1541 </a>. 1542 Because it is not feasible to develop a comprehensive test suite for a web 1543 rendering system, device implementers MUST use the specific upstream build of 1544 Chromium in the WebView implementation. Specifically: 1545 </p> 1546 <ul> 1547 <li> 1548 Device android.webkit.WebView implementations MUST be based on the 1549 <a href="http://www.chromium.org/"> 1550 Chromium 1551 </a> 1552 build from the upstream Android Open 1553 Source Project for Android 7.1. This build includes a specific 1554 set of functionality and security fixes for the WebView. 1555 </li> 1556 <li> 1557 <p> 1558 The user agent string reported by the WebView MUST be in this format: 1559 </p> 1560 <p> 1561 Mozilla/5.0 (Linux; Android $(VERSION); $(MODEL) Build/$(BUILD); wv) 1562 AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 $(CHROMIUM_VER) Mobile 1563 Safari/537.36 1564 </p> 1565 <ul> 1566 <li> 1567 The value of the $(VERSION) string MUST be the same as the value for android.os.Build.VERSION.RELEASE. 1568 </li> 1569 <li> 1570 The value of the $(MODEL) string MUST be the same as the value for android.os.Build.MODEL. 1571 </li> 1572 <li> 1573 The value of the $(BUILD) string MUST be the same as the value for android.os.Build.ID. 1574 </li> 1575 <li> 1576 The value of the $(CHROMIUM_VER) string MUST be the version of Chromium in the upstream Android Open Source Project. 1577 </li> 1578 <li> 1579 Device implementations MAY omit Mobile in the user agent string. 1580 </li> 1581 </ul> 1582 </li> 1583 </ul> 1584 <p> 1585 The WebView component SHOULD include support for as many HTML5 features as 1586 possible and if it supports the feature SHOULD conform to the 1587 <a href="http://html.spec.whatwg.org/multipage/"> 1588 HTML5 specification 1589 </a>. 1590 </p> 1591 <h4 id="3_4_2_browser_compatibility"> 1592 3.4.2. Browser Compatibility 1593 </h4> 1594 <div class="note"> 1595 Android Television, Watch, and Android Automotive implementations MAY omit a 1596 browser application, but MUST support the public intent patterns as described in 1597 <a href="#3_2_3_1_core_application_intents"> 1598 section 3.2.3.1 1599 </a>. All other types of device 1600 implementations MUST include a standalone Browser application for general user 1601 web browsing. 1602 </div> 1603 <p> 1604 The standalone Browser MAY be based on a browser technology other than WebKit. 1605 However, even if an alternate Browser application is used, the 1606 android.webkit.WebView component provided to third-party applications MUST be 1607 based on WebKit, as described in 1608 <a href="#3_4_1_webview_compatibility"> 1609 section 3.4.1 1610 </a>. 1611 </p> 1612 <p> 1613 Implementations MAY ship a custom user agent string in the standalone Browser application. 1614 </p> 1615 <p> 1616 The standalone Browser application (whether based on the upstream WebKit Browser 1617 application or a third-party replacement) SHOULD include support for as much of 1618 <a href="http://html.spec.whatwg.org/multipage/"> 1619 HTML5 1620 </a> 1621 as possible. Minimally, device 1622 implementations MUST support each of these APIs associated with HTML5: 1623 </p> 1624 <ul> 1625 <li> 1626 <a href="http://www.w3.org/html/wg/drafts/html/master/browsers.html#offline"> 1627 application cache/offline operation 1628 </a> 1629 </li> 1630 <li> 1631 <a href="http://www.w3.org/html/wg/drafts/html/master/semantics.html#video"> 1632 <video> tag 1633 </a> 1634 </li> 1635 <li> 1636 <a href="http://www.w3.org/TR/geolocation-API/"> 1637 geolocation 1638 </a> 1639 </li> 1640 </ul> 1641 <p> 1642 Additionally, device implementations MUST support the HTML5/W3C 1643 <a href="http://www.w3.org/TR/webstorage/"> 1644 webstorage API 1645 </a> 1646 and SHOULD support the HTML5/W3C 1647 <a href="http://www.w3.org/TR/IndexedDB/"> 1648 IndexedDB API 1649 </a>. Note that as the web 1650 development standards bodies are transitioning to favor IndexedDB over 1651 webstorage, IndexedDB is expected to become a required component in a future 1652 version of Android. 1653 </p> 1654 <h3 id="3_5_api_behavioral_compatibility"> 1655 3.5. API Behavioral Compatibility 1656 </h3> 1657 <p> 1658 The behaviors of each of the API types (managed, soft, native, and web) must be 1659 consistent with the preferred implementation of the upstream 1660 <a href="http://source.android.com/"> 1661 Android Open Source Project 1662 </a>. Some specific areas of 1663 compatibility are: 1664 </p> 1665 <ul> 1666 <li> 1667 Devices MUST NOT change the behavior or semantics of a standard intent. 1668 </li> 1669 <li> 1670 Devices MUST NOT alter the lifecycle or lifecycle semantics of a particular 1671 type of system component (such as Service, Activity, ContentProvider, etc.). 1672 </li> 1673 <li> 1674 Devices MUST NOT change the semantics of a standard permission. 1675 </li> 1676 </ul> 1677 <p> 1678 The above list is not comprehensive. The Compatibility Test Suite (CTS) tests 1679 significant portions of the platform for behavioral compatibility, but not all. 1680 It is the responsibility of the implementer to ensure behavioral compatibility 1681 with the Android Open Source Project. For this reason, device implementers 1682 SHOULD use the source code available via the Android Open Source Project where 1683 possible, rather than re-implement significant parts of the system. 1684 </p> 1685 <h3 id="3_6_api_namespaces"> 1686 3.6. API Namespaces 1687 </h3> 1688 <p> 1689 Android follows the package and class namespace conventions defined by the Java 1690 programming language. To ensure compatibility with third-party applications, 1691 device implementers MUST NOT make any prohibited modifications (see below) to 1692 these package namespaces: 1693 </p> 1694 <ul> 1695 <li> 1696 java.* 1697 </li> 1698 <li> 1699 javax.* 1700 </li> 1701 <li> 1702 sun.* 1703 </li> 1704 <li> 1705 android.* 1706 </li> 1707 <li> 1708 com.android.* 1709 </li> 1710 </ul> 1711 <p> 1712 <strong> 1713 Prohibited modifications include 1714 </strong> 1715 : 1716 </p> 1717 <ul> 1718 <li> 1719 Device implementations MUST NOT modify the publicly exposed APIs on the 1720 Android platform by changing any method or class signatures, or by removing 1721 classes or class fields. 1722 </li> 1723 <li> 1724 Device implementers MAY modify the underlying implementation of the APIs, 1725 but such modifications MUST NOT impact the stated behavior and Java-language 1726 signature of any publicly exposed APIs. 1727 </li> 1728 <li> 1729 Device implementers MUST NOT add any publicly exposed elements (such as 1730 classes or interfaces, or fields or methods to existing classes or 1731 interfaces) to the APIs above. 1732 </li> 1733 </ul> 1734 <p> 1735 A “publicly exposed element” is any construct that is not decorated with 1736 the“@hide” marker as used in the upstream Android source code. In other words, 1737 device implementers MUST NOT expose new APIs or alter existing APIs in the 1738 namespaces noted above. Device implementers MAY make internal-only 1739 modifications, but those modifications MUST NOT be advertised or otherwise 1740 exposed to developers. 1741 </p> 1742 <p> 1743 Device implementers MAY add custom APIs, but any such APIs MUST NOT be in a 1744 namespace owned by or referring to another organization. For instance, device 1745 implementers MUST NOT add APIs to the com.google.* or similar namespace: only 1746 Google may do so. Similarly, Google MUST NOT add APIs to other companies' 1747 namespaces. Additionally, if a device implementation includes custom APIs 1748 outside the standard Android namespace, those APIs MUST be packaged in an 1749 Android shared library so that only apps that explicitly use them (via the 1750 <uses-library> mechanism) are affected by the increased memory usage of such 1751 APIs. 1752 </p> 1753 <p> 1754 If a device implementer proposes to improve one of the package namespaces above 1755 (such as by adding useful new functionality to an existing API, or adding a new 1756 API), the implementer SHOULD visit 1757 <a href="http://source.android.com/"> 1758 source.android.com 1759 </a> 1760 and begin the process for 1761 contributing changes and code, according to the information on that site. 1762 </p> 1763 <p> 1764 Note that the restrictions above correspond to standard conventions for naming 1765 APIs in the Java programming language; this section simply aims to reinforce 1766 those conventions and make them binding through inclusion in this Compatibility 1767 Definition. 1768 </p> 1769 <h3 id="3_7_runtime_compatibility"> 1770 3.7. Runtime Compatibility 1771 </h3> 1772 <p> 1773 Device implementations MUST support the full Dalvik Executable (DEX) format and 1774 <a href="https://android.googlesource.com/platform/dalvik/"> 1775 Dalvik bytecode specification and semantics 1776 </a>. 1777 Device implementers SHOULD use ART, the reference upstream implementation of the Dalvik 1778 Executable Format, and the reference implementation’s package management system. 1779 </p> 1780 <p> 1781 Device implementations MUST configure Dalvik runtimes to allocate memory in 1782 accordance with the upstream Android platform, and as specified by the following 1783 table. (See 1784 <a href="#7_1_1_screen_configuration"> 1785 section 7.1.1 1786 </a> 1787 for screen size and 1788 screen density definitions.) Note that memory values specified below are 1789 considered minimum values and device implementations MAY allocate more memory 1790 per application. 1791 </p> 1792 <table> 1793 <tr> 1794 <th> 1795 Screen Layout 1796 </th> 1797 <th> 1798 Screen Density 1799 </th> 1800 <th> 1801 Minimum Application Memory 1802 </th> 1803 </tr> 1804 <tr> 1805 <td rowspan="12"> 1806 Android Watch 1807 </td> 1808 <td> 1809 120 dpi (ldpi) 1810 </td> 1811 <td rowspan="3"> 1812 32MB 1813 </td> 1814 </tr> 1815 <tr> 1816 <td> 1817 160 dpi (mdpi) 1818 </td> 1819 </tr> 1820 <tr> 1821 <td> 1822 213 dpi (tvdpi) 1823 </td> 1824 </tr> 1825 <tr> 1826 <td> 1827 240 dpi (hdpi) 1828 </td> 1829 <td rowspan="2"> 1830 36MB 1831 </td> 1832 </tr> 1833 <tr> 1834 <td> 1835 280 dpi (280dpi) 1836 </td> 1837 </tr> 1838 <tr> 1839 <td> 1840 320 dpi (xhdpi) 1841 </td> 1842 <td rowspan="2"> 1843 48MB 1844 </td> 1845 </tr> 1846 <tr> 1847 <td> 1848 360 dpi (360dpi) 1849 </td> 1850 </tr> 1851 <tr> 1852 <td> 1853 400 dpi (400dpi) 1854 </td> 1855 <td> 1856 56MB 1857 </td> 1858 </tr> 1859 <tr> 1860 <td> 1861 420 dpi (420dpi) 1862 </td> 1863 <td> 1864 64MB 1865 </td> 1866 </tr> 1867 <tr> 1868 <td> 1869 480 dpi (xxhdpi) 1870 </td> 1871 <td> 1872 88MB 1873 </td> 1874 </tr> 1875 <tr> 1876 <td> 1877 560 dpi (560dpi) 1878 </td> 1879 <td> 1880 112MB 1881 </td> 1882 </tr> 1883 <tr> 1884 <td> 1885 640 dpi (xxxhdpi) 1886 </td> 1887 <td> 1888 154MB 1889 </td> 1890 </tr> 1891 <tr> 1892 <td rowspan="12"> 1893 small/normal 1894 </td> 1895 <td> 1896 120 dpi (ldpi) 1897 </td> 1898 <td rowspan="2"> 1899 32MB 1900 </td> 1901 </tr> 1902 <tr> 1903 <td> 1904 160 dpi (mdpi) 1905 </td> 1906 </tr> 1907 <tr> 1908 <td> 1909 213 dpi (tvdpi) 1910 </td> 1911 <td rowspan="3"> 1912 48MB 1913 </td> 1914 </tr> 1915 <tr> 1916 <td> 1917 240 dpi (hdpi) 1918 </td> 1919 </tr> 1920 <tr> 1921 <td> 1922 280 dpi (280dpi) 1923 </td> 1924 </tr> 1925 <tr> 1926 <td> 1927 320 dpi (xhdpi) 1928 </td> 1929 <td rowspan="2"> 1930 80MB 1931 </td> 1932 </tr> 1933 <tr> 1934 <td> 1935 360 dpi (360dpi) 1936 </td> 1937 </tr> 1938 <tr> 1939 <td> 1940 400 dpi (400dpi) 1941 </td> 1942 <td> 1943 96MB 1944 </td> 1945 </tr> 1946 <tr> 1947 <td> 1948 420 dpi (420dpi) 1949 </td> 1950 <td> 1951 112MB 1952 </td> 1953 </tr> 1954 <tr> 1955 <td> 1956 480 dpi (xxhdpi) 1957 </td> 1958 <td> 1959 128MB 1960 </td> 1961 </tr> 1962 <tr> 1963 <td> 1964 560 dpi (560dpi) 1965 </td> 1966 <td> 1967 192MB 1968 </td> 1969 </tr> 1970 <tr> 1971 <td> 1972 640 dpi (xxxhdpi) 1973 </td> 1974 <td> 1975 256MB 1976 </td> 1977 </tr> 1978 <tr> 1979 <td rowspan="12"> 1980 large 1981 </td> 1982 <td> 1983 120 dpi (ldpi) 1984 </td> 1985 <td> 1986 32MB 1987 </td> 1988 </tr> 1989 <tr> 1990 <td> 1991 160 dpi (mdpi) 1992 </td> 1993 <td> 1994 48MB 1995 </td> 1996 </tr> 1997 <tr> 1998 <td> 1999 213 dpi (tvdpi) 2000 </td> 2001 <td rowspan="2"> 2002 80MB 2003 </td> 2004 </tr> 2005 <tr> 2006 <td> 2007 240 dpi (hdpi) 2008 </td> 2009 </tr> 2010 <tr> 2011 <td> 2012 280 dpi (280dpi) 2013 </td> 2014 <td> 2015 96MB 2016 </td> 2017 </tr> 2018 <tr> 2019 <td> 2020 320 dpi (xhdpi) 2021 </td> 2022 <td> 2023 128MB 2024 </td> 2025 </tr> 2026 <tr> 2027 <td> 2028 360 dpi (360dpi) 2029 </td> 2030 <td> 2031 160MB 2032 </td> 2033 </tr> 2034 <tr> 2035 <td> 2036 400 dpi (400dpi) 2037 </td> 2038 <td> 2039 192MB 2040 </td> 2041 </tr> 2042 <tr> 2043 <td> 2044 420 dpi (420dpi) 2045 </td> 2046 <td> 2047 228MB 2048 </td> 2049 </tr> 2050 <tr> 2051 <td> 2052 480 dpi (xxhdpi) 2053 </td> 2054 <td> 2055 256MB 2056 </td> 2057 </tr> 2058 <tr> 2059 <td> 2060 560 dpi (560dpi) 2061 </td> 2062 <td> 2063 384MB 2064 </td> 2065 </tr> 2066 <tr> 2067 <td> 2068 640 dpi (xxxhdpi) 2069 </td> 2070 <td> 2071 512MB 2072 </td> 2073 </tr> 2074 <tr> 2075 <td rowspan="12"> 2076 xlarge 2077 </td> 2078 <td> 2079 120 dpi (ldpi) 2080 </td> 2081 <td> 2082 48MB 2083 </td> 2084 </tr> 2085 <tr> 2086 <td> 2087 160 dpi (mdpi) 2088 </td> 2089 <td> 2090 80MB 2091 </td> 2092 </tr> 2093 <tr> 2094 <td> 2095 213 dpi (tvdpi) 2096 </td> 2097 <td rowspan="2"> 2098 96MB 2099 </td> 2100 </tr> 2101 <tr> 2102 <td> 2103 240 dpi (hdpi) 2104 </td> 2105 </tr> 2106 <tr> 2107 <td> 2108 280 dpi (280dpi) 2109 </td> 2110 <td> 2111 144MB 2112 </td> 2113 </tr> 2114 <tr> 2115 <td> 2116 320 dpi (xhdpi) 2117 </td> 2118 <td> 2119 192MB 2120 </td> 2121 </tr> 2122 <tr> 2123 <td> 2124 360 dpi (360dpi) 2125 </td> 2126 <td> 2127 240MB 2128 </td> 2129 </tr> 2130 <tr> 2131 <td> 2132 400 dpi (400dpi) 2133 </td> 2134 <td> 2135 288MB 2136 </td> 2137 </tr> 2138 <tr> 2139 <td> 2140 420 dpi (420dpi) 2141 </td> 2142 <td> 2143 336MB 2144 </td> 2145 </tr> 2146 <tr> 2147 <td> 2148 480 dpi (xxhdpi) 2149 </td> 2150 <td> 2151 384MB 2152 </td> 2153 </tr> 2154 <tr> 2155 <td> 2156 560 dpi (560dpi) 2157 </td> 2158 <td> 2159 576MB 2160 </td> 2161 </tr> 2162 <tr> 2163 <td> 2164 640 dpi (xxxhdpi) 2165 </td> 2166 <td> 2167 768MB 2168 </td> 2169 </tr> 2170 </table> 2171 <h3 id="3_8_user_interface_compatibility"> 2172 3.8. User Interface Compatibility 2173 </h3> 2174 <h4 id="3_8_1_launcher_(home_screen)"> 2175 3.8.1. Launcher (Home Screen) 2176 </h4> 2177 <p> 2178 Android includes a launcher application (home screen) and support for 2179 third-party applications to replace the device launcher (home screen). Device 2180 implementations that allow third-party applications to replace the device home 2181 screen MUST declare the platform feature android.software.home_screen. 2182 </p> 2183 <h4 id="3_8_2_widgets"> 2184 3.8.2. Widgets 2185 </h4> 2186 <div class="note"> 2187 Widgets are optional for all Android device implementations, but SHOULD be 2188 supported on Android Handheld devices. 2189 </div> 2190 <p> 2191 Android defines a component type and corresponding API and lifecycle that allows 2192 applications to expose an 2193 <a href="http://developer.android.com/guide/practices/ui_guidelines/widget_design.html"> 2194 “AppWidget” 2195 </a> 2196 to the end user, a feature that is STRONGLY RECOMMENDED to be supported on 2197 Handheld Device implementations. Device implementations that support embedding 2198 widgets on the home screen MUST meet the following requirements and declare 2199 support for platform feature android.software.app_widgets. 2200 </p> 2201 <ul> 2202 <li> 2203 Device launchers MUST include built-in support for AppWidgets and expose 2204 user interface affordances to add, configure, view, and remove AppWidgets 2205 directly within the Launcher. 2206 </li> 2207 <li> 2208 Device implementations MUST be capable of rendering widgets that are 4 x 4 2209 in the standard grid size. See the 2210 <a href="http://developer.android.com/guide/practices/ui_guidelines/widget_design.html"> 2211 App Widget Design 2212 Guidelines 2213 </a> 2214 in the Android SDK documentation for details. 2215 </li> 2216 <li> 2217 Device implementations that include support for lock screen MAY support 2218 application widgets on the lock screen. 2219 </li> 2220 </ul> 2221 <h4 id="3_8_3_notifications"> 2222 3.8.3. Notifications 2223 </h4> 2224 <p> 2225 Android includes APIs that allow developers to 2226 <a href="http://developer.android.com/guide/topics/ui/notifiers/notifications.html"> 2227 notify users of notable events 2228 </a> 2229 using hardware and software features of the device. 2230 </p> 2231 <p> 2232 Some APIs allow applications to perform notifications or attract attention using 2233 hardware—specifically sound, vibration, and light. Device implementations MUST 2234 support notifications that use hardware features, as described in the SDK 2235 documentation, and to the extent possible with the device implementation 2236 hardware. For instance, if a device implementation includes a vibrator, it MUST 2237 correctly implement the vibration APIs. If a device implementation lacks 2238 hardware, the corresponding APIs MUST be implemented as no-ops. This behavior is 2239 further detailed in 2240 <a href="#7_hardware_compatibility"> 2241 section 7 2242 </a>. 2243 </p> 2244 <p> 2245 Additionally, the implementation MUST correctly render all 2246 <a href="https://developer.android.com/guide/topics/resources/available-resources.html"> 2247 resources 2248 </a> 2249 (icons, animation files etc.) provided for in the APIs, or in the Status/System 2250 Bar 2251 <a href="http://developer.android.com/design/style/iconography.html"> 2252 icon style guide 2253 </a>, which in the 2254 case of an Android Television device includes the possibility to not display the 2255 notifications. Device implementers MAY provide an alternative user experience 2256 for notifications than that provided by the reference Android Open Source 2257 implementation; however, such alternative notification systems MUST support 2258 existing notification resources, as above. 2259 </p> 2260 <div class="note"> 2261 Android Automotive implementations MAY manage the visibility and timing of 2262 notifications to mitigate driver distraction, but MUST display 2263 notifications that use 2264 <a href="https://developer.android.com/reference/android/app/Notification.CarExtender.html"> 2265 CarExtender 2266 </a> 2267 when requested by applications. 2268 </div> 2269 <p> 2270 Android includes support for various notifications, such as: 2271 </p> 2272 <ul> 2273 <li> 2274 <strong> 2275 Rich notifications 2276 </strong> 2277 . Interactive Views for ongoing notifications. 2278 </li> 2279 <li> 2280 <strong> 2281 Heads-up notifications 2282 </strong> 2283 . Interactive Views users can act on or dismiss without leaving the current app. 2284 </li> 2285 <li> 2286 <strong> 2287 Lock screen notifications 2288 </strong> 2289 . Notifications shown over a lock screen with granular control on visibility. 2290 </li> 2291 </ul> 2292 <p> 2293 Android device implementations, when such notifications are made visible, MUST 2294 properly execute Rich and Heads-up notifications and include the title/name, 2295 icon, text as 2296 <a href="https://developer.android.com/design/patterns/notifications.html"> 2297 documented in the Android APIs 2298 </a>. 2299 </p> 2300 <p> 2301 Android includes Notification Listener Service APIs that allow apps (once 2302 explicitly enabled by the user) to receive a copy of all notifications as they 2303 are posted or updated. Device implementations MUST correctly and promptly send 2304 notifications in their entirety to all such installed and user-enabled listener 2305 services, including any and all metadata attached to the Notification object. 2306 </p> 2307 <p> 2308 Handheld device implementations MUST support the behaviors of updating, 2309 removing, replying to, and bundling notifications as described in this 2310 <a href="https://developer.android.com/guide/topics/ui/notifiers/notifications.html#Managing"> 2311 section 2312 </a>. 2313 </p> 2314 <p> 2315 Also, handheld device implementations MUST provide: 2316 </p> 2317 <ul> 2318 <li> 2319 The ability to control notifications directly in the notification shade. 2320 </li> 2321 <li> 2322 The visual affordance to trigger the control panel in the notification shade. 2323 </li> 2324 <li> 2325 The ability to BLOCK, MUTE and RESET notification preference from a 2326 package, both in the inline control panel as well as in the settings app. 2327 </li> 2328 </ul> 2329 <p> 2330 All 6 direct subclasses of the 2331 <code> 2332 Notification.Style class 2333 </code> 2334 MUST be supported as 2335 described in the 2336 <a href="https://developer.android.com/reference/android/app/Notification.Style.html"> 2337 SDK documents 2338 </a>. 2339 </p> 2340 <p> 2341 Device implementations that support the DND (Do not Disturb) feature MUST meet 2342 the following requirements: 2343 </p> 2344 <ul> 2345 <li> 2346 MUST implement an activity that would respond to the intent 2347 <a href="https://developer.android.com/reference/android/provider/Settings.html#ACTION_NOTIFICATION_POLICY_ACCESS_SETTINGS"> 2348 ACTION_NOTIFICATION_POLICY_ACCESS_SETTINGS 2349 </a>, 2350 which for implementations with UI_MODE_TYPE_NORMAL it MUST be an activity 2351 where the user can grant or deny the app access to DND policy 2352 configurations. 2353 </li> 2354 <li> 2355 MUST, for when the device implementation has provided a means for the user 2356 to grant or deny third-party apps to access the DND policy configuration, 2357 display 2358 <a href="https://developer.android.com/reference/android/app/NotificationManager.html#addAutomaticZenRule%28android.app.AutomaticZenRule%29"> 2359 Automatic DND rules 2360 </a> 2361 created by applications alongside the user-created and pre-defined rules. 2362 </li> 2363 <li> 2364 MUST honor the 2365 <a href="https://developer.android.com/reference/android/app/NotificationManager.Policy.html#suppressedVisualEffects"> 2366 <code> 2367 suppressedVisualEffects 2368 </code> 2369 </a> 2370 values passed along the 2371 <a href="https://developer.android.com/reference/android/app/NotificationManager.Policy.html#NotificationManager.Policy%28int, int, int, int%29"> 2372 <code> 2373 NotificationManager.Policy 2374 </code> 2375 </a> 2376 and if an app has set any of the SUPPRESSED_EFFECT_SCREEN_OFF or 2377 SUPPRESSED_EFFECT_SCREEN_ON flags, it SHOULD indicate to the user that the 2378 visual effects are suppressed in the DND settings menu. 2379 </li> 2380 </ul> 2381 <h4 id="3_8_4_search"> 2382 3.8.4. Search 2383 </h4> 2384 <p> 2385 Android includes APIs that allow developers to 2386 <a href="http://developer.android.com/reference/android/app/SearchManager.html"> 2387 incorporate search 2388 </a> 2389 into their applications and expose their application’s data into the global 2390 system search. Generally speaking, this functionality consists of a single, 2391 system-wide user interface that allows users to enter queries, displays 2392 suggestions as users type, and displays results. The Android APIs allow 2393 developers to reuse this interface to provide search within their own apps and 2394 allow developers to supply results to the common global search user interface. 2395 </p> 2396 <p> 2397 Android device implementations SHOULD include global search, a single, shared, 2398 system-wide search user interface capable of real-time suggestions in response 2399 to user input. Device implementations SHOULD implement the APIs that allow 2400 developers to reuse this user interface to provide search within their own 2401 applications. Device implementations that implement the global search interface 2402 MUST implement the APIs that allow third-party applications to add suggestions 2403 to the search box when it is run in global search mode. If no third-party 2404 applications are installed that make use of this functionality, the default 2405 behavior SHOULD be to display web search engine results and suggestions. 2406 </p> 2407 <p> 2408 Android device implementations SHOULD, and Android Automotive implementations 2409 MUST, implement an assistant on the device to 2410 handle the 2411 <a href="http://developer.android.com/reference/android/content/Intent.html#ACTION_ASSIST"> 2412 Assist action 2413 </a>. 2414 </p> 2415 <p> 2416 Android also includes the 2417 <a href="https://developer.android.com/reference/android/app/assist/package-summary.html"> 2418 Assist APIs 2419 </a> 2420 to allow applications to elect how much information of the current context is 2421 shared with the assistant on the device. Device implementations supporting the 2422 Assist action MUST indicate clearly to the end user when the context is 2423 shared by displaying a white light around the edges of the screen. To ensure 2424 clear visibility to the end user, the indication MUST meet or exceed the 2425 duration and brightness of the Android Open Source Project implementation. 2426 </p> 2427 <p> 2428 This indication MAY be disabled by default for preinstalled apps using the Assist and 2429 VoiceInteractionService API, if all following requirements are met: 2430 </p> 2431 <ul> 2432 <li> 2433 <p> 2434 The preinstalled app MUST request the context to be shared only when the 2435 user invoked the app by one of the following means, and the app is running in the 2436 foreground: 2437 </p> 2438 <ul> 2439 <li> 2440 hotword invocation 2441 </li> 2442 <li> 2443 input of the ASSIST navigation key/button/gesture 2444 </li> 2445 </ul> 2446 </li> 2447 <li> 2448 <p> 2449 The device implementation MUST provide an affordance to enable the 2450 indication, less than two navigations away from 2451 (the default voice input and assistant app settings menu) 2452 <a href="#3_2_3_5_default_app_settings"> 2453 section 3.2.3.5 2454 </a>. 2455 </p> 2456 </li> 2457 </ul> 2458 <h4 id="3_8_5_toasts"> 2459 3.8.5. Toasts 2460 </h4> 2461 <p> 2462 Applications can use the 2463 <a href="http://developer.android.com/reference/android/widget/Toast.html"> 2464 “Toast” API 2465 </a> 2466 to 2467 display short non-modal strings to the end user that disappear after a brief 2468 period of time. Device implementations MUST display Toasts from applications to 2469 end users in some high-visibility manner. 2470 </p> 2471 <h4 id="3_8_6_themes"> 2472 3.8.6. Themes 2473 </h4> 2474 <p> 2475 Android provides “themes” as a mechanism for applications to apply styles across 2476 an entire Activity or application. 2477 </p> 2478 <p> 2479 Android includes a “Holo” theme family as a set of defined styles for 2480 application developers to use if they want to match the 2481 <a href="http://developer.android.com/guide/topics/ui/themes.html"> 2482 Holo theme look and feel 2483 </a> 2484 as defined by the Android SDK. Device implementations MUST NOT alter any of the 2485 <a href="http://developer.android.com/reference/android/R.style.html"> 2486 Holo theme attributes 2487 </a> 2488 exposed to applications. 2489 </p> 2490 <p> 2491 Android includes a “Material” theme family as a set of defined styles for 2492 application developers to use if they want to match the design theme’s look and 2493 feel across the wide variety of different Android device types. Device 2494 implementations MUST support the “Material” theme family and MUST NOT alter any 2495 of the 2496 <a href="http://developer.android.com/reference/android/R.style.html#Theme_Material"> 2497 Material theme attributes 2498 </a> 2499 or their assets exposed to applications. 2500 </p> 2501 <p> 2502 Android also includes a “Device Default” theme family as a set of defined styles 2503 for application developers to use if they want to match the look and feel of the 2504 device theme as defined by the device implementer. Device implementations MAY 2505 modify the 2506 <a href="http://developer.android.com/reference/android/R.style.html"> 2507 Device Default theme attributes 2508 </a> 2509 exposed 2510 to applications. 2511 </p> 2512 <p> 2513 Android supports a variant theme with translucent system bars, which allows 2514 application developers to fill the area behind the status and navigation bar 2515 with their app content. To enable a consistent developer experience in this 2516 configuration, it is important the status bar icon style is maintained across 2517 different device implementations. Therefore, Android device implementations MUST 2518 use white for system status icons (such as signal strength and battery level) 2519 and notifications issued by the system, unless the icon is indicating a 2520 problematic status or an app requests a light status bar using the 2521 SYSTEM_UI_FLAG_LIGHT_STATUS_BAR flag. When an app requests a light status bar, 2522 Android device implementations MUST change the color of the system status icons 2523 to black (for details, refer to 2524 <a href="http://developer.android.com/reference/android/R.style.html"> 2525 R.style 2526 </a> 2527 ). 2528 </p> 2529 <h4 id="3_8_7_live_wallpapers"> 2530 3.8.7. Live Wallpapers 2531 </h4> 2532 <p> 2533 Android defines a component type and corresponding API and lifecycle that allows 2534 applications to expose one or more 2535 <a href="http://developer.android.com/reference/android/service/wallpaper/WallpaperService.html"> 2536 “Live Wallpapers” 2537 </a> 2538 to the end user. Live wallpapers are animations, patterns, or similar images 2539 with limited input capabilities that display as a wallpaper, behind other 2540 applications. 2541 </p> 2542 <p> 2543 Hardware is considered capable of reliably running live wallpapers if it can run 2544 all live wallpapers, with no limitations on functionality, at a reasonable frame 2545 rate with no adverse effects on other applications. If limitations in the 2546 hardware cause wallpapers and/or applications to crash, malfunction, consume 2547 excessive CPU or battery power, or run at unacceptably low frame rates, the 2548 hardware is considered incapable of running live wallpaper. As an example, some 2549 live wallpapers may use an OpenGL 2.0 or 3.x context to render their content. 2550 Live wallpaper will not run reliably on hardware that does not support multiple 2551 OpenGL contexts because the live wallpaper use of an OpenGL context may conflict 2552 with other applications that also use an OpenGL context. 2553 </p> 2554 <p> 2555 Device implementations capable of running live wallpapers reliably as described 2556 above SHOULD implement live wallpapers, and when implemented MUST report the 2557 platform feature flag android.software.live_wallpaper. 2558 </p> 2559 <h4 id="3_8_8_activity_switching"> 2560 3.8.8. Activity Switching 2561 </h4> 2562 <div class="note"> 2563 As the Recent function navigation key is OPTIONAL, the requirement to implement 2564 the overview screen is OPTIONAL for Android Watch and Android Automotive implementations, 2565 and RECOMMENDED for Android Television devices. There SHOULD still be a 2566 method to switch between activities on Android Automotive implementations. 2567 </div> 2568 <p> 2569 The upstream Android source code includes the 2570 <a href="http://developer.android.com/guide/components/recents.html"> 2571 overview screen 2572 </a>, a 2573 system-level user interface for task switching and displaying recently accessed 2574 activities and tasks using a thumbnail image of the application’s graphical 2575 state at the moment the user last left the application. Device implementations 2576 including the recents function navigation key as detailed in 2577 <a href="#7_2_3_navigation_keys"> 2578 section 7.2.3 2579 </a> 2580 MAY alter the interface but MUST meet the 2581 following requirements: 2582 </p> 2583 <ul> 2584 <li> 2585 MUST support at least up to 20 displayed activities. 2586 </li> 2587 <li> 2588 SHOULD at least display the title of 4 activities at a time. 2589 </li> 2590 <li> 2591 MUST implement the 2592 <a href="http://developer.android.com/about/versions/android-5.0.html#ScreenPinning"> 2593 screen pinning behavior 2594 </a> 2595 and provide the user with a settings menu to toggle the feature. 2596 </li> 2597 <li> 2598 SHOULD display highlight color, icon, screen title in recents. 2599 </li> 2600 <li> 2601 SHOULD display a closing affordance ("x") but MAY delay this until user interacts with screens. 2602 </li> 2603 <li> 2604 SHOULD implement a shortcut to switch easily to the previous activity 2605 </li> 2606 <li> 2607 MAY display affiliated recents as a group that moves together. 2608 </li> 2609 <li> 2610 SHOULD trigger the fast-switch action between the two most recently used 2611 apps, when the recents function key is tapped twice. 2612 </li> 2613 <li> 2614 SHOULD trigger the split-screen multiwindow-mode, if supported, when the 2615 recents functions key is long pressed. 2616 </li> 2617 </ul> 2618 <p> 2619 Device implementations are STRONGLY RECOMMENDED to use the upstream Android user 2620 interface (or a similar thumbnail-based interface) for the overview screen. 2621 </p> 2622 <h4 id="3_8_9_input_management"> 2623 3.8.9. Input Management 2624 </h4> 2625 <p> 2626 Android includes support for 2627 <a href="http://developer.android.com/guide/topics/text/creating-input-method.html"> 2628 Input Management 2629 </a> 2630 and support for third-party input method editors. Device implementations that 2631 allow users to use third-party input methods on the device MUST declare the 2632 platform feature android.software.input_methods and support IME APIs as defined 2633 in the Android SDK documentation. 2634 </p> 2635 <p> 2636 Device implementations that declare the android.software.input_methods feature 2637 MUST provide a user-accessible mechanism to add and configure third-party input 2638 methods. Device implementations MUST display the settings interface in response 2639 to the android.settings.INPUT_METHOD_SETTINGS intent. 2640 </p> 2641 <h4 id="3_8_10_lock_screen_media_control"> 2642 3.8.10. Lock Screen Media Control 2643 </h4> 2644 <p> 2645 The Remote Control Client API is deprecated from Android 5.0 in favor of the 2646 <a href="http://developer.android.com/reference/android/app/Notification.MediaStyle.html"> 2647 Media Notification Template 2648 </a> 2649 that allows media applications to integrate with playback controls that are 2650 displayed on the lock screen. Device implementations that support a lock screen, 2651 unless an Android Automotive or Watch implementation, MUST display the 2652 Lock screen Notifications including the Media Notification Template. 2653 </p> 2654 <h4 id="3_8_11_screen_savers_(previously_dreams)"> 2655 3.8.11. Screen savers (previously Dreams) 2656 </h4> 2657 <p> 2658 Android includes support for 2659 <a href="http://developer.android.com/reference/android/service/dreams/DreamService.html"> 2660 interactivescreensavers 2661 </a>, 2662 previously referred to as Dreams. Screen savers allow users to interact with 2663 applications when a device connected to a power source is idle or docked in a 2664 desk dock. Android Watch devices MAY implement screen savers, but other types 2665 of device implementations SHOULD include support for screen savers and provide 2666 a settings option for users toconfigure screen savers in response to the 2667 <code> 2668 android.settings.DREAM_SETTINGS 2669 </code> 2670 intent. 2671 </p> 2672 <h4 id="3_8_12_location"> 2673 3.8.12. Location 2674 </h4> 2675 <p> 2676 When a device has a hardware sensor (e.g. GPS) that is capable of providing the 2677 location coordinates, 2678 <a href="http://developer.android.com/reference/android/provider/Settings.Secure.html#LOCATION_MODE"> 2679 location modes 2680 </a> 2681 MUST be displayed in the Location menu within Settings. 2682 </p> 2683 <h4 id="3_8_13_unicode_and_font"> 2684 3.8.13. Unicode and Font 2685 </h4> 2686 <p> 2687 Android includes support for the emoji characters defined in 2688 <a href="http://www.unicode.org/versions/Unicode9.0.0/"> 2689 Unicode 9.0 2690 </a>. All device 2691 implementations MUST be capable of rendering these emoji characters 2692 in color glyph and when Android device implementations include an IME, 2693 it SHOULD provide an input method to the user for these emoji characters. 2694 </p> 2695 <p> 2696 Android handheld devices SHOULD support the skin tone and diverse family emojis 2697 as specified in the 2698 <a href="http://unicode.org/reports/tr51"> 2699 Unicode Technical Report #51 2700 </a>. 2701 </p> 2702 <p> 2703 Android includes support for Roboto 2 font with different 2704 weights—sans-serif-thin, sans-serif-light, sans-serif-medium, sans-serif-black, 2705 sans-serif-condensed, sans-serif-condensed-light—which MUST all be included for 2706 the languages available on the device and full Unicode 7.0 coverage of Latin, 2707 Greek, and Cyrillic, including the Latin Extended A, B, C, and D ranges, and all 2708 glyphs in the currency symbols block of Unicode 7.0. 2709 </p> 2710 <h4 id="3_8_14_multi-windows"> 2711 3.8.14. Multi-windows 2712 </h4> 2713 <p> 2714 A device implementation MAY choose not to implement any multi-window modes, but 2715 if it has the capability to display multiple activities at the same time it 2716 MUST implement such multi-window mode(s) in accordance with the application 2717 behaviors and APIs described in the Android SDK 2718 <a href="https://developer.android.com/preview/features/multi-window.html"> 2719 multi-window mode support documentation 2720 </a> 2721 and meet the following requirements: 2722 </p> 2723 <ul> 2724 <li> 2725 Applications can indicate whether they are capable of operating in 2726 multi-window mode in the AndroidManifest.xml file, either explicitly via the 2727 <a href="https://developer.android.com/reference/android/R.attr.html#resizeableActivity"> 2728 <code> 2729 android:resizeableActivity 2730 </code> 2731 </a> 2732 attribute or implicitly by having the targetSdkVersion > 24. Apps that 2733 explicitly set this attribute to false in their manifest MUST not be 2734 launched in multi-window mode. Apps that don't set the attribute in their 2735 manifest file (targetSdkVersion < 24) can be launched in multi-window mode, 2736 but the system MUST provide warning that the app may not work as expected in 2737 multi-window mode. 2738 </li> 2739 <li> 2740 Device implementations MUST NOT offer split-screen or freeform mode 2741 if both the screen height and width is less than 440 dp. 2742 </li> 2743 <li> 2744 Device implementations with screen size 2745 <code> 2746 xlarge 2747 </code> 2748 SHOULD support freeform mode. 2749 </li> 2750 <li> 2751 Android Television device implementations MUST support picture-in-picture (PIP) mode multi-window 2752 and place the PIP multi-window in the top right corner when PIP is ON. 2753 </li> 2754 <li> 2755 Device implementations with PIP mode multi-window support 2756 MUST allocate at least 240x135 dp for the PIP window. 2757 </li> 2758 <li> 2759 If the PIP multi-window mode is supported the 2760 <a href="https://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_WINDOW"> 2761 <code> 2762 KeyEvent.KEYCODE_WINDOW 2763 </code> 2764 </a> 2765 key MUST be used to control the PIP window; otherwise, the key MUST be 2766 available to the foreground activity. 2767 </li> 2768 </ul> 2769 <h3 id="3_9_device_administration"> 2770 3.9. Device Administration 2771 </h3> 2772 <p> 2773 Android includes features that allow security-aware applications to perform 2774 device administration functions at the system level, such as enforcing password 2775 policies or performing remote wipe, through the 2776 <a href="http://developer.android.com/guide/topics/admin/device-admin.html"> 2777 Android Device Administration API 2778 </a> 2779 ]. 2780 Device implementations MUST provide an implementation of the 2781 <a href="http://developer.android.com/reference/android/app/admin/DevicePolicyManager.html"> 2782 DevicePolicyManager 2783 </a> 2784 class. Device implementations that supports a secure lock screen MUST implement 2785 the full range of 2786 <a href="http://developer.android.com/guide/topics/admin/device-admin.html"> 2787 device administration 2788 </a> 2789 policies defined in the Android SDK documentation and report the platform 2790 feature android.software.device_admin. 2791 </p> 2792 <h4 id="3_9_1_device_provisioning"> 2793 3.9.1 Device Provisioning 2794 </h4> 2795 <h5 id="3_9_1_1_device_owner_provisioning"> 2796 3.9.1.1 Device owner provisioning 2797 </h5> 2798 <p> 2799 If a device implementation declares the 2800 <code> 2801 android.software.device_admin 2802 </code> 2803 feature 2804 then it MUST implement the provisioning of the 2805 <a href="http://developer.android.com/reference/android/app/admin/DevicePolicyManager.html#isDeviceOwnerApp(java.lang.String)"> 2806 Device Owner app 2807 </a> 2808 of a Device Policy Client (DPC) application as indicated below: 2809 </p> 2810 <ul> 2811 <li> 2812 When the device implementation has no user data configured yet, it: 2813 <ul> 2814 <li> 2815 MUST report 2816 <code> 2817 true 2818 </code> 2819 for 2820 <a href="https://developer.android.com/reference/android/app/admin/DevicePolicyManager.html#isProvisioningAllowed(java.lang.String)"> 2821 <code> 2822 DevicePolicyManager.isProvisioningAllowed(ACTION_PROVISION_MANAGED_DEVICE) 2823 </code> 2824 </a>. 2825 </li> 2826 <li> 2827 MUST enroll the DPC application as the Device Owner app in response to 2828 the intent action 2829 <a href="http://developer.android.com/reference/android/app/admin/DevicePolicyManager.html#ACTION_PROVISION_MANAGED_DEVICE"> 2830 <code> 2831 android.app.action.PROVISION_MANAGED_DEVICE 2832 </code> 2833 </a>. 2834 </li> 2835 <li> 2836 MUST enroll the DPC application as the Device Owner app if the device 2837 declares Near-Field Communications (NFC) support via the feature flag 2838 <code> 2839 android.hardware.nfc 2840 </code> 2841 and receives an NFC message containing a record 2842 with MIME type 2843 <a href="https://developer.android.com/reference/android/app/admin/DevicePolicyManager.html#MIME_TYPE_PROVISIONING_NFC"> 2844 <code> 2845 MIME_TYPE_PROVISIONING_NFC 2846 </code> 2847 </a>. 2848 </li> 2849 </ul> 2850 </li> 2851 <li> 2852 When the device implementation has user data, it: 2853 <ul> 2854 <li> 2855 MUST report 2856 <code> 2857 false 2858 </code> 2859 for the 2860 <a href="https://developer.android.com/reference/android/app/admin/DevicePolicyManager.html#isProvisioningAllowed(java.lang.String)"> 2861 <code> 2862 DevicePolicyManager.isProvisioningAllowed(ACTION_PROVISION_MANAGED_DEVICE) 2863 </code> 2864 </a>. 2865 </li> 2866 <li> 2867 MUST not enroll any DPC application as the Device Owner App any more. 2868 </li> 2869 </ul> 2870 </li> 2871 </ul> 2872 <p> 2873 Device implementations MAY have a preinstalled application performing device 2874 administration functions but this application MUST NOT be set as the Device 2875 Owner app without explicit consent or action from the user or the administrator 2876 of the device. 2877 </p> 2878 <h5 id="3_9_1_2_managed_profile_provisioning"> 2879 3.9.1.2 Managed profile provisioning 2880 </h5> 2881 <p> 2882 If a device implementation declares the android.software.managed_users, it MUST 2883 be possible to enroll a Device Policy Controller (DPC) application as the 2884 <a href="http://developer.android.com/reference/android/app/admin/DevicePolicyManager.html#isProfileOwnerApp(java.lang.String)"> 2885 owner of a new Managed Profile 2886 </a>. 2887 </p> 2888 <p> 2889 The managed profile provisioning process (the flow initiated by 2890 <a href="http://developer.android.com/reference/android/app/admin/DevicePolicyManager.html#ACTION_PROVISION_MANAGED_PROFILE"> 2891 android.app.action.PROVISION_MANAGED_PROFILE 2892 </a> 2893 ) 2894 user experience MUST align with the AOSP implementation. 2895 </p> 2896 <p> 2897 Device implementations MUST provide the following user affordances within the 2898 Settings user interface to indicate to the user when a particular system function 2899 has been disabled by the Device Policy Controller (DPC): 2900 </p> 2901 <ul> 2902 <li> 2903 A consistent icon or other user affordance (for example the upstream AOSP 2904 info icon) to represent when a particular setting is restricted by a 2905 Device Admin. 2906 </li> 2907 <li> 2908 A short explanation message, as provided by the Device Admin via the 2909 <a href="https://developer.android.com/reference/android/app/admin/DevicePolicyManager.html#setShortSupportMessage%28android.content.ComponentName, java.lang.CharSequence%29"> 2910 <code> 2911 setShortSupportMessage 2912 </code> 2913 </a>. 2914 </li> 2915 <li> 2916 The DPC application’s icon. 2917 </li> 2918 </ul> 2919 <h3 id="3_9_2_managed_profile_support"> 2920 3.9.2 Managed Profile Support 2921 </h3> 2922 <p> 2923 Managed profile capable devices are those devices that: 2924 </p> 2925 <ul> 2926 <li> 2927 Declare android.software.device_admin (see 2928 <a href="#3_9_device_administration"> 2929 section 3.9 Device Administration 2930 </a> 2931 ). 2932 </li> 2933 <li> 2934 Are not low RAM devices (see 2935 <a href="#7_6_1_minimum_memory_and_storage"> 2936 section 7.6.1 2937 </a> 2938 ). 2939 </li> 2940 <li> 2941 Allocate internal (non-removable) storage as shared storage (see 2942 <a href="#7_6_2_application_shared_storage"> 2943 section 7.6.2 2944 </a> 2945 ). 2946 </li> 2947 </ul> 2948 <p> 2949 Managed profile capable devices MUST: 2950 </p> 2951 <ul> 2952 <li> 2953 Declare the platform feature flag 2954 <code> 2955 android.software.managed_users 2956 </code> 2957 . 2958 </li> 2959 <li> 2960 Support managed profiles via the 2961 <code> 2962 android.app.admin.DevicePolicyManager 2963 </code> 2964 APIs. 2965 </li> 2966 <li> 2967 Allow one and only 2968 <a href="http://developer.android.com/reference/android/app/admin/DevicePolicyManager.html#ACTION_PROVISION_MANAGED_PROFILE"> 2969 one managed profile to be created 2970 </a>. 2971 </li> 2972 <li> 2973 Use an icon badge (similar to the AOSP upstream work badge) to represent the 2974 managed applications and widgets and other badged UI elements like 2975 Recents & Notifications. 2976 </li> 2977 <li> 2978 Display a notification icon (similar to the AOSP upstream work badge) to 2979 indicate when user is within a managed profile application. 2980 </li> 2981 <li> 2982 Display a toast indicating that the user is in the managed profile if and 2983 when the device wakes up (ACTION_USER_PRESENT) and the foreground 2984 application is within the managed profile. 2985 </li> 2986 <li> 2987 Where a managed profile exists, show a visual affordance in the Intent 2988 'Chooser' to allow the user to forward the intent from the managed profile 2989 to the primary user or vice versa, if enabled by the Device Policy 2990 Controller. 2991 </li> 2992 <li> 2993 Where a managed profile exists, expose the following user affordances for 2994 both the primary user and the managed profile: 2995 <ul> 2996 <li> 2997 Separate accounting for battery, location, mobile data and storage usage 2998 for the primary user and managed profile. 2999 </li> 3000 <li> 3001 Independent management of VPN Applications installed within the primary 3002 user or managed profile. 3003 </li> 3004 <li> 3005 Independent management of applications installed within the primary user 3006 or managed profile. 3007 </li> 3008 <li> 3009 Independent management of accounts within the primary user or managed 3010 profile. 3011 </li> 3012 </ul> 3013 </li> 3014 <li> 3015 Ensure the preinstalled dialer, contacts and messaging applications can 3016 search for and look up caller information from the managed profile (if one 3017 exists) alongside those from the primary profile, if the Device Policy 3018 Controller permits it. When contacts from the managed profile are displayed 3019 in the preinstalled call log, in-call UI, in-progress and missed-call 3020 notifications, contacts and messaging apps they SHOULD be badged with the 3021 same badge used to indicate managed profile applications. 3022 </li> 3023 <li> 3024 MUST ensure that it satisfies all the security requirements applicable for a 3025 device with multiple users enabled (see 3026 <a href="#9_5_multi-user_support"> 3027 section 9.5 3028 </a> 3029 ), 3030 even though the managed profile is not counted as another user in addition 3031 to the primary user. 3032 </li> 3033 <li> 3034 Support the ability to specify a separate lock screen meeting the following 3035 requirements to grant access to apps running in a managed profile. 3036 <ul> 3037 <li> 3038 Device implementations MUST honor the 3039 <a href="https://developer.android.com/reference/android/app/admin/DevicePolicyManager.html#ACTION_SET_NEW_PASSWORD"> 3040 <code> 3041 DevicePolicyManager.ACTION_SET_NEW_PASSWORD 3042 </code> 3043 </a> 3044 intent and show an interface to configure a separate lock screen 3045 credential for the managed profile. 3046 </li> 3047 <li> 3048 The lock screen credentials of the managed profile MUST use the same 3049 credential storage and management mechanisms as the parent profile, 3050 as documented on the 3051 <a href="http://source.android.com/security/authentication/index.html"> 3052 Android Open Source Project Site 3053 </a> 3054 </li> 3055 <li> 3056 The DPC 3057 <a href="https://developer.android.com/guide/topics/admin/device-admin.html#pwd"> 3058 password policies 3059 </a> 3060 MUST apply to only the managed profile's lock screen credentials unless 3061 called upon the 3062 <code> 3063 DevicePolicyManager 3064 </code> 3065 instance returned by 3066 <a href="https://developer.android.com/reference/android/app/admin/DevicePolicyManager.html#getParentProfileInstance%28android.content.ComponentName%29"> 3067 getParentProfileInstance 3068 </a>. 3069 </li> 3070 </ul> 3071 </li> 3072 </ul> 3073 <h3 id="3_10_accessibility"> 3074 3.10. Accessibility 3075 </h3> 3076 <p> 3077 Android provides an accessibility layer that helps users with disabilities to 3078 navigate their devices more easily. In addition, Android provides platform APIs 3079 that enable 3080 <a href="http://developer.android.com/reference/android/accessibilityservice/AccessibilityService.html"> 3081 accessibility service implementations 3082 </a> 3083 to receive callbacks for user and system events and generate alternate feedback 3084 mechanisms, such as text-to-speech, haptic feedback, and trackball/d-pad 3085 navigation. 3086 </p> 3087 <p> 3088 Device implementations include the following requirements: 3089 </p> 3090 <ul> 3091 <li> 3092 Android Automotive implementations SHOULD provide an implementation of the 3093 Android accessibility framework consistent with the default Android 3094 implementation. 3095 </li> 3096 <li> 3097 Device implementations (Android Automotive excluded) MUST provide an 3098 implementation of the Android accessibility framework consistent with the 3099 default Android implementation. 3100 </li> 3101 <li> 3102 Device implementations (Android Automotive excluded) MUST support 3103 third-party accessibility service implementations through the 3104 <a href="http://developer.android.com/reference/android/view/accessibility/package-summary.html"> 3105 android.accessibilityservice APIs 3106 </a>. 3107 </li> 3108 <li> 3109 Device implementations (Android Automotive excluded) MUST generate 3110 AccessibilityEvents and deliver these events to all registered 3111 AccessibilityService implementations in a manner consistent with the default 3112 Android implementation 3113 </li> 3114 <li> 3115 <p> 3116 Device implementations (Android Automotive and Android Watch devices with no 3117 audio output excluded), MUST provide a user-accessible mechanism to enable 3118 and disable accessibility services, and MUST display this interface in 3119 response to the android.provider.Settings.ACTION_ACCESSIBILITY_SETTINGS 3120 intent. 3121 </p> 3122 </li> 3123 <li> 3124 <p> 3125 Android device implementations with audio output are STRONGLY RECOMMENDED to provide 3126 implementations of accessibility services on the device comparable in or exceeding functionality 3127 of the TalkBack** and Switch Access accessibility services (https://github.com/google/talkback). 3128 </p> 3129 </li> 3130 <li> 3131 Android Watch devices with audio output SHOULD provide implementations of an accessibility service 3132 on the device comparable in or exceeding functionality of the TalkBack accessibility service 3133 (https://github.com/google/talkback). 3134 </li> 3135 <li> 3136 Device implementations SHOULD provide a mechanism in the out-of-box setup flow for users to enable 3137 relevant accessibility services, as well as options to adjust the font size, display size and 3138 magnification gestures. 3139 </li> 3140 </ul> 3141 <p> 3142 ** For languages supported by Text-to-speech. 3143 </p> 3144 <p> 3145 Also, note that if there is a preloaded accessibility service, it MUST be a Direct Boot aware 3146 {directBootAware} app if the device has encrypted storage using File Based 3147 Encryption (FBE). 3148 </p> 3149 <h3 id="3_11_text-to-speech"> 3150 3.11. Text-to-Speech 3151 </h3> 3152 <p> 3153 Android includes APIs that allow applications to make use of text-to-speech 3154 (TTS) services and allows service providers to provide implementations of TTS 3155 services. Device implementations reporting the feature 3156 android.hardware.audio.output MUST meet these requirements related to the 3157 <a href="http://developer.android.com/reference/android/speech/tts/package-summary.html"> 3158 Android TTS framework 3159 </a>. 3160 </p> 3161 <p> 3162 Android Automotive implementations: 3163 </p> 3164 <ul> 3165 <li> 3166 MUST support the Android TTS framework APIs. 3167 </li> 3168 <li> 3169 MAY support installation of third-party TTS engines. If supported, partners 3170 MUST provide a user-accessible interface that allows the user to select a 3171 TTS engine for use at system level. 3172 </li> 3173 </ul> 3174 <p> 3175 All other device implementations: 3176 </p> 3177 <ul> 3178 <li> 3179 MUST support the Android TTS framework APIs and SHOULD include a TTS engine 3180 supporting the languages available on the device. Note that the upstream 3181 Android open source software includes a full-featured TTS engine 3182 implementation. 3183 </li> 3184 <li> 3185 MUST support installation of third-party TTS engines. 3186 </li> 3187 <li> 3188 MUST provide a user-accessible interface that allows users to select a TTS 3189 engine for use at the system level. 3190 </li> 3191 </ul> 3192 <h3 id="3_12_tv_input_framework"> 3193 3.12. TV Input Framework 3194 </h3> 3195 <p> 3196 The 3197 <a href="http://source.android.com/devices/tv/index.html"> 3198 Android Television Input Framework (TIF) 3199 </a> 3200 simplifies the delivery of live content to Android Television devices. TIF 3201 provides a standard API to create input modules that control Android Television 3202 devices. Android Television device implementations MUST support TV Input 3203 Framework. 3204 </p> 3205 <p> 3206 Device implementations that support TIF MUST declare the platform feature 3207 android.software.live_tv. 3208 </p> 3209 <h4 id="3_12_1_tv_app"> 3210 3.12.1. TV App 3211 </h4> 3212 <p> 3213 Any device implementation that declares support for Live TV MUST have an 3214 installed TV application (TV App). The Android Open Source Project provides an 3215 implementation of the TV App. 3216 </p> 3217 <p> 3218 The TV App MUST provide facilities to install and use 3219 <a href="http://developer.android.com/reference/android/media/tv/TvContract.Channels.html"> 3220 TV Channels 3221 </a> 3222 and meet the following requirements: 3223 </p> 3224 <ul> 3225 <li> 3226 Device implementations MUST allow third-party TIF-based inputs 3227 ( 3228 <a href="https://source.android.com/devices/tv/index.html#third-party_input_example"> 3229 third-party inputs 3230 </a> 3231 ) 3232 to be installed and managed. 3233 </li> 3234 <li> 3235 Device implementations MAY provide visual separation between pre-installed 3236 <a href="https://source.android.com/devices/tv/index.html#tv_inputs"> 3237 TIF-based inputs 3238 </a> 3239 (installed inputs) and third-party inputs. 3240 </li> 3241 <li> 3242 Device implementations MUST NOT display the third-party inputs more than a 3243 single navigation action away from the TV App (i.e. expanding a list of 3244 third-party inputs from the TV App). 3245 </li> 3246 </ul> 3247 <h5 id="3_12_1_1_electronic_program_guide"> 3248 3.12.1.1. Electronic Program Guide 3249 </h5> 3250 <p> 3251 Android Television device implementations MUST show an informational and 3252 interactive overlay, which MUST include an electronic program guide (EPG) 3253 generated from the values in the 3254 <a href="https://developer.android.com/reference/android/media/tv/TvContract.Programs.html"> 3255 TvContract.Programs 3256 </a> 3257 fields. The EPG MUST meet the following requirements: 3258 </p> 3259 <ul> 3260 <li> 3261 The EPG MUST display information from all installed inputs and third-party 3262 inputs. 3263 </li> 3264 <li> 3265 The EPG MAY provide visual separation between the installed inputs and 3266 third-party inputs. 3267 </li> 3268 <li> 3269 The EPG is STRONGLY RECOMMENDED to display installed inputs and third-party 3270 inputs with equal prominence. The EPG MUST NOT display the third-party 3271 inputs more than a single navigation action away from the installed inputs 3272 on the EPG. 3273 </li> 3274 <li> 3275 On channel change, device implementations MUST display EPG data for the 3276 currently playing program. 3277 </li> 3278 </ul> 3279 <h5 id="3_12_1_2_navigation"> 3280 3.12.1.2. Navigation 3281 </h5> 3282 <p> 3283 The TV App MUST allow navigation for the following functions via the D-pad, 3284 Back, and Home keys on the Android Television device’s input device(s) 3285 (i.e. remote control, remote control application, or game controller): 3286 </p> 3287 <ul> 3288 <li> 3289 Changing TV channels 3290 </li> 3291 <li> 3292 Opening EPG 3293 </li> 3294 <li> 3295 Configuring and tuning to third-party TIF-based inputs 3296 </li> 3297 <li> 3298 Opening Settings menu 3299 </li> 3300 </ul> 3301 <p> 3302 The TV App SHOULD pass key events to HDMI inputs through CEC. 3303 </p> 3304 <h5 id="3_12_1_3_tv_input_app_linking"> 3305 3.12.1.3. TV input app linking 3306 </h5> 3307 <p> 3308 Android Television device implementations MUST support 3309 <a href="http://developer.android.com/reference/android/media/tv/TvContract.Channels.html#COLUMN_APP_LINK_INTENT_URI"> 3310 TV input app linking 3311 </a>, 3312 which allows all inputs to provide activity links from the current activity to 3313 another activity (i.e. a link from live programming to related content). The TV 3314 App MUST show TV input app linking when it is provided. 3315 </p> 3316 <h5 id="3_12_1_4_time_shifting"> 3317 3.12.1.4. Time shifting 3318 </h5> 3319 <p> 3320 Android Television device implementations MUST support time shifting, which 3321 allows the user to pause and resume live content. Device implementations MUST 3322 provide the user a way to pause and resume the currently playing program, if 3323 time shifting for that program 3324 <a href="https://developer.android.com/reference/android/media/tv/TvInputManager.html#TIME_SHIFT_STATUS_AVAILABLE"> 3325 is available 3326 </a>. 3327 </p> 3328 <h5 id="3_12_1_5_tv_recording"> 3329 3.12.1.5. TV recording 3330 </h5> 3331 <p> 3332 Android Television device implementations are STRONGLY RECOMMENDED to support 3333 TV recording. If the TV input supports recording, the EPG MAY provide a way to 3334 <a href="https://developer.android.com/reference/android/media/tv/TvInputInfo.html#canRecord%28%29"> 3335 record a program 3336 </a> 3337 if the recording of such a program is not 3338 <a href="https://developer.android.com/reference/android/media/tv/TvContract.Programs.html#COLUMN_RECORDING_PROHIBITED"> 3339 prohibited 3340 </a>. 3341 Device implementations SHOULD provide a user interface to play recorded programs. 3342 </p> 3343 <h3 id="3_13_quick_settings"> 3344 3.13. Quick Settings 3345 </h3> 3346 <p> 3347 Android device implementations SHOULD include a Quick Settings UI component that 3348 allow quick access to frequently used or urgently needed actions. 3349 </p> 3350 <p> 3351 Android includes the 3352 <a href="https://developer.android.com/reference/android/service/quicksettings/package-summary.html"> 3353 <code> 3354 quicksettings 3355 </code> 3356 </a> 3357 API allowing third party apps to implement tiles that can be added by the user 3358 alongside the system-provided tiles in the Quick Settings UI component. If a 3359 device implementation has a Quick Settings UI component, it: 3360 </p> 3361 <ul> 3362 <li> 3363 MUST allow the user to add or remove tiles from a third-party app to Quick 3364 Settings. 3365 </li> 3366 <li> 3367 MUST NOT automatically add a tile from a third-party app directly to Quick 3368 Settings. 3369 </li> 3370 <li> 3371 MUST display all the user-added tiles from third-party apps alongside the 3372 system-provided quick setting tiles. 3373 </li> 3374 </ul> 3375 <h3 id="3_14_vehicle_ui_apis"> 3376 3.14. Vehicle UI APIs 3377 </h3> 3378 <h4 id="3_14_1__vehicle_media_ui"> 3379 3.14.1. Vehicle Media UI 3380 </h4> 3381 <p> 3382 Any device implementation that 3383 <a href="https://developer.android.com/reference/android/content/pm/PackageManager.html?#FEATURE_AUTOMOTIVE?"> 3384 declares automotive support 3385 </a> 3386 MUST include a UI framework to support third-party apps consuming the 3387 <a href="http://developer.android.com/reference/android/media/browse/MediaBrowser.html"> 3388 MediaBrowser 3389 </a> 3390 and 3391 <a href="http://developer.android.com/reference/android/media/session/MediaSession.html"> 3392 MediaSession 3393 </a> 3394 APIs. 3395 </p> 3396 <p> 3397 The UI framework supporting third-party apps that depend on MediaBrowser and 3398 MediaSession has the following visual requirements: 3399 </p> 3400 <ul> 3401 <li> 3402 MUST display 3403 <a href="http://developer.android.com/reference/android/media/browse/MediaBrowser.MediaItem.html"> 3404 MediaItem 3405 </a> 3406 icons and notification icons unaltered. 3407 </li> 3408 <li> 3409 MUST display those items as described by MediaSession, e.g., metadata, icons, 3410 imagery. 3411 </li> 3412 <li> 3413 MUST show app title. 3414 </li> 3415 <li> 3416 MUST have drawer to present 3417 <a href="http://developer.android.com/reference/android/media/browse/MediaBrowser.html"> 3418 MediaBrowser 3419 </a> 3420 hierarchy. 3421 </li> 3422 </ul> 3423 <h2 id="4_application_packaging_compatibility"> 3424 4. Application Packaging Compatibility 3425 </h2> 3426 <p> 3427 Device implementations MUST install and run Android “.apk” files as generated 3428 by the “aapt” tool included in the 3429 <a href="http://developer.android.com/tools/help/index.html"> 3430 official Android SDK 3431 </a>. 3432 For this reason device implementations SHOULD use the reference implementation’s 3433 package management system. 3434 </p> 3435 <p> 3436 The package manager MUST support verifying “.apk” files using the 3437 <a href="https://source.android.com/security/apksigning/v2.html"> 3438 APK Signature Scheme v2 3439 </a> 3440 and 3441 <a href="https://source.android.com/security/apksigning/v2.html#v1-verification"> 3442 JAR signing 3443 </a>. 3444 </p> 3445 <p> 3446 Devices implementations MUST NOT extend either the 3447 <a href="http://developer.android.com/guide/components/fundamentals.html"> 3448 .apk 3449 </a>, 3450 <a href="http://developer.android.com/guide/topics/manifest/manifest-intro.html"> 3451 Android Manifest 3452 </a>, 3453 <a href="https://android.googlesource.com/platform/dalvik/"> 3454 Dalvik bytecode 3455 </a>, or 3456 RenderScript bytecode formats in such a way that would prevent those files from 3457 installing and running correctly on other compatible devices. 3458 </p> 3459 <p> 3460 Device implementations MUST NOT allow apps other than the current 3461 "installer of record" for the package to silently uninstall the app without any 3462 prompt, as documented in the SDK for the 3463 <a href="https://developer.android.com/reference/android/Manifest.permission.html#DELETE_PACKAGES"> 3464 <code> 3465 DELETE_PACKAGE 3466 </code> 3467 </a> 3468 permission. The only exceptions are the system package verifier app handling 3469 <a href="https://developer.android.com/reference/android/content/Intent.html#ACTION_PACKAGE_NEEDS_VERIFICATION"> 3470 PACKAGE_NEEDS_VERIFICATION 3471 </a> 3472 intent and the storage manager app handling 3473 <a href="https://developer.android.com/reference/android/os/storage/StorageManager.html#ACTION_MANAGE_STORAGE"> 3474 ACTION_MANAGE_STORAGE 3475 </a> 3476 intent. 3477 </p> 3478 <h2 id="5_multimedia_compatibility"> 3479 5. Multimedia Compatibility 3480 </h2> 3481 <h3 id="5_1_media_codecs"> 3482 5.1. Media Codecs 3483 </h3> 3484 <p> 3485 Device implementations— 3486 </p> 3487 <ul> 3488 <li> 3489 <p> 3490 MUST support the 3491 <a href="http://developer.android.com/guide/appendix/media-formats.html"> 3492 core media 3493 formats 3494 </a> 3495 specified in the Android SDK documentation, except where explicitly permitted 3496 in this document. 3497 </p> 3498 </li> 3499 <li> 3500 <p> 3501 MUST support the media formats, encoders, decoders, file types, and 3502 container formats defined in the tables below and reported via 3503 <a href="http://developer.android.com/reference/android/media/MediaCodecList.html"> 3504 MediaCodecList 3505 </a>. 3506 </p> 3507 </li> 3508 <li> 3509 <p> 3510 MUST also be able to decode all profiles reported in its 3511 <a href="http://developer.android.com/reference/android/media/CamcorderProfile.html"> 3512 CamcorderProfile 3513 </a> 3514 </p> 3515 </li> 3516 <li> 3517 <p> 3518 MUST be able to decode all formats it can encode. This includes all 3519 bitstreams that its encoders generate. 3520 </p> 3521 </li> 3522 </ul> 3523 <p> 3524 Codecs SHOULD aim for minimum codec latency, in other words, codecs— 3525 </p> 3526 <ul> 3527 <li> 3528 SHOULD NOT consume and store input buffers and return input buffers only 3529 once processed 3530 </li> 3531 <li> 3532 SHOULD NOT hold onto decoded buffers for longer than as specified by the 3533 standard (e.g. SPS). 3534 </li> 3535 <li> 3536 SHOULD NOT hold onto encoded buffers longer than required by the GOP 3537 structure. 3538 </li> 3539 </ul> 3540 <p> 3541 All of the codecs listed in the table below are provided as software 3542 implementations in the preferred Android implementation from the Android Open 3543 Source Project. 3544 </p> 3545 <p> 3546 Please note that neither Google nor the Open Handset Alliance make any 3547 representation that these codecs are free from third-party patents. Those 3548 intending to use this source code in hardware or software products are advised 3549 that implementations of this code, including in open source software or 3550 shareware, may require patent licenses from the relevant patent holders. 3551 </p> 3552 <h4 id="5_1_1_audio_codecs"> 3553 5.1.1. Audio Codecs 3554 </h4> 3555 <table> 3556 <tr> 3557 <th> 3558 Format/Codec 3559 </th> 3560 <th> 3561 Encoder 3562 </th> 3563 <th> 3564 Decoder 3565 </th> 3566 <th> 3567 Details 3568 </th> 3569 <th> 3570 Supported File Types/Container Formats 3571 </th> 3572 </tr> 3573 <tr> 3574 <td> 3575 MPEG-4 AAC Profile 3576 <br/> 3577 (AAC LC) 3578 </td> 3579 <td> 3580 REQUIRED 3581 <sup> 3582 1 3583 </sup> 3584 </td> 3585 <td> 3586 REQUIRED 3587 </td> 3588 <td> 3589 Support for mono/stereo/5.0/5.1 3590 <sup> 3591 2 3592 </sup> 3593 content with standard 3594 sampling rates from 8 to 48 kHz. 3595 </td> 3596 <td> 3597 <ul> 3598 <li class="table_list"> 3599 3GPP (.3gp) 3600 </li> 3601 <li class="table_list"> 3602 MPEG-4 (.mp4, .m4a) 3603 </li> 3604 <li class="table_list"> 3605 ADTS raw AAC (.aac, decode in Android 3.1+, encode in 3606 Android 4.0+, ADIF not supported) 3607 </li> 3608 <li class="table_list"> 3609 MPEG-TS (.ts, not seekable, Android 3.0+) 3610 </li> 3611 </ul> 3612 </td> 3613 </tr> 3614 <tr> 3615 <td> 3616 MPEG-4 HE AAC Profile (AAC+) 3617 </td> 3618 <td> 3619 REQUIRED 3620 <sup> 3621 1 3622 </sup> 3623 <br/> 3624 (Android 4.1+) 3625 </td> 3626 <td> 3627 REQUIRED 3628 </td> 3629 <td> 3630 Support for mono/stereo/5.0/5.1 3631 <sup> 3632 2 3633 </sup> 3634 content with standard 3635 sampling rates from 16 to 48 kHz. 3636 </td> 3637 <td> 3638 </td> 3639 </tr> 3640 <tr> 3641 <td> 3642 MPEG-4 HE AACv2 3643 <br/> 3644 Profile (enhanced AAC+) 3645 </td> 3646 <td> 3647 </td> 3648 <td> 3649 REQUIRED 3650 </td> 3651 <td> 3652 Support for mono/stereo/5.0/5.1 3653 <sup> 3654 2 3655 </sup> 3656 content with standard 3657 sampling rates from 16 to 48 kHz. 3658 </td> 3659 <td> 3660 </td> 3661 </tr> 3662 <tr> 3663 <td> 3664 AAC ELD (enhanced low delay AAC) 3665 </td> 3666 <td> 3667 REQUIRED 3668 <sup> 3669 1 3670 </sup> 3671 <br/> 3672 (Android 4.1+) 3673 </td> 3674 <td> 3675 REQUIRED 3676 <br/> 3677 (Android 4.1+) 3678 </td> 3679 <td> 3680 Support for mono/stereo content with standard sampling rates from 16 to 3681 48 kHz. 3682 </td> 3683 <td> 3684 </td> 3685 </tr> 3686 <tr> 3687 <td> 3688 AMR-NB 3689 </td> 3690 <td> 3691 REQUIRED 3692 <sup> 3693 3 3694 </sup> 3695 </td> 3696 <td> 3697 REQUIRED 3698 <sup> 3699 3 3700 </sup> 3701 </td> 3702 <td> 3703 4.75 to 12.2 kbps sampled @ 8 kHz 3704 </td> 3705 <td> 3706 3GPP (.3gp) 3707 </td> 3708 </tr> 3709 <tr> 3710 <td> 3711 AMR-WB 3712 </td> 3713 <td> 3714 REQUIRED 3715 <sup> 3716 3 3717 </sup> 3718 </td> 3719 <td> 3720 REQUIRED 3721 <sup> 3722 3 3723 </sup> 3724 </td> 3725 <td> 3726 9 rates from 6.60 kbit/s to 23.85 kbit/s sampled @ 16 kHz 3727 </td> 3728 <td> 3729 </td> 3730 </tr> 3731 <tr> 3732 <td> 3733 FLAC 3734 </td> 3735 <td> 3736 </td> 3737 <td> 3738 REQUIRED 3739 <br/> 3740 (Android 3.1+) 3741 </td> 3742 <td> 3743 Mono/Stereo (no multichannel). Sample rates up to 48 kHz (but up to 44.1 3744 kHz is RECOMMENDED on devices with 44.1 kHz output, as the 48 to 44.1 kHz 3745 downsampler does not include a low-pass filter). 16-bit RECOMMENDED; no 3746 dither applied for 24-bit. 3747 </td> 3748 <td> 3749 FLAC (.flac) only 3750 </td> 3751 </tr> 3752 <tr> 3753 <td> 3754 MP3 3755 </td> 3756 <td> 3757 </td> 3758 <td> 3759 REQUIRED 3760 </td> 3761 <td> 3762 Mono/Stereo 8-320Kbps constant (CBR) or variable bitrate (VBR) 3763 </td> 3764 <td> 3765 MP3 (.mp3) 3766 </td> 3767 </tr> 3768 <tr> 3769 <td> 3770 MIDI 3771 </td> 3772 <td> 3773 </td> 3774 <td> 3775 REQUIRED 3776 </td> 3777 <td> 3778 MIDI Type 0 and 1. DLS Version 1 and 2. XMF and Mobile XMF. Support for 3779 ringtone formats RTTTL/RTX, OTA, and iMelody 3780 </td> 3781 <td> 3782 <ul> 3783 <li class="table_list"> 3784 Type 0 and 1 (.mid, .xmf, .mxmf) 3785 </li> 3786 <li class="table_list"> 3787 RTTTL/RTX (.rtttl, .rtx) 3788 </li> 3789 <li class="table_list"> 3790 OTA (.ota) 3791 </li> 3792 <li class="table_list"> 3793 iMelody (.imy) 3794 </li> 3795 </ul> 3796 </td> 3797 </tr> 3798 <tr> 3799 <td> 3800 Vorbis 3801 </td> 3802 <td> 3803 </td> 3804 <td> 3805 REQUIRED 3806 </td> 3807 <td> 3808 </td> 3809 <td> 3810 <ul> 3811 <li class="table_list"> 3812 Ogg (.ogg) 3813 </li> 3814 <li class="table_list"> 3815 Matroska (.mkv, Android 4.0+) 3816 </li> 3817 </ul> 3818 </td> 3819 </tr> 3820 <tr> 3821 <td> 3822 PCM/WAVE 3823 </td> 3824 <td> 3825 REQUIRED 3826 <sup> 3827 4 3828 </sup> 3829 <br/> 3830 (Android 4.1+) 3831 </td> 3832 <td> 3833 REQUIRED 3834 </td> 3835 <td> 3836 16-bit linear PCM (rates up to limit of hardware). Devices MUST support 3837 sampling rates for raw PCM recording at 8000, 11025, 16000, and 44100 Hz 3838 frequencies. 3839 </td> 3840 <td> 3841 WAVE (.wav) 3842 </td> 3843 </tr> 3844 <tr> 3845 <td> 3846 Opus 3847 </td> 3848 <td> 3849 </td> 3850 <td> 3851 REQUIRED 3852 <br/> 3853 (Android 5.0+) 3854 </td> 3855 <td> 3856 </td> 3857 <td> 3858 Matroska (.mkv), Ogg(.ogg) 3859 </td> 3860 </tr> 3861 </table> 3862 <p class="table_footnote"> 3863 1 Required for device implementations that define 3864 android.hardware.microphone but optional for Android Watch device 3865 implementations. 3866 </p> 3867 <p class="table_footnote"> 3868 2 Recording or playback MAY be performed in mono 3869 or stereo, but the decoding of AAC input buffers of multichannel streams 3870 (i.e. more than two channels) to PCM through the default AAC audio decoder 3871 in the android.media.MediaCodec API, the following MUST be supported: 3872 </p> 3873 <ul> 3874 <li> 3875 decoding is performed without downmixing (e.g. a 5.0 AAC stream must be 3876 decoded to five channels of PCM, a 5.1 AAC stream must be decoded to six 3877 channels of PCM), 3878 </li> 3879 <li> 3880 dynamic range metadata, as defined in "Dynamic Range Control (DRC)" 3881 in ISO/IEC 14496-3, and the android.media.MediaFormat DRC keys to 3882 configure the dynamic range-related behaviors of the audio decoder. The 3883 AAC DRC keys were introduced in API 21,and are: 3884 KEY_AAC_DRC_ATTENUATION_FACTOR, KEY_AAC_DRC_BOOST_FACTOR, 3885 KEY_AAC_DRC_HEAVY_COMPRESSION, KEY_AAC_DRC_TARGET_REFERENCE_LEVEL and 3886 KEY_AAC_ENCODED_TARGET_LEVEL 3887 </li> 3888 </ul> 3889 <p class="table_footnote"> 3890 3 Required for Android Handheld device 3891 implementations. 3892 </p> 3893 <p class="table_footnote"> 3894 4 Required for device implementations that define 3895 android.hardware.microphone, including Android Watch device implementations. 3896 </p> 3897 <h4 id="5_1_2_image_codecs"> 3898 5.1.2. Image Codecs 3899 </h4> 3900 <table> 3901 <tr> 3902 <th> 3903 Format/Codec 3904 </th> 3905 <th> 3906 Encoder 3907 </th> 3908 <th> 3909 Decoder 3910 </th> 3911 <th> 3912 Details 3913 </th> 3914 <th> 3915 Supported File Types/Container Formats 3916 </th> 3917 </tr> 3918 <tr> 3919 <td> 3920 JPEG 3921 </td> 3922 <td> 3923 REQUIRED 3924 </td> 3925 <td> 3926 REQUIRED 3927 </td> 3928 <td> 3929 Base+progressive 3930 </td> 3931 <td> 3932 JPEG (.jpg) 3933 </td> 3934 </tr> 3935 <tr> 3936 <td> 3937 GIF 3938 </td> 3939 <td> 3940 </td> 3941 <td> 3942 REQUIRED 3943 </td> 3944 <td> 3945 </td> 3946 <td> 3947 GIF (.gif) 3948 </td> 3949 </tr> 3950 <tr> 3951 <td> 3952 PNG 3953 </td> 3954 <td> 3955 REQUIRED 3956 </td> 3957 <td> 3958 REQUIRED 3959 </td> 3960 <td> 3961 </td> 3962 <td> 3963 PNG (.png) 3964 </td> 3965 </tr> 3966 <tr> 3967 <td> 3968 BMP 3969 </td> 3970 <td> 3971 </td> 3972 <td> 3973 REQUIRED 3974 </td> 3975 <td> 3976 </td> 3977 <td> 3978 BMP (.bmp) 3979 </td> 3980 </tr> 3981 <tr> 3982 <td> 3983 WebP 3984 </td> 3985 <td> 3986 REQUIRED 3987 </td> 3988 <td> 3989 REQUIRED 3990 </td> 3991 <td> 3992 </td> 3993 <td> 3994 WebP (.webp) 3995 </td> 3996 </tr> 3997 <tr> 3998 <td> 3999 Raw 4000 </td> 4001 <td> 4002 </td> 4003 <td> 4004 REQUIRED 4005 </td> 4006 <td> 4007 </td> 4008 <td> 4009 ARW (.arw), CR2 (.cr2), DNG (.dng), NEF (.nef), NRW (.nrw), ORF (.orf), 4010 PEF (.pef), RAF (.raf), RW2 (.rw2), SRW (.srw) 4011 </td> 4012 </tr> 4013 </table> 4014 <h4 id="5_1_3_video_codecs"> 4015 5.1.3. Video Codecs 4016 </h4> 4017 <ul> 4018 <li> 4019 <p> 4020 Codecs advertising HDR profile support MUST support HDR static metadata 4021 parsing and handling. 4022 </p> 4023 </li> 4024 <li> 4025 <p> 4026 If a media codec advertises intra refresh support, then it MUST support the 4027 refresh periods in the range of 10 - 60 frames and accurately operate within 4028 20% of configured refresh period. 4029 </p> 4030 </li> 4031 <li> 4032 <p> 4033 Video codecs MUST support output and input bytebuffer sizes that 4034 accommodate the largest feasible compressed and uncompressed frame as dictated 4035 by the standard and configuration but also not overallocate. 4036 </p> 4037 </li> 4038 <li> 4039 <p> 4040 Video encoders and decoders MUST support YUV420 flexible color format 4041 (COLOR_FormatYUV420Flexible). 4042 </p> 4043 </li> 4044 </ul> 4045 <table> 4046 <tr> 4047 <th> 4048 Format/Codec 4049 </th> 4050 <th> 4051 Encoder 4052 </th> 4053 <th> 4054 Decoder 4055 </th> 4056 <th> 4057 Details 4058 </th> 4059 <th> 4060 Supported File Types/ 4061 <br/> 4062 Container Formats 4063 </th> 4064 </tr> 4065 <tr> 4066 <td> 4067 H.263 4068 </td> 4069 <td> 4070 MAY 4071 </td> 4072 <td> 4073 MAY 4074 </td> 4075 <td> 4076 </td> 4077 <td> 4078 <ul> 4079 <li class="table_list"> 4080 3GPP (.3gp) 4081 </li> 4082 <li class="table_list"> 4083 MPEG-4 (.mp4) 4084 </li> 4085 </ul> 4086 </td> 4087 </tr> 4088 <tr> 4089 <td> 4090 H.264 AVC 4091 </td> 4092 <td> 4093 REQUIRED 4094 <sup> 4095 2 4096 </sup> 4097 </td> 4098 <td> 4099 REQUIRED 4100 <sup> 4101 2 4102 </sup> 4103 </td> 4104 <td> 4105 See 4106 <a href="#5_2_video_encoding"> 4107 section 5.2 4108 </a> 4109 and 4110 <a href="#5_3_video_decoding"> 4111 5.3 4112 </a> 4113 for details 4114 </td> 4115 <td> 4116 <ul> 4117 <li class="table_list"> 4118 3GPP (.3gp) 4119 </li> 4120 <li class="table_list"> 4121 MPEG-4 (.mp4) 4122 </li> 4123 <li class="table_list"> 4124 MPEG-2 TS (.ts, AAC audio only, not seekable, Android 4125 3.0+) 4126 </li> 4127 </ul> 4128 </td> 4129 </tr> 4130 <tr> 4131 <td> 4132 H.265 HEVC 4133 </td> 4134 <td> 4135 </td> 4136 <td> 4137 REQUIRED 4138 <sup> 4139 5 4140 </sup> 4141 </td> 4142 <td> 4143 See 4144 <a href="#5_3_video_decoding"> 4145 section 5.3 4146 </a> 4147 for details 4148 </td> 4149 <td> 4150 MPEG-4 (.mp4) 4151 </td> 4152 </tr> 4153 <tr> 4154 <td> 4155 MPEG-2 4156 </td> 4157 <td> 4158 </td> 4159 <td> 4160 STRONGLY RECOMMENDED 4161 <sup> 4162 6 4163 </sup> 4164 </td> 4165 <td> 4166 Main Profile 4167 </td> 4168 <td> 4169 MPEG2-TS 4170 </td> 4171 </tr> 4172 <tr> 4173 <td> 4174 MPEG-4 SP 4175 </td> 4176 <td> 4177 </td> 4178 <td> 4179 REQUIRED 4180 <sup> 4181 2 4182 </sup> 4183 </td> 4184 <td> 4185 </td> 4186 <td> 4187 3GPP (.3gp) 4188 </td> 4189 </tr> 4190 <tr> 4191 <td> 4192 VP8 4193 <sup> 4194 3 4195 </sup> 4196 </td> 4197 <td> 4198 REQUIRED 4199 <sup> 4200 2 4201 </sup> 4202 <br/> 4203 (Android 4.3+) 4204 </td> 4205 <td> 4206 REQUIRED 4207 <sup> 4208 2 4209 </sup> 4210 <br/> 4211 (Android 2.3.3+) 4212 </td> 4213 <td> 4214 See 4215 <a href="#5_2_video_encoding"> 4216 section 5.2 4217 </a> 4218 and 4219 <a href="#5_3_video_decoding"> 4220 5.3 4221 </a> 4222 for details 4223 </td> 4224 <td> 4225 <ul> 4226 <li class="table_list"> 4227 <a href="http://www.webmproject.org/"> 4228 WebM 4229 (.webm) 4230 </a> 4231 </li> 4232 <li class="table_list"> 4233 Matroska (.mkv, Android 4.0+) 4234 <sup> 4235 4 4236 </sup> 4237 </li> 4238 </ul> 4239 </td> 4240 </tr> 4241 <tr> 4242 <td> 4243 VP9 4244 </td> 4245 <td> 4246 </td> 4247 <td> 4248 REQUIRED 4249 <sup> 4250 2 4251 </sup> 4252 <br/> 4253 (Android 4.4+) 4254 </td> 4255 <td> 4256 See 4257 <a href="#5_3_video_decoding"> 4258 section 5.3 4259 </a> 4260 for details 4261 </td> 4262 <td> 4263 <ul> 4264 <li class="table_list"> 4265 <a href="http://www.webmproject.org/"> 4266 WebM 4267 (.webm) 4268 </a> 4269 </li> 4270 <li class="table_list"> 4271 Matroska (.mkv, Android 4.0+) 4272 <sup> 4273 4 4274 </sup> 4275 </li> 4276 </ul> 4277 </td> 4278 </tr> 4279 </table> 4280 <p class="table_footnote"> 4281 1 Required for device implementations that include 4282 camera hardware and define android.hardware.camera or 4283 android.hardware.camera.front. 4284 </p> 4285 <p class="table_footnote"> 4286 2 Required for device implementations except Android 4287 Watch devices. 4288 </p> 4289 <p class="table_footnote"> 4290 3 For acceptable quality of web video streaming and 4291 video-conference services, device implementations SHOULD use a hardware VP8 4292 codec that meets the 4293 <a href="http://www.webmproject.org/hardware/rtc-coding-requirements/"> 4294 requirements 4295 </a>. 4296 </p> 4297 <p class="table_footnote"> 4298 4 Device implementations SHOULD support writing 4299 Matroska WebM files. 4300 </p> 4301 <p class="table_footnote"> 4302 5 STRONGLY RECOMMENDED for Android Automotive, 4303 optional for Android Watch, and required for all other device types. 4304 </p> 4305 <p class="table_footnote"> 4306 6 Applies only to Android Television device 4307 implementations. 4308 </p> 4309 <h3 id="5_2_video_encoding"> 4310 5.2. Video Encoding 4311 </h3> 4312 <div class="note"> 4313 Video codecs are optional for Android Watch device implementations. 4314 </div> 4315 <p> 4316 H.264, VP8, VP9 and HEVC video encoders— 4317 </p> 4318 <ul> 4319 <li> 4320 MUST support dynamically configurable bitrates. 4321 </li> 4322 <li> 4323 SHOULD support variable frame rates, where video encoder SHOULD determine 4324 instantaneous frame duration based on the timestamps of input buffers, and 4325 allocate its bit bucket based on that frame duration. 4326 </li> 4327 </ul> 4328 <p> 4329 H.263 and MPEG-4 video encoder SHOULD support dynamically configurable 4330 bitrates. 4331 </p> 4332 <p> 4333 All video encoders SHOULD meet the following bitrate targets over two sliding 4334 windows: 4335 </p> 4336 <ul> 4337 <li> 4338 It SHOULD be not more than ~15% over the bitrate between intraframe 4339 (I-frame) intervals. 4340 </li> 4341 <li> 4342 It SHOULD be not more than ~100% over the bitrate over a sliding window of 4343 1 second. 4344 </li> 4345 </ul> 4346 <h4 id="5_2_1_h_263"> 4347 5.2.1. H.263 4348 </h4> 4349 <p> 4350 Android device implementations with H.263 encoders MUST support Baseline Profile Level 45. 4351 </p> 4352 <h4 id="5_2_2_h-264"> 4353 5.2.2. H-264 4354 </h4> 4355 <p> 4356 Android device implementations with H.264 codec support: 4357 </p> 4358 <ul> 4359 <li> 4360 MUST support Baseline Profile Level 3. 4361 <br/> 4362 However, support for ASO (Arbitrary Slice Ordering), FMO (Flexible Macroblock 4363 Ordering) and RS (Redundant Slices) is OPTIONAL. Moreover, to maintain 4364 compatibility with other Android devices, it is RECOMMENDED that ASO, FMO 4365 and RS are not used for Baseline Profile by encoders. 4366 </li> 4367 <li> 4368 MUST support the SD (Standard Definition) video encoding profiles in the following table. 4369 </li> 4370 <li> 4371 SHOULD support Main Profile Level 4. 4372 </li> 4373 <li> 4374 SHOULD support the HD (High Definition) video encoding profiles as indicated in the following table. 4375 </li> 4376 <li> 4377 In addition, Android Television devices are STRONGLY RECOMMENDED to encode HD 1080p video at 30 fps. 4378 </li> 4379 </ul> 4380 <table> 4381 <tr> 4382 <th> 4383 </th> 4384 <th> 4385 SD (Low quality) 4386 </th> 4387 <th> 4388 SD (High quality) 4389 </th> 4390 <th> 4391 HD 720p 4392 <sup> 4393 1 4394 </sup> 4395 </th> 4396 <th> 4397 HD 1080p 4398 <sup> 4399 1 4400 </sup> 4401 </th> 4402 </tr> 4403 <tr> 4404 <th> 4405 Video resolution 4406 </th> 4407 <td> 4408 320 x 240 px 4409 </td> 4410 <td> 4411 720 x 480 px 4412 </td> 4413 <td> 4414 1280 x 720 px 4415 </td> 4416 <td> 4417 1920 x 1080 px 4418 </td> 4419 </tr> 4420 <tr> 4421 <th> 4422 Video frame rate 4423 </th> 4424 <td> 4425 20 fps 4426 </td> 4427 <td> 4428 30 fps 4429 </td> 4430 <td> 4431 30 fps 4432 </td> 4433 <td> 4434 30 fps 4435 </td> 4436 </tr> 4437 <tr> 4438 <th> 4439 Video bitrate 4440 </th> 4441 <td> 4442 384 Kbps 4443 </td> 4444 <td> 4445 2 Mbps 4446 </td> 4447 <td> 4448 4 Mbps 4449 </td> 4450 <td> 4451 10 Mbps 4452 </td> 4453 </tr> 4454 </table> 4455 <p class="table_footnote"> 4456 1 When supported by hardware, but STRONGLY RECOMMENDED 4457 for Android Television devices. 4458 </p> 4459 <h4 id="5_2_3_vp8"> 4460 5.2.3. VP8 4461 </h4> 4462 <p> 4463 Android device implementations with VP8 codec support MUST support the SD video 4464 encoding profiles and SHOULD support the following HD (High Definition) video encoding profiles. 4465 </p> 4466 <table> 4467 <tr> 4468 <th> 4469 </th> 4470 <th> 4471 SD (Low quality) 4472 </th> 4473 <th> 4474 SD (High quality) 4475 </th> 4476 <th> 4477 HD 720p 4478 <sup> 4479 1 4480 </sup> 4481 </th> 4482 <th> 4483 HD 1080p 4484 <sup> 4485 1 4486 </sup> 4487 </th> 4488 </tr> 4489 <tr> 4490 <th> 4491 Video resolution 4492 </th> 4493 <td> 4494 320 x 180 px 4495 </td> 4496 <td> 4497 640 x 360 px 4498 </td> 4499 <td> 4500 1280 x 720 px 4501 </td> 4502 <td> 4503 1920 x 1080 px 4504 </td> 4505 </tr> 4506 <tr> 4507 <th> 4508 Video frame rate 4509 </th> 4510 <td> 4511 30 fps 4512 </td> 4513 <td> 4514 30 fps 4515 </td> 4516 <td> 4517 30 fps 4518 </td> 4519 <td> 4520 30 fps 4521 </td> 4522 </tr> 4523 <tr> 4524 <th> 4525 Video bitrate 4526 </th> 4527 <td> 4528 800 Kbps 4529 </td> 4530 <td> 4531 2 Mbps 4532 </td> 4533 <td> 4534 4 Mbps 4535 </td> 4536 <td> 4537 10 Mbps 4538 </td> 4539 </tr> 4540 </table> 4541 <p class="table_footnote"> 4542 1 When supported by hardware. 4543 </p> 4544 <h3 id="5_3_video_decoding"> 4545 5.3. Video Decoding 4546 </h3> 4547 <div class="note"> 4548 Video codecs are optional for Android Watch device implementations. 4549 </div> 4550 <p> 4551 Device implementations— 4552 </p> 4553 <ul> 4554 <li> 4555 <p> 4556 MUST support dynamic video resolution and frame rate switching through the 4557 standard Android APIs within the same stream for all VP8, VP9, H.264, and 4558 H.265 codecs in real time and up to the maximum resolution supported by each 4559 codec on the device. 4560 </p> 4561 </li> 4562 <li> 4563 <p> 4564 Implementations that support the Dolby Vision decoder— 4565 </p> 4566 </li> 4567 <li> 4568 MUST provide a Dolby Vision-capable extractor. 4569 </li> 4570 <li> 4571 <p> 4572 MUST properly display Dolby Vision content on the device screen or on a 4573 standard video output port (e.g., HDMI). 4574 </p> 4575 </li> 4576 <li> 4577 <p> 4578 Implementations that provide a Dolby Vision-capable extractor MUST set the 4579 track index of backward-compatible base-layer(s) (if present) to be the same 4580 as the combined Dolby Vision layer's track index. 4581 </p> 4582 </li> 4583 </ul> 4584 <h4 id="5_3_1_mpeg-2"> 4585 5.3.1. MPEG-2 4586 </h4> 4587 <p> 4588 Android device implementations with MPEG-2 decoders must support the Main 4589 Profile High Level. 4590 </p> 4591 <h4 id="5_3_2_h_263"> 4592 5.3.2. H.263 4593 </h4> 4594 <p> 4595 Android device implementations with H.263 decoders MUST support Baseline Profile 4596 Level 30 and Level 45. 4597 </p> 4598 <h4 id="5_3_3_mpeg-4"> 4599 5.3.3. MPEG-4 4600 </h4> 4601 <p> 4602 Android device implementations with MPEG-4 decoders MUST support Simple Profile 4603 Level 3. 4604 </p> 4605 <h4 id="5_3_4_h_264"> 4606 5.3.4. H.264 4607 </h4> 4608 <p> 4609 Android device implementations with H.264 decoders: 4610 </p> 4611 <ul> 4612 <li> 4613 MUST support Main Profile Level 3.1 and Baseline Profile. 4614 <br/> 4615 Support for ASO (Arbitrary Slice Ordering), FMO (Flexible Macroblock Ordering) 4616 and RS (Redundant Slices) is OPTIONAL. 4617 </li> 4618 <li> 4619 MUST be capable of decoding videos with the SD (Standard Definition) 4620 profiles listed in the following table and encoded with the Baseline Profile and 4621 Main Profile Level 3.1 (including 720p30). 4622 </li> 4623 <li> 4624 SHOULD be capable of decoding videos with the HD (High Definition) profiles 4625 as indicated in the following table. 4626 </li> 4627 <li> 4628 In addition, Android Television devices— 4629 <ul> 4630 <li> 4631 MUST support High Profile Level 4.2 and the HD 1080p60 decoding profile. 4632 </li> 4633 <li> 4634 MUST be capable of decoding videos with both HD profiles as indicated 4635 in the following table and encoded with either the Baseline Profile, Main 4636 Profile, or the High Profile Level 4.2 4637 </li> 4638 </ul> 4639 </li> 4640 </ul> 4641 <table> 4642 <tr> 4643 <th> 4644 </th> 4645 <th> 4646 SD (Low quality) 4647 </th> 4648 <th> 4649 SD (High quality) 4650 </th> 4651 <th> 4652 HD 720p 4653 <sup> 4654 1 4655 </sup> 4656 </th> 4657 <th> 4658 HD 1080p 4659 <sup> 4660 1 4661 </sup> 4662 </th> 4663 </tr> 4664 <tr> 4665 <th> 4666 Video resolution 4667 </th> 4668 <td> 4669 320 x 240 px 4670 </td> 4671 <td> 4672 720 x 480 px 4673 </td> 4674 <td> 4675 1280 x 720 px 4676 </td> 4677 <td> 4678 1920 x 1080 px 4679 </td> 4680 </tr> 4681 <tr> 4682 <th> 4683 Video frame rate 4684 </th> 4685 <td> 4686 30 fps 4687 </td> 4688 <td> 4689 30 fps 4690 </td> 4691 <td> 4692 60 fps 4693 </td> 4694 <td> 4695 30 fps (60 fps 4696 <sup> 4697 2 4698 </sup> 4699 ) 4700 </td> 4701 </tr> 4702 <tr> 4703 <th> 4704 Video bitrate 4705 </th> 4706 <td> 4707 800 Kbps 4708 </td> 4709 <td> 4710 2 Mbps 4711 </td> 4712 <td> 4713 8 Mbps 4714 </td> 4715 <td> 4716 20 Mbps 4717 </td> 4718 </tr> 4719 </table> 4720 <p class="table_footnote"> 4721 1 REQUIRED for when the height as reported by the 4722 Display.getSupportedModes() method is equal or greater than the video resolution. 4723 </p> 4724 <p class="table_footnote"> 4725 2 REQUIRED for Android Television device 4726 implementations. 4727 </p> 4728 <h4 id="5_3_5_h_265_(hevc)"> 4729 5.3.5. H.265 (HEVC) 4730 </h4> 4731 <p> 4732 Android device implementations, when supporting H.265 codec as described in 4733 <a href="#5_1_3_video_codecs"> 4734 section 5.1.3 4735 </a>: 4736 </p> 4737 <ul> 4738 <li> 4739 MUST support the Main Profile Level 3 Main tier and the SD video decoding profiles 4740 as indicated in the following table. 4741 </li> 4742 <li> 4743 SHOULD support the HD decoding profiles as indicated in the following table. 4744 </li> 4745 <li> 4746 MUST support the HD decoding profiles as indicated in the following table 4747 if there is a hardware decoder. 4748 </li> 4749 <li> 4750 In addition, Android Television devices: 4751 </li> 4752 <li> 4753 MUST support the HD 720p decoding profile. 4754 </li> 4755 <li> 4756 STRONGLY RECOMMENDED to support the HD 1080p decoding profile. If the HD 1080p 4757 decoding profile is supported, it MUST support the Main Profile Level 4.1 Main tier. 4758 </li> 4759 <li> 4760 SHOULD support the UHD decoding profile. If the UHD decoding profile is supported the 4761 codec MUST support Main10 Level 5 Main Tier profile. 4762 </li> 4763 </ul> 4764 <table> 4765 <tr> 4766 <th> 4767 </th> 4768 <th> 4769 SD (Low quality) 4770 </th> 4771 <th> 4772 SD (High quality) 4773 </th> 4774 <th> 4775 HD 720p 4776 </th> 4777 <th> 4778 HD 1080p 4779 </th> 4780 <th> 4781 UHD 4782 </th> 4783 </tr> 4784 <tr> 4785 <th> 4786 Video resolution 4787 </th> 4788 <td> 4789 352 x 288 px 4790 </td> 4791 <td> 4792 720 x 480 px 4793 </td> 4794 <td> 4795 1280 x 720 px 4796 </td> 4797 <td> 4798 1920 x 1080 px 4799 </td> 4800 <td> 4801 3840 x 2160 px 4802 </td> 4803 </tr> 4804 <tr> 4805 <th> 4806 Video frame rate 4807 </th> 4808 <td> 4809 30 fps 4810 </td> 4811 <td> 4812 30 fps 4813 </td> 4814 <td> 4815 30 fps 4816 </td> 4817 <td> 4818 30 fps (60 fps 4819 <sup> 4820 1 4821 </sup> 4822 ) 4823 </td> 4824 <td> 4825 60 fps 4826 </td> 4827 </tr> 4828 <tr> 4829 <th> 4830 Video bitrate 4831 </th> 4832 <td> 4833 600 Kbps 4834 </td> 4835 <td> 4836 1.6 Mbps 4837 </td> 4838 <td> 4839 4 Mbps 4840 </td> 4841 <td> 4842 5 Mbps 4843 </td> 4844 <td> 4845 20 Mbps 4846 </td> 4847 </tr> 4848 </table> 4849 <p class="table_footnote"> 4850 1 REQUIRED for Android Television device 4851 implementations with H.265 hardware decoding. 4852 </p> 4853 <h4 id="5_3_6_vp8"> 4854 5.3.6. VP8 4855 </h4> 4856 <p> 4857 Android device implementations, when supporting VP8 codec as described in 4858 <a href="https://source.android.com/compatibility/android-cdd.html#5_1_3_video_codecs"> 4859 section 5.1.3 4860 </a>: 4861 </p> 4862 <ul> 4863 <li> 4864 MUST support the SD decoding profiles in the following table. 4865 </li> 4866 <li> 4867 SHOULD support the HD decoding profiles in the following table. 4868 </li> 4869 <li> 4870 Android Television devices MUST support the HD 1080p60 decoding profile. 4871 </li> 4872 </ul> 4873 <table> 4874 <tr> 4875 <th> 4876 </th> 4877 <th> 4878 SD (Low quality) 4879 </th> 4880 <th> 4881 SD (High quality) 4882 </th> 4883 <th> 4884 HD 720p 4885 <sup> 4886 1 4887 </sup> 4888 </th> 4889 <th> 4890 HD 1080p 4891 <sup> 4892 1 4893 </sup> 4894 </th> 4895 </tr> 4896 <tr> 4897 <th> 4898 Video resolution 4899 </th> 4900 <td> 4901 320 x 180 px 4902 </td> 4903 <td> 4904 640 x 360 px 4905 </td> 4906 <td> 4907 1280 x 720 px 4908 </td> 4909 <td> 4910 1920 x 1080 px 4911 </td> 4912 </tr> 4913 <tr> 4914 <th> 4915 Video frame rate 4916 </th> 4917 <td> 4918 30 fps 4919 </td> 4920 <td> 4921 30 fps 4922 </td> 4923 <td> 4924 30 fps (60 fps 4925 <sup> 4926 2 4927 </sup> 4928 ) 4929 </td> 4930 <td> 4931 30 (60 fps 4932 <sup> 4933 2 4934 </sup> 4935 ) 4936 </td> 4937 </tr> 4938 <tr> 4939 <th> 4940 Video bitrate 4941 </th> 4942 <td> 4943 800 Kbps 4944 </td> 4945 <td> 4946 2 Mbps 4947 </td> 4948 <td> 4949 8 Mbps 4950 </td> 4951 <td> 4952 20 Mbps 4953 </td> 4954 </tr> 4955 </table> 4956 <p class="table_footnote"> 4957 1 REQUIRED for when the height as reported by the 4958 Display.getSupportedModes() method is equal or greater than the video resolution. 4959 </p> 4960 <p class="table_footnote"> 4961 2 REQUIRED for Android Television device 4962 implementations. 4963 </p> 4964 <h4 id="5_3_7_vp9"> 4965 5.3.7. VP9 4966 </h4> 4967 <p> 4968 Android device implementations, when supporting VP9 codec as described in 4969 <a href="https://source.android.com/compatibility/android-cdd.html#5_1_3_video_codecs"> 4970 section 5.1.3 4971 </a>: 4972 </p> 4973 <ul> 4974 <li> 4975 MUST support the SD video decoding profiles as indicated in the following table. 4976 </li> 4977 <li> 4978 SHOULD support the HD decoding profiles as indicated in the following table. 4979 </li> 4980 <li> 4981 MUST support the HD decoding profiles as indicated in the following table, 4982 if there is a hardware decoder. 4983 </li> 4984 <li> 4985 <p> 4986 In addition, Android Television devices: 4987 </p> 4988 <ul> 4989 <li> 4990 MUST support the HD 720p decoding profile. 4991 </li> 4992 <li> 4993 STRONGLY RECOMMENDED to support the HD 1080p decoding profile. 4994 </li> 4995 <li> 4996 SHOULD support the UHD decoding profile. If the UHD video decoding 4997 profile is supported, it MUST support 8-bit color depth and SHOULD 4998 support VP9 Profile 2 (10-bit). 4999 </li> 5000 </ul> 5001 </li> 5002 </ul> 5003 <table> 5004 <tr> 5005 <th> 5006 </th> 5007 <th> 5008 SD (Low quality) 5009 </th> 5010 <th> 5011 SD (High quality) 5012 </th> 5013 <th> 5014 HD 720p 5015 </th> 5016 <th> 5017 HD 1080p 5018 </th> 5019 <th> 5020 UHD 5021 </th> 5022 </tr> 5023 <tr> 5024 <th> 5025 Video resolution 5026 </th> 5027 <td> 5028 320 x 180 px 5029 </td> 5030 <td> 5031 640 x 360 px 5032 </td> 5033 <td> 5034 1280 x 720 px 5035 </td> 5036 <td> 5037 1920 x 1080 px 5038 </td> 5039 <td> 5040 3840 x 2160 px 5041 </td> 5042 </tr> 5043 <tr> 5044 <th> 5045 Video frame rate 5046 </th> 5047 <td> 5048 30 fps 5049 </td> 5050 <td> 5051 30 fps 5052 </td> 5053 <td> 5054 30 fps 5055 </td> 5056 <td> 5057 30 fps (60 fps 5058 <sup> 5059 1 5060 </sup> 5061 ) 5062 </td> 5063 <td> 5064 60 fps 5065 </td> 5066 </tr> 5067 <tr> 5068 <th> 5069 Video bitrate 5070 </th> 5071 <td> 5072 600 Kbps 5073 </td> 5074 <td> 5075 1.6 Mbps 5076 </td> 5077 <td> 5078 4 Mbps 5079 </td> 5080 <td> 5081 5 Mbps 5082 </td> 5083 <td> 5084 20 Mbps 5085 </td> 5086 </tr> 5087 </table> 5088 <p class="table_footnote"> 5089 1 REQUIRED for Android Television 5090 device implementations with VP9 hardware decoding. 5091 </p> 5092 <h3 id="5_4_audio_recording"> 5093 5.4. Audio Recording 5094 </h3> 5095 <p> 5096 While some of the requirements outlined in this section are stated as SHOULD 5097 since Android 4.3, the Compatibility Definition for a future version is planned 5098 to change these to MUST. Existing and new Android devices are 5099 <strong> 5100 STRONGLY 5101 RECOMMENDED 5102 </strong> 5103 to meet these requirements that are stated as SHOULD, or they 5104 will not be able to attain Android compatibility when upgraded to the future 5105 version. 5106 </p> 5107 <h4 id="5_4_1_raw_audio_capture"> 5108 5.4.1. Raw Audio Capture 5109 </h4> 5110 <p> 5111 Device implementations that declare android.hardware.microphone MUST allow 5112 capture of raw audio content with the following characteristics: 5113 </p> 5114 <ul> 5115 <li> 5116 <strong> 5117 Format 5118 </strong> 5119 : Linear PCM, 16-bit 5120 </li> 5121 <li> 5122 <strong> 5123 Sampling rates 5124 </strong> 5125 : 8000, 11025, 16000, 44100 5126 </li> 5127 <li> 5128 <strong> 5129 Channels 5130 </strong> 5131 : Mono 5132 </li> 5133 </ul> 5134 <p> 5135 The capture for the above sample rates MUST be done without up-sampling, and 5136 any down-sampling MUST include an appropriate anti-aliasing filter. 5137 </p> 5138 <p> 5139 Device implementations that declare android.hardware.microphone SHOULD allow 5140 capture of raw audio content with the following characteristics: 5141 </p> 5142 <ul> 5143 <li> 5144 <strong> 5145 Format 5146 </strong> 5147 : Linear PCM, 16-bit 5148 </li> 5149 <li> 5150 <strong> 5151 Sampling rates 5152 </strong> 5153 : 22050, 48000 5154 </li> 5155 <li> 5156 <strong> 5157 Channels 5158 </strong> 5159 : Stereo 5160 </li> 5161 </ul> 5162 <p> 5163 If capture for the above sample rates is supported, then the capture MUST be 5164 done without up-sampling at any ratio higher than 16000:22050 or 44100:48000. 5165 Any up-sampling or down-sampling MUST include an appropriate anti-aliasing 5166 filter. 5167 </p> 5168 <h4 id="5_4_2_capture_for_voice_recognition"> 5169 5.4.2. Capture for Voice Recognition 5170 </h4> 5171 <p> 5172 The android.media.MediaRecorder.AudioSource.VOICE_RECOGNITION audio source MUST 5173 support capture at one of the sampling rates, 44100 and 48000. 5174 </p> 5175 <p> 5176 In addition to the above recording specifications, when an application has 5177 started recording an audio stream using the 5178 android.media.MediaRecorder.AudioSource.VOICE_RECOGNITION audio source: 5179 </p> 5180 <ul> 5181 <li> 5182 The device SHOULD exhibit approximately flat amplitude versus frequency 5183 characteristics: specifically, ±3 dB, from 100 Hz to 4000 Hz. 5184 </li> 5185 <li> 5186 Audio input sensitivity SHOULD be set such that a 90 dB sound power level 5187 (SPL) source at 1000 Hz yields RMS of 2500 for 16-bit samples. 5188 </li> 5189 <li> 5190 PCM amplitude levels SHOULD linearly track input SPL changes over at least a 5191 30 dB range from -18 dB to +12 dB re 90 dB SPL at the microphone. 5192 </li> 5193 <li> 5194 Total harmonic distortion SHOULD be less than 1% for 1 kHz at 90 dB SPL 5195 input level at the microphone. 5196 </li> 5197 <li> 5198 Noise reduction processing, if present, MUST be disabled. 5199 </li> 5200 <li> 5201 Automatic gain control, if present, MUST be disabled. 5202 </li> 5203 </ul> 5204 <p> 5205 If the platform supports noise suppression technologies tuned for speech 5206 recognition, the effect MUST be controllable from the 5207 android.media.audiofx.NoiseSuppressor API. Moreover, the UUID field for the 5208 noise suppressor’s effect descriptor MUST uniquely identify each implementation 5209 of the noise suppression technology. 5210 </p> 5211 <h4 id="5_4_3_capture_for_rerouting_of_playback"> 5212 5.4.3. Capture for Rerouting of Playback 5213 </h4> 5214 <p> 5215 The android.media.MediaRecorder.AudioSource class includes the REMOTE_SUBMIX 5216 audio source. Devices that declare android.hardware.audio.output MUST properly 5217 implement the REMOTE_SUBMIX audio source so that when an application uses the 5218 android.media.AudioRecord API to record from this audio source, it can capture 5219 a mix of all audio streams except for the following: 5220 </p> 5221 <ul> 5222 <li> 5223 STREAM_RING 5224 </li> 5225 <li> 5226 STREAM_ALARM 5227 </li> 5228 <li> 5229 STREAM_NOTIFICATION 5230 </li> 5231 </ul> 5232 <h3 id="5_5_audio_playback"> 5233 5.5. Audio Playback 5234 </h3> 5235 <p> 5236 Device implementations that declare android.hardware.audio.output MUST conform 5237 to the requirements in this section. 5238 </p> 5239 <h4 id="5_5_1_raw_audio_playback"> 5240 5.5.1. Raw Audio Playback 5241 </h4> 5242 <p> 5243 The device MUST allow playback of raw audio content with the following 5244 characteristics: 5245 </p> 5246 <ul> 5247 <li> 5248 <strong> 5249 Format 5250 </strong> 5251 : Linear PCM, 16-bit 5252 </li> 5253 <li> 5254 <strong> 5255 Sampling rates 5256 </strong> 5257 : 8000, 11025, 16000, 22050, 32000, 44100 5258 </li> 5259 <li> 5260 <strong> 5261 Channels 5262 </strong> 5263 : Mono, Stereo 5264 </li> 5265 </ul> 5266 <p> 5267 The device SHOULD allow playback of raw audio content with the following 5268 characteristics: 5269 </p> 5270 <ul> 5271 <li> 5272 <strong> 5273 Sampling rates 5274 </strong> 5275 : 24000, 48000 5276 </li> 5277 </ul> 5278 <h4 id="5_5_2_audio_effects"> 5279 5.5.2. Audio Effects 5280 </h4> 5281 <p> 5282 Android provides an 5283 <a href="http://developer.android.com/reference/android/media/audiofx/AudioEffect.html"> 5284 API for audio effects 5285 </a> 5286 for device implementations. Device implementations that declare the feature 5287 android.hardware.audio.output: 5288 </p> 5289 <ul> 5290 <li> 5291 MUST support the EFFECT_TYPE_EQUALIZER and EFFECT_TYPE_LOUDNESS_ENHANCER 5292 implementations controllable through the AudioEffect subclasses Equalizer, 5293 LoudnessEnhancer. 5294 </li> 5295 <li> 5296 MUST support the visualizer API implementation, controllable through the 5297 Visualizer class. 5298 </li> 5299 <li> 5300 SHOULD support the EFFECT_TYPE_BASS_BOOST, EFFECT_TYPE_ENV_REVERB, 5301 EFFECT_TYPE_PRESET_REVERB, and EFFECT_TYPE_VIRTUALIZER implementations 5302 controllable through the AudioEffect sub-classes BassBoost, 5303 EnvironmentalReverb, PresetReverb, and Virtualizer. 5304 </li> 5305 </ul> 5306 <h4 id="5_5_3_audio_output_volume"> 5307 5.5.3. Audio Output Volume 5308 </h4> 5309 <p> 5310 Android Television device implementations MUST include support for system 5311 Master Volume and digital audio output volume attenuation on supported outputs, 5312 except for compressed audio passthrough output (where no audio decoding is done 5313 on the device). 5314 </p> 5315 <p> 5316 Android Automotive device implementations SHOULD allow adjusting audio volume 5317 separately per each audio stream using the content type or usage as defined 5318 by 5319 <a href="" title="http://developer.android.com/reference/android/media/AudioAttributes.html"> 5320 AudioAttributes 5321 </a> 5322 and car audio usage as publicly defined in 5323 <code> 5324 android.car.CarAudioManager 5325 </code> 5326 . 5327 </p> 5328 <h3 id="5_6_audio_latency"> 5329 5.6. Audio Latency 5330 </h3> 5331 <p> 5332 Audio latency is the time delay as an audio signal passes through a system. 5333 Many classes of applications rely on short latencies, to achieve real-time 5334 sound effects. 5335 </p> 5336 <p> 5337 For the purposes of this section, use the following definitions: 5338 </p> 5339 <ul> 5340 <li> 5341 <strong> 5342 output latency 5343 </strong> 5344 . The interval between when an application writes a frame 5345 of PCM-coded data and when the corresponding sound is presented to environment at an on-device transducer 5346 or signal leaves the device via a port and can be observed externally. 5347 </li> 5348 <li> 5349 <strong> 5350 cold output latency 5351 </strong> 5352 . The output latency for the first frame, when the 5353 audio output system has been idle and powered down prior to the request. 5354 </li> 5355 <li> 5356 <strong> 5357 continuous output latency 5358 </strong> 5359 . The output latency for subsequent frames, 5360 after the device is playing audio. 5361 </li> 5362 <li> 5363 <strong> 5364 input latency 5365 </strong> 5366 . The interval between when a sound is presented by environment to device 5367 at an on-device transducer or signal enters the device via a port 5368 and when an application reads the corresponding frame of 5369 PCM-coded data. 5370 </li> 5371 <li> 5372 <strong> 5373 lost input 5374 </strong> 5375 . The initial portion of an input signal that is unusable or unavailable. 5376 </li> 5377 <li> 5378 <strong> 5379 cold input latency 5380 </strong> 5381 . The sum of lost input time and the input latency 5382 for the first frame, when the audio input system has been idle and powered down 5383 prior to the request. 5384 </li> 5385 <li> 5386 <strong> 5387 continuous input latency 5388 </strong> 5389 . The input latency for subsequent frames, 5390 while the device is capturing audio. 5391 </li> 5392 <li> 5393 <strong> 5394 cold output jitter 5395 </strong> 5396 . The variability among separate measurements of cold 5397 output latency values. 5398 </li> 5399 <li> 5400 <strong> 5401 cold input jitter 5402 </strong> 5403 . The variability among separate measurements of cold 5404 input latency values. 5405 </li> 5406 <li> 5407 <strong> 5408 continuous round-trip latency 5409 </strong> 5410 . The sum of continuous input latency plus 5411 continuous output latency plus one buffer period. The buffer period allows 5412 time for the app to process the signal and time for the app to mitigate phase difference 5413 between input and output streams. 5414 </li> 5415 <li> 5416 <strong> 5417 OpenSL ES PCM buffer queue API 5418 </strong> 5419 . The set of PCM-related OpenSL ES APIs 5420 within 5421 <a href="https://developer.android.com/ndk/index.html"> 5422 Android NDK 5423 </a>. 5424 </li> 5425 </ul> 5426 <p> 5427 Device implementations that declare android.hardware.audio.output are STRONGLY 5428 RECOMMENDED to meet or exceed these audio output requirements: 5429 </p> 5430 <ul> 5431 <li> 5432 cold output latency of 100 milliseconds or less 5433 </li> 5434 <li> 5435 continuous output latency of 45 milliseconds or less 5436 </li> 5437 <li> 5438 minimize the cold output jitter 5439 </li> 5440 </ul> 5441 <p> 5442 If a device implementation meets the requirements of this section after any 5443 initial calibration when using the OpenSL ES PCM buffer queue API, for 5444 continuous output latency and cold output latency over at least one supported 5445 audio output device, it is STRONGLY RECOMMENDED to report support for 5446 low-latency audio, by reporting the feature android.hardware.audio.low_latency 5447 via the 5448 <a href="http://developer.android.com/reference/android/content/pm/PackageManager.html"> 5449 android.content.pm.PackageManager 5450 </a> 5451 class. Conversely, if the device implementation does not meet these 5452 requirements it MUST NOT report support for low-latency audio. 5453 </p> 5454 <p> 5455 Device implementations that include android.hardware.microphone are STRONGLY 5456 RECOMMENDED to meet these input audio requirements: 5457 </p> 5458 <ul> 5459 <li> 5460 cold input latency of 100 milliseconds or less 5461 </li> 5462 <li> 5463 continuous input latency of 30 milliseconds or less 5464 </li> 5465 <li> 5466 continuous round-trip latency of 50 milliseconds or less 5467 </li> 5468 <li> 5469 minimize the cold input jitter 5470 </li> 5471 </ul> 5472 <h3 id="5_7_network_protocols"> 5473 5.7. Network Protocols 5474 </h3> 5475 <p> 5476 Devices MUST support the 5477 <a href="http://developer.android.com/guide/appendix/media-formats.html"> 5478 media network protocols 5479 </a> 5480 for audio and video playback as specified in the Android SDK documentation. 5481 Specifically, devices MUST support the following media network protocols: 5482 </p> 5483 <ul> 5484 <li> 5485 <p> 5486 HTTP(S) progressive streaming 5487 <br/> 5488 All required codecs and container formats in 5489 <a href="#5_1_media_codecs"> 5490 section 5.1 5491 </a> 5492 MUST 5493 be supported over HTTP(S) 5494 </p> 5495 </li> 5496 <li> 5497 <p> 5498 <a href="http://tools.ietf.org/html/draft-pantos-http-live-streaming-07"> 5499 HTTP Live Streaming draft protocol, Version 7 5500 </a> 5501 <br/> 5502 The following media segment formats MUST be supported: 5503 </p> 5504 </li> 5505 </ul> 5506 <table> 5507 <tr> 5508 <th> 5509 Segment formats 5510 </th> 5511 <th> 5512 Reference(s) 5513 </th> 5514 <th> 5515 Required codec support 5516 </th> 5517 </tr> 5518 <tr id="mp2t"> 5519 <td> 5520 MPEG-2 Transport Stream 5521 </td> 5522 <td> 5523 <a href="http://www.iso.org/iso/catalogue_detail?csnumber=44169"> 5524 ISO 13818 5525 </a> 5526 </td> 5527 <td> 5528 Video codecs: 5529 <ul> 5530 <li class="table_list"> 5531 H264 AVC 5532 </li> 5533 <li class="table_list"> 5534 MPEG-4 SP 5535 </li> 5536 <li class="table_list"> 5537 MPEG-2 5538 </li> 5539 </ul> 5540 See 5541 <a href="#5_1_3_video_codecs"> 5542 section 5.1.3 5543 </a> 5544 for details on H264 AVC, MPEG2-4 SP, 5545 <br/> 5546 and MPEG-2. 5547 <p> 5548 Audio codecs: 5549 </p> 5550 <ul> 5551 <li class="table_list"> 5552 AAC 5553 </li> 5554 </ul> 5555 See 5556 <a href="#5_1_1_audio_codecs"> 5557 section 5.1.1 5558 </a> 5559 for details on AAC and its variants. 5560 </td> 5561 </tr> 5562 <tr> 5563 <td> 5564 AAC with ADTS framing and ID3 tags 5565 </td> 5566 <td> 5567 <a href="http://www.iso.org/iso/home/store/catalogue_tc/catalogue_detail.htm?csnumber=43345"> 5568 ISO 13818-7 5569 </a> 5570 </td> 5571 <td> 5572 See 5573 <a href="#5_1_1_audio_codecs"> 5574 section 5.1.1 5575 </a> 5576 for details on AAC and its variants 5577 </td> 5578 </tr> 5579 <tr> 5580 <td> 5581 WebVTT 5582 </td> 5583 <td> 5584 <a href="http://dev.w3.org/html5/webvtt/"> 5585 WebVTT 5586 </a> 5587 </td> 5588 <td> 5589 </td> 5590 </tr> 5591 </table> 5592 <ul> 5593 <li> 5594 <p> 5595 RTSP (RTP, SDP) 5596 </p> 5597 <p> 5598 The following RTP audio video profile and related codecs MUST be supported. 5599 For exceptions please see the table footnotes in 5600 <a href="#5_1_media_codecs"> 5601 section 5.1 5602 </a>. 5603 </p> 5604 </li> 5605 </ul> 5606 <table> 5607 <tr> 5608 <th> 5609 Profile name 5610 </th> 5611 <th> 5612 Reference(s) 5613 </th> 5614 <th> 5615 Required codec support 5616 </th> 5617 </tr> 5618 <tr> 5619 <td> 5620 H264 AVC 5621 </td> 5622 <td> 5623 <a href="https://tools.ietf.org/html/rfc6184"> 5624 RFC 6184 5625 </a> 5626 </td> 5627 <td> 5628 See 5629 <a href="#5_1_3_video_codecs"> 5630 section 5.1.3 5631 </a> 5632 for details on H264 AVC 5633 </td> 5634 </tr> 5635 <tr> 5636 <td> 5637 MP4A-LATM 5638 </td> 5639 <td> 5640 <a href="https://tools.ietf.org/html/rfc6416"> 5641 RFC 6416 5642 </a> 5643 </td> 5644 <td> 5645 See 5646 <a href="#5_1_1_audio_codecs"> 5647 section 5.1.1 5648 </a> 5649 for details on AAC and its variants 5650 </td> 5651 </tr> 5652 <tr> 5653 <td> 5654 H263-1998 5655 </td> 5656 <td> 5657 <a href="https://tools.ietf.org/html/rfc3551"> 5658 RFC 3551 5659 </a> 5660 <br/> 5661 <a href="https://tools.ietf.org/html/rfc4629"> 5662 RFC 4629 5663 </a> 5664 <br/> 5665 <a href="https://tools.ietf.org/html/rfc2190"> 5666 RFC 2190 5667 </a> 5668 </td> 5669 <td> 5670 See 5671 <a href="#5_1_3_video_codecs"> 5672 section 5.1.3 5673 </a> 5674 for details on H263 5675 </td> 5676 </tr> 5677 <tr> 5678 <td> 5679 H263-2000 5680 </td> 5681 <td> 5682 <a href="https://tools.ietf.org/html/rfc4629"> 5683 RFC 4629 5684 </a> 5685 </td> 5686 <td> 5687 See 5688 <a href="#5_1_3_video_codecs"> 5689 section 5.1.3 5690 </a> 5691 for details on H263 5692 </td> 5693 </tr> 5694 <tr> 5695 <td> 5696 AMR 5697 </td> 5698 <td> 5699 <a href="https://tools.ietf.org/html/rfc4867"> 5700 RFC 4867 5701 </a> 5702 </td> 5703 <td> 5704 See 5705 <a href="#5_1_1_audio_codecs"> 5706 section 5.1.1 5707 </a> 5708 for details on AMR-NB 5709 </td> 5710 </tr> 5711 <tr> 5712 <td> 5713 AMR-WB 5714 </td> 5715 <td> 5716 <a href="https://tools.ietf.org/html/rfc4867"> 5717 RFC 4867 5718 </a> 5719 </td> 5720 <td> 5721 See 5722 <a href="#5_1_1_audio_codecs"> 5723 section 5.1.1 5724 </a> 5725 for details on AMR-WB 5726 </td> 5727 </tr> 5728 <tr> 5729 <td> 5730 MP4V-ES 5731 </td> 5732 <td> 5733 <a href="https://tools.ietf.org/html/rfc6416"> 5734 RFC 6416 5735 </a> 5736 </td> 5737 <td> 5738 See 5739 <a href="#5_1_3_video_codecs"> 5740 section 5.1.3 5741 </a> 5742 for details on MPEG-4 SP 5743 </td> 5744 </tr> 5745 <tr> 5746 <td> 5747 mpeg4-generic 5748 </td> 5749 <td> 5750 <a href="https://tools.ietf.org/html/rfc3640"> 5751 RFC 3640 5752 </a> 5753 </td> 5754 <td> 5755 See 5756 <a href="#5_1_1_audio_codecs"> 5757 section 5.1.1 5758 </a> 5759 for details on AAC and its variants 5760 </td> 5761 </tr> 5762 <tr> 5763 <td> 5764 MP2T 5765 </td> 5766 <td> 5767 <a href="https://tools.ietf.org/html/rfc2250"> 5768 RFC 2250 5769 </a> 5770 </td> 5771 <td> 5772 See 5773 <a href="#mp2t"> 5774 MPEG-2 Transport Stream 5775 </a> 5776 underneath HTTP Live Streaming for details 5777 </td> 5778 </tr> 5779 </table> 5780 <h3 id="5_8_secure_media"> 5781 5.8. Secure Media 5782 </h3> 5783 <p> 5784 Device implementations that support secure video output and are capable of 5785 supporting secure surfaces MUST declare support for Display.FLAG_SECURE. Device 5786 implementations that declare support for Display.FLAG_SECURE, if they support a 5787 wireless display protocol, MUST secure the link with a cryptographically strong 5788 mechanism such as HDCP 2.x or higher for Miracast wireless displays. Similarly 5789 if they support a wired external display, the device implementations MUST 5790 support HDCP 1.2 or higher. Android Television device implementations MUST 5791 support HDCP 2.2 for devices supporting 4K resolution and HDCP 1.4 or above for 5792 lower resolutions. The upstream Android open source implementation includes 5793 support for wireless (Miracast) and wired (HDMI) displays that satisfies this 5794 requirement. 5795 </p> 5796 <h3 id="5_9_musical_instrument_digital_interface_(midi)"> 5797 5.9. Musical Instrument Digital Interface (MIDI) 5798 </h3> 5799 <p> 5800 If a device implementation supports the inter-app MIDI software transport 5801 (virtual MIDI devices), and it supports MIDI over 5802 <em> 5803 all 5804 </em> 5805 of the following 5806 MIDI-capable hardware transports for which it provides generic non-MIDI 5807 connectivity, it is STRONGLY RECOMMENDED to report support for feature 5808 android.software.midi via the 5809 <a href="http://developer.android.com/reference/android/content/pm/PackageManager.html"> 5810 android.content.pm.PackageManager 5811 </a> 5812 class. 5813 </p> 5814 <p> 5815 The MIDI-capable hardware transports are: 5816 </p> 5817 <ul> 5818 <li> 5819 USB host mode (section 7.7 USB) 5820 </li> 5821 <li> 5822 USB peripheral mode (section 7.7 USB) 5823 </li> 5824 <li> 5825 MIDI over Bluetooth LE acting in central role (section 7.4.3 Bluetooth) 5826 </li> 5827 </ul> 5828 <p> 5829 Conversely, if the device implementation provides generic non-MIDI connectivity 5830 over a particular MIDI-capable hardware transport listed above, but does not 5831 support MIDI over that hardware transport, it MUST NOT report support for 5832 feature android.software.midi. 5833 </p> 5834 <h3 id="5_10_professional_audio"> 5835 5.10. Professional Audio 5836 </h3> 5837 <p> 5838 If a device implementation meets 5839 <em> 5840 all 5841 </em> 5842 of the following requirements, it is 5843 STRONGLY RECOMMENDED to report support for feature android.hardware.audio.pro 5844 via the 5845 <a href="http://developer.android.com/reference/android/content/pm/PackageManager.html"> 5846 android.content.pm.PackageManager 5847 </a> 5848 class. 5849 </p> 5850 <ul> 5851 <li> 5852 The device implementation MUST report support for feature 5853 android.hardware.audio.low_latency. 5854 </li> 5855 <li> 5856 The continuous round-trip audio latency, as defined in section 5.6 Audio 5857 Latency, MUST be 20 milliseconds or less and SHOULD be 10 milliseconds or less 5858 over at least one supported path. 5859 </li> 5860 <li> 5861 If the device includes a 4 conductor 3.5mm audio jack, the continuous 5862 round-trip audio latency MUST be 20 milliseconds or less over the audio jack 5863 path, and SHOULD be 10 milliseconds or less over at the audio jack path. 5864 </li> 5865 <li> 5866 The device implementation MUST include a USB port(s) supporting USB host 5867 mode and USB peripheral mode. 5868 </li> 5869 <li> 5870 The USB host mode MUST implement the USB audio class. 5871 </li> 5872 <li> 5873 If the device includes an HDMI port, the device implementation MUST support 5874 output in stereo and eight channels at 20-bit or 24-bit depth and 192 kHz 5875 without bit-depth loss or resampling. 5876 </li> 5877 <li> 5878 The device implementation MUST report support for feature 5879 android.software.midi. 5880 </li> 5881 <li> 5882 If the device includes a 4 conductor 3.5mm audio jack, the device 5883 implementation is STRONGLY RECOMMENDED to comply with section 5884 <a href="https://source.android.com/accessories/headset/specification.html#mobile_device_jack_specifications"> 5885 Mobile device 5886 (jack) specifications 5887 </a> 5888 of the 5889 <a href="https://source.android.com/accessories/headset/specification.html"> 5890 Wired Audio Headset Specification (v1.1) 5891 </a>. 5892 </li> 5893 </ul> 5894 <p> 5895 Latencies and USB audio requirements MUST be met using the 5896 <a href="https://developer.android.com/ndk/guides/audio/opensl-for-android.html"> 5897 OpenSL ES 5898 </a> 5899 PCM buffer queue API. 5900 </p> 5901 <p> 5902 In addition, a device implementation that reports support for this feature SHOULD: 5903 </p> 5904 <ul> 5905 <li> 5906 Provide a sustainable level of CPU performance while audio is active. 5907 </li> 5908 <li> 5909 Minimize audio clock inaccuracy and drift relative to standard time. 5910 </li> 5911 <li> 5912 Minimize audio clock drift relative to the CPU 5913 <code> 5914 CLOCK_MONOTONIC 5915 </code> 5916 when both are active. 5917 </li> 5918 <li> 5919 Minimize audio latency over on-device transducers. 5920 </li> 5921 <li> 5922 Minimize audio latency over USB digital audio. 5923 </li> 5924 <li> 5925 Document audio latency measurements over all paths. 5926 </li> 5927 <li> 5928 Minimize jitter in audio buffer completion callback entry times, as this affects usable percentage of full CPU bandwidth by the callback. 5929 </li> 5930 <li> 5931 Provide zero audio underruns (output) or overruns (input) under normal use at reported latency. 5932 </li> 5933 <li> 5934 Provide zero inter-channel latency difference. 5935 </li> 5936 <li> 5937 Minimize MIDI mean latency over all transports. 5938 </li> 5939 <li> 5940 Minimize MIDI latency variability under load (jitter) over all transports. 5941 </li> 5942 <li> 5943 Provide accurate MIDI timestamps over all transports. 5944 </li> 5945 <li> 5946 Minimize audio signal noise over on-device transducers, including the period immediately after cold start. 5947 </li> 5948 <li> 5949 Provide zero audio clock difference between the input and output sides of corresponding 5950 end-points, when both are active. Examples of corresponding end-points include 5951 the on-device microphone and speaker, or the audio jack input and output. 5952 </li> 5953 <li> 5954 Handle audio buffer completion callbacks for the input and output sides of corresponding 5955 end-points on the same thread when both are active, and enter the output callback immediately 5956 after the return from the input callback. Or if it is not feasible to handle the callbacks 5957 on the same thread, then enter the output callback shortly after entering the input callback 5958 to permit the application to have a consistent timing of the input and output sides. 5959 </li> 5960 <li> 5961 Minimize the phase difference between HAL audio buffering for the input and output 5962 sides of corresponding end-points. 5963 </li> 5964 <li> 5965 Minimize touch latency. 5966 </li> 5967 <li> 5968 Minimize touch latency variability under load (jitter). 5969 </li> 5970 </ul> 5971 <h3 id="5_11_capture_for_unprocessed"> 5972 5.11. Capture for Unprocessed 5973 </h3> 5974 <p> 5975 Starting from Android 7.0, 5976 a new recording source has been added. It can be accessed using 5977 the 5978 <code> 5979 android.media.MediaRecorder.AudioSource.UNPROCESSED 5980 </code> 5981 audio 5982 source. In OpenSL ES, it can be accessed with the record preset 5983 <code> 5984 SL_ANDROID_RECORDING_PRESET_UNPROCESSED 5985 </code> 5986 . 5987 </p> 5988 <p> 5989 A device MUST satisfy all of the following requirements to report support 5990 of the unprocessed audio source via the 5991 <code> 5992 android.media.AudioManager 5993 </code> 5994 property 5995 <a href="http://developer.android.com/reference/android/media/AudioManager.html#PROPERTY_SUPPORT_AUDIO_SOURCE_UNPROCESSED"> 5996 PROPERTY_SUPPORT_AUDIO_SOURCE_UNPROCESSED 5997 </a>: 5998 </p> 5999 <ul> 6000 <li> 6001 <p> 6002 The device MUST exhibit approximately flat amplitude-versus-frequency 6003 characteristics in the mid-frequency range: specifically ±10dB from 6004 100 Hz to 7000 Hz. 6005 </p> 6006 </li> 6007 <li> 6008 <p> 6009 The device MUST exhibit amplitude levels in the low frequency range: 6010 specifically from ±20 dB from 5 Hz to 100 Hz compared to the mid-frequency range. 6011 </p> 6012 </li> 6013 <li> 6014 <p> 6015 The device MUST exhibit amplitude levels in the high frequency range: 6016 specifically from ±30 dB from 7000 Hz to 22 KHz compared to the mid-frequency range. 6017 </p> 6018 </li> 6019 <li> 6020 <p> 6021 Audio input sensitivity MUST be set such that a 1000 Hz sinusoidal tone 6022 source played at 94 dB Sound Pressure Level (SPL) 6023 yields a response with RMS of 520 for 16 6024 bit-samples (or -36 dB Full Scale for floating point/double precision 6025 samples). 6026 </p> 6027 </li> 6028 <li> 6029 <p> 6030 SNR > 60 dB (difference between 94 dB SPL and equivalent SPL of self 6031 noise, A-weighted). 6032 </p> 6033 </li> 6034 <li> 6035 <p> 6036 Total harmonic distortion MUST be less than 1% for 1 kHZ at 90 dB SPL 6037 input level at the microphone. 6038 </p> 6039 </li> 6040 <li> 6041 <p> 6042 The only signal processing allowed in the path is a level multiplier 6043 to bring the level to desired range. This level multiplier MUST NOT 6044 introduce delay or latency to the signal path. 6045 </p> 6046 </li> 6047 <li> 6048 <p> 6049 No other signal processing is allowed in the path, such as Automatic Gain 6050 Control, High Pass Filter, or Echo Cancellation. If any signal processing 6051 is present in the architecture for any reason, it MUST be disabled and 6052 effectively introduce zero delay or extra latency to the signal path. 6053 </p> 6054 </li> 6055 </ul> 6056 <p> 6057 All SPL measurements are made directly next to the microphone under test. 6058 </p> 6059 <p> 6060 For multiple microphone configurations, these requirements apply to each 6061 microphone. 6062 </p> 6063 <p> 6064 It is STRONGLY RECOMMENDED that a device satisfy as many of the requirements for the signal 6065 path for the unprocessed recording source; however, a device must satisfy 6066 <em> 6067 all 6068 </em> 6069 of these 6070 requirements, listed above, if it claims to support the unprocessed audio source. 6071 </p> 6072 <h2 id="6_developer_tools_and_options_compatibility"> 6073 6. Developer Tools and Options Compatibility 6074 </h2> 6075 <h3 id="6_1_developer_tools"> 6076 6.1. Developer Tools 6077 </h3> 6078 <p> 6079 Device implementations MUST support the Android Developer Tools provided in the 6080 Android SDK. Android compatible devices MUST be compatible with: 6081 </p> 6082 <ul> 6083 <li> 6084 <a href="http://developer.android.com/tools/help/adb.html"> 6085 <strong> 6086 Android Debug Bridge (adb) 6087 </strong> 6088 </a> 6089 <ul> 6090 <li> 6091 Device implementations MUST support all adb functions as documented in 6092 the Android SDK including 6093 <a href="https://source.android.com/devices/input/diagnostics.html"> 6094 dumpsys 6095 </a>. 6096 </li> 6097 <li> 6098 The device-side adb daemon MUST be inactive by default and there MUST 6099 be a user-accessible mechanism to turn on the Android Debug Bridge. If a device 6100 implementation omits USB peripheral mode, it MUST implement the Android Debug 6101 Bridge via local-area network (such as Ethernet or 802.11). 6102 </li> 6103 <li> 6104 Android includes support for secure adb. Secure adb enables adb on 6105 known authenticated hosts. Device implementations MUST support secure adb. 6106 </li> 6107 </ul> 6108 </li> 6109 <li> 6110 <a href="http://developer.android.com/tools/debugging/ddms.html"> 6111 <strong> 6112 Dalvik Debug Monitor Service (ddms) 6113 </strong> 6114 </a> 6115 <ul> 6116 <li> 6117 Device implementations MUST support all ddms features as documented in the Android SDK. 6118 </li> 6119 <li> 6120 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. 6121 </li> 6122 </ul> 6123 </li> 6124 <li> 6125 <a href="http://developer.android.com/tools/help/monkey.html"> 6126 <strong> 6127 Monkey 6128 </strong> 6129 </a> 6130 Device 6131 implementations MUST include the Monkey framework, and make it available for 6132 applications to use. 6133 </li> 6134 <li> 6135 <a href="http://developer.android.com/tools/help/systrace.html"> 6136 <strong> 6137 SysTrace 6138 </strong> 6139 </a> 6140 <ul> 6141 <li> 6142 Device implementations MUST support systrace tool as documented in the 6143 Android SDK. Systrace must be inactive by default, and there MUST be a 6144 user-accessible mechanism to turn on Systrace. 6145 </li> 6146 <li> 6147 Most Linux-based systems and Apple Macintosh systems recognize Android 6148 devices using the standard Android SDK tools, without additional support; 6149 however Microsoft Windows systems typically require a driver for new Android 6150 devices. (For instance, new vendor IDs and sometimes new device IDs require 6151 custom USB drivers for Windows systems.) 6152 </li> 6153 <li> 6154 If a device implementation is unrecognized by the adb tool as provided 6155 in the standard Android SDK, device implementers MUST provide Windows drivers 6156 allowing developers to connect to the device using the adb protocol. These 6157 drivers MUST be provided for Windows XP, Windows Vista, Windows 7, Windows 8, 6158 and Windows 10 in both 32-bit and 64-bit versions. 6159 </li> 6160 </ul> 6161 </li> 6162 </ul> 6163 <h3 id="6_2_developer_options"> 6164 6.2. Developer Options 6165 </h3> 6166 <p> 6167 Android includes support for developers to configure application 6168 development-related settings. Device implementations MUST honor the 6169 <a href="http://developer.android.com/reference/android/provider/Settings.html#ACTION_APPLICATION_DEVELOPMENT_SETTINGS"> 6170 android.settings.APPLICATION_DEVELOPMENT_SETTINGS 6171 </a> 6172 intent to show application development-related settings The upstream Android 6173 implementation hides the Developer Options menu by default and enables users to 6174 launch Developer Options after pressing seven (7) times on the 6175 <strong> 6176 Settings 6177 </strong> 6178 > 6179 <strong> 6180 About Device 6181 </strong> 6182 > 6183 <strong> 6184 Build Number 6185 </strong> 6186 menu item. Device implementations MUST 6187 provide a consistent experience for Developer Options. Specifically, device 6188 implementations MUST hide Developer Options by default and MUST provide a 6189 mechanism to enable Developer Options that is consistent with the upstream 6190 Android implementation. 6191 </p> 6192 <div class="note"> 6193 Android Automotive implementations MAY limit access to the Developer Options 6194 menu by visually hiding or disabling the menu when the vehicle is in motion. 6195 </div> 6196 <h2 id="7_hardware_compatibility"> 6197 7. Hardware Compatibility 6198 </h2> 6199 <p> 6200 If a device includes a particular hardware component that has a corresponding 6201 API for third-party developers, the device implementation MUST implement that 6202 API as described in the Android SDK documentation. If an API in the SDK 6203 interacts with a hardware component that is stated to be optional and the 6204 device implementation does not possess that component: 6205 </p> 6206 <ul> 6207 <li> 6208 Complete class definitions (as documented by the SDK) for the component 6209 APIs MUST still be presented. 6210 </li> 6211 <li> 6212 The API’s behaviors MUST be implemented as no-ops in some reasonable 6213 fashion. 6214 </li> 6215 <li> 6216 API methods MUST return null values where permitted by the SDK 6217 documentation. 6218 </li> 6219 <li> 6220 API methods MUST return no-op implementations of classes where null values 6221 are not permitted by the SDK documentation. 6222 </li> 6223 <li> 6224 API methods MUST NOT throw exceptions not documented by the SDK 6225 documentation. 6226 </li> 6227 </ul> 6228 <p> 6229 A typical example of a scenario where these requirements apply is the telephony 6230 API: Even on non-phone devices, these APIs must be implemented as reasonable 6231 no-ops. 6232 </p> 6233 <p> 6234 Device implementations MUST consistently report accurate hardware configuration 6235 information via the getSystemAvailableFeatures() and hasSystemFeature(String) 6236 methods on the 6237 <a href="http://developer.android.com/reference/android/content/pm/PackageManager.html"> 6238 android.content.pm.PackageManager 6239 </a> 6240 class for the same build fingerprint. 6241 </p> 6242 <h3 id="7_1_display_and_graphics"> 6243 7.1. Display and Graphics 6244 </h3> 6245 <p> 6246 Android includes facilities that automatically adjust application assets and UI 6247 layouts appropriately for the device to ensure that third-party applications 6248 run well on a 6249 <a href="http://developer.android.com/guide/practices/screens_support.html"> 6250 variety of hardware configurations 6251 </a>. 6252 Devices MUST properly implement these APIs and behaviors, as detailed in this 6253 section. 6254 </p> 6255 <p> 6256 The units referenced by the requirements in this section are defined as follows: 6257 </p> 6258 <ul> 6259 <li> 6260 <strong> 6261 physical diagonal size 6262 </strong> 6263 . The distance in inches between two opposing 6264 corners of the illuminated portion of the display. 6265 </li> 6266 <li> 6267 <strong> 6268 dots per inch (dpi) 6269 </strong> 6270 . The number of pixels encompassed by a linear 6271 horizontal or vertical span of 1”. Where dpi values are listed, both horizontal 6272 and vertical dpi must fall within the range. 6273 </li> 6274 <li> 6275 <strong> 6276 aspect ratio 6277 </strong> 6278 . The ratio of the pixels of the longer dimension to the 6279 shorter dimension of the screen. For example, a display of 480x854 pixels would 6280 be 854/480 = 1.779, or roughly “16:9”. 6281 </li> 6282 <li> 6283 <strong> 6284 density-independent pixel (dp) 6285 </strong> 6286 . The virtual pixel unit normalized to a 6287 160 dpi screen, calculated as: pixels = dps * (density/160). 6288 </li> 6289 </ul> 6290 <h4 id="7_1_1_screen_configuration"> 6291 7.1.1. Screen Configuration 6292 </h4> 6293 <h5 id="7_1_1_1_screen_size"> 6294 7.1.1.1. Screen Size 6295 </h5> 6296 <div class="note"> 6297 Android Watch devices (detailed in 6298 <a href="#2_device_types"> 6299 section 2 6300 </a> 6301 ) MAY have 6302 smaller screen sizes as described in this section. 6303 </div> 6304 <p> 6305 The Android UI framework supports a variety of different screen sizes, and 6306 allows applications to query the device screen size (aka “screen layout") via 6307 android.content.res.Configuration.screenLayout with the SCREENLAYOUT_SIZE_MASK. 6308 Device implementations MUST report the correct 6309 <a href="http://developer.android.com/guide/practices/screens_support.html"> 6310 screen size 6311 </a> 6312 as 6313 defined in the Android SDK documentation and determined by the upstream Android 6314 platform. Specifically, device implementations MUST report the correct screen 6315 size according to the following logical density-independent pixel (dp) screen 6316 dimensions. 6317 </p> 6318 <ul> 6319 <li> 6320 Devices MUST have screen sizes of at least 426 dp x 320 dp (‘small’), 6321 unless it is an Android Watch device. 6322 </li> 6323 <li> 6324 Devices that report screen size ‘normal’ MUST have screen sizes of at least 6325 480 dp x 320 dp. 6326 </li> 6327 <li> 6328 Devices that report screen size ‘large’ MUST have screen sizes of at least 6329 640 dp x 480 dp. 6330 </li> 6331 <li> 6332 Devices that report screen size ‘xlarge’ MUST have screen sizes of at least 6333 960 dp x 720 dp. 6334 </li> 6335 </ul> 6336 <p> 6337 In addition: 6338 </p> 6339 <ul> 6340 <li> 6341 Android Watch devices MUST have a screen with the physical diagonal size in 6342 the range from 1.1 to 2.5 inches. 6343 </li> 6344 <li> 6345 Android Automotive devices MUST have a screen with the physical diagonal 6346 size greater than or equal to 6 inches. 6347 </li> 6348 <li> 6349 Android Automotive devices MUST have a screen size of at least 750 dp x 6350 480 dp. 6351 </li> 6352 <li> 6353 Other types of Android device implementations, with a physically integrated 6354 screen, MUST have a screen at least 2.5 inches in physical diagonal size. 6355 </li> 6356 </ul> 6357 <p> 6358 Devices MUST NOT change their reported screen size at any time. 6359 </p> 6360 <p> 6361 Applications optionally indicate which screen sizes they support via the 6362 <supports-screens> attribute in the AndroidManifest.xml file. Device 6363 implementations MUST correctly honor applications' stated support for small, 6364 normal, large, and xlarge screens, as described in the Android SDK 6365 documentation. 6366 </p> 6367 <h5 id="7_1_1_2_screen_aspect_ratio"> 6368 7.1.1.2. Screen Aspect Ratio 6369 </h5> 6370 <p> 6371 While there is no restriction to the screen aspect ratio value of the physical 6372 screen display, the screen aspect ratio of the surface that third-party apps 6373 are rendered on and which can be derived from the values reported via the 6374 <a href="https://developer.android.com/reference/android/util/DisplayMetrics.html"> 6375 DisplayMetrics 6376 </a> 6377 MUST meet the following requirements: 6378 </p> 6379 <ul> 6380 <li> 6381 If the 6382 <a href="https://developer.android.com/reference/android/content/res/Configuration.html#uiMode"> 6383 uiMode 6384 </a> 6385 is configured as UI_MODE_TYPE_WATCH, the aspect ratio value MAY be set as 6386 1.0 (1:1). 6387 </li> 6388 <li> 6389 If the third-party app indicates that it is resizeable via the 6390 <a href="https://developer.android.com/guide/topics/ui/multi-window.html#configuring"> 6391 android:resizeableActivity 6392 </a> 6393 attribute, there are no restrictions to the aspect ratio value. 6394 </li> 6395 <li> 6396 For all other cases, the aspect ratio MUST be a value between 1.3333 (4:3) 6397 and 1.86 (roughly 16:9) unless the app has indicated explicitly that it 6398 supports a higher screen aspect ratio through the 6399 <a href="https://developer.android.com/guide/practices/screens_support.html#MaxAspectRatio"> 6400 maxAspectRatio 6401 </a> 6402 metadata value. 6403 </li> 6404 </ul> 6405 <h5 id="7_1_1_3_screen_density"> 6406 7.1.1.3. Screen Density 6407 </h5> 6408 <p> 6409 The Android UI framework defines a set of standard logical densities to help 6410 application developers target application resources. By default, device 6411 implementations MUST report only one of the following logical Android framework 6412 densities through the 6413 <a href="https://developer.android.com/reference/android/util/DisplayMetrics.html#DENSITY_DEVICE_STABLE"> 6414 DENSITY_DEVICE_STABLE 6415 </a> 6416 API and this value MUST NOT change at any time; however, the device MAY report 6417 a different arbitrary density according to the display configuration changes 6418 made by the user (for example, display size) set after initial boot. 6419 </p> 6420 <ul> 6421 <li> 6422 120 dpi (ldpi) 6423 </li> 6424 <li> 6425 160 dpi (mdpi) 6426 </li> 6427 <li> 6428 213 dpi (tvdpi) 6429 </li> 6430 <li> 6431 240 dpi (hdpi) 6432 </li> 6433 <li> 6434 260 dpi (260dpi) 6435 </li> 6436 <li> 6437 280 dpi (280dpi) 6438 </li> 6439 <li> 6440 300 dpi (300dpi) 6441 </li> 6442 <li> 6443 320 dpi (xhdpi) 6444 </li> 6445 <li> 6446 340 dpi (340dpi) 6447 </li> 6448 <li> 6449 360 dpi (360dpi) 6450 </li> 6451 <li> 6452 400 dpi (400dpi) 6453 </li> 6454 <li> 6455 420 dpi (420dpi) 6456 </li> 6457 <li> 6458 480 dpi (xxhdpi) 6459 </li> 6460 <li> 6461 560 dpi (560dpi) 6462 </li> 6463 <li> 6464 640 dpi (xxxhdpi) 6465 </li> 6466 </ul> 6467 <p> 6468 Device implementations SHOULD define the standard Android framework density 6469 that is numerically closest to the physical density of the screen, unless that 6470 logical density pushes the reported screen size below the minimum supported. If 6471 the standard Android framework density that is numerically closest to the 6472 physical density results in a screen size that is smaller than the smallest 6473 supported compatible screen size (320 dp width), device implementations SHOULD 6474 report the next lowest standard Android framework density. 6475 </p> 6476 <p> 6477 Device implementations are STRONGLY RECOMMENDED to provide users a setting to change 6478 the display size. If there is an implementation to change the display size of the device, 6479 it MUST align with the AOSP implementation as indicated below: 6480 </p> 6481 <ul> 6482 <li> 6483 The display size MUST NOT be scaled any larger than 1.5 times the native density or 6484 produce an effective minimum screen dimension smaller than 320dp (equivalent 6485 to resource qualifier sw320dp), whichever comes first. 6486 </li> 6487 <li> 6488 Display size MUST NOT be scaled any smaller than 0.85 times the native density. 6489 </li> 6490 <li> 6491 To ensure good usability and consistent font sizes, it is RECOMMENDED that the 6492 following scaling of Native Display options be provided (while complying with the limits 6493 specified above) 6494 </li> 6495 <li> 6496 Small: 0.85x 6497 </li> 6498 <li> 6499 Default: 1x (Native display scale) 6500 </li> 6501 <li> 6502 Large: 1.15x 6503 </li> 6504 <li> 6505 Larger: 1.3x 6506 </li> 6507 <li> 6508 Largest 1.45x 6509 </li> 6510 </ul> 6511 <h4 id="7_1_2_display_metrics"> 6512 7.1.2. Display Metrics 6513 </h4> 6514 <p> 6515 Device implementations MUST report correct values for all display metrics 6516 defined in 6517 <a href="http://developer.android.com/reference/android/util/DisplayMetrics.html"> 6518 android.util.DisplayMetrics 6519 </a> 6520 and MUST report the same values regardless of whether the embedded or external 6521 screen is used as the default display. 6522 </p> 6523 <h4 id="7_1_3_screen_orientation"> 6524 7.1.3. Screen Orientation 6525 </h4> 6526 <p> 6527 Devices MUST report which screen orientations they support 6528 (android.hardware.screen.portrait and/or android.hardware.screen.landscape) and 6529 MUST report at least one supported orientation. For example, a device with a 6530 fixed orientation landscape screen, such as a television or laptop, SHOULD only 6531 report android.hardware.screen.landscape. 6532 </p> 6533 <p> 6534 Devices that report both screen orientations MUST support dynamic orientation 6535 by applications to either portrait or landscape screen orientation. That is, 6536 the device must respect the application’s request for a specific screen 6537 orientation. Device implementations MAY select either portrait or landscape 6538 orientation as the default. 6539 </p> 6540 <p> 6541 Devices MUST report the correct value for the device’s current orientation, 6542 whenever queried via the android.content.res.Configuration.orientation, 6543 android.view.Display.getOrientation(), or other APIs. 6544 </p> 6545 <p> 6546 Devices MUST NOT change the reported screen size or density when changing orientation. 6547 </p> 6548 <h4 id="7_1_4_2d_and_3d_graphics_acceleration"> 6549 7.1.4. 2D and 3D Graphics Acceleration 6550 </h4> 6551 <p> 6552 Device implementations MUST support both OpenGL ES 1.0 and 2.0, as embodied and 6553 detailed in the Android SDK documentations. Device implementations SHOULD 6554 support OpenGL ES 3.0, 3.1, or 3.2 on devices capable of supporting it. Device 6555 implementations MUST also support 6556 <a href="http://developer.android.com/guide/topics/renderscript/"> 6557 Android RenderScript 6558 </a>, 6559 as detailed in the Android SDK documentation. 6560 </p> 6561 <p> 6562 Device implementations MUST also correctly identify themselves as supporting 6563 OpenGL ES 1.0, OpenGL ES 2.0, OpenGL ES 3.0, OpenGL 3.1, or OpenGL 3.2. That is: 6564 </p> 6565 <ul> 6566 <li> 6567 The managed APIs (such as via the GLES10.getString() method) MUST report 6568 support for OpenGL ES 1.0 and OpenGL ES 2.0. 6569 </li> 6570 <li> 6571 The native C/C++ OpenGL APIs (APIs available to apps via libGLES_v1CM.so, 6572 libGLES_v2.so, or libEGL.so) MUST report support for OpenGL ES 1.0 and OpenGL 6573 ES 2.0. 6574 </li> 6575 <li> 6576 Device implementations that declare support for OpenGL ES 3.0, 3.1, or 3.2 MUST 6577 support the corresponding managed APIs and include support for native C/C++ 6578 APIs. On device implementations that declare support for OpenGL ES 3.0, 3.1, or 6579 3.2 libGLESv2.so MUST export the corresponding function symbols in addition to 6580 the OpenGL ES 2.0 function symbols. 6581 </li> 6582 </ul> 6583 <p> 6584 Android provides an OpenGL ES 6585 <a href="https://developer.android.com/reference/android/opengl/GLES31Ext.html"> 6586 extension pack 6587 </a> 6588 with Java interfaces and native support for advanced graphics functionality 6589 such as tessellation and the ASTC texture compression format. Android device 6590 implementations MUST support the extension pack if the device supports OpenGL 6591 ES 3.2 and MAY support it otherwise. If the extension pack is supported in its 6592 entirety, the device MUST identify the support through the 6593 <code> 6594 android.hardware.opengles.aep 6595 </code> 6596 feature flag. 6597 </p> 6598 <p> 6599 Also, device implementations MAY implement any desired OpenGL ES extensions. 6600 However, device implementations MUST report via the OpenGL ES managed and 6601 native APIs all extension strings that they do support, and conversely MUST NOT 6602 report extension strings that they do not support. 6603 </p> 6604 <p> 6605 Note that Android includes support for applications to optionally specify that 6606 they require specific OpenGL texture compression formats. These formats are 6607 typically vendor-specific. Device implementations are not required by Android 6608 to implement any specific texture compression format. However, they SHOULD 6609 accurately report any texture compression formats that they do support, via the 6610 getString() method in the OpenGL API. 6611 </p> 6612 <p> 6613 Android includes a mechanism for applications to declare that they want to 6614 enable hardware acceleration for 2D graphics at the Application, Activity, 6615 Window, or View level through the use of a manifest tag 6616 <a href="http://developer.android.com/guide/topics/graphics/hardware-accel.html"> 6617 android:hardwareAccelerated 6618 </a> 6619 or direct API calls. 6620 </p> 6621 <p> 6622 Device implementations MUST enable hardware acceleration by default, and MUST 6623 disable hardware acceleration if the developer so requests by setting 6624 android:hardwareAccelerated="false” or disabling hardware acceleration directly 6625 through the Android View APIs. 6626 </p> 6627 <p> 6628 In addition, device implementations MUST exhibit behavior consistent with the 6629 Android SDK documentation on 6630 <a href="http://developer.android.com/guide/topics/graphics/hardware-accel.html"> 6631 hardware 6632 acceleration 6633 </a>. 6634 </p> 6635 <p> 6636 Android includes a TextureView object that lets developers directly integrate 6637 hardware-accelerated OpenGL ES textures as rendering targets in a UI hierarchy. 6638 Device implementations MUST support the TextureView API, and MUST exhibit 6639 consistent behavior with the upstream Android implementation. 6640 </p> 6641 <p> 6642 Android includes support for EGL_ANDROID_RECORDABLE, an EGLConfig attribute 6643 that indicates whether the EGLConfig supports rendering to an ANativeWindow 6644 that records images to a video. Device implementations MUST support 6645 <a href="https://www.khronos.org/registry/egl/extensions/ANDROID/EGL_ANDROID_recordable.txt"> 6646 EGL_ANDROID_RECORDABLE 6647 </a> 6648 extension. 6649 </p> 6650 <h4 id="7_1_5_legacy_application_compatibility_mode"> 6651 7.1.5. Legacy Application Compatibility Mode 6652 </h4> 6653 <p> 6654 Android specifies a “compatibility mode” in which the framework operates in a 6655 'normal' screen size equivalent (320dp width) mode for the benefit of legacy 6656 applications not developed for old versions of Android that pre-date 6657 screen-size independence. 6658 </p> 6659 <ul> 6660 <li> 6661 Android Automotive does not support legacy compatibility mode. 6662 </li> 6663 <li> 6664 All other device implementations MUST include support for legacy 6665 application compatibility mode as implemented by the upstream Android open 6666 source code. That is, device implementations MUST NOT alter the triggers or 6667 thresholds at which compatibility mode is activated, and MUST NOT alter the 6668 behavior of the compatibility mode itself. 6669 </li> 6670 </ul> 6671 <h4 id="7_1_6_screen_technology"> 6672 7.1.6. Screen Technology 6673 </h4> 6674 <p> 6675 The Android platform includes APIs that allow applications to render rich 6676 graphics to the display. Devices MUST support all of these APIs as defined by 6677 the Android SDK unless specifically allowed in this document. 6678 </p> 6679 <ul> 6680 <li> 6681 Devices MUST support displays capable of rendering 16-bit color graphics 6682 and SHOULD support displays capable of 24-bit color graphics. 6683 </li> 6684 <li> 6685 Devices MUST support displays capable of rendering animations. 6686 </li> 6687 <li> 6688 The display technology used MUST have a pixel aspect ratio (PAR) between 6689 0.9 and 1.15. That is, the pixel aspect ratio MUST be near square (1.0) with a 6690 10 ~ 15% tolerance. 6691 </li> 6692 </ul> 6693 <h4 id="7_1_7_secondary_displays"> 6694 7.1.7. Secondary Displays 6695 </h4> 6696 <p> 6697 Android includes support for secondary display to enable media sharing 6698 capabilities and developer APIs for accessing external displays. If a device 6699 supports an external display either via a wired, wireless, or an embedded 6700 additional display connection then the device implementation MUST implement the 6701 <a href="http://developer.android.com/reference/android/hardware/display/DisplayManager.html"> 6702 display manager 6703 API 6704 </a> 6705 as described in the Android SDK documentation. 6706 </p> 6707 <h3 id="7_2_input_devices"> 6708 7.2. Input Devices 6709 </h3> 6710 <p> 6711 Devices MUST support a touchscreen or meet the requirements listed in 7.2.2 for 6712 non-touch navigation. 6713 </p> 6714 <h4 id="7_2_1_keyboard"> 6715 7.2.1. Keyboard 6716 </h4> 6717 <div class="note"> 6718 Android Watch and Android Automotive implementations MAY implement a soft 6719 keyboard. All other device implementations MUST implement a soft keyboard and: 6720 </div> 6721 <p> 6722 Device implementations: 6723 </p> 6724 <ul> 6725 <li> 6726 MUST include support for the Input Management Framework (which allows 6727 third-party developers to create Input Method Editors—i.e. soft keyboard) as 6728 detailed at 6729 <a href="http://developer.android.com"> 6730 http://developer.android.com 6731 </a>. 6732 </li> 6733 <li> 6734 MUST provide at least one soft keyboard implementation (regardless of 6735 whether a hard keyboard is present) except for Android Watch devices where the 6736 screen size makes it less reasonable to have a soft keyboard. 6737 </li> 6738 <li> 6739 MAY include additional soft keyboard implementations. 6740 </li> 6741 <li> 6742 MAY include a hardware keyboard. 6743 </li> 6744 <li> 6745 MUST NOT include a hardware keyboard that does not match one of the formats 6746 specified in 6747 <a href="http://developer.android.com/reference/android/content/res/Configuration.html"> 6748 android.content.res.Configuration.keyboard 6749 </a> 6750 (QWERTY or 12-key). 6751 </li> 6752 </ul> 6753 <h4 id="7_2_2_non-touch_navigation"> 6754 7.2.2. Non-touch Navigation 6755 </h4> 6756 <div class="note"> 6757 Android Television devices MUST support D-pad. 6758 </div> 6759 <p> 6760 Device implementations: 6761 </p> 6762 <ul> 6763 <li> 6764 MAY omit a non-touch navigation option (trackball, d-pad, or wheel) if the 6765 device implementation is not an Android Television device. 6766 </li> 6767 <li> 6768 MUST report the correct value for 6769 <a href="http://developer.android.com/reference/android/content/res/Configuration.html"> 6770 android.content.res.Configuration.navigation 6771 </a>. 6772 </li> 6773 <li> 6774 MUST provide a reasonable alternative user interface mechanism for the 6775 selection and editing of text, compatible with Input Management Engines. The 6776 upstream Android open source implementation includes a selection mechanism 6777 suitable for use with devices that lack non-touch navigation inputs. 6778 </li> 6779 </ul> 6780 <h4 id="7_2_3_navigation_keys"> 6781 7.2.3. Navigation Keys 6782 </h4> 6783 <div class="note"> 6784 The availability and visibility requirement of the Home, Recents, and Back 6785 functions differ between device types as described in this section. 6786 </div> 6787 <p> 6788 The Home, Recents, and Back functions (mapped to the key events KEYCODE_HOME, 6789 KEYCODE_APP_SWITCH, KEYCODE_BACK, respectively) are essential to the Android 6790 navigation paradigm and therefore: 6791 </p> 6792 <ul> 6793 <li> 6794 Android Handheld device implementations MUST provide the Home, Recents, and 6795 Back functions. 6796 </li> 6797 <li> 6798 Android Television device implementations MUST provide the Home and Back 6799 functions. 6800 </li> 6801 <li> 6802 Android Watch device implementations MUST have the Home function available 6803 to the user, and the Back function except for when it is in 6804 <code> 6805 UI_MODE_TYPE_WATCH 6806 </code> 6807 . 6808 </li> 6809 <li> 6810 Android Watch device implementations, and no other Android device types, 6811 MAY consume the long press event on the key event 6812 <a href="http://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_BACK"> 6813 <code> 6814 KEYCODE_BACK 6815 </code> 6816 </a> 6817 and omit it from being sent to the foreground application. 6818 </li> 6819 <li> 6820 Android Automotive implementations MUST provide the Home function and MAY 6821 provide Back and Recent functions. 6822 </li> 6823 <li> 6824 All other types of device implementations MUST provide the Home and Back 6825 functions. 6826 </li> 6827 </ul> 6828 <p> 6829 These functions MAY be implemented via dedicated physical buttons (such as 6830 mechanical or capacitive touch buttons), or MAY be implemented using dedicated 6831 software keys on a distinct portion of the screen, gestures, touch panel, etc. 6832 Android supports both implementations. All of these functions MUST be accessible 6833 with a single action (e.g. tap, double-click or gesture) when visible. 6834 </p> 6835 <p> 6836 Recents function, if provided, MUST have a visible button or icon unless hidden 6837 together with other navigation functions in full-screen mode. This does not 6838 apply to devices upgrading from earlier Android versions that have physical 6839 buttons for navigation and no recents key. 6840 </p> 6841 <p> 6842 The Home and Back functions, if provided, MUST each have a visible button or 6843 icon unless hidden together with other navigation functions in full-screen mode 6844 or when the uiMode UI_MODE_TYPE_MASK is set to UI_MODE_TYPE_WATCH. 6845 </p> 6846 <p> 6847 The Menu function is deprecated in favor of action bar since Android 4.0. 6848 Therefore the new device implementations shipping with Android 7.1 6849 and later MUST NOT implement a dedicated physical button for the Menu function. 6850 Older device implementations SHOULD NOT implement a dedicated physical button 6851 for the Menu function, but if the physical Menu button is implemented and the 6852 device is running applications with targetSdkVersion > 10, the device 6853 implementation: 6854 </p> 6855 <ul> 6856 <li> 6857 MUST display the action overflow button on the action bar when it is visible 6858 and the resulting action overflow menu popup is not empty. For a device 6859 implementation launched before Android 4.4 but upgrading to Android 6860 7.1, this is RECOMMENDED. 6861 </li> 6862 <li> 6863 MUST NOT modify the position of the action overflow popup displayed by 6864 selecting the overflow button in the action bar. 6865 </li> 6866 <li> 6867 MAY render the action overflow popup at a modified position on the screen 6868 when it is displayed by selecting the physical menu button. 6869 </li> 6870 </ul> 6871 <p> 6872 For backwards compatibility, device implementations MUST make the Menu function 6873 available to applications when targetSdkVersion is less than 10, either by a 6874 physical button, a software key, or gestures. This Menu function should be 6875 presented unless hidden together with other navigation functions. 6876 </p> 6877 <p> 6878 Android device implementations supporting the 6879 <a href="http://developer.android.com/reference/android/content/Intent.html#ACTION_ASSIST"> 6880 Assist action 6881 </a> 6882 and/or 6883 <a href="https://developer.android.com/reference/android/service/voice/VoiceInteractionService.html"> 6884 <code> 6885 VoiceInteractionService 6886 </code> 6887 </a> 6888 MUST be able to launch an assist app with a single interaction (e.g. tap, 6889 double-click, or gesture) when other navigation keys are visible. It is STRONGLY 6890 RECOMMENDED to use long press on home as this interaction. The designated 6891 interaction MUST launch the user-selected assist app, in other words the app 6892 that implements a VoiceInteractionService, or an activity handling the ACTION_ASSIST intent. 6893 </p> 6894 <p> 6895 Device implementations MAY use a distinct portion of the screen to display the 6896 navigation keys, but if so, MUST meet these requirements: 6897 </p> 6898 <ul> 6899 <li> 6900 Device implementation navigation keys MUST use a distinct portion of the 6901 screen, not available to applications, and MUST NOT obscure or otherwise 6902 interfere with the portion of the screen available to applications. 6903 </li> 6904 <li> 6905 Device implementations MUST make available a portion of the display to 6906 applications that meets the requirements defined in 6907 <a href="#7_1_1_screen_configuration"> 6908 section 6909 7.1.1 6910 </a>. 6911 </li> 6912 <li> 6913 Device implementations MUST display the navigation keys when applications do 6914 not specify a system UI mode, or specify SYSTEM_UI_FLAG_VISIBLE. 6915 </li> 6916 <li> 6917 Device implementations MUST present the navigation keys in an unobtrusive 6918 “low profile” (eg. dimmed) mode when applications specify 6919 SYSTEM_UI_FLAG_LOW_PROFILE. 6920 </li> 6921 <li> 6922 Device implementations MUST hide the navigation keys when applications 6923 specify SYSTEM_UI_FLAG_HIDE_NAVIGATION. 6924 </li> 6925 </ul> 6926 <h4 id="7_2_4_touchscreen_input"> 6927 7.2.4. Touchscreen Input 6928 </h4> 6929 <div class="note"> 6930 Android Handhelds and Watch Devices MUST support touchscreen input. 6931 </div> 6932 <p> 6933 Device implementations SHOULD have a pointer input system of some kind (either 6934 mouse-like or touch). However, if a device implementation does not support a 6935 pointer input system, it MUST NOT report the android.hardware.touchscreen or 6936 android.hardware.faketouch feature constant. Device implementations that do 6937 include a pointer input system: 6938 </p> 6939 <ul> 6940 <li> 6941 SHOULD support fully independently tracked pointers, if the device input 6942 system supports multiple pointers. 6943 </li> 6944 <li> 6945 MUST report the value of 6946 <a href="http://developer.android.com/reference/android/content/res/Configuration.html"> 6947 android.content.res.Configuration.touchscreen 6948 </a> 6949 corresponding to the type of the specific touchscreen on the device. 6950 </li> 6951 </ul> 6952 <p> 6953 Android includes support for a variety of touchscreens, touch pads, and fake 6954 touch input devices. 6955 <a href="http://source.android.com/devices/tech/input/touch-devices.html"> 6956 Touchscreen-based device implementations 6957 </a> 6958 are associated with a display such that the user has the impression of directly 6959 manipulating items on screen. Since the user is directly touching the screen, 6960 the system does not require any additional affordances to indicate the objects 6961 being manipulated. In contrast, a fake touch interface provides a user input 6962 system that approximates a subset of touchscreen capabilities. For example, a 6963 mouse or remote control that drives an on-screen cursor approximates touch, but 6964 requires the user to first point or focus then click. Numerous input devices 6965 like the mouse, trackpad, gyro-based air mouse, gyro-pointer, joystick, and 6966 multi-touch trackpad can support fake touch interactions. Android includes the 6967 feature constant android.hardware.faketouch, which corresponds to a 6968 high-fidelity non-touch (pointer-based) input device such as a mouse or trackpad 6969 that can adequately emulate touch-based input (including basic gesture support), 6970 and indicates that the device supports an emulated subset of touchscreen 6971 functionality. Device implementations that declare the fake touch feature MUST 6972 meet the fake touch requirements in 6973 <a href="#7_2_5_fake_touch_input"> 6974 section 7.2.5 6975 </a>. 6976 </p> 6977 <p> 6978 Device implementations MUST report the correct feature corresponding to the type 6979 of input used. Device implementations that include a touchscreen (single-touch 6980 or better) MUST report the platform feature constant 6981 android.hardware.touchscreen. Device implementations that report the platform 6982 feature constant android.hardware.touchscreen MUST also report the platform 6983 feature constant android.hardware.faketouch. Device implementations that do not 6984 include a touchscreen (and rely on a pointer device only) MUST NOT report any 6985 touchscreen feature, and MUST report only android.hardware.faketouch if they 6986 meet the fake touch requirements in 6987 <a href="#7_2_5_fake_touch_input"> 6988 section 7.2.5 6989 </a>. 6990 </p> 6991 <h4 id="7_2_5_fake_touch_input"> 6992 7.2.5. Fake Touch Input 6993 </h4> 6994 <p> 6995 Device implementations that declare support for android.hardware.faketouch: 6996 </p> 6997 <ul> 6998 <li> 6999 MUST report the 7000 <a href="http://developer.android.com/reference/android/view/MotionEvent.html"> 7001 absolute X and Y screen positions 7002 </a> 7003 of the pointer location and display a visual pointer on the screen. 7004 </li> 7005 <li> 7006 MUST report touch event with the action code that specifies the state change 7007 that occurs on the pointer 7008 <a href="http://developer.android.com/reference/android/view/MotionEvent.html"> 7009 going down or up on the 7010 screen 7011 </a>. 7012 </li> 7013 <li> 7014 MUST support pointer down and up on an object on the screen, which allows 7015 users to emulate tap on an object on the screen. 7016 </li> 7017 <li> 7018 MUST support pointer down, pointer up, pointer down then pointer up in the 7019 same place on an object on the screen within a time threshold, which allows 7020 users to 7021 <a href="http://developer.android.com/reference/android/view/MotionEvent.html"> 7022 emulate double tap 7023 </a> 7024 on an object on the screen. 7025 </li> 7026 <li> 7027 MUST support pointer down on an arbitrary point on the screen, pointer move 7028 to any other arbitrary point on the screen, followed by a pointer up, which 7029 allows users to emulate a touch drag. 7030 </li> 7031 <li> 7032 MUST support pointer down then allow users to quickly move the object to a 7033 different position on the screen and then pointer up on the screen, which allows 7034 users to fling an object on the screen. 7035 </li> 7036 </ul> 7037 <p> 7038 Devices that declare support for android.hardware.faketouch.multitouch.distinct 7039 MUST meet the requirements for faketouch above, and MUST also support distinct 7040 tracking of two or more independent pointer inputs. 7041 </p> 7042 <h4 id="7_2_6_game_controller_support"> 7043 7.2.6. Game Controller Support 7044 </h4> 7045 <p> 7046 Android Television device implementations MUST support button mappings for game 7047 controllers as listed below. The upstream Android implementation includes 7048 implementation for game controllers that satisfies this requirement. 7049 </p> 7050 <h5 id="7_2_6_1_button_mappings"> 7051 7.2.6.1. Button Mappings 7052 </h5> 7053 <p> 7054 Android Television device implementations MUST support the following key mappings: 7055 </p> 7056 <table> 7057 <tr> 7058 <th> 7059 Button 7060 </th> 7061 <th> 7062 HID Usage 7063 <sup> 7064 2 7065 </sup> 7066 </th> 7067 <th> 7068 Android Button 7069 </th> 7070 </tr> 7071 <tr> 7072 <td> 7073 <a href="http://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_BUTTON_A"> 7074 A 7075 </a> 7076 <sup> 7077 1 7078 </sup> 7079 </td> 7080 <td> 7081 0x09 0x0001 7082 </td> 7083 <td> 7084 KEYCODE_BUTTON_A (96) 7085 </td> 7086 </tr> 7087 <tr> 7088 <td> 7089 <a href="http://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_BUTTON_B"> 7090 B 7091 </a> 7092 <sup> 7093 1 7094 </sup> 7095 </td> 7096 <td> 7097 0x09 0x0002 7098 </td> 7099 <td> 7100 KEYCODE_BUTTON_B (97) 7101 </td> 7102 </tr> 7103 <tr> 7104 <td> 7105 <a href="http://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_BUTTON_X"> 7106 X 7107 </a> 7108 <sup> 7109 1 7110 </sup> 7111 </td> 7112 <td> 7113 0x09 0x0004 7114 </td> 7115 <td> 7116 KEYCODE_BUTTON_X (99) 7117 </td> 7118 </tr> 7119 <tr> 7120 <td> 7121 <a href="http://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_BUTTON_Y"> 7122 Y 7123 </a> 7124 <sup> 7125 1 7126 </sup> 7127 </td> 7128 <td> 7129 0x09 0x0005 7130 </td> 7131 <td> 7132 KEYCODE_BUTTON_Y (100) 7133 </td> 7134 </tr> 7135 <tr> 7136 <td> 7137 <a href="http://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_DPAD_UP"> 7138 D-pad up 7139 </a> 7140 <sup> 7141 1 7142 </sup> 7143 <br/> 7144 <a href="http://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_DPAD_DOWN"> 7145 D-pad down 7146 </a> 7147 <sup> 7148 1 7149 </sup> 7150 </td> 7151 <td> 7152 0x01 0x0039 7153 <sup> 7154 3 7155 </sup> 7156 </td> 7157 <td> 7158 <a href="http://developer.android.com/reference/android/view/MotionEvent.html#AXIS_HAT_Y"> 7159 AXIS_HAT_Y 7160 </a> 7161 <sup> 7162 4 7163 </sup> 7164 </td> 7165 </tr> 7166 <tr> 7167 <td> 7168 <a href="http://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_DPAD_LEFT"> 7169 D-pad left 7170 </a> 7171 1 7172 <br/> 7173 <a href="http://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_DPAD_RIGHT"> 7174 D-pad right 7175 </a> 7176 <sup> 7177 1 7178 </sup> 7179 </td> 7180 <td> 7181 0x01 0x0039 7182 <sup> 7183 3 7184 </sup> 7185 </td> 7186 <td> 7187 <a href="http://developer.android.com/reference/android/view/MotionEvent.html#AXIS_HAT_X"> 7188 AXIS_HAT_X 7189 </a> 7190 <sup> 7191 4 7192 </sup> 7193 </td> 7194 </tr> 7195 <tr> 7196 <td> 7197 <a href="http://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_BUTTON_L1"> 7198 Left shoulder button 7199 </a> 7200 <sup> 7201 1 7202 </sup> 7203 </td> 7204 <td> 7205 0x09 0x0007 7206 </td> 7207 <td> 7208 KEYCODE_BUTTON_L1 (102) 7209 </td> 7210 </tr> 7211 <tr> 7212 <td> 7213 <a href="http://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_BUTTON_R1"> 7214 Right shoulder button 7215 </a> 7216 <sup> 7217 1 7218 </sup> 7219 </td> 7220 <td> 7221 0x09 0x0008 7222 </td> 7223 <td> 7224 KEYCODE_BUTTON_R1 (103) 7225 </td> 7226 </tr> 7227 <tr> 7228 <td> 7229 <a href="http://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_BUTTON_THUMBL"> 7230 Left stick click 7231 </a> 7232 <sup> 7233 1 7234 </sup> 7235 </td> 7236 <td> 7237 0x09 0x000E 7238 </td> 7239 <td> 7240 KEYCODE_BUTTON_THUMBL (106) 7241 </td> 7242 </tr> 7243 <tr> 7244 <td> 7245 <a href="http://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_BUTTON_THUMBR"> 7246 Right stick click 7247 </a> 7248 <sup> 7249 1 7250 </sup> 7251 </td> 7252 <td> 7253 0x09 0x000F 7254 </td> 7255 <td> 7256 KEYCODE_BUTTON_THUMBR (107) 7257 </td> 7258 </tr> 7259 <tr> 7260 <td> 7261 <a href="http://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_HOME"> 7262 Home 7263 </a> 7264 <sup> 7265 1 7266 </sup> 7267 </td> 7268 <td> 7269 0x0c 0x0223 7270 </td> 7271 <td> 7272 KEYCODE_HOME (3) 7273 </td> 7274 </tr> 7275 <tr> 7276 <td> 7277 <a href="http://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_BACK"> 7278 Back 7279 </a> 7280 <sup> 7281 1 7282 </sup> 7283 </td> 7284 <td> 7285 0x0c 0x0224 7286 </td> 7287 <td> 7288 KEYCODE_BACK (4) 7289 </td> 7290 </tr> 7291 </table> 7292 <p class="table_footnote"> 7293 1 7294 <a href="http://developer.android.com/reference/android/view/KeyEvent.html"> 7295 KeyEvent 7296 </a> 7297 </p> 7298 <p class="table_footnote"> 7299 2 The above HID usages must be declared within a Game 7300 pad CA (0x01 0x0005). 7301 </p> 7302 <p class="table_footnote"> 7303 3 This usage must have a Logical Minimum of 0, a 7304 Logical Maximum of 7, a Physical Minimum of 0, a Physical Maximum of 315, Units 7305 in Degrees, and a Report Size of 4. The logical value is defined to be the 7306 clockwise rotation away from the vertical axis; for example, a logical value of 7307 0 represents no rotation and the up button being pressed, while a logical value 7308 of 1 represents a rotation of 45 degrees and both the up and left keys being 7309 pressed. 7310 </p> 7311 <p class="table_footnote"> 7312 4 7313 <a href="http://developer.android.com/reference/android/view/MotionEvent.html"> 7314 MotionEvent 7315 </a> 7316 </p> 7317 <table> 7318 <tr> 7319 <th> 7320 Analog Controls 7321 <sup> 7322 1 7323 </sup> 7324 </th> 7325 <th> 7326 HID Usage 7327 </th> 7328 <th> 7329 Android Button 7330 </th> 7331 </tr> 7332 <tr> 7333 <td> 7334 <a href="http://developer.android.com/reference/android/view/MotionEvent.html#AXIS_LTRIGGER"> 7335 Left Trigger 7336 </a> 7337 </td> 7338 <td> 7339 0x02 0x00C5 7340 </td> 7341 <td> 7342 AXIS_LTRIGGER 7343 </td> 7344 </tr> 7345 <tr> 7346 <td> 7347 <a href="http://developer.android.com/reference/android/view/MotionEvent.html#AXIS_THROTTLE"> 7348 Right Trigger 7349 </a> 7350 </td> 7351 <td> 7352 0x02 0x00C4 7353 </td> 7354 <td> 7355 AXIS_RTRIGGER 7356 </td> 7357 </tr> 7358 <tr> 7359 <td> 7360 <a href="http://developer.android.com/reference/android/view/MotionEvent.html#AXIS_Y"> 7361 Left Joystick 7362 </a> 7363 </td> 7364 <td> 7365 0x01 0x0030 7366 <br/> 7367 0x01 0x0031 7368 </td> 7369 <td> 7370 AXIS_X 7371 <br/> 7372 AXIS_Y 7373 </td> 7374 </tr> 7375 <tr> 7376 <td> 7377 <a href="http://developer.android.com/reference/android/view/MotionEvent.html#AXIS_Z"> 7378 Right Joystick 7379 </a> 7380 </td> 7381 <td> 7382 0x01 0x0032 7383 <br/> 7384 0x01 0x0035 7385 </td> 7386 <td> 7387 AXIS_Z 7388 <br/> 7389 AXIS_RZ 7390 </td> 7391 </tr> 7392 </table> 7393 <p class="table_footnote"> 7394 1 7395 <a href="http://developer.android.com/reference/android/view/MotionEvent.html"> 7396 MotionEvent 7397 </a> 7398 </p> 7399 <h4 id="7_2_7_remote_control"> 7400 7.2.7. Remote Control 7401 </h4> 7402 <p> 7403 Android Television device implementations SHOULD provide a remote control to 7404 allow users to access the TV interface. The remote control MAY be a physical 7405 remote or can be a software-based remote that is accessible from a mobile phone 7406 or tablet. The remote control MUST meet the requirements defined below. 7407 </p> 7408 <ul> 7409 <li> 7410 <strong> 7411 Search affordance 7412 </strong> 7413 . Device implementations MUST fire KEYCODE_SEARCH 7414 (or KEYCODE_ASSIST if the device supports an assistant) when the user 7415 invokes voice search on either the physical or software-based remote. 7416 </li> 7417 <li> 7418 <strong> 7419 Navigation 7420 </strong> 7421 . All Android Television remotes MUST include 7422 <a href="http://developer.android.com/reference/android/view/KeyEvent.html"> 7423 Back, Home, and Select buttons and support for D-pad events 7424 </a>. 7425 </li> 7426 </ul> 7427 <h3 id="7_3_sensors"> 7428 7.3. Sensors 7429 </h3> 7430 <p> 7431 Android includes APIs for accessing a variety of sensor types. Devices 7432 implementations generally MAY omit these sensors, as provided for in the 7433 following subsections. If a device includes a particular sensor type that has a 7434 corresponding API for third-party developers, the device implementation MUST 7435 implement that API as described in the Android SDK documentation and the 7436 Android Open Source documentation on 7437 <a href="http://source.android.com/devices/sensors/"> 7438 sensors 7439 </a>. For example, device 7440 implementations: 7441 </p> 7442 <ul> 7443 <li> 7444 MUST accurately report the presence or absence of sensors per the 7445 <a href="http://developer.android.com/reference/android/content/pm/PackageManager.html"> 7446 android.content.pm.PackageManager 7447 </a> 7448 class. 7449 </li> 7450 <li> 7451 MUST return an accurate list of supported sensors via the 7452 SensorManager.getSensorList() and similar methods. 7453 </li> 7454 <li> 7455 MUST behave reasonably for all other sensor APIs (for example, by returning 7456 true or false as appropriate when applications attempt to register listeners, 7457 not calling sensor listeners when the corresponding sensors are not present; 7458 etc.). 7459 </li> 7460 <li> 7461 MUST 7462 <a href="http://developer.android.com/reference/android/hardware/SensorEvent.html"> 7463 report all sensor measurements 7464 </a> 7465 using the relevant International System of Units (metric) values for each 7466 sensor type as defined in the Android SDK documentation. 7467 </li> 7468 <li> 7469 SHOULD 7470 <a href="http://developer.android.com/reference/android/hardware/SensorEvent.html#timestamp"> 7471 report the event time 7472 </a> 7473 in nanoseconds as defined in the Android SDK documentation, representing the 7474 time the event happened and synchronized with the 7475 SystemClock.elapsedRealtimeNano() clock. Existing and new Android devices are 7476 <strong> 7477 STRONGLY RECOMMENDED 7478 </strong> 7479 to meet these requirements so they will be able to 7480 upgrade to the future platform releases where this might become a REQUIRED 7481 component. The synchronization error SHOULD be below 100 milliseconds. 7482 </li> 7483 <li> 7484 MUST report sensor data with a maximum latency of 100 milliseconds + 2 * 7485 sample_time for the case of a sensor streamed with a minimum required latency 7486 of 5 ms + 2 * sample_time when the application processor is active. This delay 7487 does not include any filtering delays. 7488 </li> 7489 <li> 7490 MUST report the first sensor sample within 400 milliseconds + 2 * 7491 sample_time of the sensor being activated. It is acceptable for this sample to 7492 have an accuracy of 0. 7493 </li> 7494 </ul> 7495 <p> 7496 The list above is not comprehensive; the documented behavior of the Android SDK 7497 and the Android Open Source Documentations on 7498 <a href="http://source.android.com/devices/sensors/"> 7499 sensors 7500 </a> 7501 is to be considered 7502 authoritative. 7503 </p> 7504 <p> 7505 Some sensor types are composite, meaning they can be derived from data provided 7506 by one or more other sensors. (Examples include the orientation sensor and the 7507 linear acceleration sensor.) Device implementations SHOULD implement these 7508 sensor types, when they include the prerequisite physical sensors as described 7509 in 7510 <a href="https://source.android.com/devices/sensors/sensor-types.html"> 7511 sensor types 7512 </a>. If a 7513 device implementation includes a composite sensor it MUST implement the sensor 7514 as described in the Android Open Source documentation on 7515 <a href="https://source.android.com/devices/sensors/sensor-types.html#composite_sensor_type_summary"> 7516 composite sensors 7517 </a>. 7518 </p> 7519 <p> 7520 Some Android sensors support a 7521 <a href="https://source.android.com/devices/sensors/report-modes.html#continuous"> 7522 “continuous” trigger mode 7523 </a>, 7524 which returns data continuously. For any API indicated by the Android SDK 7525 documentation to be a continuous sensor, device implementations MUST 7526 continuously provide periodic data samples that SHOULD have a jitter below 3%, 7527 where jitter is defined as the standard deviation of the difference of the 7528 reported timestamp values between consecutive events. 7529 </p> 7530 <p> 7531 Note that the device implementations MUST ensure that the sensor event stream 7532 MUST NOT prevent the device CPU from entering a suspend state or waking up from 7533 a suspend state. 7534 </p> 7535 <p> 7536 Finally, when several sensors are activated, the power consumption SHOULD NOT 7537 exceed the sum of the individual sensor’s reported power consumption. 7538 </p> 7539 <h4 id="7_3_1_accelerometer"> 7540 7.3.1. Accelerometer 7541 </h4> 7542 <p> 7543 Device implementations SHOULD include a 3-axis accelerometer. Android Handheld 7544 devices, Android Automotive implementations, and Android Watch devices are STRONGLY 7545 RECOMMENDED to include this sensor. If a device implementation does include a 7546 3-axis accelerometer, it: 7547 </p> 7548 <ul> 7549 <li> 7550 MUST implement and report 7551 <a href="http://developer.android.com/reference/android/hardware/Sensor.html#TYPE_ACCELEROMETER"> 7552 TYPE_ACCELEROMETER sensor 7553 </a>. 7554 </li> 7555 <li> 7556 MUST be able to report events up to a frequency of at least 50 Hz for 7557 Android Watch devices as such devices have a stricter power constraint and 100 7558 Hz for all other device types. 7559 </li> 7560 <li> 7561 SHOULD report events up to at least 200 Hz. 7562 </li> 7563 <li> 7564 MUST comply with the 7565 <a href="http://developer.android.com/reference/android/hardware/SensorEvent.html"> 7566 Android sensor coordinate system 7567 </a> 7568 as detailed in the Android APIs. Android Automotive implementations MUST comply 7569 with the Android 7570 <a href="http://source.android.com/devices/sensors/sensor-types.html#auto_axes"> 7571 car sensor coordinate system 7572 </a>. 7573 </li> 7574 <li> 7575 MUST be capable of measuring from freefall up to four times the gravity 7576 (4g) or more on any axis. 7577 </li> 7578 <li> 7579 MUST have a resolution of at least 12-bits and SHOULD have a resolution of 7580 at least 16-bits. 7581 </li> 7582 <li> 7583 SHOULD be calibrated while in use if the characteristics changes over the 7584 life cycle and compensated, and preserve the compensation parameters between 7585 device reboots. 7586 </li> 7587 <li> 7588 SHOULD be temperature compensated. 7589 </li> 7590 <li> 7591 MUST have a standard deviation no greater than 0.05 m/s^, where the 7592 standard deviation should be calculated on a per axis basis on samples 7593 collected over a period of at least 3 seconds at the fastest sampling rate. 7594 </li> 7595 <li> 7596 SHOULD implement the TYPE_SIGNIFICANT_MOTION, TYPE_TILT_DETECTOR, 7597 TYPE_STEP_DETECTOR, TYPE_STEP_COUNTER composite sensors as described in the 7598 Android SDK document. Existing and new Android devices are 7599 <strong> 7600 STRONGLY 7601 RECOMMENDED 7602 </strong> 7603 to implement the TYPE_SIGNIFICANT_MOTION composite sensor. If any 7604 of these sensors are implemented, the sum of their power consumption MUST 7605 always be less than 4 mW and SHOULD each be below 2 mW and 0.5 mW for when the 7606 device is in a dynamic or static condition. 7607 </li> 7608 <li> 7609 If a gyroscope sensor is included, MUST implement the TYPE_GRAVITY and 7610 TYPE_LINEAR_ACCELERATION composite sensors and SHOULD implement the 7611 TYPE_GAME_ROTATION_VECTOR composite sensor. Existing and new Android devices 7612 are STRONGLY RECOMMENDED to implement the TYPE_GAME_ROTATION_VECTOR sensor. 7613 </li> 7614 <li> 7615 MUST implement a TYPE_ROTATION_VECTOR composite sensor, if a gyroscope 7616 sensor and a magnetometer sensor is also included. 7617 </li> 7618 </ul> 7619 <h4 id="7_3_2_magnetometer"> 7620 7.3.2. Magnetometer 7621 </h4> 7622 <p> 7623 Device implementations SHOULD include a 3-axis magnetometer (compass). If a 7624 device does include a 3-axis magnetometer, it: 7625 </p> 7626 <ul> 7627 <li> 7628 MUST implement the TYPE_MAGNETIC_FIELD sensor and SHOULD also implement 7629 TYPE_MAGNETIC_FIELD_UNCALIBRATED sensor. Existing and new Android devices are 7630 STRONGLY RECOMMENDED to implement the TYPE_MAGNETIC_FIELD_UNCALIBRATED sensor. 7631 </li> 7632 <li> 7633 MUST be able to report events up to a frequency of at least 10 Hz and 7634 SHOULD report events up to at least 50 Hz. 7635 </li> 7636 <li> 7637 MUST comply with the 7638 <a href="http://developer.android.com/reference/android/hardware/SensorEvent.html"> 7639 Android sensor coordinate system 7640 </a> 7641 as detailed in the Android APIs. 7642 </li> 7643 <li> 7644 MUST be capable of measuring between -900 µT and +900 µT on each axis 7645 before saturating. 7646 </li> 7647 <li> 7648 MUST have a hard iron offset value less than 700 µT and SHOULD have a value 7649 below 200 µT, by placing the magnetometer far from dynamic (current-induced) 7650 and static (magnet-induced) magnetic fields. 7651 </li> 7652 <li> 7653 MUST have a resolution equal or denser than 0.6 µT and SHOULD have a 7654 resolution equal or denser than 0.2 µT. 7655 </li> 7656 <li> 7657 SHOULD be temperature compensated. 7658 </li> 7659 <li> 7660 MUST support online calibration and compensation of the hard iron bias, and 7661 preserve the compensation parameters between device reboots. 7662 </li> 7663 <li> 7664 MUST have the soft iron compensation applied—the calibration can be done 7665 either while in use or during the production of the device. 7666 </li> 7667 <li> 7668 SHOULD have a standard deviation, calculated on a per axis basis on samples 7669 collected over a period of at least 3 seconds at the fastest sampling rate, no 7670 greater than 0.5 µT. 7671 </li> 7672 <li> 7673 MUST implement a TYPE_ROTATION_VECTOR composite sensor, if an accelerometer 7674 sensor and a gyroscope sensor is also included. 7675 </li> 7676 <li> 7677 MAY implement the TYPE_GEOMAGNETIC_ROTATION_VECTOR sensor if an 7678 accelerometer sensor is also implemented. However if implemented, it MUST 7679 consume less than 10 mW and SHOULD consume less than 3 mW when the sensor is 7680 registered for batch mode at 10 Hz. 7681 </li> 7682 </ul> 7683 <h4 id="7_3_3_gps"> 7684 7.3.3. GPS 7685 </h4> 7686 <p> 7687 Device implementations SHOULD include a GPS/GNSS receiver. If a device implementation 7688 does include a GPS/GNSS receiver and reports the capability to applications through the 7689 <code> 7690 android.hardware.location.gps 7691 </code> 7692 feature flag: 7693 </p> 7694 <ul> 7695 <li> 7696 It is STRONGLY RECOMMENDED that the device continue to deliver normal GPS/GNSS 7697 outputs to applications during an emergency phone call and that location output 7698 not be blocked during an emergency phone call. 7699 </li> 7700 <li> 7701 It MUST support location outputs at a rate of at least 1 Hz when requested via 7702 <code> 7703 LocationManager#requestLocationUpdate 7704 </code> 7705 . 7706 </li> 7707 <li> 7708 It MUST be able to determine the location in open-sky conditions (strong signals, 7709 negligible multipath, HDOP < 2) within 10 seconds (fast time to first fix), when 7710 connected to a 0.5 Mbps or faster data speed internet connection. This requirement 7711 is typically met by the use of some form of Assisted or Predicted GPS/GNSS technique 7712 to minimize GPS/GNSS lock-on time (Assistance data includes Reference Time, Reference 7713 Location and Satellite Ephemeris/Clock). 7714 <ul> 7715 <li> 7716 After making such a location calculation, it is STRONGLY RECOMMENDED for the device to 7717 be able to determine its location, in open sky, within 10 seconds, when location 7718 requests are restarted, up to an hour after the initial location calculation, 7719 even when the subsequent request is made without a data connection, and/or after a power 7720 cycle. 7721 </li> 7722 </ul> 7723 </li> 7724 <li> 7725 In open sky conditions after determining the location, while stationary or moving with less 7726 than 1 meter per second squared of acceleration: 7727 <ul> 7728 <li> 7729 It MUST be able to determine location within 20 meters, and speed within 0.5 meters 7730 per second, at least 95% of the time. 7731 </li> 7732 <li> 7733 It MUST simultaneously track and report via 7734 <a href="https://developer.android.com/reference/android/location/GnssStatus.Callback.html#GnssStatus.Callback()'"> 7735 GnssStatus.Callback 7736 </a> 7737 at least 8 satellites from one constellation. 7738 </li> 7739 <li> 7740 It SHOULD be able to simultaneously track at least 24 satellites, from multiple 7741 constellations (e.g. GPS + at least one of Glonass, Beidou, Galileo). 7742 </li> 7743 </ul> 7744 </li> 7745 <li> 7746 It MUST report the GNSS technology generation through the test API ‘getGnssYearOfHardware’. 7747 </li> 7748 <li> 7749 It is STRONGLY RECOMMENDED to meet and MUST meet all requirements below if the GNSS technology 7750 generation is reported as the year "2016" or newer. 7751 <ul> 7752 <li> 7753 It MUST report GPS measurements, as soon as they are found, even if a location calculated 7754 from GPS/GNSS is not yet reported. 7755 </li> 7756 <li> 7757 It MUST report GPS pseudoranges and pseudorange rates, that, in open-sky conditions 7758 after determining the location, while stationary or moving with less than 0.2 meter 7759 per second squared of acceleration, are sufficient to calculate position within 7760 20 meters, and speed within 0.2 meters per second, at least 95% of the time. 7761 </li> 7762 </ul> 7763 </li> 7764 </ul> 7765 <p> 7766 Note that while some of the GPS requirements above are stated as STRONGLY RECOMMENDED, the 7767 Compatibility Definition for the next major version is expected to change these to a MUST. 7768 </p> 7769 <h4 id="7_3_4_gyroscope"> 7770 7.3.4. Gyroscope 7771 </h4> 7772 <p> 7773 Device implementations SHOULD include a gyroscope (angular change sensor). 7774 Devices SHOULD NOT include a gyroscope sensor unless a 3-axis accelerometer is 7775 also included. If a device implementation includes a gyroscope, it: 7776 </p> 7777 <ul> 7778 <li> 7779 MUST implement the TYPE_GYROSCOPE sensor and SHOULD also implement 7780 TYPE_GYROSCOPE_UNCALIBRATED sensor. Existing and new Android devices are 7781 STRONGLY RECOMMENDED to implement the SENSOR_TYPE_GYROSCOPE_UNCALIBRATED 7782 sensor. 7783 </li> 7784 <li> 7785 MUST be capable of measuring orientation changes up to 1,000 degrees per 7786 second. 7787 </li> 7788 <li> 7789 MUST be able to report events up to a frequency of at least 50 Hz for 7790 Android Watch devices as such devices have a stricter power constraint and 100 7791 Hz for all other device types. 7792 </li> 7793 <li> 7794 SHOULD report events up to at least 200 Hz. 7795 </li> 7796 <li> 7797 MUST have a resolution of 12-bits or more and SHOULD have a resolution of 7798 16-bits or more. 7799 </li> 7800 <li> 7801 MUST be temperature compensated. 7802 </li> 7803 <li> 7804 MUST be calibrated and compensated while in use, and preserve the 7805 compensation parameters between device reboots. 7806 </li> 7807 <li> 7808 MUST have a variance no greater than 1e-7 rad^2 / s^2 per Hz (variance per 7809 Hz, or rad^2 / s). The variance is allowed to vary with the sampling rate, but 7810 must be constrained by this value. In other words, if you measure the variance 7811 of the gyro at 1 Hz sampling rate it should be no greater than 1e-7 rad^2/s^2. 7812 </li> 7813 <li> 7814 MUST implement a TYPE_ROTATION_VECTOR composite sensor, if an accelerometer 7815 sensor and a magnetometer sensor is also included. 7816 </li> 7817 <li> 7818 If an accelerometer sensor is included, MUST implement the TYPE_GRAVITY and 7819 TYPE_LINEAR_ACCELERATION composite sensors and SHOULD implement the 7820 TYPE_GAME_ROTATION_VECTOR composite sensor. Existing and new Android devices 7821 are STRONGLY RECOMMENDED to implement the TYPE_GAME_ROTATION_VECTOR sensor. 7822 </li> 7823 </ul> 7824 <h4 id="7_3_5_barometer"> 7825 7.3.5. Barometer 7826 </h4> 7827 <p> 7828 Device implementations SHOULD include a barometer (ambient air pressure 7829 sensor). If a device implementation includes a barometer, it: 7830 </p> 7831 <ul> 7832 <li> 7833 MUST implement and report TYPE_PRESSURE sensor. 7834 </li> 7835 <li> 7836 MUST be able to deliver events at 5 Hz or greater. 7837 </li> 7838 <li> 7839 MUST have adequate precision to enable estimating altitude. 7840 </li> 7841 <li> 7842 MUST be temperature compensated. 7843 </li> 7844 </ul> 7845 <h4 id="7_3_6_thermometer"> 7846 7.3.6. Thermometer 7847 </h4> 7848 <p> 7849 Device implementations MAY include an ambient thermometer (temperature sensor). 7850 If present, it MUST be defined as SENSOR_TYPE_AMBIENT_TEMPERATURE and it MUST 7851 measure the ambient (room) temperature in degrees Celsius. 7852 </p> 7853 <p> 7854 Device implementations MAY but SHOULD NOT include a CPU temperature sensor. If 7855 present, it MUST be defined as SENSOR_TYPE_TEMPERATURE, it MUST measure the 7856 temperature of the device CPU, and it MUST NOT measure any other temperature. 7857 Note the SENSOR_TYPE_TEMPERATURE sensor type was deprecated in Android 4.0. 7858 </p> 7859 <div class="note"> 7860 For Android Automotive implementations, SENSOR_TYPE_AMBIENT_TEMPERATURE MUST 7861 measure the temperature inside the vehicle cabin. 7862 </div> 7863 <h4 id="7_3_7_photometer"> 7864 7.3.7. Photometer 7865 </h4> 7866 <p> 7867 Device implementations MAY include a photometer (ambient light sensor). 7868 </p> 7869 <h4 id="7_3_8_proximity_sensor"> 7870 7.3.8. Proximity Sensor 7871 </h4> 7872 <p> 7873 Device implementations MAY include a proximity sensor. Devices that can make a 7874 voice call and indicate any value other than PHONE_TYPE_NONE in getPhoneType 7875 SHOULD include a proximity sensor. If a device implementation does include a 7876 proximity sensor, it: 7877 </p> 7878 <ul> 7879 <li> 7880 MUST measure the proximity of an object in the same direction as the 7881 screen. That is, the proximity sensor MUST be oriented to detect objects close 7882 to the screen, as the primary intent of this sensor type is to detect a phone 7883 in use by the user. If a device implementation includes a proximity sensor with 7884 any other orientation, it MUST NOT be accessible through this API. 7885 </li> 7886 <li> 7887 MUST have 1-bit of accuracy or more. 7888 </li> 7889 </ul> 7890 <h4 id="7_3_9_high_fidelity_sensors"> 7891 7.3.9. High Fidelity Sensors 7892 </h4> 7893 <p> 7894 Device implementations supporting a set of higher quality sensors that can meet 7895 all the requirements listed in this section MUST identify the support through 7896 the 7897 <code> 7898 android.hardware.sensor.hifi_sensors 7899 </code> 7900 feature flag. 7901 </p> 7902 <p> 7903 A device declaring android.hardware.sensor.hifi_sensors MUST support all of the 7904 following sensor types meeting the quality requirements as below: 7905 </p> 7906 <ul> 7907 <li> 7908 SENSOR_TYPE_ACCELEROMETER 7909 <ul> 7910 <li> 7911 MUST have a measurement range between at least -8g and +8g. 7912 </li> 7913 <li> 7914 MUST have a measurement resolution of at least 1024 LSB/G. 7915 </li> 7916 <li> 7917 MUST have a minimum measurement frequency of 12.5 Hz or lower. 7918 </li> 7919 <li> 7920 MUST have a maximum measurement frequency of 400 Hz or higher. 7921 </li> 7922 <li> 7923 MUST have a measurement noise not above 400 uG/√Hz. 7924 </li> 7925 <li> 7926 MUST implement a non-wake-up form of this sensor with a buffering 7927 capability of at least 3000 sensor events. 7928 </li> 7929 <li> 7930 MUST have a batching power consumption not worse than 3 mW. 7931 </li> 7932 <li> 7933 SHOULD have a stationary noise bias stability of \<15 μg √Hz from 24hr static 7934 dataset. 7935 </li> 7936 <li> 7937 SHOULD have a bias change vs. temperature of ≤ +/- 1mg / °C. 7938 </li> 7939 <li> 7940 SHOULD have a best-fit line non-linearity of ≤ 0.5%, and sensitivity change vs. temperature of ≤ 7941 0.03%/C°. 7942 </li> 7943 </ul> 7944 </li> 7945 <li> 7946 <p> 7947 SENSOR_TYPE_GYROSCOPE 7948 </p> 7949 <ul> 7950 <li> 7951 MUST have a measurement range between at least -1000 and +1000 dps. 7952 </li> 7953 <li> 7954 MUST have a measurement resolution of at least 16 LSB/dps. 7955 </li> 7956 <li> 7957 MUST have a minimum measurement frequency of 12.5 Hz or lower. 7958 </li> 7959 <li> 7960 MUST have a maximum measurement frequency of 400 Hz or higher. 7961 </li> 7962 <li> 7963 MUST have a measurement noise not above 0.014°/s/√Hz. 7964 </li> 7965 <li> 7966 SHOULD have a stationary bias stability of < 0.0002 °/s √Hz from 24-hour static dataset. 7967 </li> 7968 <li> 7969 SHOULD have a bias change vs. temperature of ≤ +/- 0.05 °/ s / °C. 7970 </li> 7971 <li> 7972 SHOULD have a sensitivity change vs. temperature of ≤ 0.02% / °C. 7973 </li> 7974 <li> 7975 SHOULD have a best-fit line non-linearity of ≤ 0.2%. 7976 </li> 7977 <li> 7978 SHOULD have a noise density of ≤ 0.007 °/s/√Hz. 7979 </li> 7980 </ul> 7981 </li> 7982 <li> 7983 <p> 7984 SENSOR_TYPE_GYROSCOPE_UNCALIBRATED with the same quality requirements as 7985 SENSOR_TYPE_GYROSCOPE. 7986 </p> 7987 </li> 7988 <li> 7989 SENSOR_TYPE_GEOMAGNETIC_FIELD 7990 <ul> 7991 <li> 7992 MUST have a measurement range between at least -900 and +900 uT. 7993 </li> 7994 <li> 7995 MUST have a measurement resolution of at least 5 LSB/uT. 7996 </li> 7997 <li> 7998 MUST have a minimum measurement frequency of 5 Hz or lower. 7999 </li> 8000 <li> 8001 MUST have a maximum measurement frequency of 50 Hz or higher. 8002 </li> 8003 <li> 8004 MUST have a measurement noise not above 0.5 uT. 8005 </li> 8006 </ul> 8007 </li> 8008 <li> 8009 SENSOR_TYPE_MAGNETIC_FIELD_UNCALIBRATED with the same quality requirements 8010 as SENSOR_TYPE_GEOMAGNETIC_FIELD and in addition: 8011 <ul> 8012 <li> 8013 MUST implement a non-wake-up form of this sensor with a buffering 8014 capability of at least 600 sensor events. 8015 </li> 8016 </ul> 8017 </li> 8018 <li> 8019 SENSOR_TYPE_PRESSURE 8020 <ul> 8021 <li> 8022 MUST have a measurement range between at least 300 and 1100 hPa. 8023 </li> 8024 <li> 8025 MUST have a measurement resolution of at least 80 LSB/hPa. 8026 </li> 8027 <li> 8028 MUST have a minimum measurement frequency of 1 Hz or lower. 8029 </li> 8030 <li> 8031 MUST have a maximum measurement frequency of 10 Hz or higher. 8032 </li> 8033 <li> 8034 MUST have a measurement noise not above 2 Pa/√Hz. 8035 </li> 8036 <li> 8037 MUST implement a non-wake-up form of this sensor with a buffering 8038 capability of at least 300 sensor events. 8039 </li> 8040 <li> 8041 MUST have a batching power consumption not worse than 2 mW. 8042 </li> 8043 </ul> 8044 </li> 8045 <li> 8046 SENSOR_TYPE_GAME_ROTATION_VECTOR 8047 <ul> 8048 <li> 8049 MUST implement a non-wake-up form of this sensor with a buffering 8050 capability of at least 300 sensor events. 8051 </li> 8052 <li> 8053 MUST have a batching power consumption not worse than 4 mW. 8054 </li> 8055 </ul> 8056 </li> 8057 <li> 8058 SENSOR_TYPE_SIGNIFICANT_MOTION 8059 <ul> 8060 <li> 8061 MUST have a power consumption not worse than 0.5 mW when device is 8062 static and 1.5 mW when device is moving. 8063 </li> 8064 </ul> 8065 </li> 8066 <li> 8067 SENSOR_TYPE_STEP_DETECTOR 8068 <ul> 8069 <li> 8070 MUST implement a non-wake-up form of this sensor with a buffering 8071 capability of at least 100 sensor events. 8072 </li> 8073 <li> 8074 MUST have a power consumption not worse than 0.5 mW when device is 8075 static and 1.5 mW when device is moving. 8076 </li> 8077 <li> 8078 MUST have a batching power consumption not worse than 4 mW. 8079 </li> 8080 </ul> 8081 </li> 8082 <li> 8083 SENSOR_TYPE_STEP_COUNTER 8084 <ul> 8085 <li> 8086 MUST have a power consumption not worse than 0.5 mW when device is 8087 static and 1.5 mW when device is moving. 8088 </li> 8089 </ul> 8090 </li> 8091 <li> 8092 SENSOR_TILT_DETECTOR 8093 <ul> 8094 <li> 8095 MUST have a power consumption not worse than 0.5 mW when device is 8096 static and 1.5 mW when device is moving. 8097 </li> 8098 </ul> 8099 </li> 8100 </ul> 8101 <p> 8102 Also such a device MUST meet the following sensor subsystem requirements: 8103 </p> 8104 <ul> 8105 <li> 8106 The event timestamp of the same physical event reported by the 8107 Accelerometer, Gyroscope sensor and Magnetometer MUST be within 2.5 8108 milliseconds of each other. 8109 </li> 8110 <li> 8111 The Gyroscope sensor event timestamps MUST be on the same time base as the 8112 camera subsystem and within 1 milliseconds of error. 8113 </li> 8114 <li> 8115 High Fidelity sensors MUST deliver samples to applications within 5 8116 milliseconds from the time when the data is available on the physical sensor 8117 to the application. 8118 </li> 8119 <li> 8120 The power consumption MUST not be higher than 0.5 mW when device is static 8121 and 2.0 mW when device is moving when any combination of the following sensors 8122 are enabled: 8123 <ul> 8124 <li> 8125 SENSOR_TYPE_SIGNIFICANT_MOTION 8126 </li> 8127 <li> 8128 SENSOR_TYPE_STEP_DETECTOR 8129 </li> 8130 <li> 8131 SENSOR_TYPE_STEP_COUNTER 8132 </li> 8133 <li> 8134 SENSOR_TILT_DETECTORS 8135 </li> 8136 </ul> 8137 </li> 8138 </ul> 8139 <p> 8140 Note that all power consumption requirements in this section do not include the 8141 power consumption of the Application Processor. It is inclusive of the power 8142 drawn by the entire sensor chain—the sensor, any supporting circuitry, any 8143 dedicated sensor processing system, etc. 8144 </p> 8145 <p> 8146 The following sensor types MAY also be supported on a device implementation 8147 declaring android.hardware.sensor.hifi_sensors, but if these sensor types are 8148 present they MUST meet the following minimum buffering capability requirement: 8149 </p> 8150 <ul> 8151 <li> 8152 SENSOR_TYPE_PROXIMITY: 100 sensor events 8153 </li> 8154 </ul> 8155 <h4 id="7_3_10_fingerprint_sensor"> 8156 7.3.10. Fingerprint Sensor 8157 </h4> 8158 <p> 8159 Device implementations with a secure lock screen SHOULD include a fingerprint 8160 sensor. If a device implementation includes a fingerprint sensor and has a 8161 corresponding API for third-party developers, it: 8162 </p> 8163 <ul> 8164 <li> 8165 MUST declare support for the android.hardware.fingerprint feature. 8166 </li> 8167 <li> 8168 MUST fully implement the 8169 <a href="https://developer.android.com/reference/android/hardware/fingerprint/package-summary.html"> 8170 corresponding API 8171 </a> 8172 as described in the Android SDK documentation. 8173 </li> 8174 <li> 8175 MUST have a false acceptance rate not higher than 0.002%. 8176 </li> 8177 <li> 8178 Is STRONGLY RECOMMENDED to have a false rejection rate of less than 10%, as 8179 measured on the device 8180 </li> 8181 <li> 8182 Is STRONGLY RECOMMENDED to have a latency below 1 second, measured from 8183 when the fingerprint sensor is touched until the screen is unlocked, for one 8184 enrolled finger. 8185 </li> 8186 <li> 8187 MUST rate limit attempts for at least 30 seconds after five false trials 8188 for fingerprint verification. 8189 </li> 8190 <li> 8191 MUST have a hardware-backed keystore implementation, and perform the 8192 fingerprint matching in a Trusted Execution Environment (TEE) or on a chip with 8193 a secure channel to the TEE. 8194 </li> 8195 <li> 8196 MUST have all identifiable fingerprint data encrypted and cryptographically 8197 authenticated such that they cannot be acquired, read or altered outside of the 8198 Trusted Execution Environment (TEE) as documented in the 8199 <a href="https://source.android.com/devices/tech/security/authentication/fingerprint-hal.html"> 8200 implementation guidelines 8201 </a> 8202 on the Android Open Source Project site. 8203 </li> 8204 <li> 8205 MUST prevent adding a fingerprint without first establishing a chain of 8206 trust by having the user confirm existing or add a new device credential 8207 (PIN/pattern/password) that's secured by TEE; the Android Open Source Project 8208 implementation provides the mechanism in the framework to do so. 8209 </li> 8210 <li> 8211 MUST NOT enable 3rd-party applications to distinguish between individual 8212 fingerprints. 8213 </li> 8214 <li> 8215 MUST honor the DevicePolicyManager.KEYGUARD_DISABLE_FINGERPRINT flag. 8216 </li> 8217 <li> 8218 MUST, when upgraded from a version earlier than Android 6.0, have the 8219 fingerprint data securely migrated to meet the above requirements or removed. 8220 </li> 8221 <li> 8222 SHOULD use the Android Fingerprint icon provided in the Android Open Source 8223 Project. 8224 </li> 8225 </ul> 8226 <h4 id="7_3_11_android_automotive-only_sensors"> 8227 7.3.11. Android Automotive-only sensors 8228 </h4> 8229 <p> 8230 Automotive-specific sensors are defined in the 8231 <code> 8232 android.car.CarSensorManager API 8233 </code> 8234 . 8235 </p> 8236 <h5 id="7_3_11_1_current_gear"> 8237 7.3.11.1. Current Gear 8238 </h5> 8239 <p> 8240 Android Automotive implementations SHOULD provide current gear as SENSOR_TYPE_GEAR. 8241 </p> 8242 <h5 id="7_3_11_2_day_night_mode"> 8243 7.3.11.2. Day Night Mode 8244 </h5> 8245 <p> 8246 Android Automotive implementations MUST support day/night mode defined as 8247 SENSOR_TYPE_NIGHT. The value of this flag MUST be consistent with dashboard 8248 day/night mode and SHOULD be based on ambient light sensor input. The 8249 underlying ambient light sensor MAY be the same as 8250 <a href="#7_3_7_photometer"> 8251 Photometer 8252 </a>. 8253 </p> 8254 <h5 id="7_3_11_3_driving_status"> 8255 7.3.11.3. Driving Status 8256 </h5> 8257 <p> 8258 Android Automotive implementations MUST support driving status defined as 8259 SENSOR_TYPE_DRIVING_STATUS, with a default value of DRIVE_STATUS_UNRESTRICTED 8260 when the vehicle is fully stopped and parked. It is the responsibility of device 8261 manufacturers to configure SENSOR_TYPE_DRIVING_STATUS in compliance with all 8262 laws and regulations that apply to markets where the product is shipping. 8263 </p> 8264 <h5 id="7_3_11_4_wheel_speed"> 8265 7.3.11.4. Wheel Speed 8266 </h5> 8267 <p> 8268 Android Automotive implementations MUST provide vehicle speed defined as 8269 SENSOR_TYPE_CAR_SPEED. 8270 </p> 8271 <h3 id="7_3_12_pose_sensor"> 8272 7.3.12. Pose Sensor 8273 </h3> 8274 <p> 8275 Device implementations MAY support pose sensor with 6 degrees of freedom. Android Handheld 8276 devices are RECOMMENDED to support this sensor. If a device implementation does support pose 8277 sensor with 6 degrees of freedom, it: 8278 </p> 8279 <ul> 8280 <li> 8281 MUST implement and report 8282 <a href="https://developer.android.com/reference/android/hardware/Sensor.html#TYPE_POSE_6DOF"> 8283 <code> 8284 TYPE_POSE_6DOF 8285 </code> 8286 </a> 8287 sensor. 8288 </li> 8289 <li> 8290 MUST be more accurate than the rotation vector alone. 8291 </li> 8292 </ul> 8293 <h3 id="7_4_data_connectivity"> 8294 7.4. Data Connectivity 8295 </h3> 8296 <h4 id="7_4_1_telephony"> 8297 7.4.1. Telephony 8298 </h4> 8299 <p> 8300 “Telephony” as used by the Android APIs and this document refers specifically 8301 to hardware related to placing voice calls and sending SMS messages via a GSM 8302 or CDMA network. While these voice calls may or may not be packet-switched, 8303 they are for the purposes of Android considered independent of any data 8304 connectivity that may be implemented using the same network. In other words, 8305 the Android “telephony” functionality and APIs refer specifically to voice 8306 calls and SMS. For instance, device implementations that cannot place calls or 8307 send/receive SMS messages MUST NOT report the android.hardware.telephony 8308 feature or any subfeatures, regardless of whether they use a cellular network 8309 for data connectivity. 8310 </p> 8311 <p> 8312 Android MAY be used on devices that do not include telephony hardware. That is, 8313 Android is compatible with devices that are not phones. However, if a device 8314 implementation does include GSM or CDMA telephony, it MUST implement full 8315 support for the API for that technology. Device implementations that do not 8316 include telephony hardware MUST implement the full APIs as no-ops. 8317 </p> 8318 <h5 id="7_4_1_1_number_blocking_compatibility"> 8319 7.4.1.1. Number Blocking Compatibility 8320 </h5> 8321 <p> 8322 Android Telephony device implementations MUST include number blocking support 8323 and: 8324 </p> 8325 <ul> 8326 <li> 8327 MUST fully implement 8328 <a href="http://developer.android.com/reference/android/provider/BlockedNumberContract.html"> 8329 BlockedNumberContract 8330 </a> 8331 and the corresponding API as described in the SDK documentation. 8332 </li> 8333 <li> 8334 MUST block all calls and messages from a phone number in 8335 'BlockedNumberProvider' without any interaction with apps. The only exception 8336 is when number blocking is temporarily lifted as described in the SDK 8337 documentation. 8338 </li> 8339 <li> 8340 MUST NOT write to the 8341 <a href="http://developer.android.com/reference/android/provider/CallLog.html"> 8342 platform call log provider 8343 </a> 8344 for a blocked call. 8345 </li> 8346 <li> 8347 MUST NOT write to the 8348 <a href="http://developer.android.com/reference/android/provider/Telephony.html"> 8349 Telephony provider 8350 </a> 8351 for a blocked message. 8352 </li> 8353 <li> 8354 MUST implement a blocked numbers management UI, which is opened with the 8355 intent returned by TelecomManager.createManageBlockedNumbersIntent() method. 8356 </li> 8357 <li> 8358 MUST NOT allow secondary users to view or edit the blocked numbers on the 8359 device as the Android platform assumes the primary user to have full control 8360 of the telephony services, a single instance, on the device. All blocking 8361 related UI MUST be hidden for secondary users and the blocked list MUST still 8362 be respected. 8363 </li> 8364 <li> 8365 SHOULD migrate the blocked numbers into the provider when a device updates 8366 to Android 7.0. 8367 </li> 8368 </ul> 8369 <h4 id="7_4_2_ieee_802_11_(wi-fi)"> 8370 7.4.2. IEEE 802.11 (Wi-Fi) 8371 </h4> 8372 <p> 8373 All Android device implementations SHOULD include support for one or more forms 8374 of 802.11. If a device implementation does include support for 802.11 and exposes the 8375 functionality to a third-party application, it MUST implement the corresponding 8376 Android API and: 8377 </p> 8378 <ul> 8379 <li> 8380 MUST report the hardware feature flag android.hardware.wifi. 8381 </li> 8382 <li> 8383 MUST implement the 8384 <a href="http://developer.android.com/reference/android/net/wifi/WifiManager.MulticastLock.html"> 8385 multicast API 8386 </a> 8387 as described in the SDK documentation. 8388 </li> 8389 <li> 8390 MUST support multicast DNS (mDNS) and MUST NOT filter mDNS packets 8391 (224.0.0.251) at any time of operation including: 8392 <ul> 8393 <li> 8394 Even when the screen is not in an active state. 8395 </li> 8396 <li> 8397 For Android Television device implementations, even when in standby 8398 power states. 8399 </li> 8400 </ul> 8401 </li> 8402 </ul> 8403 <h5 id="7_4_2_1_wi-fi_direct"> 8404 7.4.2.1. Wi-Fi Direct 8405 </h5> 8406 <p> 8407 Device implementations SHOULD include support for Wi-Fi Direct (Wi-Fi 8408 peer-to-peer). If a device implementation does include support for Wi-Fi 8409 Direct, it MUST implement the 8410 <a href="http://developer.android.com/reference/android/net/wifi/p2p/WifiP2pManager.html"> 8411 corresponding Android API 8412 </a> 8413 as described in the SDK documentation. If a device implementation includes 8414 support for Wi-Fi Direct, then it: 8415 </p> 8416 <ul> 8417 <li> 8418 MUST report the hardware feature android.hardware.wifi.direct. 8419 </li> 8420 <li> 8421 MUST support regular Wi-Fi operation. 8422 </li> 8423 <li> 8424 SHOULD support concurrent Wi-Fi and Wi-Fi Direct operation. 8425 </li> 8426 </ul> 8427 <h5 id="7_4_2_2_wi-fi_tunneled_direct_link_setup"> 8428 7.4.2.2. Wi-Fi Tunneled Direct Link Setup 8429 </h5> 8430 <p> 8431 Device implementations SHOULD include support for 8432 <a href="http://developer.android.com/reference/android/net/wifi/WifiManager.html"> 8433 Wi-Fi 8434 Tunneled Direct Link Setup (TDLS) 8435 </a> 8436 as described in the Android SDK Documentation. If a device 8437 implementation does include support for TDLS and TDLS is enabled by the 8438 WiFiManager API, the device: 8439 </p> 8440 <ul> 8441 <li> 8442 SHOULD use TDLS only when it is possible AND beneficial. 8443 </li> 8444 <li> 8445 SHOULD have some heuristic and NOT use TDLS when its performance might be 8446 worse than going through the Wi-Fi access point. 8447 </li> 8448 </ul> 8449 <h4 id="7_4_3_bluetooth"> 8450 7.4.3. Bluetooth 8451 </h4> 8452 <div class="note"> 8453 Android Watch implementations MUST support Bluetooth. Android Television 8454 implementations MUST support Bluetooth and Bluetooth LE. Android Automotive 8455 implementations MUST support Bluetooth and SHOULD support Bluetooth LE. 8456 </div> 8457 <p> 8458 Device implementations that support 8459 <code> 8460 android.hardware.vr.high_performance 8461 </code> 8462 feature MUST 8463 support Bluetooth 4.2 and Bluetooth LE Data Length Extension. 8464 </p> 8465 <p> 8466 Android includes support for 8467 <a href="http://developer.android.com/reference/android/bluetooth/package-summary.html"> 8468 Bluetooth and Bluetooth Low Energy 8469 </a>. 8470 Device implementations that include support for Bluetooth and Bluetooth Low 8471 Energy MUST declare the relevant platform features (android.hardware.bluetooth 8472 and android.hardware.bluetooth_le respectively) and implement the platform APIs. 8473 Device implementations SHOULD implement relevant Bluetooth profiles such as 8474 A2DP, AVCP, OBEX, etc. as appropriate for the device. 8475 </p> 8476 <p> 8477 Android Automotive implementations SHOULD support Message Access Profile (MAP). 8478 Android Automotive implementations MUST support the following Bluetooth 8479 profiles: 8480 </p> 8481 <ul> 8482 <li> 8483 Phone calling over Hands-Free Profile (HFP). 8484 </li> 8485 <li> 8486 Media playback over Audio Distribution Profile (A2DP). 8487 </li> 8488 <li> 8489 Media playback control over Remote Control Profile (AVRCP). 8490 </li> 8491 <li> 8492 Contact sharing using the Phone Book Access Profile (PBAP). 8493 </li> 8494 </ul> 8495 <p> 8496 Device implementations including support for Bluetooth Low Energy: 8497 </p> 8498 <ul> 8499 <li> 8500 MUST declare the hardware feature android.hardware.bluetooth_le. 8501 </li> 8502 <li> 8503 MUST enable the GATT (generic attribute profile) based Bluetooth APIs as 8504 described in the SDK documentation and 8505 <a href="http://developer.android.com/reference/android/bluetooth/package-summary.html"> 8506 android.bluetooth 8507 </a>. 8508 </li> 8509 <li> 8510 are STRONGLY RECOMMENDED to implement a Resolvable Private Address (RPA) 8511 timeout no longer than 15 minutes and rotate the address at timeout to protect 8512 user privacy. 8513 </li> 8514 <li> 8515 SHOULD support offloading of the filtering logic to the bluetooth chipset 8516 when implementing the 8517 <a href="https://developer.android.com/reference/android/bluetooth/le/ScanFilter.html"> 8518 ScanFilter API 8519 </a>, 8520 and MUST report the correct value of where the filtering logic is implemented 8521 whenever queried via the 8522 android.bluetooth.BluetoothAdapter.isOffloadedFilteringSupported() method. 8523 </li> 8524 <li> 8525 SHOULD support offloading of the batched scanning to the bluetooth chipset, 8526 but if not supported, MUST report ‘false’ whenever queried via the 8527 android.bluetooth.BluetoothAdapter.isOffloadedScanBatchingSupported() method. 8528 </li> 8529 <li> 8530 SHOULD support multi advertisement with at least 4 slots, but if not 8531 supported, MUST report ‘false’ whenever queried via the 8532 android.bluetooth.BluetoothAdapter.isMultipleAdvertisementSupported() method. 8533 </li> 8534 </ul> 8535 <h4 id="7_4_4_near-field_communications"> 8536 7.4.4. Near-Field Communications 8537 </h4> 8538 <p> 8539 Device implementations SHOULD include a transceiver and related hardware for 8540 Near-Field Communications (NFC). If a device implementation does include NFC 8541 hardware and plans to make it available to third-party apps, then it: 8542 </p> 8543 <ul> 8544 <li> 8545 MUST report the android.hardware.nfc feature from the 8546 <a href="http://developer.android.com/reference/android/content/pm/PackageManager.html"> 8547 android.content.pm.PackageManager.hasSystemFeature() method 8548 </a>. 8549 </li> 8550 <li> 8551 MUST be capable of reading and writing NDEF messages via the following NFC 8552 standards: 8553 <ul> 8554 <li> 8555 MUST be capable of acting as an NFC Forum reader/writer (as defined by 8556 the NFC Forum technical specification NFCForum-TS-DigitalProtocol-1.0) via the 8557 following NFC standards: 8558 <ul> 8559 <li> 8560 NfcA (ISO14443-3A) 8561 </li> 8562 <li> 8563 NfcB (ISO14443-3B) 8564 </li> 8565 <li> 8566 NfcF (JIS X 6319-4) 8567 </li> 8568 <li> 8569 IsoDep (ISO 14443-4) 8570 </li> 8571 <li> 8572 NFC Forum Tag Types 1, 2, 3, 4 (defined by the NFC Forum) 8573 </li> 8574 </ul> 8575 </li> 8576 <li> 8577 STRONGLY RECOMMENDED to be capable of reading and writing NDEF messages 8578 as well as raw data via the following NFC standards. Note that while the NFC 8579 standards below are stated as STRONGLY RECOMMENDED, the Compatibility 8580 Definition for a future version is planned to change these to MUST. These 8581 standards are optional in this version but will be required in future versions. 8582 Existing and new devices that run this version of Android are very strongly 8583 encouraged to meet these requirements now so they will be able to upgrade to 8584 the future platform releases. 8585 <ul> 8586 <li> 8587 NfcV (ISO 15693) 8588 </li> 8589 </ul> 8590 </li> 8591 <li> 8592 SHOULD be capable of reading the barcode and URL (if encoded) of 8593 <a href="http://developer.android.com/reference/android/nfc/tech/NfcBarcode.html"> 8594 Thinfilm NFC Barcode 8595 </a> 8596 products. 8597 </li> 8598 <li> 8599 MUST be capable of transmitting and receiving data via the following 8600 peer-to-peer standards and protocols: 8601 <ul> 8602 <li> 8603 ISO 18092 8604 </li> 8605 <li> 8606 LLCP 1.2 (defined by the NFC Forum) 8607 </li> 8608 <li> 8609 SDP 1.0 (defined by the NFC Forum) 8610 </li> 8611 <li> 8612 <a href="http://static.googleusercontent.com/media/source.android.com/en/us/compatibility/ndef-push-protocol.pdf"> 8613 NDEF Push Protocol 8614 </a> 8615 </li> 8616 <li> 8617 SNEP 1.0 (defined by the NFC Forum) 8618 </li> 8619 </ul> 8620 </li> 8621 <li> 8622 MUST include support for 8623 <a href="http://developer.android.com/guide/topics/connectivity/nfc/nfc.html"> 8624 Android Beam 8625 </a>. 8626 </li> 8627 <li> 8628 MUST implement the SNEP default server. Valid NDEF messages 8629 received by the default SNEP server MUST be dispatched to applications using 8630 the android.nfc.ACTION_NDEF_DISCOVERED intent. Disabling Android Beam in 8631 settings MUST NOT disable dispatch of incoming NDEF message. 8632 </li> 8633 <li> 8634 MUST honor the android.settings.NFCSHARING_SETTINGS intent to show 8635 <a href="http://developer.android.com/reference/android/provider/Settings.html#ACTION_NFCSHARING_SETTINGS"> 8636 NFC sharing settings 8637 </a>. 8638 </li> 8639 <li> 8640 MUST implement the NPP server. Messages received by the NPP server 8641 MUST be processed the same way as the SNEP default server. 8642 </li> 8643 <li> 8644 MUST implement a SNEP client and attempt to send outbound P2P NDEF 8645 to the default SNEP server when Android Beam is enabled. If no default SNEP 8646 server is found then the client MUST attempt to send to an NPP server. 8647 </li> 8648 <li> 8649 MUST allow foreground activities to set the outbound P2P NDEF 8650 message using android.nfc.NfcAdapter.setNdefPushMessage, and 8651 android.nfc.NfcAdapter.setNdefPushMessageCallback, and 8652 android.nfc.NfcAdapter.enableForegroundNdefPush. 8653 </li> 8654 <li> 8655 SHOULD use a gesture or on-screen confirmation, such as 'Touch to 8656 Beam', before sending outbound P2P NDEF messages. 8657 </li> 8658 <li> 8659 SHOULD enable Android Beam by default and MUST be able to send and 8660 receive using Android Beam, even when another proprietary NFC P2p mode is 8661 turned on. 8662 </li> 8663 <li> 8664 MUST support NFC Connection handover to Bluetooth when the device 8665 supports Bluetooth Object Push Profile. Device implementations MUST support 8666 connection handover to Bluetooth when using 8667 android.nfc.NfcAdapter.setBeamPushUris, by implementing the 8668 “ 8669 <a href="http://members.nfc-forum.org/specs/spec_list/#conn_handover"> 8670 Connection Handover version 1.2 8671 </a> 8672 ” and 8673 “ 8674 <a href="http://members.nfc-forum.org/apps/group_public/download.php/18688/NFCForum-AD-BTSSP_1_1.pdf"> 8675 Bluetooth Secure Simple Pairing Using NFC version 1.0 8676 </a> 8677 ” 8678 specs from the NFC Forum. Such an implementation MUST implement the handover 8679 LLCP service with service name “urn:nfc:sn:handover” for exchanging the 8680 handover request/select records over NFC, and it MUST use the Bluetooth Object 8681 Push Profile for the actual Bluetooth data transfer. For legacy reasons (to 8682 remain compatible with Android 4.1 devices), the implementation SHOULD still 8683 accept SNEP GET requests for exchanging the handover request/select records 8684 over NFC. However an implementation itself SHOULD NOT send SNEP GET requests 8685 for performing connection handover. 8686 </li> 8687 <li> 8688 MUST poll for all supported technologies while in NFC discovery mode. 8689 </li> 8690 <li> 8691 SHOULD be in NFC discovery mode while the device is awake with the 8692 screen active and the lock-screen unlocked. 8693 </li> 8694 </ul> 8695 </li> 8696 </ul> 8697 <p> 8698 (Note that publicly available links are not available for the JIS, ISO, and NFC 8699 Forum specifications cited above.) 8700 </p> 8701 <p> 8702 Android includes support for NFC Host Card Emulation (HCE) mode. If a device 8703 implementation does include an NFC controller chipset capable of HCE (for NfcA 8704 and/or NfcB) and it supports Application ID (AID) routing, then it: 8705 </p> 8706 <ul> 8707 <li> 8708 MUST report the android.hardware.nfc.hce feature constant. 8709 </li> 8710 <li> 8711 MUST support 8712 <a href="http://developer.android.com/guide/topics/connectivity/nfc/hce.html"> 8713 NFC HCE 8714 APIs 8715 </a> 8716 as 8717 defined in the Android SDK. 8718 </li> 8719 </ul> 8720 <p> 8721 If a device implementation does include an NFC controller chipset capable of HCE 8722 for NfcF, and it implements the feature for third-party applications, then it: 8723 </p> 8724 <ul> 8725 <li> 8726 MUST report the android.hardware.nfc.hcef feature constant. 8727 </li> 8728 <li> 8729 MUST implement the [NfcF Card Emulation APIs] 8730 (https://developer.android.com/reference/android/nfc/cardemulation/NfcFCardEmulation.html) 8731 as defined in the Android SDK. 8732 </li> 8733 </ul> 8734 <p> 8735 Additionally, device implementations MAY include reader/writer support for the 8736 following MIFARE technologies. 8737 </p> 8738 <ul> 8739 <li> 8740 MIFARE Classic 8741 </li> 8742 <li> 8743 MIFARE Ultralight 8744 </li> 8745 <li> 8746 NDEF on MIFARE Classic 8747 </li> 8748 </ul> 8749 <p> 8750 Note that Android includes APIs for these MIFARE types. If a device 8751 implementation supports MIFARE in the reader/writer role, it: 8752 </p> 8753 <ul> 8754 <li> 8755 MUST implement the corresponding Android APIs as documented by the Android SDK. 8756 </li> 8757 <li> 8758 MUST report the feature com.nxp.mifare from the 8759 <a href="http://developer.android.com/reference/android/content/pm/PackageManager.html"> 8760 android.content.pm.PackageManager.hasSystemFeature() 8761 </a> 8762 method. Note that this is not a standard Android feature and as such does not 8763 appear as a constant in the android.content.pm.PackageManager class. 8764 </li> 8765 <li> 8766 MUST NOT implement the corresponding Android APIs nor report the 8767 com.nxp.mifare feature unless it also implements general NFC support as 8768 described in this section. 8769 </li> 8770 </ul> 8771 <p> 8772 If a device implementation does not include NFC hardware, it MUST NOT declare 8773 the android.hardware.nfc feature from the 8774 <a href="http://developer.android.com/reference/android/content/pm/PackageManager.html"> 8775 android.content.pm.PackageManager.hasSystemFeature() 8776 </a> 8777 method, and MUST implement the Android NFC API as a no-op. 8778 </p> 8779 <p> 8780 As the classes android.nfc.NdefMessage and android.nfc.NdefRecord represent a 8781 protocol-independent data representation format, device implementations MUST 8782 implement these APIs even if they do not include support for NFC or declare the 8783 android.hardware.nfc feature. 8784 </p> 8785 <h4 id="7_4_5_minimum_network_capability"> 8786 7.4.5. Minimum Network Capability 8787 </h4> 8788 <p> 8789 Device implementations MUST include support for one or more forms of data 8790 networking. Specifically, device implementations MUST include support for at 8791 least one data standard capable of 200Kbit/sec or greater. Examples of 8792 technologies that satisfy this requirement include EDGE, HSPA, EV-DO, 802.11g, 8793 Ethernet, Bluetooth PAN, etc. 8794 </p> 8795 <p> 8796 Device implementations where a physical networking standard (such as Ethernet) 8797 is the primary data connection SHOULD also include support for at least one 8798 common wireless data standard, such as 802.11 (Wi-Fi). 8799 </p> 8800 <p> 8801 Devices MAY implement more than one form of data connectivity. 8802 </p> 8803 <p> 8804 Devices MUST include an IPv6 networking stack and support IPv6 communication 8805 using the managed APIs, such as 8806 <code> 8807 java.net.Socket 8808 </code> 8809 and 8810 <code> 8811 java.net.URLConnection 8812 </code> 8813 , 8814 as well as the native APIs, such as 8815 <code> 8816 AF_INET6 8817 </code> 8818 sockets. The required level of 8819 IPv6 support depends on the network type, as follows: 8820 </p> 8821 <ul> 8822 <li> 8823 Devices that support Wi-Fi networks MUST support dual-stack and IPv6-only 8824 operation on Wi-Fi. 8825 </li> 8826 <li> 8827 Devices that support Ethernet networks MUST support dual-stack operation on 8828 Ethernet. 8829 </li> 8830 <li> 8831 Devices that support cellular data SHOULD support IPv6 operation (IPv6-only 8832 and possibly dual-stack) on cellular data. 8833 </li> 8834 <li> 8835 When a device is simultaneously connected to more than one network (e.g., 8836 Wi-Fi and cellular data), it MUST simultaneously meet these requirements on 8837 each network to which it is connected. 8838 </li> 8839 </ul> 8840 <p> 8841 IPv6 MUST be enabled by default. 8842 </p> 8843 <p> 8844 In order to ensure that IPv6 communication is as reliable as IPv4, unicast IPv6 8845 packets sent to the device MUST NOT be dropped, even when the screen is not in 8846 an active state. Redundant multicast IPv6 packets, such as repeated identical 8847 Router Advertisements, MAY be rate-limited in hardware or firmware if doing so 8848 is necessary to save power. In such cases, rate-limiting MUST NOT cause the 8849 device to lose IPv6 connectivity on any IPv6-compliant network that uses RA 8850 lifetimes of at least 180 seconds. 8851 </p> 8852 <p> 8853 IPv6 connectivity MUST be maintained in doze mode. 8854 </p> 8855 <h4 id="7_4_6_sync_settings"> 8856 7.4.6. Sync Settings 8857 </h4> 8858 <p> 8859 Device implementations MUST have the master auto-sync setting on by default so 8860 that the method 8861 <a href="http://developer.android.com/reference/android/content/ContentResolver.html"> 8862 getMasterSyncAutomatically() 8863 </a> 8864 returns “true”. 8865 </p> 8866 <h4 id="7_4_7_data_saver"> 8867 7.4.7. Data Saver 8868 </h4> 8869 <p> 8870 Device implementations with a metered connection are STRONGLY RECOMMENDED to provide the 8871 data saver mode. 8872 </p> 8873 <p> 8874 If a device implementation provides the data saver mode, it: 8875 </p> 8876 <ul> 8877 <li> 8878 <p> 8879 MUST support all the APIs in the 8880 <code> 8881 ConnectivityManager 8882 </code> 8883 class as described in the 8884 <a href="https://developer.android.com/training/basics/network-ops/data-saver.html"> 8885 SDK documentation 8886 </a> 8887 </p> 8888 </li> 8889 <li> 8890 <p> 8891 MUST provide a user interface in the settings, allowing users to add 8892 applications to or remove applications from the whitelist. 8893 </p> 8894 </li> 8895 </ul> 8896 <p> 8897 Conversely if a device implementation does not provide the data saver mode, it: 8898 </p> 8899 <ul> 8900 <li> 8901 <p> 8902 MUST return the value 8903 <code> 8904 RESTRICT_BACKGROUND_STATUS_DISABLED 8905 </code> 8906 for 8907 <a href="https://developer.android.com/reference/android/net/ConnectivityManager.html#getRestrictBackgroundStatus%28%29"> 8908 <code> 8909 ConnectivityManager.getRestrictBackgroundStatus() 8910 </code> 8911 </a> 8912 </p> 8913 </li> 8914 <li> 8915 <p> 8916 MUST not broadcast 8917 <code> 8918 ConnectivityManager.ACTION_RESTRICT_BACKGROUND_CHANGED 8919 </code> 8920 </p> 8921 </li> 8922 <li> 8923 <p> 8924 MUST have an activity that handles the 8925 <code> 8926 Settings.ACTION_IGNORE_BACKGROUND_DATA_RESTRICTIONS_SETTINGS 8927 </code> 8928 intent but MAY implement it as a no-op. 8929 </p> 8930 </li> 8931 </ul> 8932 <h3 id="7_5_cameras"> 8933 7.5. Cameras 8934 </h3> 8935 <p> 8936 Device implementations SHOULD include a rear-facing camera and MAY include a 8937 front-facing camera. A rear-facing camera is a camera located on the side of 8938 the device opposite the display; that is, it images scenes on the far side of 8939 the device, like a traditional camera. A front-facing camera is a camera 8940 located on the same side of the device as the display; that is, a camera 8941 typically used to image the user, such as for video conferencing and similar 8942 applications. 8943 </p> 8944 <p> 8945 If a device implementation includes at least one camera, it MUST be possible for 8946 an application to simultaneously allocate 3 RGBA_8888 bitmaps equal to the size 8947 of the images produced by the largest-resolution camera sensor on the device, 8948 while camera is open for the purpose of basic preview and still capture. 8949 </p> 8950 <h4 id="7_5_1_rear-facing_camera"> 8951 7.5.1. Rear-Facing Camera 8952 </h4> 8953 <p> 8954 Device implementations SHOULD include a rear-facing camera. If a device 8955 implementation includes at least one rear-facing camera, it: 8956 </p> 8957 <ul> 8958 <li> 8959 MUST report the feature flag android.hardware.camera and 8960 android.hardware.camera.any. 8961 </li> 8962 <li> 8963 MUST have a resolution of at least 2 megapixels. 8964 </li> 8965 <li> 8966 SHOULD have either hardware auto-focus or software auto-focus implemented 8967 in the camera driver (transparent to application software). 8968 </li> 8969 <li> 8970 MAY have fixed-focus or EDOF (extended depth of field) hardware. 8971 </li> 8972 <li> 8973 MAY include a flash. If the Camera includes a flash, the flash lamp MUST 8974 NOT be lit while an android.hardware.Camera.PreviewCallback instance has been 8975 registered on a Camera preview surface, unless the application has explicitly 8976 enabled the flash by enabling the FLASH_MODE_AUTO or FLASH_MODE_ON attributes 8977 of a Camera.Parameters object. Note that this constraint does not apply to the 8978 device’s built-in system camera application, but only to third-party 8979 applications using Camera.PreviewCallback. 8980 </li> 8981 </ul> 8982 <h4 id="7_5_2_front-facing_camera"> 8983 7.5.2. Front-Facing Camera 8984 </h4> 8985 <p> 8986 Device implementations MAY include a front-facing camera. If a device 8987 implementation includes at least one front-facing camera, it: 8988 </p> 8989 <ul> 8990 <li> 8991 MUST report the feature flag android.hardware.camera.any and 8992 android.hardware.camera.front. 8993 </li> 8994 <li> 8995 MUST have a resolution of at least VGA (640x480 pixels). 8996 </li> 8997 <li> 8998 MUST NOT use a front-facing camera as the default for the Camera API. The 8999 camera API in Android has specific support for front-facing cameras and device 9000 implementations MUST NOT configure the API to to treat a front-facing camera as 9001 the default rear-facing camera, even if it is the only camera on the device. 9002 </li> 9003 <li> 9004 MAY include features (such as auto-focus, flash, etc.) available to 9005 rear-facing cameras as described in 9006 <a href="#7_5_1_rear-facing_camera"> 9007 section 7.5.1 9008 </a>. 9009 </li> 9010 <li> 9011 MUST horizontally reflect (i.e. mirror) the stream displayed by an app in a 9012 CameraPreview, as follows: 9013 <ul> 9014 <li> 9015 If the device implementation is capable of being rotated by user (such 9016 as automatically via an accelerometer or manually via user input), the camera 9017 preview MUST be mirrored horizontally relative to the device’s current 9018 orientation. 9019 </li> 9020 <li> 9021 If the current application has explicitly requested that the Camera 9022 display be rotated via a call to the 9023 <a href="http://developer.android.com/reference/android/hardware/Camera.html#setDisplayOrientation(int)"> 9024 android.hardware.Camera.setDisplayOrientation() 9025 </a> 9026 method, the camera preview MUST be mirrored horizontally relative to the 9027 orientation specified by the application. 9028 </li> 9029 <li> 9030 Otherwise, the preview MUST be mirrored along the device’s default 9031 horizontal axis. 9032 </li> 9033 </ul> 9034 </li> 9035 <li> 9036 MUST mirror the image displayed by the postview in the same manner as the 9037 camera preview image stream. If the device implementation does not support 9038 postview, this requirement obviously does not apply. 9039 </li> 9040 <li> 9041 MUST NOT mirror the final captured still image or video streams returned to 9042 application callbacks or committed to media storage. 9043 </li> 9044 </ul> 9045 <h4 id="7_5_3_external_camera"> 9046 7.5.3. External Camera 9047 </h4> 9048 <p> 9049 Device implementations MAY include support for an external camera that is not 9050 necessarily always connected. If a device includes support for an external camera, 9051 it: 9052 </p> 9053 <ul> 9054 <li> 9055 MUST declare the platform feature flag 9056 <code> 9057 android.hardware.camera.external 9058 </code> 9059 and 9060 <code> 9061 android.hardware camera.any 9062 </code> 9063 . 9064 </li> 9065 <li> 9066 MAY support multiple cameras. 9067 </li> 9068 <li> 9069 MUST support USB Video Class (UVC 1.0 or higher) if the external camera 9070 connects through the USB port. 9071 </li> 9072 <li> 9073 SHOULD support video compressions such as MJPEG to enable transfer of 9074 high-quality unencoded streams (i.e. raw or independently compressed picture 9075 streams). 9076 </li> 9077 <li> 9078 MAY support camera-based video encoding. If supported, a simultaneous 9079 unencoded / MJPEG stream (QVGA or greater resolution) MUST be accessible to 9080 the device implementation. 9081 </li> 9082 </ul> 9083 <h4 id="7_5_4_camera_api_behavior"> 9084 7.5.4. Camera API Behavior 9085 </h4> 9086 <p> 9087 Android includes two API packages to access the camera, the newer 9088 android.hardware.camera2 API expose lower-level camera control to the app, 9089 including efficient zero-copy burst/streaming flows and per-frame controls of 9090 exposure, gain, white balance gains, color conversion, denoising, sharpening, 9091 and more. 9092 </p> 9093 <p> 9094 The older API package, android.hardware.Camera, is marked as deprecated in 9095 Android 5.0 but as it should still be available for apps to use Android device 9096 implementations MUST ensure the continued support of the API as described in 9097 this section and in the Android SDK. 9098 </p> 9099 <p> 9100 Device implementations MUST implement the following behaviors for the 9101 camera-related APIs, for all available cameras: 9102 </p> 9103 <ul> 9104 <li> 9105 If an application has never called 9106 android.hardware.Camera.Parameters.setPreviewFormat(int), then the device MUST 9107 use android.hardware.PixelFormat.YCbCr_420_SP for preview data provided to 9108 application callbacks. 9109 </li> 9110 <li> 9111 If an application registers an android.hardware.Camera.PreviewCallback 9112 instance and the system calls the onPreviewFrame() method when the preview 9113 format is YCbCr_420_SP, the data in the byte[] passed into onPreviewFrame() 9114 must further be in the NV21 encoding format. That is, NV21 MUST be the default. 9115 </li> 9116 <li> 9117 For android.hardware.Camera, device implementations MUST support the YV12 9118 format (as denoted by the android.graphics.ImageFormat.YV12 constant) for 9119 camera previews for both front- and rear-facing cameras. (The hardware video 9120 encoder and camera may use any native pixel format, but the device 9121 implementation MUST support conversion to YV12.) 9122 </li> 9123 <li> 9124 For android.hardware.camera2, device implementations must support the 9125 android.hardware.ImageFormat.YUV_420_888 and android.hardware.ImageFormat.JPEG 9126 formats as outputs through the android.media.ImageReader API. 9127 </li> 9128 </ul> 9129 <p> 9130 Device implementations MUST still implement the full 9131 <a href="http://developer.android.com/reference/android/hardware/Camera.html"> 9132 Camera 9133 API 9134 </a> 9135 included in the Android SDK documentation, regardless of whether the device 9136 includes hardware autofocus or other capabilities. For instance, cameras that 9137 lack autofocus MUST still call any registered 9138 android.hardware.Camera.AutoFocusCallback instances (even though this has no 9139 relevance to a non-autofocus camera.) Note that this does apply to front-facing 9140 cameras; for instance, even though most front-facing cameras do not support 9141 autofocus, the API callbacks must still be “faked” as described. 9142 </p> 9143 <p> 9144 Device implementations MUST recognize and honor each parameter name defined as 9145 a constant on the 9146 <a href="http://developer.android.com/reference/android/hardware/Camera.Parameters.html"> 9147 android.hardware.Camera.Parameters 9148 </a> 9149 class, if the underlying hardware supports the feature. If the device hardware 9150 does not support a feature, the API must behave as documented. Conversely, 9151 device implementations MUST NOT honor or recognize string constants passed to 9152 the android.hardware.Camera.setParameters() method other than those documented 9153 as constants on the android.hardware.Camera.Parameters. That is, device 9154 implementations MUST support all standard Camera parameters if the hardware 9155 allows, and MUST NOT support custom Camera parameter types. For instance, 9156 device implementations that support image capture using high dynamic range 9157 (HDR) imaging techniques MUST support camera parameter Camera.SCENE_MODE_HDR. 9158 </p> 9159 <p> 9160 Because not all device implementations can fully support all the features of 9161 the android.hardware.camera2 API, device implementations MUST report the proper 9162 level of support with the 9163 <a href="https://developer.android.com/reference/android/hardware/camera2/CameraCharacteristics.html#INFO_SUPPORTED_HARDWARE_LEVEL"> 9164 android.info.supportedHardwareLevel 9165 </a> 9166 property as described in the Android SDK and report the appropriate 9167 <a href="http://source.android.com/devices/camera/versioning.html"> 9168 framework feature flags 9169 </a>. 9170 </p> 9171 <p> 9172 Device implementations MUST also declare its Individual camera capabilities of 9173 android.hardware.camera2 via the android.request.availableCapabilities property 9174 and declare the appropriate 9175 <a href="http://source.android.com/devices/camera/versioning.html"> 9176 feature flags 9177 </a>; 9178 a device must define the feature flag if any of its attached camera devices 9179 supports the feature. 9180 </p> 9181 <p> 9182 Device implementations MUST broadcast the Camera.ACTION_NEW_PICTURE intent 9183 whenever a new picture is taken by the camera and the entry of the picture has 9184 been added to the media store. 9185 </p> 9186 <p> 9187 Device implementations MUST broadcast the Camera.ACTION_NEW_VIDEO intent 9188 whenever a new video is recorded by the camera and the entry of the picture has 9189 been added to the media store. 9190 </p> 9191 <h4 id="7_5_5_camera_orientation"> 9192 7.5.5. Camera Orientation 9193 </h4> 9194 <p> 9195 Both front- and rear-facing cameras, if present, MUST be oriented so that the 9196 long dimension of the camera aligns with the screen’s long dimension. That is, 9197 when the device is held in the landscape orientation, cameras MUST capture 9198 images in the landscape orientation. This applies regardless of the device’s 9199 natural orientation; that is, it applies to landscape-primary devices as well 9200 as portrait-primary devices. 9201 </p> 9202 <h3 id="7_6_memory_and_storage"> 9203 7.6. Memory and Storage 9204 </h3> 9205 <h4 id="7_6_1_minimum_memory_and_storage"> 9206 7.6.1. Minimum Memory and Storage 9207 </h4> 9208 <div class="note"> 9209 Android Television devices MUST have at least 4GB of non-volatile storage 9210 available for application private data. 9211 </div> 9212 <p> 9213 The memory available to the kernel and userspace on device implementations MUST 9214 be at least equal or larger than the minimum values specified by the following 9215 table. (See 9216 <a href="#7_1_1_screen_configuration"> 9217 section 7.1.1 9218 </a> 9219 for screen size and 9220 density definitions.) 9221 </p> 9222 <table> 9223 <tr> 9224 <th> 9225 Density and screen size 9226 </th> 9227 <th> 9228 32-bit device 9229 </th> 9230 <th> 9231 64-bit device 9232 </th> 9233 </tr> 9234 <tr> 9235 <td> 9236 Android Watch devices (due to smaller screens) 9237 </td> 9238 <td> 9239 416MB 9240 </td> 9241 <td> 9242 Not applicable 9243 </td> 9244 </tr> 9245 <tr> 9246 <td> 9247 <ul> 9248 <li class="table_list"> 9249 280dpi or lower on small/normal screens 9250 </li> 9251 <li class="table_list"> 9252 mdpi or lower on large screens 9253 </li> 9254 <li class="table_list"> 9255 ldpi or lower on extra large screens 9256 </li> 9257 </ul> 9258 </td> 9259 <td> 9260 512MB 9261 </td> 9262 <td> 9263 816MB 9264 </td> 9265 </tr> 9266 <tr> 9267 <td> 9268 <ul> 9269 <li class="table_list"> 9270 xhdpi or higher on small/normal screens 9271 </li> 9272 <li class="table_list"> 9273 hdpi or higher on large screens 9274 </li> 9275 <li class="table_list"> 9276 mdpi or higher on extra large screens 9277 </li> 9278 </ul> 9279 </td> 9280 <td> 9281 608MB 9282 </td> 9283 <td> 9284 944MB 9285 </td> 9286 </tr> 9287 <tr> 9288 <td> 9289 <ul> 9290 <li class="table_list"> 9291 400dpi or higher on small/normal screens 9292 </li> 9293 <li class="table_list"> 9294 xhdpi or higher on large screens 9295 </li> 9296 <li class="table_list"> 9297 tvdpi or higher on extra large screens 9298 </li> 9299 </ul> 9300 </td> 9301 <td> 9302 896MB 9303 </td> 9304 <td> 9305 1280MB 9306 </td> 9307 </tr> 9308 <tr> 9309 <td> 9310 <ul> 9311 <li class="table_list"> 9312 560dpi or higher on small/normal screens 9313 </li> 9314 <li class="table_list"> 9315 400dpi or higher on large screens 9316 </li> 9317 <li class="table_list"> 9318 xhdpi or higher on extra large screens 9319 </li> 9320 </ul> 9321 </td> 9322 <td> 9323 1344MB 9324 </td> 9325 <td> 9326 1824MB 9327 </td> 9328 </tr> 9329 </table> 9330 <p> 9331 The minimum memory values MUST be in addition to any memory space already 9332 dedicated to hardware components such as radio, video, and so on that is not 9333 under the kernel’s control. 9334 </p> 9335 <p> 9336 Device implementations with less than 512MB of memory available to the kernel 9337 and userspace, unless an Android Watch, MUST return the value "true" for 9338 ActivityManager.isLowRamDevice(). 9339 </p> 9340 <p> 9341 Android Television devices MUST have at least 4GB and other device 9342 implementations MUST have at least 3GB of non-volatile storage available for 9343 application private data. That is, the /data partition MUST be at least 4GB for 9344 Android Television devices and at least 3GB for other device implementations. 9345 Device implementations that run Android are 9346 <strong> 9347 STRONGLY RECOMMENDED 9348 </strong> 9349 to have at 9350 least 4GB of non-volatile storage for application private data so they will be 9351 able to upgrade to the future platform releases. 9352 </p> 9353 <p> 9354 The Android APIs include a 9355 <a href="http://developer.android.com/reference/android/app/DownloadManager.html"> 9356 Download Manager 9357 </a> 9358 that applications MAY use to download data files. The device implementation of 9359 the Download Manager MUST be capable of downloading individual files of at 9360 least 100MB in size to the default “cache” location. 9361 </p> 9362 <h4 id="7_6_2_application_shared_storage"> 9363 7.6.2. Application Shared Storage 9364 </h4> 9365 <p> 9366 Device implementations MUST offer shared storage for applications also often 9367 referred as “shared external storage”. 9368 </p> 9369 <p> 9370 Device implementations MUST be configured with shared storage mounted by 9371 default, “out of the box”. If the shared storage is not mounted on the 9372 Linuxpath /sdcard, then the device MUST include a Linux symbolic link from 9373 /sdcard to the actual mount point. 9374 </p> 9375 <p> 9376 Device implementations MAY have hardware for user-accessible removable storage, 9377 such as a Secure Digital (SD) card slot. If this slot is used to satisfy the 9378 shared storage requirement, the device implementation: 9379 </p> 9380 <ul> 9381 <li> 9382 MUST implement a toast or pop-up user interface warning the user when there 9383 is no SD card. 9384 </li> 9385 <li> 9386 MUST include a FAT-formatted SD card 1GB in size or larger OR show on the 9387 box and other material available at time of purchase that the SD card has to be 9388 separately purchased. 9389 </li> 9390 <li> 9391 MUST mount the SD card by default. 9392 </li> 9393 </ul> 9394 <p> 9395 Alternatively, device implementations MAY allocate internal (non-removable) 9396 storage as shared storage for apps as included in the upstream Android Open 9397 Source Project; device implementations SHOULD use this configuration and 9398 software implementation. If a device implementation uses internal 9399 (non-removable) storage to satisfy the shared storage requirement, while that 9400 storage MAY share space with the application private data, it MUST be at least 9401 1GB in size and mounted on /sdcard (or /sdcard MUST be a symbolic link to the 9402 physical location if it is mounted elsewhere). 9403 </p> 9404 <p> 9405 Device implementations MUST enforce as documented the 9406 android.permission.WRITE_EXTERNAL_STORAGE permission on this shared storage. 9407 Shared storage MUST otherwise be writable by any application that obtains that 9408 permission. 9409 </p> 9410 <p> 9411 Device implementations that include multiple shared storage paths (such as both 9412 an SD card slot and shared internal storage) MUST allow only pre-installed & 9413 privileged Android applications with the WRITE_EXTERNAL_STORAGE permission to 9414 write to the secondary external storage, except when writing to their 9415 package-specific directories or within the 9416 <code> 9417 URI 9418 </code> 9419 returned by firing the 9420 <code> 9421 ACTION_OPEN_DOCUMENT_TREE 9422 </code> 9423 intent. 9424 </p> 9425 <p> 9426 However, device implementations SHOULD expose content from both storage paths 9427 transparently through Android’s media scanner service and 9428 android.provider.MediaStore. 9429 </p> 9430 <p> 9431 Regardless of the form of shared storage used, if the device implementation has 9432 a USB port with USB peripheral mode support, it MUST provide some mechanism to 9433 access the contents of shared storage from a host computer. Device 9434 implementations MAY use USB mass storage, but SHOULD use Media Transfer 9435 Protocol to satisfy this requirement. If the device implementation supports 9436 Media Transfer Protocol, it: 9437 </p> 9438 <ul> 9439 <li> 9440 SHOULD be compatible with the reference Android MTP host, 9441 <a href="http://www.android.com/filetransfer"> 9442 Android File Transfer 9443 </a>. 9444 </li> 9445 <li> 9446 SHOULD report a USB device class of 0x00. 9447 </li> 9448 <li> 9449 SHOULD report a USB interface name of 'MTP'. 9450 </li> 9451 </ul> 9452 <h4 id="7_6_3_adoptable_storage"> 9453 7.6.3. Adoptable Storage 9454 </h4> 9455 <p> 9456 Device implementations are STRONGLY RECOMMENDED to implement 9457 <a href="http://source.android.com/devices/storage/adoptable.html"> 9458 adoptable storage 9459 </a> 9460 if the 9461 removable storage device port is in a long-term stable location, such as within 9462 the battery compartment or other protective cover. 9463 </p> 9464 <p> 9465 Device implementations such as a television, MAY enable adoption through USB 9466 ports as the device is expected to be static and not mobile. But for other 9467 device implementations that are mobile in nature, it is STRONGLY RECOMMENDED to 9468 implement the adoptable storage in a long-term stable location, since 9469 accidentally disconnecting them can cause data loss/corruption. 9470 </p> 9471 <h3 id="7_7_usb"> 9472 7.7. USB 9473 </h3> 9474 <p> 9475 Device implementations SHOULD support USB peripheral mode and SHOULD support USB 9476 host mode. 9477 </p> 9478 <h4 id="7_7_1_usb_peripheral_mode"> 9479 7.7.1. USB peripheral mode 9480 </h4> 9481 <p> 9482 If a device implementation includes a USB port supporting peripheral mode: 9483 </p> 9484 <ul> 9485 <li> 9486 The port MUST be connectable to a USB host that has a standard type-A or 9487 type-C USB port. 9488 </li> 9489 <li> 9490 The port SHOULD use micro-B, micro-AB or Type-C USB form factor. Existing 9491 and new Android devices are 9492 <strong> 9493 STRONGLY RECOMMENDED to meet these 9494 requirements 9495 </strong> 9496 so they will be able to upgrade to the future platform 9497 releases. 9498 </li> 9499 <li> 9500 The port SHOULD be located on the bottom of the device 9501 (according to natural orientation) or enable software screen rotation for 9502 all apps (including home screen), so that the display draws correctly when 9503 the device is oriented with the port at bottom. Existing and new Android 9504 devices are 9505 <strong> 9506 STRONGLY RECOMMENDED to meet these requirements 9507 </strong> 9508 so they will 9509 be able to upgrade to future platform releases. 9510 </li> 9511 <li> 9512 It MUST allow a USB host connected with the Android device to access the 9513 contents of the shared storage volume using either USB mass storage or Media 9514 Transfer Protocol. 9515 </li> 9516 <li> 9517 It SHOULD implement the Android Open Accessory (AOA) API and specification 9518 as documented in the Android SDK documentation, and if it is an Android 9519 Handheld device it MUST implement the AOA API. Device implementations 9520 implementing the AOA specification: 9521 <ul> 9522 <li> 9523 MUST declare support for the hardware feature 9524 <a href="http://developer.android.com/guide/topics/connectivity/usb/accessory.html"> 9525 android.hardware.usb.accessory 9526 </a>. 9527 </li> 9528 <li> 9529 MUST implement the 9530 <a href="http://developer.android.com/reference/android/hardware/usb/UsbConstants.html#USB_CLASS_AUDIO"> 9531 USB audio class 9532 </a> 9533 as documented in the Android SDK documentation. 9534 </li> 9535 <li> 9536 The USB mass storage class MUST include the string "android" at the end 9537 of the interface description 9538 <code> 9539 iInterface 9540 </code> 9541 string of the USB mass storage 9542 </li> 9543 </ul> 9544 </li> 9545 <li> 9546 It SHOULD implement support to draw 1.5 A current during HS chirp and 9547 traffic as specified in the 9548 <a href="http://www.usb.org/developers/docs/devclass_docs/BCv1.2_070312.zip"> 9549 USB Battery Charging specification, revision 1.2 9550 </a>. 9551 Existing and new Android devices are 9552 <strong> 9553 STRONGLY RECOMMENDED to meet these 9554 requirements 9555 </strong> 9556 so they will be able to upgrade to the future platform 9557 releases. 9558 </li> 9559 <li> 9560 Type-C devices MUST detect 1.5A and 3.0A chargers per the Type-C resistor 9561 standard and it must detect changes in the advertisement. 9562 </li> 9563 <li> 9564 Type-C devices also supporting USB host mode are STRONGLY RECOMMENDED to 9565 support Power Delivery for data and power role swapping. 9566 </li> 9567 <li> 9568 Type-C devices SHOULD support Power Delivery for high-voltage charging and 9569 support for Alternate Modes such as display out. 9570 </li> 9571 <li> 9572 The value of iSerialNumber in USB standard device descriptor MUST be equal 9573 to the value of android.os.Build.SERIAL. 9574 </li> 9575 <li> 9576 Type-C devices are STRONGLY RECOMMENDED to not support proprietary charging 9577 methods that modify Vbus voltage beyond default levels, or alter sink/source 9578 roles as such may result in interoperability issues with the chargers or 9579 devices that support the standard USB Power Delivery methods. While this is 9580 called out as "STRONGLY RECOMMENDED", in future Android versions we might 9581 REQUIRE all type-C devices to support full interoperability with standard 9582 type-C chargers. 9583 </li> 9584 </ul> 9585 <h4 id="7_7_2_usb_host_mode"> 9586 7.7.2. USB host mode 9587 </h4> 9588 <p> 9589 If a device implementation includes a USB port supporting host mode, it: 9590 </p> 9591 <ul> 9592 <li> 9593 SHOULD use a type-C USB port, if the device implementation supports USB 3.1. 9594 </li> 9595 <li> 9596 MAY use a non-standard port form factor, but if so MUST ship with a cable or 9597 cables adapting the port to a standard type-A or type-C USB port. 9598 </li> 9599 <li> 9600 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. 9601 </li> 9602 <li> 9603 is 9604 <strong> 9605 STRONGLY RECOMMENDED 9606 </strong> 9607 to implement the 9608 <a href="http://developer.android.com/reference/android/hardware/usb/UsbConstants.html#USB_CLASS_AUDIO"> 9609 USB audio class 9610 </a> 9611 as documented in the Android SDK documentation. 9612 </li> 9613 <li> 9614 MUST implement the Android USB host API as documented in the Android SDK, 9615 and MUST declare support for the hardware feature 9616 <a href="http://developer.android.com/guide/topics/connectivity/usb/host.html"> 9617 android.hardware.usb.host 9618 </a>. 9619 </li> 9620 <li> 9621 SHOULD support device charging while in host mode; advertising a source 9622 current of at least 1.5A as specified in the Termination Parameters section 9623 of the [USB Type-C Cable and Connector Specification Revision 1.2] (http://www.usb.org/developers/docs/usb_31_021517.zip) 9624 for USB Type-C connectors or using Charging Downstream Port(CDP) output 9625 current range as specified in the 9626 <a href="http://www.usb.org/developers/docs/devclass_docs/BCv1.2_070312.zip"> 9627 USB Battery Charging specifications, revision 1.2 9628 </a> 9629 for Micro-AB connectors. 9630 </li> 9631 <li> 9632 USB Type-C devices are STRONGLY RECOMMENDED to support DisplayPort, SHOULD 9633 support USB SuperSpeed Data Rates, and are STRONGLY RECOMMENDED to support 9634 Power Delivery for data and power role swapping. 9635 </li> 9636 <li> 9637 Devices with any type-A or type-AB ports MUST NOT ship with an adapter converting 9638 from this port to a type-C receptacle. 9639 </li> 9640 <li> 9641 MUST recognize any remotely connected MTP (Media Transfer Protocol) devices 9642 and make their contents accessible through the 9643 <code> 9644 ACTION_GET_CONTENT 9645 </code> 9646 , 9647 <code> 9648 ACTION_OPEN_DOCUMENT 9649 </code> 9650 , and 9651 <code> 9652 ACTION_CREATE_DOCUMENT 9653 </code> 9654 intents, if the Storage Access 9655 Framework (SAF) is supported. 9656 </li> 9657 <li> 9658 MUST, if using a Type-C USB port and including support for peripheral mode, 9659 implement Dual Role Port functionality as defined by the USB Type-C 9660 specification (section 4.5.1.3.3). 9661 </li> 9662 <li> 9663 SHOULD, if the Dual Role Port functionality is supported, implement the 9664 Try.* model that is most appropriate for the device form factor. For 9665 example a handheld device SHOULD implement the Try.SNK model. 9666 </li> 9667 </ul> 9668 <h3 id="7_8_audio"> 9669 7.8. Audio 9670 </h3> 9671 <h4 id="7_8_1_microphone"> 9672 7.8.1. Microphone 9673 </h4> 9674 <div class="note"> 9675 Android Handheld, Watch, and Automotive implementations MUST include a 9676 microphone. 9677 </div> 9678 <p> 9679 Device implementations MAY omit a microphone. However, if a device 9680 implementation omits a microphone, it MUST NOT report the 9681 android.hardware.microphone feature constant, and MUST implement the audio 9682 recording API at least as no-ops, per 9683 <a href="#7_hardware_compatibility"> 9684 section 7 9685 </a>. 9686 Conversely, device implementations that do possess a microphone: 9687 </p> 9688 <ul> 9689 <li> 9690 MUST report the android.hardware.microphone feature constant. 9691 </li> 9692 <li> 9693 MUST meet the audio recording requirements in 9694 <a href="#5_4_audio_recording"> 9695 section 5.4 9696 </a>. 9697 </li> 9698 <li> 9699 MUST meet the audio latency requirements in 9700 <a href="#5_6_audio_latency"> 9701 section 5.6 9702 </a>. 9703 </li> 9704 <li> 9705 STRONGLY RECOMMENDED to support near-ultrasound recording as described in 9706 <a href="#7_8_3_near_ultrasound"> 9707 section 7.8.3 9708 </a>. 9709 </li> 9710 </ul> 9711 <h4 id="7_8_2_audio_output"> 9712 7.8.2. Audio Output 9713 </h4> 9714 <div class="note"> 9715 Android Watch devices MAY include an audio output. 9716 </div> 9717 <p> 9718 Device implementations including a speaker or with an audio/multimedia output 9719 port for an audio output peripheral as a headset or an external speaker: 9720 </p> 9721 <ul> 9722 <li> 9723 MUST report the android.hardware.audio.output feature constant. 9724 </li> 9725 <li> 9726 MUST meet the audio playback requirements in 9727 <a href="#5_5_audio_playback"> 9728 section 5.5 9729 </a>. 9730 </li> 9731 <li> 9732 MUST meet the audio latency requirements in 9733 <a href="#5_6_audio_latency"> 9734 section 5.6 9735 </a>. 9736 </li> 9737 <li> 9738 STRONGLY RECOMMENDED to support near-ultrasound playback as described in 9739 <a href="#7_8_3_near_ultrasound"> 9740 section 7.8.3 9741 </a>. 9742 </li> 9743 </ul> 9744 <p> 9745 Conversely, if a device implementation does not include a speaker or audio 9746 output port, it MUST NOT report the android.hardware.audio output feature, and 9747 MUST implement the Audio Output related APIs as no-ops at least. 9748 </p> 9749 <p> 9750 Android Watch device implementation MAY but SHOULD NOT have audio output, but 9751 other types of Android device implementations MUST have an audio output and 9752 declare android.hardware.audio.output. 9753 </p> 9754 <h5 id="7_8_2_1_analog_audio_ports"> 9755 7.8.2.1. Analog Audio Ports 9756 </h5> 9757 <p> 9758 In order to be compatible with the 9759 <a href="http://source.android.com/accessories/headset-spec.html"> 9760 headsets and other audio accessories 9761 </a> 9762 using the 3.5mm audio plug across the Android ecosystem, if a device 9763 implementation includes one or more analog audio ports, at least one of the 9764 audio port(s) SHOULD be a 4 conductor 3.5mm audio jack. If a device 9765 implementation has a 4 conductor 3.5mm audio jack, it: 9766 </p> 9767 <ul> 9768 <li> 9769 MUST support audio playback to stereo headphones and stereo headsets with a 9770 microphone, and SHOULD support audio recording from stereo headsets with a 9771 microphone. 9772 </li> 9773 <li> 9774 MUST support TRRS audio plugs with the CTIA pin-out order, and SHOULD 9775 support audio plugs with the OMTP pin-out order. 9776 </li> 9777 <li> 9778 MUST support the detection of microphone on the plugged in audio accessory, 9779 if the device implementation supports a microphone, and broadcast the 9780 android.intent.action.HEADSET_PLUG with the extra value microphone set as 1. 9781 </li> 9782 <li> 9783 MUST support the detection and mapping to the keycodes for the following 9784 3 ranges of equivalent impedance between the microphone and ground conductors 9785 on the audio plug: 9786 <ul> 9787 <li> 9788 <strong> 9789 70 ohm or less 9790 </strong> 9791 : KEYCODE_HEADSETHOOK 9792 </li> 9793 <li> 9794 <strong> 9795 210-290 Ohm 9796 </strong> 9797 : KEYCODE_VOLUME_UP 9798 </li> 9799 <li> 9800 <strong> 9801 360-680 Ohm 9802 </strong> 9803 : KEYCODE_VOLUME_DOWN 9804 </li> 9805 </ul> 9806 </li> 9807 <li> 9808 STRONGLY RECOMMENDED to detect and map to the keycode for the following 9809 range of equivalent impedance between the microphone and ground conductors 9810 on the audio plug: 9811 <ul> 9812 <li> 9813 <strong> 9814 110-180 Ohm: 9815 </strong> 9816 KEYCODE_VOICE_ASSIST 9817 </li> 9818 </ul> 9819 </li> 9820 <li> 9821 MUST trigger ACTION_HEADSET_PLUG upon a plug insert, but only after all 9822 contacts on plug are touching their relevant segments on the jack. 9823 </li> 9824 <li> 9825 MUST be capable of driving at least 150mV ± 10% of output voltage on a 32 9826 Ohm speaker impedance. 9827 </li> 9828 <li> 9829 MUST have a microphone bias voltage between 1.8V ~ 2.9V. 9830 </li> 9831 </ul> 9832 <h4 id="7_8_3_near-ultrasound"> 9833 7.8.3. Near-Ultrasound 9834 </h4> 9835 <p> 9836 Near-Ultrasound audio is the 18.5 kHz to 20 kHz band. Device implementations 9837 MUST correctly report the support of near-ultrasound audio capability via the 9838 <a href="http://developer.android.com/reference/android/media/AudioManager.html#getProperty%28java.lang.String%29"> 9839 AudioManager.getProperty 9840 </a> 9841 API as follows: 9842 </p> 9843 <ul> 9844 <li> 9845 If 9846 <a href="http://developer.android.com/reference/android/media/AudioManager.html#PROPERTY_SUPPORT_MIC_NEAR_ULTRASOUND"> 9847 PROPERTY_SUPPORT_MIC_NEAR_ULTRASOUND 9848 </a> 9849 is "true", then the following requirements must be met by the 9850 VOICE_RECOGNITION and UNPROCESSED audio sources: 9851 <ul> 9852 <li> 9853 The microphone's mean power response in the 18.5 kHz to 20 kHz band 9854 MUST be no more than 15 dB below the response at 2 kHz. 9855 </li> 9856 <li> 9857 The microphone's unweighted signal to noise ratio over 18.5 kHz to 20 kHz 9858 for a 19 kHz tone at -26 dBFS MUST be no lower than 50 dB. 9859 </li> 9860 </ul> 9861 </li> 9862 <li> 9863 If 9864 <a href="http://developer.android.com/reference/android/media/AudioManager.html#PROPERTY_SUPPORT_SPEAKER_NEAR_ULTRASOUND"> 9865 PROPERTY_SUPPORT_SPEAKER_NEAR_ULTRASOUND 9866 </a> 9867 is "true", then the speaker's mean response in 18.5 kHz - 20 kHz MUST be no 9868 lower than 40 dB below the response at 2 kHz. 9869 </li> 9870 </ul> 9871 <h3 id="7_9_virtual_reality"> 9872 7.9. Virtual Reality 9873 </h3> 9874 <p> 9875 Android includes APIs and facilities to build "Virtual Reality" (VR) applications including high 9876 quality mobile VR experiences. Device implementations MUST properly implement these APIs and 9877 behaviors, as detailed in this section. 9878 </p> 9879 <h4 id="7_9_1_virtual_reality_mode"> 9880 7.9.1. Virtual Reality Mode 9881 </h4> 9882 <p> 9883 Android handheld device implementations that support a mode for VR applications that handles 9884 stereoscopic rendering of notifications and disable monocular system UI components while a VR 9885 application has user focus MUST declare 9886 <code> 9887 android.software.vr.mode 9888 </code> 9889 feature. Devices declaring this 9890 feature MUST include an application implementing 9891 <code> 9892 android.service.vr.VrListenerService 9893 </code> 9894 that can be 9895 enabled by VR applications via 9896 <code> 9897 android.app.Activity#setVrModeEnabled 9898 </code> 9899 . 9900 </p> 9901 <h4 id="7_9_2_virtual_reality_high_performance"> 9902 7.9.2. Virtual Reality High Performance 9903 </h4> 9904 <p> 9905 Android handheld device implementations MUST identify the support of high performance virtual 9906 reality for longer user periods through the 9907 <code> 9908 android.hardware.vr.high_performance 9909 </code> 9910 feature flag and 9911 meet the following requirements. 9912 </p> 9913 <ul> 9914 <li> 9915 Device implementations MUST have at least 2 physical cores. 9916 </li> 9917 <li> 9918 Device implementations MUST declare android.software.vr.mode feature. 9919 </li> 9920 <li> 9921 Device implementations MAY provide an exclusive core to the foreground 9922 application and MAY support the Process.getExclusiveCores API to return 9923 the numbers of the cpu cores that are exclusive to the top foreground 9924 application. If exclusive core is supported then the core MUST not allow 9925 any other userspace processes to run on it (except device drivers used 9926 by the application), but MAY allow some kernel processes to run as 9927 necessary. 9928 </li> 9929 <li> 9930 Device implementations MUST support sustained performance mode. 9931 </li> 9932 <li> 9933 Device implementations MUST support OpenGL ES 3.2. 9934 </li> 9935 <li> 9936 Device implementations MUST support Vulkan Hardware Level 0 and SHOULD support 9937 Vulkan Hardware Level 1. 9938 </li> 9939 <li> 9940 Device implementations MUST implement EGL_KHR_mutable_render_buffer and 9941 EGL_ANDROID_front_buffer_auto_refresh, EGL_ANDROID_create_native_client_buffer, 9942 EGL_KHR_fence_sync and EGL_KHR_wait_sync so that they may be used for Shared Buffer Mode, and 9943 expose the extensions in the list of available EGL extensions. 9944 </li> 9945 <li> 9946 The GPU and display MUST be able to synchronize access to the shared front buffer such that 9947 alternating-eye rendering of VR content at 60fps with two render contexts will be displayed with 9948 no visible tearing artifacts. 9949 </li> 9950 <li> 9951 Device implementations MUST implement EGL_IMG_context_priority, and expose the extension in the 9952 list of available EGL extensions. 9953 </li> 9954 <li> 9955 Device implementations MUST implement GL_EXT_multisampled_render_to_texture, GL_OVR_multiview, 9956 GL_OVR_multiview2 and GL_OVR_multiview_multisampled_render_to_texture, and expose the extensions 9957 in the list of available GL extensions. 9958 </li> 9959 <li> 9960 Device implementations MUST implement EGL_EXT_protected_content and GL_EXT_protected_textures so 9961 that it may be used for Secure Texture Video Playback, and expose the extensions in the list of 9962 available EGL and GL extensions. 9963 </li> 9964 <li> 9965 Device implementations MUST support H.264 decoding at least 3840x2160@30fps-40Mbps (equivalent 9966 to 4 instances of 1920x1080@30fps-10Mbps or 2 instances of 1920x1080@60fps-20Mbps). 9967 </li> 9968 <li> 9969 Device implementations MUST support HEVC and VP9, MUST be capable to decode at least 9970 1920x1080@30fps-10Mbps and SHOULD be capable to decode 3840x2160@30fps-20Mbps (equivalent to 9971 4 instances of 1920x1080@30fps-5Mbps). 9972 </li> 9973 <li> 9974 The device implementations are STRONGLY RECOMMENDED to support 9975 android.hardware.sensor.hifi_sensors feature and MUST meet the gyroscope, accelerometer, and 9976 magnetometer related requirements for android.hardware.hifi_sensors. 9977 </li> 9978 <li> 9979 Device implementations MUST support HardwarePropertiesManager.getDeviceTemperatures API and 9980 return accurate values for skin temperature. 9981 </li> 9982 <li> 9983 The device implementation MUST have an embedded screen, and its resolution MUST be at least be 9984 FullHD(1080p) and STRONGLY RECOMMENDED TO BE be QuadHD (1440p) or higher. 9985 </li> 9986 <li> 9987 The display MUST measure between 4.7" and 6" diagonal. 9988 </li> 9989 <li> 9990 The display MUST update at least 60 Hz while in VR Mode. 9991 </li> 9992 <li> 9993 The display latency on Gray-to-Gray, White-to-Black, and Black-to-White switching time MUST 9994 be ≤ 3 ms. 9995 </li> 9996 <li> 9997 The display MUST support a low-persistence mode with ≤5 ms persistence,persistence being 9998 defined as the amount of time for which a pixel is emitting light. 9999 </li> 10000 <li> 10001 Device implementations MUST support Bluetooth 4.2 and Bluetooth LE Data Length Extension 10002 <a href="#7_4_3_bluetooth"> 10003 section 7.4.3 10004 </a>. 10005 </li> 10006 </ul> 10007 <h2 id="8_performance_and_power"> 10008 8. Performance and Power 10009 </h2> 10010 <p> 10011 Some minimum performance and power criteria are critical to the user experience 10012 and impact the baseline assumptions developers would have when developing an 10013 app. Android Watch devices SHOULD and other type of device implementations MUST 10014 meet the following criteria. 10015 </p> 10016 <h3 id="8_1_user_experience_consistency"> 10017 8.1. User Experience Consistency 10018 </h3> 10019 <p> 10020 Device implementations MUST provide a smooth user interface by ensuring a 10021 consistent frame rate and response times for applications and games. Device 10022 implementations MUST meet the following requirements: 10023 </p> 10024 <ul> 10025 <li> 10026 <strong> 10027 Consistent frame latency 10028 </strong> 10029 . Inconsistent frame latency or a delay to 10030 render frames MUST NOT happen more often than 5 frames in a second, and SHOULD 10031 be below 1 frames in a second. 10032 </li> 10033 <li> 10034 <strong> 10035 User interface latency 10036 </strong> 10037 . Device implementations MUST ensure low latency 10038 user experience by scrolling a list of 10K list entries as defined by the 10039 Android Compatibility Test Suite (CTS) in less than 36 secs. 10040 </li> 10041 <li> 10042 <strong> 10043 Task switching 10044 </strong> 10045 . When multiple applications have been launched, 10046 re-launching an already-running application after it has been launched MUST 10047 take less than 1 second. 10048 </li> 10049 </ul> 10050 <h3 id="8_2_file_i/o_access_performance"> 10051 8.2. File I/O Access Performance 10052 </h3> 10053 <p> 10054 Device implementations MUST ensure internal storage file access performance 10055 consistency for read and write operations. 10056 </p> 10057 <ul> 10058 <li> 10059 <strong> 10060 Sequential write 10061 </strong> 10062 . Device implementations MUST ensure a sequential write 10063 performance of at least 5MB/s for a 256MB file using 10MB write buffer. 10064 </li> 10065 <li> 10066 <strong> 10067 Random write 10068 </strong> 10069 . Device implementations MUST ensure a random write 10070 performance of at least 0.5MB/s for a 256MB file using 4KB write buffer. 10071 </li> 10072 <li> 10073 <strong> 10074 Sequential read 10075 </strong> 10076 . Device implementations MUST ensure a sequential read 10077 performance of at least 15MB/s for a 256MB file using 10MB write buffer. 10078 </li> 10079 <li> 10080 <strong> 10081 Random read 10082 </strong> 10083 . Device implementations MUST ensure a random read 10084 performance of at least 3.5MB/s for a 256MB file using 4KB write buffer. 10085 </li> 10086 </ul> 10087 <h3 id="8_3_power-saving_modes"> 10088 8.3. Power-Saving Modes 10089 </h3> 10090 <p> 10091 Android 6.0 introduced App Standby and Doze power-saving modes to optimize 10092 battery usage. All Apps exempted from these modes MUST be made visible to the 10093 end user. Further, the triggering, maintenance, wakeup algorithms and the use of 10094 global system settings of these power-saving modes MUST not deviate from the 10095 Android Open Source Project. 10096 </p> 10097 <p> 10098 In addition to the power-saving modes, Android device implementations MAY 10099 implement any or all of the 4 sleeping power states as defined by the Advanced 10100 Configuration and Power Interface (ACPI), but if it implements S3 and S4 10101 power states, it can only enter these states when closing a lid that is 10102 physically part of the device. 10103 </p> 10104 <h3 id="8_4_power_consumption_accounting"> 10105 8.4. Power Consumption Accounting 10106 </h3> 10107 <p> 10108 A more accurate accounting and reporting of the power consumption provides the 10109 app developer both the incentives and the tools to optimize the power usage 10110 pattern of the application. Therefore, device implementations: 10111 </p> 10112 <ul> 10113 <li> 10114 MUST be able to track hardware component power usage and attribute that 10115 power usage to specific applications. Specifically, implementations: 10116 <ul> 10117 <li> 10118 MUST provide a per-component power profile that defines the 10119 <a href="http://source.android.com/devices/tech/power/values.html"> 10120 current consumption value 10121 </a> 10122 for each hardware component and the approximate battery drain caused by the 10123 components over time as documented in the Android Open Source Project site. 10124 </li> 10125 <li> 10126 MUST report all power consumption values in milliampere hours (mAh). 10127 </li> 10128 <li> 10129 SHOULD be attributed to the hardware component itself if unable to 10130 attribute hardware component power usage to an application. 10131 </li> 10132 <li> 10133 MUST report CPU power consumption per each process's UID. The Android 10134 Open Source Project meets the requirement through the 10135 <code> 10136 uid_cputime 10137 </code> 10138 kernel 10139 module implementation. 10140 </li> 10141 </ul> 10142 </li> 10143 <li> 10144 MUST make this power usage available via the 10145 <a href="http://source.android.com/devices/tech/power/batterystats.html"> 10146 <code> 10147 adb shell dumpsys batterystats 10148 </code> 10149 </a> 10150 shell command to the app developer. 10151 </li> 10152 <li> 10153 MUST honor the 10154 <a href="http://developer.android.com/reference/android/content/Intent.html#ACTION_POWER_USAGE_SUMMARY"> 10155 android.intent.action.POWER_USAGE_SUMMARY 10156 </a> 10157 intent and display a settings menu that shows this power usage. 10158 </li> 10159 </ul> 10160 <h3 id="8_5_consistent_performance"> 10161 8.5. Consistent Performance 10162 </h3> 10163 <p> 10164 Performance can fluctuate dramatically for high-performance long-running apps, 10165 either because of the other apps running in the background or the CPU throttling 10166 due to temperature limits. Android includes programmatic interfaces so that when 10167 the device is capable, the top foreground application can request that the system 10168 optimize the allocation of the resources to address such fluctuations. 10169 </p> 10170 <p> 10171 Device implementations SHOULD support Sustained Performance Mode which can 10172 provide the top foreground application a consistent level of performance for a 10173 prolonged amount of time when requested through the 10174 <a href="https://developer.android.com/reference/android/view/Window.html#setSustainedPerformanceMode%28boolean%29"> 10175 <code> 10176 Window.setSustainedPerformanceMode() 10177 </code> 10178 </a> 10179 API method. A Device implementation MUST report the support of Sustained 10180 Performance Mode accurately through the 10181 <a href="https://developer.android.com/reference/android/os/PowerManager.html#isSustainedPerformanceModeSupported%28%29"> 10182 <code> 10183 PowerManager.isSustainedPerformanceModeSupported() 10184 </code> 10185 </a> 10186 API method. 10187 </p> 10188 <p> 10189 Device implementations with two or more CPU cores SHOULD provide at least one exclusive core that 10190 can be reserved by the top foreground application. If provided, implementations MUST meet the 10191 following requirements: 10192 </p> 10193 <ul> 10194 <li> 10195 Implementations MUST report through the 10196 <a href="https://developer.android.com/reference/android/os/Process.html#getExclusiveCores%28%29"> 10197 <code> 10198 Process.getExclusiveCores() 10199 </code> 10200 </a> 10201 API method the id numbers of the exclusive cores that can be reserved by the top foreground 10202 application. 10203 </li> 10204 <li> 10205 Device implementations MUST not allow any user space processes except the device drivers used 10206 by the application to run on the exclusive cores, but MAY allow some kernel processes to run 10207 as necessary. 10208 </li> 10209 </ul> 10210 <p> 10211 If a device implementation does not support an exclusive core, it MUST return an 10212 empty list through the 10213 <a href="https://developer.android.com/reference/android/os/Process.html#getExclusiveCores%28%29"> 10214 <code> 10215 Process.getExclusiveCores() 10216 </code> 10217 </a> 10218 API method. 10219 </p> 10220 <h2 id="9_security_model_compatibility"> 10221 9. Security Model Compatibility 10222 </h2> 10223 <p> 10224 Device implementations MUST implement a security model consistent with the 10225 Android platform security model as defined in 10226 <a href="http://developer.android.com/guide/topics/security/permissions.html"> 10227 Security and Permissions reference document 10228 </a> 10229 in the APIs in the Android developer documentation. Device implementations MUST 10230 support installation of self-signed applications without requiring any 10231 additional permissions/certificates from any third parties/authorities. 10232 Specifically, compatible devices MUST support the security mechanisms described 10233 in the follow subsections. 10234 </p> 10235 <h3 id="9_1_permissions"> 10236 9.1. Permissions 10237 </h3> 10238 <p> 10239 Device implementations MUST support the 10240 <a href="http://developer.android.com/guide/topics/security/permissions.html"> 10241 Android permissions model 10242 </a> 10243 as 10244 defined in the Android developer documentation. Specifically, implementations 10245 MUST enforce each permission defined as described in the SDK documentation; no 10246 permissions may be omitted, altered, or ignored. Implementations MAY add 10247 additional permissions, provided the new permission ID strings are not in the 10248 android.* namespace. 10249 </p> 10250 <p> 10251 Permissions with a 10252 <code> 10253 protectionLevel 10254 </code> 10255 of 10256 <a href="https://developer.android.com/reference/android/content/pm/PermissionInfo.html#PROTECTION_FLAG_PRIVILEGED"> 10257 'PROTECTION_FLAG_PRIVILEGED' 10258 </a> 10259 MUST only be granted to apps preloaded in the whitelisted privileged path(s) 10260 of the system image, such as the 10261 <code> 10262 system/priv-app 10263 </code> 10264 path in the AOSP 10265 implementation. 10266 </p> 10267 <p> 10268 Permissions with a protection level of dangerous are runtime permissions. 10269 Applications with targetSdkVersion > 22 request them at runtime. Device 10270 implementations: 10271 </p> 10272 <ul> 10273 <li> 10274 MUST show a dedicated interface for the user to decide whether to grant the 10275 requested runtime permissions and also provide an interface for the user to 10276 manage runtime permissions. 10277 </li> 10278 <li> 10279 MUST have one and only one implementation of both user interfaces. 10280 </li> 10281 <li> 10282 MUST NOT grant any runtime permissions to preinstalled apps unless: 10283 <ul> 10284 <li> 10285 the user's consent can be obtained before the application uses it 10286 </li> 10287 <li> 10288 the runtime permissions are associated with an intent pattern for which 10289 the preinstalled application is set as the default handler 10290 </li> 10291 </ul> 10292 </li> 10293 </ul> 10294 <h3 id="9_2_uid_and_process_isolation"> 10295 9.2. UID and Process Isolation 10296 </h3> 10297 <p> 10298 Device implementations MUST support the Android application sandbox model, in 10299 which each application runs as a unique Unixstyle UID and in a separate 10300 process. Device implementations MUST support running multiple applications as 10301 the same Linux user ID, provided that the applications are properly signed and 10302 constructed, as defined in the 10303 <a href="http://developer.android.com/guide/topics/security/permissions.html"> 10304 Security and Permissions reference 10305 </a>. 10306 </p> 10307 <h3 id="9_3_filesystem_permissions"> 10308 9.3. Filesystem Permissions 10309 </h3> 10310 <p> 10311 Device implementations MUST support the Android file access permissions model 10312 as defined in the 10313 <a href="http://developer.android.com/guide/topics/security/permissions.html"> 10314 Security and Permissions reference 10315 </a>. 10316 </p> 10317 <h3 id="9_4_alternate_execution_environments"> 10318 9.4. Alternate Execution Environments 10319 </h3> 10320 <p> 10321 Device implementations MAY include runtime environments that execute 10322 applications using some other software or technology than the Dalvik Executable 10323 Format or native code. However, such alternate execution environments MUST NOT 10324 compromise the Android security model or the security of installed Android 10325 applications, as described in this section. 10326 </p> 10327 <p> 10328 Alternate runtimes MUST themselves be Android applications, and abide by the 10329 standard Android security model, as described elsewhere in 10330 <a href="#9_security_model_compatibility"> 10331 section 9 10332 </a>. 10333 </p> 10334 <p> 10335 Alternate runtimes MUST NOT be granted access to resources protected by 10336 permissions not requested in the runtime’s AndroidManifest.xml file via the 10337 <uses-permission> mechanism. 10338 </p> 10339 <p> 10340 Alternate runtimes MUST NOT permit applications to make use of features 10341 protected by Android permissions restricted to system applications. 10342 </p> 10343 <p> 10344 Alternate runtimes MUST abide by the Android sandbox model. Specifically, 10345 alternate runtimes: 10346 </p> 10347 <ul> 10348 <li> 10349 SHOULD install apps via the PackageManager into separate Android sandboxes 10350 (Linux user IDs, etc.). 10351 </li> 10352 <li> 10353 MAY provide a single Android sandbox shared by all applications using the 10354 alternate runtime. 10355 </li> 10356 <li> 10357 Installed applications using an alternate runtime MUST NOT reuse the 10358 sandbox of any other app installed on the device, except through the standard 10359 Android mechanisms of shared user ID and signing certificate. 10360 </li> 10361 <li> 10362 MUST NOT launch with, grant, or be granted access to the sandboxes 10363 corresponding to other Android applications. 10364 </li> 10365 <li> 10366 MUST NOT be launched with, be granted, or grant to other applications any 10367 privileges of the superuser (root), or of any other user ID. 10368 </li> 10369 </ul> 10370 <p> 10371 The .apk files of alternate runtimes MAY be included in the system image of a 10372 device implementation, but MUST be signed with a key distinct from the key used 10373 to sign other applications included with the device implementation. 10374 </p> 10375 <p> 10376 When installing applications, alternate runtimes MUST obtain user consent for 10377 the Android permissions used by the application. If an application needs to 10378 make use of a device resource for which there is a corresponding Android 10379 permission (such as Camera, GPS, etc.), the alternate runtime MUST inform the 10380 user that the application will be able to access that resource. If the runtime 10381 environment does not record application capabilities in this manner, the 10382 runtime environment MUST list all permissions held by the runtime itself when 10383 installing any application using that runtime. 10384 </p> 10385 <h3 id="9_5_multi-user_support"> 10386 9.5. Multi-User Support 10387 </h3> 10388 <div class="note"> 10389 This feature is optional for all device types. 10390 </div> 10391 <p> 10392 Android includes 10393 <a href="http://developer.android.com/reference/android/os/UserManager.html"> 10394 support for multiple users 10395 </a> 10396 and 10397 provides support for full user isolation. Device implementations MAY enable 10398 multiple users, but when enabled MUST meet the following requirements related 10399 to 10400 <a href="http://source.android.com/devices/storage/traditional.html"> 10401 multi-user support 10402 </a>: 10403 </p> 10404 <ul> 10405 <li> 10406 Android Automotive device implementations with multi-user support enabled 10407 MUST include a guest account that allows all functions provided by the vehicle 10408 system without requiring a user to log in. 10409 </li> 10410 <li> 10411 Device implementations that do not declare the android.hardware.telephony 10412 feature flag MUST support restricted profiles, a feature that allows device 10413 owners to manage additional users and their capabilities on the device. With 10414 restricted profiles, device owners can quickly set up separate environments for 10415 additional users to work in, with the ability to manage finer-grained 10416 restrictions in the apps that are available in those environments. 10417 </li> 10418 <li> 10419 Conversely device implementations that declare the 10420 android.hardware.telephony feature flag MUST NOT support restricted profiles 10421 but MUST align with the AOSP implementation of controls to enable /disable 10422 other users from accessing the voice calls and SMS. 10423 </li> 10424 <li> 10425 Device implementations MUST, for each user, implement a security model 10426 consistent with the Android platform security model as defined in 10427 <a href="http://developer.android.com/guide/topics/security/permissions.html"> 10428 Security and Permissions reference document 10429 </a> 10430 in the APIs. 10431 </li> 10432 <li> 10433 Each user instance on an Android device MUST have separate and isolated 10434 external storage directories. Device implementations MAY store multiple users' 10435 data on the same volume or filesystem. However, the device implementation MUST 10436 ensure that applications owned by and running on behalf a given user cannot 10437 list, read, or write to data owned by any other user. Note that removable 10438 media, such as SD card slots, can allow one user to access another’s data by 10439 means of a host PC. For this reason, device implementations that use removable 10440 media for the external storage APIs MUST encrypt the contents of the SD card if 10441 multiuser is enabled using a key stored only on non-removable media accessible 10442 only to the system. As this will make the media unreadable by a host PC, device 10443 implementations will be required to switch to MTP or a similar system to 10444 provide host PCs with access to the current user’s data. Accordingly, device 10445 implementations MAY but SHOULD NOT enable multi-user if they use 10446 <a href="http://developer.android.com/reference/android/os/Environment.html"> 10447 removable media 10448 </a> 10449 for 10450 primary external storage. 10451 </li> 10452 </ul> 10453 <h3 id="9_6_premium_sms_warning"> 10454 9.6. Premium SMS Warning 10455 </h3> 10456 <p> 10457 Android includes support for warning users of any outgoing 10458 <a href="http://en.wikipedia.org/wiki/Short_code"> 10459 premium SMS message 10460 </a>. Premium SMS 10461 messages are text messages sent to a service registered with a carrier that may 10462 incur a charge to the user. Device implementations that declare support for 10463 android.hardware.telephony MUST warn users before sending a SMS message to 10464 numbers identified by regular expressions defined in /data/misc/sms/codes.xml 10465 file in the device. The upstream Android Open Source Project provides an 10466 implementation that satisfies this requirement. 10467 </p> 10468 <h3 id="9_7_kernel_security_features"> 10469 9.7. Kernel Security Features 10470 </h3> 10471 <p> 10472 The Android Sandbox includes features that use the Security-Enhanced Linux 10473 (SELinux) mandatory access control (MAC) system, seccomp sandboxing, and other 10474 security features in the Linux kernel. SELinux or any other security features 10475 implemented below the Android framework: 10476 </p> 10477 <ul> 10478 <li> 10479 MUST maintain compatibility with existing applications. 10480 </li> 10481 <li> 10482 MUST NOT have a visible user interface when a security violation is 10483 detected and successfully blocked, but MAY have a visible user interface when 10484 an unblocked security violation occurs resulting in a successful exploit. 10485 </li> 10486 <li> 10487 SHOULD NOT be user or developer configurable. 10488 </li> 10489 </ul> 10490 <p> 10491 If any API for configuration of policy is exposed to an application that can 10492 affect another application (such as a Device Administration API), the API MUST 10493 NOT allow configurations that break compatibility. 10494 </p> 10495 <p> 10496 Devices MUST implement SELinux or, if using a kernel other than Linux, an 10497 equivalent mandatory access control system. Devices MUST also meet the 10498 following requirements, which are satisfied by the reference implementation in 10499 the upstream Android Open Source Project. 10500 </p> 10501 <p> 10502 Device implementations: 10503 </p> 10504 <ul> 10505 <li> 10506 MUST set SELinux to global enforcing mode. 10507 </li> 10508 <li> 10509 MUST configure all domains in enforcing mode. No permissive mode domains 10510 are allowed, including domains specific to a device/vendor. 10511 </li> 10512 <li> 10513 MUST NOT modify, omit, or replace the neverallow rules present within the 10514 system/sepolicy folder provided in the upstream Android Open Source Project 10515 (AOSP) and the policy MUST compile with all neverallow rules present, for both 10516 AOSP SELinux domains as well as device/vendor specific domains. 10517 </li> 10518 <li> 10519 MUST split the media framework into multiple processes so that it 10520 is possible to more narrowly grant access for each process as 10521 <a href="https://source.android.com/devices/media/framework-hardening.html#arch_changes"> 10522 described 10523 </a> 10524 in the Android Open Source Project site. 10525 </li> 10526 </ul> 10527 <p> 10528 Device implementations SHOULD retain the default SELinux policy provided in the 10529 system/sepolicy folder of the upstream Android Open Source Project and only 10530 further add to this policy for their own device-specific configuration. Device 10531 implementations MUST be compatible with the upstream Android Open Source 10532 Project. 10533 </p> 10534 <p> 10535 Devices MUST implement a kernel application sandboxing mechanism which allows 10536 filtering of system calls using a configurable policy from multithreaded 10537 programs. The upstream Android Open Source Project meets this requirement 10538 through enabling the seccomp-BPF with threadgroup synchronization (TSYNC) as 10539 described 10540 <a href="http://source.android.com/devices/tech/config/kernel.html#Seccomp-BPF-TSYNC"> 10541 in the Kernel Configuration section of source.android.com 10542 </a>. 10543 </p> 10544 <h3 id="9_8_privacy"> 10545 9.8. Privacy 10546 </h3> 10547 <p> 10548 If the device implements functionality in the system that captures the contents 10549 displayed on the screen and/or records the audio stream played on the device, 10550 it MUST continuously notify the user whenever this functionality is enabled and 10551 actively capturing/recording. 10552 </p> 10553 <p> 10554 If a device implementation has a mechanism that routes network data traffic 10555 through a proxy server or VPN gateway by default (for example, preloading a VPN 10556 service with android.permission.CONTROL_VPN granted), the device implementation 10557 MUST ask for the user's consent before enabling that mechanism, unless that 10558 VPN is enabled by the Device Policy Controller via the 10559 <a href="https://developer.android.com/reference/android/app/admin/DevicePolicyManager.html#setAlwaysOnVpnPackage(android.content.ComponentName, java.lang.String, boolean)"> 10560 <code> 10561 DevicePolicyManager.setAlwaysOnVpnPackage() 10562 </code> 10563 </a>, in which case the user does not need to provide a separate consent, but MUST 10564 only be notified. 10565 </p> 10566 <p> 10567 Device implementations MUST ship with an empty user-added Certificate Authority 10568 (CA) store, and MUST preinstall the same root certificates for the system-trusted 10569 CA store as 10570 <a href="https://source.android.com/security/overview/app-security.html#certificate-authorities"> 10571 provided 10572 </a> 10573 in the upstream Android Open Source Project. 10574 </p> 10575 <p> 10576 When devices are routed through a VPN, or a user root CA is installed, the 10577 implementation MUST display a warning indicating the network traffic may be 10578 monitored to the user. 10579 </p> 10580 <p> 10581 If a device implementation has a USB port with USB peripheral mode support, it 10582 MUST present a user interface asking for the user's consent before allowing 10583 access to the contents of the shared storage over the USB port. 10584 </p> 10585 <h3 id="9_9_data_storage_encryption"> 10586 9.9. Data Storage Encryption 10587 </h3> 10588 <div class="note"> 10589 Optional for Android device implementations without a secure lock screen. 10590 </div> 10591 <p> 10592 If the device implementation supports a secure lock screen as described in section 9.11.1, 10593 then the device MUST support data storage encryption of the application private data (/data partition), as well as the 10594 application shared storage partition (/sdcard partition) if it is a permanent, 10595 non-removable part of the device. 10596 </p> 10597 <p> 10598 For device implementations supporting data storage encryption and with Advanced 10599 Encryption Standard (AES) crypto performance above 50MiB/sec, the data storage 10600 encryption MUST be enabled by default at the time the user has completed the 10601 out-of-box setup experience. If a device implementation is already launched on 10602 an earlier Android version with encryption disabled by default, such 10603 a device cannot meet the requirement through a system software update and thus 10604 MAY be exempted. 10605 </p> 10606 <p> 10607 Device implementations SHOULD meet the above data storage encryption requirement 10608 via implementing 10609 <a href="https://source.android.com/security/encryption/file-based.html"> 10610 File Based Encryption 10611 </a> 10612 (FBE). 10613 </p> 10614 <h4 id="9_9_1_direct_boot"> 10615 9.9.1. Direct Boot 10616 </h4> 10617 <p> 10618 All devices MUST implement the 10619 <a href="http://developer.android.com/preview/features/direct-boot.html"> 10620 Direct Boot mode 10621 </a> 10622 APIs even 10623 if they do not support Storage Encryption. In particular, the 10624 <a href="https://developer.android.com/reference/android/content/Intent.html#LOCKED_BOOT_COMPLETED"> 10625 LOCKED_BOOT_COMPLETED 10626 </a> 10627 and 10628 <a href="https://developer.android.com/reference/android/content/Intent.html#ACTION_USER_UNLOCKED"> 10629 ACTION_USER_UNLOCKED 10630 </a> 10631 Intents must still be broadcast to signal Direct Boot aware applications that 10632 Device Encrypted (DE) and Credential Encrypted (CE) storage locations are 10633 available for user. 10634 </p> 10635 <h4 id="9_9_2_file_based_encryption"> 10636 9.9.2. File Based Encryption 10637 </h4> 10638 <p> 10639 Device implementations supporting FBE: 10640 </p> 10641 <ul> 10642 <li> 10643 MUST boot up without challenging the user for credentials and allow Direct 10644 Boot aware apps to access to the Device Encrypted (DE) storage after the 10645 LOCKED_BOOT_COMPLETED message is broadcasted. 10646 </li> 10647 <li> 10648 MUST only allow access to Credential Encrypted (CE) storage after the user 10649 has unlocked the device by supplying their credentials (eg. passcode, pin, 10650 pattern or fingerprint) and the ACTION_USER_UNLOCKED message is broadcasted. 10651 Device implementations MUST NOT offer any 10652 method to unlock the CE protected storage without the user supplied 10653 credentials. 10654 </li> 10655 <li> 10656 MUST support Verified Boot and ensure that DE keys are cryptographically 10657 bound to the device's hardware root of trust. 10658 </li> 10659 <li> 10660 MUST support encrypting file contents using AES with a key length of 256-bits 10661 in XTS mode. 10662 </li> 10663 <li> 10664 MUST support encrypting file name using AES with a key length of 256-bits in 10665 CBC-CTS mode. 10666 </li> 10667 <li> 10668 MAY support alternative ciphers, key lengths and modes for file content and 10669 file name encryption, but MUST use the mandatorily supported ciphers, 10670 key lengths and modes by default. 10671 </li> 10672 <li> 10673 SHOULD make preloaded essential apps (e.g. Alarm, Phone, Messenger) 10674 Direct Boot aware. 10675 </li> 10676 </ul> 10677 <p> 10678 The keys protecting CE and DE storage areas: 10679 </p> 10680 <ul> 10681 <li> 10682 MUST be cryptographically bound to a hardware-backed Keystore. CE keys 10683 must be bound to a user's lock screen credentials. If the user has 10684 specified no lock screen credentials then the CE keys MUST be bound to 10685 a default passcode. 10686 </li> 10687 <li> 10688 MUST be unique and distinct, in other words no user's CE or DE key 10689 may match any other user's CE or DE keys. 10690 </li> 10691 </ul> 10692 <p> 10693 The upstream Android Open Source project provides a preferred implementation of 10694 this feature based on the Linux kernel ext4 encryption feature. 10695 </p> 10696 <h4 id="9_9_3_full_disk_encryption"> 10697 9.9.3. Full Disk Encryption 10698 </h4> 10699 <p> 10700 Device implementations supporting 10701 <a href="http://source.android.com/devices/tech/security/encryption/index.html"> 10702 full disk encryption 10703 </a> 10704 (FDE). MUST use AES with a key of 128-bits 10705 (or greater) and a mode designed for storage (for example, AES-XTS, 10706 AES-CBC-ESSIV). The encryption key MUST NOT be written to storage at any time 10707 without being encrypted. The user MUST be provided with the possibility to AES 10708 encrypt the encryption key, except when it is in active use, with the lock 10709 screen credentials stretched using a slow stretching algorithm 10710 (e.g. PBKDF2 or scrypt). If the user has not specified a lock screen 10711 credentials or has disabled use of the passcode for encryption, the system 10712 SHOULD use a default passcode to wrap the encryption key. If the device 10713 provides a hardware-backed keystore, the password stretching algorithm MUST 10714 be cryptographically bound to that keystore. The encryption key MUST NOT be 10715 sent off the device (even when wrapped with the user passcode and/or hardware 10716 bound key). The upstream Android Open Source project provides a preferred 10717 implementation of this feature based on the Linux kernel feature dm-crypt. 10718 </p> 10719 <h3 id="9_10_device_integrity"> 10720 9.10. Device Integrity 10721 </h3> 10722 <p> 10723 The following requirements ensures there is transparancy to the status of the 10724 device integrity. 10725 </p> 10726 <p> 10727 Device implementations MUST correctly report through the System API method 10728 PersistentDataBlockManager.getFlashLockState() whether their bootloader state 10729 permits flashing of the system image. The 10730 <code> 10731 FLASH_LOCK_UNKNOWN 10732 </code> 10733 state is reserved 10734 for device implementations upgrading from an earlier version of Android where this 10735 new system API method did not exist. 10736 </p> 10737 <p> 10738 Verified boot is a feature that guarantees the integrity of the device 10739 software. If a device implementation supports the feature, it MUST: 10740 </p> 10741 <ul> 10742 <li> 10743 Declare the platform feature flag android.software.verified_boot. 10744 </li> 10745 <li> 10746 Perform verification on every boot sequence. 10747 </li> 10748 <li> 10749 Start verification from an immutable hardware key that is the root of trust 10750 and go all the way up to the system partition. 10751 </li> 10752 <li> 10753 Implement each stage of verification to check the integrity and 10754 authenticity of all the bytes in the next stage before executing the code in 10755 the next stage. 10756 </li> 10757 <li> 10758 Use verification algorithms as strong as current recommendations from NIST 10759 for hashing algorithms (SHA-256) and public key sizes (RSA-2048). 10760 </li> 10761 <li> 10762 MUST NOT allow boot to complete when system verification fails, unless the 10763 user consents to attempt booting anyway, in which case the data from any 10764 non-verified storage blocks MUST not be used. 10765 </li> 10766 <li> 10767 MUST NOT allow verified partitions on the device to be modified unless the 10768 user has explicitly unlocked the boot loader. 10769 </li> 10770 </ul> 10771 <p> 10772 The upstream Android Open Source Project provides a preferred implementation of 10773 this feature based on the Linux kernel feature dm-verity. 10774 </p> 10775 <p> 10776 Starting from Android 6.0, device implementations with Advanced Encryption 10777 Standard (AES) crypto performance above 50 MiB/seconds MUST support verified boot 10778 for device integrity. 10779 </p> 10780 <p> 10781 If a device implementation is already launched without supporting verified boot 10782 on an earlier version of Android, such a device can not add support for this feature 10783 with a system software update and thus are exempted from the requirement. 10784 </p> 10785 <h3 id="9_11_keys_and_credentials"> 10786 9.11. Keys and Credentials 10787 </h3> 10788 <p> 10789 The 10790 <a href="https://developer.android.com/training/articles/keystore.html"> 10791 Android Keystore System 10792 </a> 10793 allows 10794 app developers to store cryptographic keys in a container and use them in 10795 cryptographic operations through the 10796 <a href="https://developer.android.com/reference/android/security/KeyChain.html"> 10797 KeyChain API 10798 </a> 10799 or 10800 the 10801 <a href="https://developer.android.com/reference/java/security/KeyStore.html"> 10802 Keystore API 10803 </a>. 10804 </p> 10805 <p> 10806 All Android device implementations MUST meet the following requirements: 10807 </p> 10808 <ul> 10809 <li> 10810 SHOULD not limit the number of keys that can be generated, and MUST at 10811 least allow more than 8,192 keys to be imported. 10812 </li> 10813 <li> 10814 The lock screen authentication MUST rate limit attempts and MUST have an 10815 exponential backoff algorithm. Beyond 150 failed attempts, the delay MUST be 10816 at least 24 hours per attempt. 10817 </li> 10818 <li> 10819 When the device implementation supports a secure lock screen it MUST back up the 10820 keystore implementation with secure hardware and meet following requirements: 10821 <ul> 10822 <li> 10823 MUST have implementations of RSA, AES, ECDSA and HMAC cryptographic 10824 algorithms and MD5, SHA1, and SHA-2 family hash functions to properly 10825 support the Android Keystore system's supported algorithms in an area 10826 that is securely isolated from the code running on the kernel and 10827 above. Secure isolation MUST block all potential mechanisms by which 10828 kernel or userspace code might access the internal state of the 10829 isolated environment, including DMA. The upstream Android Open Source 10830 Project (AOSP) meets this requirement by using the 10831 <a href="https://source.android.com/security/trusty/"> 10832 Trusty 10833 </a> 10834 implementation, but another ARM TrustZone-based solution or a 10835 third-party reviewed secure implementation of a proper 10836 hypervisor-based isolation are alternative options. 10837 </li> 10838 <li> 10839 MUST perform the lock screen authentication in the isolated execution 10840 environment and only when successful, allow the authentication-bound 10841 keys to be used. The upstream Android Open Source Project provides 10842 the 10843 <a href="http://source.android.com/devices/tech/security/authentication/gatekeeper.html"> 10844 Gatekeeper Hardware Abstraction Layer (HAL) 10845 </a> 10846 and Trusty, which can be used to satisfy this requirement. 10847 </li> 10848 </ul> 10849 </li> 10850 </ul> 10851 <p> 10852 Note that if a device implementation is already launched on an earlier Android 10853 version, such a device is exempted from the requirement to have a 10854 hardware-backed keystore, unless it declares the 10855 <code> 10856 android.hardware.fingerprint 10857 </code> 10858 feature which requires a hardware-backed keystore. 10859 </p> 10860 <h4 id="9_11_1_secure_lock_screen"> 10861 9.11.1. Secure Lock Screen 10862 </h4> 10863 <p> 10864 Device implementations MAY add or modify the authentication methods to unlock 10865 the lock screen, but MUST still meet the following requirements: 10866 </p> 10867 <ul> 10868 <li> 10869 The authentication method, if based on a known secret, MUST NOT be treated 10870 as a secure lock screen unless it meets all following requirements: 10871 <ul> 10872 <li> 10873 The entropy of the shortest allowed length of inputs MUST be greater 10874 than 10 bits. 10875 </li> 10876 <li> 10877 The maximum entropy of all possible inputs MUST be greater than 18 bits. 10878 </li> 10879 <li> 10880 MUST not replace any of the existing authentication methods (PIN, 10881 pattern, password) implemented and provided in AOSP. 10882 </li> 10883 <li> 10884 MUST be disabled when the Device Policy Controller (DPC) application 10885 has set the password quality policy via the 10886 <a href="https://developer.android.com/reference/android/app/admin/DevicePolicyManager.html#setPasswordQuality%28android.content.ComponentName,%20int%29"> 10887 <code> 10888 DevicePolicyManager.setPasswordQuality() 10889 </code> 10890 </a> 10891 method with a more restrictive quality constant than 10892 <code> 10893 PASSWORD_QUALITY_SOMETHING 10894 </code> 10895 . 10896 </li> 10897 </ul> 10898 </li> 10899 <li> 10900 The authenticaion method, if based on a physical token or the location, 10901 MUST NOT be treated as a secure lock screen unless it meets all following 10902 requirements: 10903 <ul> 10904 <li> 10905 It MUST have a fall-back mechanism to use one of the primary 10906 authentication methods which is based on a known secret and meets 10907 the requirements to be treated as a secure lock screen. 10908 </li> 10909 <li> 10910 It MUST be disabled and only allow the primary authentication to 10911 unlock the screen when the Device Policy Controller (DPC) application 10912 has set the policy with either the 10913 <a href="http://developer.android.com/reference/android/app/admin/DevicePolicyManager.html#setKeyguardDisabledFeatures%28android.content.ComponentName,%20int%29"> 10914 <code> 10915 DevicePolicyManager.setKeyguardDisabledFeatures(KEYGUARD_DISABLE_TRUST_AGENTS) 10916 </code> 10917 </a> 10918 method or the 10919 <a href="https://developer.android.com/reference/android/app/admin/DevicePolicyManager.html#setPasswordQuality%28android.content.ComponentName,%20int%29"> 10920 <code> 10921 DevicePolicyManager.setPasswordQuality() 10922 </code> 10923 </a> 10924 method with a more restrictive quality constant than 10925 <code> 10926 PASSWORD_QUALITY_UNSPECIFIED 10927 </code> 10928 . 10929 </li> 10930 </ul> 10931 </li> 10932 <li> 10933 The authentication method, if based on biometrics, MUST NOT be treated as a 10934 secure lock screen unless it meets all following requirements: 10935 <ul> 10936 <li> 10937 It MUST have a fall-back mechanism to use one of the primary 10938 authentication methods which is based on a known secret and meets 10939 the requirements to be treated as a secure lock screen. 10940 </li> 10941 <li> 10942 It MUST be disabled and only allow the primary authentication to 10943 unlock the screen when the Device Policy Controller (DPC) application 10944 has set the keguard feature policy by calling the method 10945 <a href="http://developer.android.com/reference/android/app/admin/DevicePolicyManager.html#setKeyguardDisabledFeatures%28android.content.ComponentName,%20int%29"> 10946 <code> 10947 DevicePolicyManager.setKeyguardDisabledFeatures(KEYGUARD_DISABLE_FINGERPRINT) 10948 </code> 10949 </a>. 10950 </li> 10951 <li> 10952 It MUST have a false acceptance rate that is equal or stronger than 10953 what is required for a fingerprint sensor as described in 10954 section 7.3.10, or otherwise MUST be disabled and only allow the 10955 primary authentication to unlock the screen when the Device Policy 10956 Controller (DPC) application has set the password quality policy 10957 via the 10958 <a href="https://developer.android.com/reference/android/app/admin/DevicePolicyManager.html#setPasswordQuality%28android.content.ComponentName,%20int%29"> 10959 <code> 10960 DevicePolicyManager.setPasswordQuality() 10961 </code> 10962 </a> 10963 method with a more restrictive quality constant than 10964 <code> 10965 PASSWORD_QUALITY_BIOMETRIC_WEAK 10966 </code> 10967 . 10968 </li> 10969 </ul> 10970 </li> 10971 <li> 10972 If the authentication method can not be treated as a secure lock screen, 10973 it: 10974 <ul> 10975 <li> 10976 MUST return 10977 <code> 10978 false 10979 </code> 10980 for both the 10981 <a href="http://developer.android.com/reference/android/app/KeyguardManager.html#isKeyguardSecure%28%29"> 10982 <code> 10983 KeyguardManager.isKeyguardSecure() 10984 </code> 10985 </a> 10986 and the 10987 <a href="https://developer.android.com/reference/android/app/KeyguardManager.html#isDeviceSecure%28%29"> 10988 <code> 10989 KeyguardManager.isDeviceSecure() 10990 </code> 10991 </a> 10992 methods. 10993 </li> 10994 <li> 10995 MUST be disabled when the Device Policy Controller (DPC) application 10996 has set the password quality policy via the 10997 <a href="https://developer.android.com/reference/android/app/admin/DevicePolicyManager.html#setPasswordQuality%28android.content.ComponentName,%20int%29"> 10998 <code> 10999 DevicePolicyManager.setPasswordQuality() 11000 </code> 11001 </a> 11002 method with a more restrictive quality constant than 11003 <code> 11004 PASSWORD_QUALITY_UNSPECIFIED 11005 </code> 11006 . 11007 </li> 11008 <li> 11009 MUST NOT reset the password expiration timers set by 11010 <a href="http://developer.android.com/reference/android/app/admin/DevicePolicyManager.html#setPasswordExpirationTimeout%28android.content.ComponentName,%20long%29"> 11011 <code> 11012 DevicePolicyManager.setPasswordExpirationTimeout() 11013 </code> 11014 </a>. 11015 </li> 11016 <li> 11017 MUST NOT authenticate access to keystores if the application has called 11018 <a href="https://developer.android.com/reference/android/security/keystore/KeyGenParameterSpec.Builder.html#setUserAuthenticationRequired%28boolean%29"> 11019 <code> 11020 KeyGenParameterSpec.Builder.setUserAuthenticationRequired(true) 11021 </code> 11022 </a> 11023 ). 11024 </li> 11025 </ul> 11026 </li> 11027 <li> 11028 If the authentication method is based on a physical token, the location, 11029 or biometrics that has higher false acceptance rate than what is required 11030 for fingerprint sensors as described in section 7.3.10, then it: 11031 <ul> 11032 <li> 11033 MUST NOT reset the password expiration timers set by 11034 <a href="http://developer.android.com/reference/android/app/admin/DevicePolicyManager.html#setPasswordExpirationTimeout%28android.content.ComponentName,%20long%29"> 11035 <code> 11036 DevicePolicyManager.setPasswordExpirationTimeout() 11037 </code> 11038 </a>. 11039 </li> 11040 <li> 11041 MUST NOT authenticate access to keystores if the application has called 11042 <a href="https://developer.android.com/reference/android/security/keystore/KeyGenParameterSpec.Builder.html#setUserAuthenticationRequired%28boolean%29"> 11043 <code> 11044 KeyGenParameterSpec.Builder.setUserAuthenticationRequired(true) 11045 </code> 11046 </a>. 11047 </li> 11048 </ul> 11049 </li> 11050 </ul> 11051 <h3 id="9_12_data_deletion"> 11052 9.12. Data Deletion 11053 </h3> 11054 <p> 11055 Devices MUST provide users with a mechanism to perform a "Factory Data Reset" 11056 that allows logical and physical deletion of all data except for the following: 11057 </p> 11058 <ul> 11059 <li> 11060 The system image 11061 </li> 11062 <li> 11063 Any operating system files required by the system image 11064 </li> 11065 </ul> 11066 <p> 11067 All user-generated data MUST be deleted. This MUST satisfy relevant industry 11068 standards for data deletion such as NIST SP800-88. This MUST be used for the 11069 implementation of the wipeData() API (part of the Android Device Administration 11070 API) described in 11071 <a href="#3_9_device_administration"> 11072 section 3.9 Device Administration 11073 </a>. 11074 </p> 11075 <p> 11076 Devices MAY provide a fast data wipe that conducts a logical data erase. 11077 </p> 11078 <h3 id="9_13_safe_boot_mode"> 11079 9.13. Safe Boot Mode 11080 </h3> 11081 <p> 11082 Android provides a mode enabling users to boot up into a mode where only 11083 preinstalled system apps are allowed to run and all third-party apps are 11084 disabled. This mode, known as "Safe Boot Mode", provides the user the 11085 capability to uninstall potentially harmful third-party apps. 11086 </p> 11087 <p> 11088 Android device implementations are STRONGLY RECOMENDED to implement Safe Boot 11089 Mode and meet following requirements: 11090 </p> 11091 <ul> 11092 <li> 11093 <p> 11094 Device implementations SHOULD provide the user an option to enter Safe Boot 11095 Mode from the boot menu which is reachable through a workflow that is different 11096 from that of normal boot. 11097 </p> 11098 </li> 11099 <li> 11100 <p> 11101 Device implementations MUST provide the user an option to enter Safe Boot Mode 11102 in such a way that is uninterruptible from third-party apps installed on 11103 the device, except for when the third party app is a Device Policy Controller 11104 and has set the 11105 <a href="https://developer.android.com/reference/android/os/UserManager.html#DISALLOW_SAFE_BOOT"> 11106 <code> 11107 UserManager.DISALLOW_SAFE_BOOT 11108 </code> 11109 </a> 11110 flag as true. 11111 </p> 11112 </li> 11113 <li> 11114 <p> 11115 Device implementations MUST provide the user the capability to uninstall 11116 any third-party apps within Safe Mode. 11117 </p> 11118 </li> 11119 </ul> 11120 <h3 id="9_14_automotive_vehicle_system_isolation"> 11121 9.14. Automotive Vehicle System Isolation 11122 </h3> 11123 <p> 11124 Android Automotive devices are expected to exchange data with critical vehicle 11125 subsystems, e.g., by using the 11126 <a href="http://source.android.com/devices/automotive.html"> 11127 vehicle HAL 11128 </a> 11129 to send and receive messages over vehicle networks such as CAN bus. Android 11130 Automotive device implementations MUST implement security features below the 11131 Android framework layers to prevent malicious or unintentional interaction 11132 between the Android framework or third-party apps and vehicle subsystems. These 11133 security features are as follows: 11134 </p> 11135 <ul> 11136 <li> 11137 Gatekeeping messages from Android framework vehicle subsystems, e.g., 11138 whitelisting permitted message types and message sources. 11139 </li> 11140 <li> 11141 Watchdog against denial of service attacks from the Android framework or 11142 third-party apps. This guards against malicious software flooding the vehicle 11143 network with traffic, which may lead to malfunctioning vehicle subsystems. 11144 </li> 11145 </ul> 11146 <h2 id="10_software_compatibility_testing"> 11147 10. Software Compatibility Testing 11148 </h2> 11149 <p> 11150 Device implementations MUST pass all tests described in this section. 11151 </p> 11152 <p> 11153 However, note that no software test package is fully comprehensive. For this 11154 reason, device implementers are 11155 <strong> 11156 STRONGLY RECOMMENDED 11157 </strong> 11158 to make the minimum 11159 number of changes as possible to the reference and preferred implementation of 11160 Android available from the Android Open Source Project. This will minimize the 11161 risk of introducing bugs that create incompatibilities requiring rework and 11162 potential device updates. 11163 </p> 11164 <h3 id="10_1_compatibility_test_suite"> 11165 10.1. Compatibility Test Suite 11166 </h3> 11167 <p> 11168 Device implementations MUST pass the 11169 <a href="http://source.android.com/compatibility/index.html"> 11170 Android Compatibility Test Suite (CTS) 11171 </a> 11172 available from the Android Open Source Project, using the final shipping 11173 software on the device. Additionally, device implementers SHOULD use the 11174 reference implementation in the Android Open Source tree as much as possible, 11175 and MUST ensure compatibility in cases of ambiguity in CTS and for any 11176 reimplementations of parts of the reference source code. 11177 </p> 11178 <p> 11179 The CTS is designed to be run on an actual device. Like any software, the CTS 11180 may itself contain bugs. The CTS will be versioned independently of this 11181 Compatibility Definition, and multiple revisions of the CTS may be released for 11182 Android 7.1. Device implementations MUST pass the latest CTS 11183 version available at the time the device software is completed. 11184 </p> 11185 <h3 id="10_2_cts_verifier"> 11186 10.2. CTS Verifier 11187 </h3> 11188 <p> 11189 Device implementations MUST correctly execute all applicable cases in the CTS 11190 Verifier. The CTS Verifier is included with the Compatibility Test Suite, and 11191 is intended to be run by a human operator to test functionality that cannot be 11192 tested by an automated system, such as correct functioning of a camera and 11193 sensors. 11194 </p> 11195 <p> 11196 The CTS Verifier has tests for many kinds of hardware, including some hardware 11197 that is optional. Device implementations MUST pass all tests for hardware that 11198 they possess; for instance, if a device possesses an accelerometer, it MUST 11199 correctly execute the Accelerometer test case in the CTS Verifier. Test cases 11200 for features noted as optional by this Compatibility Definition Document MAY be 11201 skipped or omitted. 11202 </p> 11203 <p> 11204 Every device and every build MUST correctly run the CTS Verifier, as noted 11205 above. However, since many builds are very similar, device implementers are not 11206 expected to explicitly run the CTS Verifier on builds that differ only in 11207 trivial ways. Specifically, device implementations that differ from an 11208 implementation that has passed the CTS Verifier only by the set of included 11209 locales, branding, etc. MAY omit the CTS Verifier test. 11210 </p> 11211 <h2 id="11_updatable_software"> 11212 11. Updatable Software 11213 </h2> 11214 <p> 11215 Device implementations MUST include a mechanism to replace the entirety of the 11216 system software. The mechanism need not perform “live” upgrades—that is, a 11217 device restart MAY be required. 11218 </p> 11219 <p> 11220 Any method can be used, provided that it can replace the entirety of the 11221 software preinstalled on the device. For instance, any of the following 11222 approaches will satisfy this requirement: 11223 </p> 11224 <ul> 11225 <li> 11226 “Over-the-air (OTA)” downloads with offline update via reboot. 11227 </li> 11228 <li> 11229 “Tethered” updates over USB from a host PC. 11230 </li> 11231 <li> 11232 “Offline” updates via a reboot and update from a file on removable storage. 11233 </li> 11234 </ul> 11235 <p> 11236 However, if the device implementation includes support for an unmetered data 11237 connection such as 802.11 or Bluetooth PAN (Personal Area Network) profile, it 11238 MUST support OTA downloads with offline update via reboot. 11239 </p> 11240 <p> 11241 The update mechanism used MUST support updates without wiping user data. That 11242 is, the update mechanism MUST preserve application private data and application 11243 shared data. Note that the upstream Android software includes an update 11244 mechanism that satisfies this requirement. 11245 </p> 11246 <p> 11247 For device implementations that are launching with Android 6.0 and 11248 later, the update mechanism SHOULD support verifying that the system image is 11249 binary identical to expected result following an OTA. The block-based OTA 11250 implementation in the upstream Android Open Source Project, added since Android 11251 5.1, satisfies this requirement. 11252 </p> 11253 <p> 11254 Also, device implementations SHOULD support 11255 <a href="https://source.android.com/devices/tech/ota/ab_updates.html"> 11256 A/B system updates 11257 </a>. 11258 The AOSP implements this feature using the boot control HAL. 11259 </p> 11260 <p> 11261 If an error is found in a device implementation after it has been released but 11262 within its reasonable product lifetime that is determined in consultation with 11263 the Android Compatibility Team to affect the compatibility of third-party 11264 applications, the device implementer MUST correct the error via a software 11265 update available that can be applied per the mechanism just described. 11266 </p> 11267 <p> 11268 Android includes features that allow the Device Owner app (if present) to 11269 control the installation of system updates. To facilitate this, the system 11270 update subsystem for devices that report android.software.device_admin MUST 11271 implement the behavior described in the 11272 <a href="http://developer.android.com/reference/android/app/admin/SystemUpdatePolicy.html"> 11273 SystemUpdatePolicy 11274 </a> 11275 class. 11276 </p> 11277 <h2 id="12_document_changelog"> 11278 12. Document Changelog 11279 </h2> 11280 <p> 11281 For a summary of changes to the Compatibility Definition in this release: 11282 </p> 11283 <ul> 11284 <li> 11285 <a href="https://android.googlesource.com/platform/compatibility/cdd/+log/nougat-mr1-dev/?pretty=full&no-merges"> 11286 Document changelog 11287 </a> 11288 </li> 11289 </ul> 11290 <p> 11291 For a summary of changes to individuals sections: 11292 </p> 11293 <ol> 11294 <li> 11295 <a href="https://android.googlesource.com/platform/compatibility/cdd/+log/nougat-mr1-dev/1_introduction?pretty=full&no-merges"> 11296 Introduction 11297 </a> 11298 </li> 11299 <li> 11300 <a href="https://android.googlesource.com/platform/compatibility/cdd/+log/nougat-mr1-dev/2_device_types?pretty=full&no-merges"> 11301 Device Types 11302 </a> 11303 </li> 11304 <li> 11305 <a href="https://android.googlesource.com/platform/compatibility/cdd/+log/nougat-mr1-dev/3_software?pretty=full&no-merges"> 11306 Software 11307 </a> 11308 </li> 11309 <li> 11310 <a href="https://android.googlesource.com/platform/compatibility/cdd/+log/nougat-mr1-dev/4_application-packaging?pretty=full&no-merges"> 11311 Application Packaging 11312 </a> 11313 </li> 11314 <li> 11315 <a href="https://android.googlesource.com/platform/compatibility/cdd/+log/nougat-mr1-dev/5_multimedia?pretty=full&no-merges"> 11316 Multimedia 11317 </a> 11318 </li> 11319 <li> 11320 <a href="https://android.googlesource.com/platform/compatibility/cdd/+log/nougat-mr1-dev/6_dev-tools-and-options?pretty=full&no-merges"> 11321 Developer Tools and Options 11322 </a> 11323 </li> 11324 <li> 11325 <a href="https://android.googlesource.com/platform/compatibility/cdd/+log/nougat-mr1-dev/7_hardware-compatibility?pretty=full&no-merges"> 11326 Hardware Compatibility 11327 </a> 11328 </li> 11329 <li> 11330 <a href="https://android.googlesource.com/platform/compatibility/cdd/+log/nougat-mr1-dev/8_performance-and-power?pretty=full&no-merges"> 11331 Performance and Power 11332 </a> 11333 </li> 11334 <li> 11335 <a href="https://android.googlesource.com/platform/compatibility/cdd/+log/nougat-mr1-dev/9_security-model?pretty=full&no-merges"> 11336 Security Model 11337 </a> 11338 </li> 11339 <li> 11340 <a href="https://android.googlesource.com/platform/compatibility/cdd/+log/nougat-mr1-dev/10_software-compatibility-testing?pretty=full&no-merges"> 11341 Software Compatibility Testing 11342 </a> 11343 </li> 11344 <li> 11345 <a href="https://android.googlesource.com/platform/compatibility/cdd/+log/nougat-mr1-dev/11_updatable-software?pretty=full&no-merges"> 11346 Updatable Software 11347 </a> 11348 </li> 11349 <li> 11350 <a href="https://android.googlesource.com/platform/compatibility/cdd/+log/nougat-mr1-dev/12_document-changelog?pretty=full&no-merges"> 11351 Document Changelog 11352 </a> 11353 </li> 11354 <li> 11355 <a href="https://android.googlesource.com/platform/compatibility/cdd/+log/nougat-mr1-dev/13_contact-us?pretty=full&no-merges"> 11356 Contact Us 11357 </a> 11358 </li> 11359 </ol> 11360 <h3 id="12_1_changelog_viewing_tips"> 11361 12.1. Changelog Viewing Tips 11362 </h3> 11363 <p> 11364 Changes are marked as follows: 11365 </p> 11366 <ul> 11367 <li> 11368 <p> 11369 <strong> 11370 CDD 11371 </strong> 11372 <br/> 11373 Substantive changes to the compatibility requirements. 11374 </p> 11375 </li> 11376 <li> 11377 <p> 11378 <strong> 11379 Docs 11380 </strong> 11381 <br/> 11382 Cosmetic or build related changes. 11383 </p> 11384 </li> 11385 </ul> 11386 <p> 11387 For best viewing, append the 11388 <code> 11389 pretty=full 11390 </code> 11391 and 11392 <code> 11393 no-merges 11394 </code> 11395 URL parameters to your 11396 changelog URLs. 11397 </p> 11398 <h2 id="13_contact_us"> 11399 13. Contact Us 11400 </h2> 11401 <p> 11402 You can join the 11403 <a href="https://groups.google.com/forum/#!forum/android-compatibility"> 11404 android-compatibility forum 11405 </a> 11406 and ask for clarifications or bring up any issues that you think the document does not 11407 cover. 11408 </p> 11409 </body> 11410 </body> 11411 </html> 11412