Home | History | Annotate | Download | only in 4.4
      1 <html devsite>
      2 <head>
      3 <title>Android 4.4 Compatibility Definition</title>
      4 <link rel="stylesheet" type="text/css" href="cdd.css"/>
      5 </head>
      6 <body>
      7 <!--
      8 <span style="color: red; font-weight: bold;"><h2>Revision 1</h2></span><br/>
      9 <span style="color: red;">Last updated: July 23, 2013</span>
     10 -->
     11 <p><b><font color="red">Revision 1</font></b><br/>
     12 Last updated: November 27, 2013
     13 </p>
     14 <p>Copyright &copy; 2013, Google Inc. All rights reserved.<br/>
     15 <a href="mailto:compatibility (a] android.com">compatibility (a] android.com</a>
     16 </p>
     17 
     18 <h2>Table of Contents</h2>
     19 <div style="margin-left: 2em;">
     20   <a href="#section-1">1. Introduction</a><br/>
     21   <a href="#section-2">2. Resources</a><br/>
     22   <a href="#section-3">3. Software</a><br/>
     23   <div style="margin-left: 2em;">
     24     <a href="#section-3.1">3.1. Managed API Compatibility</a><br/>
     25     <a href="#section-3.2">3.2. Soft API Compatibility</a><br/>
     26     <div style="margin-left: 2em;">
     27       <a href="#section-3.2.1">3.2.1. Permissions</a><br/>
     28       <a href="#section-3.2.2">3.2.2. Build Parameters</a><br/>
     29       <a href="#section-3.2.3">3.2.3. Intent Compatibility</a><br/>
     30       <div style="margin-left: 2em;">
     31         <a href="#section-3.2.3.1">3.2.3.1. Core Application Intents</a><br/>
     32         <a href="#section-3.2.3.2">3.2.3.2. Intent Overrides</a><br/>
     33         <a href="#section-3.2.3.3">3.2.3.3. Intent Namespaces</a><br/>
     34         <a href="#section-3.2.3.4">3.2.3.4. Broadcast Intents</a><br/>
     35         <a href="#section-3.2.3.5">3.2.3.5. Default App Settings</a><br/>
     36       </div>
     37     </div>
     38     <a href="#section-3.3">3.3. Native API Compatibility</a><br/>
     39     <div style="margin-left: 2em;">
     40       <a href="#section-3.3.1">3.3.1 Application Binary Interfaces</a><br/>
     41     </div>
     42     <a href="#section-3.4">3.4. Web Compatibility</a><br/>
     43     <div style="margin-left: 2em;">
     44       <a href="#section-3.4.1">3.4.1. WebView Compatibility</a><br/>
     45       <a href="#section-3.4.2">3.4.2. Browser Compatibility</a><br/>
     46     </div>
     47     <a href="#section-3.5">3.5. API Behavioral Compatibility</a><br/>
     48     <a href="#section-3.6">3.6. API Namespaces</a><br/>
     49     <a href="#section-3.7">3.7. Virtual Machine Compatibility</a><br/>
     50     <a href="#section-3.8">3.8. User Interface Compatibility</a><br/>
     51     <div style="margin-left: 2em;">
     52       <a href="#section-3.8.1">3.8.1. Launcher (Home Screen)</a><br/>
     53       <a href="#section-3.8.2">3.8.2. Widgets</a><br/>
     54       <a href="#section-3.8.3">3.8.3. Notifications</a><br/>
     55       <a href="#section-3.8.4">3.8.4. Search</a><br/>
     56       <a href="#section-3.8.5">3.8.5. Toasts</a><br/>
     57       <a href="#section-3.8.6">3.8.6. Themes</a><br/>
     58       <a href="#section-3.8.7">3.8.7. Live Wallpapers</a><br/>
     59       <a href="#section-3.8.8">3.8.8. Recent Application Display</a><br/>
     60       <a href="#section-3.8.9">3.8.9. Input Management</a><br/>
     61       <a href="#section-3.8.10">3.8.10. Lock Screen Media Remote Control</a><br/>
     62       <a href="#section-3.8.11">3.8.11. Dreams</a><br/>
     63       <a href="#section-3.8.12">3.8.12. Location</a><br/>
     64       <a href="#section-3.8.13">3.8.13. Unicode</a><br/>
     65     </div>
     66     <a href="#section-3.9">3.9 Device Administration</a><br/>
     67     <a href="#section-3.10">3.10 Accessibility</a><br/>
     68     <a href="#section-3.11">3.11 Text-to-Speech</a><br/>
     69   </div>
     70   <a href="#section-4">4. Application Packaging Compatibility</a><br/>
     71   <a href="#section-5">5. Multimedia Compatibility</a><br/>
     72     <div style="margin-left: 2em;">
     73       <a href="#section-5.1">5.1. Media Codecs</a><br/>
     74       <a href="#section-5.2">5.2. Video Encoding</a><br/>
     75       <a href="#section-5.3">5.3. Video Decoding</a><br/>
     76       <a href="#section-5.4">5.4. Audio Recording</a><br/>
     77       <a href="#section-5.5">5.5. Audio Latency</a><br/>
     78       <a href="#section-5.6">5.6. Network Protocols</a><br/>
     79     </div>
     80   <a href="#section-6">6. Developer Tools and Options Compatibility</a><br/>
     81     <div style="margin-left: 2em;">
     82       <a href="#section-6.1">6.1. Developer Tools</a><br/>
     83       <a href="#section-6.2">6.2. Developer Options</a><br/>
     84       <a href="#section-6.2.1">6.2.1. Experimental</a><br/>
     85     </div>
     86   <a href="#section-7">7. Hardware Compatibility</a><br/>
     87   <div style="margin-left: 2em;">
     88     <a href="#section-7.1">7.1. Display and Graphics</a><br/>
     89     <div style="margin-left: 2em;">
     90       <a href="#section-7.1.1">7.1.1. Screen Configuration</a><br/>
     91       <a href="#section-7.1.2">7.1.2. Display Metrics</a><br/>
     92       <a href="#section-7.1.3">7.1.3. Screen Orientation</a><br/>
     93       <a href="#section-7.1.4">7.1.4. 2D and 3D Graphics Acceleration</a><br/>
     94       <a href="#section-7.1.5">7.1.5. Legacy Application Compatibility Mode</a><br/>
     95       <a href="#section-7.1.6">7.1.6. Screen Types</a><br/>
     96       <a href="#section-7.1.7">7.1.7. Screen Technology</a><br/>
     97       <a href="#section-7.1.8">7.1.8. External Displays</a><br/>
     98     </div>
     99     <a href="#section-7.2">7.2. Input Devices</a><br/>
    100     <div style="margin-left: 2em;">
    101       <a href="#section-7.2.1">7.2.1. Keyboard</a><br/>
    102       <a href="#section-7.2.2">7.2.2. Non-touch Navigation</a><br/>
    103       <a href="#section-7.2.3">7.2.3. Navigation keys</a><br/>
    104       <a href="#section-7.2.4">7.2.4. Touchscreen input</a><br/>
    105       <a href="#section-7.2.5">7.2.5. Fake touch input</a><br/>
    106       <a href="#section-7.2.6">7.2.6. Microphone</a><br/>
    107     </div>
    108     <a href="#section-7.3">7.3. Sensors</a><br/>
    109     <div style="margin-left: 2em;">
    110       <a href="#section-7.3.1">7.3.1. Accelerometer</a><br/>
    111       <a href="#section-7.3.2">7.3.2. Magnetometer</a><br/>
    112       <a href="#section-7.3.3">7.3.3. GPS</a><br/>
    113       <a href="#section-7.3.4">7.3.4. Gyroscope</a><br/>
    114       <a href="#section-7.3.5">7.3.5. Barometer</a><br/>
    115       <a href="#section-7.3.6">7.3.6. Thermometer</a><br/>
    116       <a href="#section-7.3.7">7.3.7. Photometer</a><br/>
    117       <a href="#section-7.3.8">7.3.8. Proximity Sensor</a><br/>
    118     </div>
    119     <a href="#section-7.4">7.4. Data Connectivity</a><br/>
    120     <div style="margin-left: 2em;">
    121       <a href="#section-7.4.1">7.4.1. Telephony</a><br/>
    122       <a href="#section-7.4.2">7.4.2. IEEE 802.11 (Wi-Fi)</a><br/>
    123       <div style="margin-left: 2em;">
    124         <a href="#section-7.4.2.1">7.4.2.1. Wi-Fi Direct</a><br/>
    125         <a href="#section-7.4.2.2">7.4.2.2. Wi-Fi Tunneled Direct Link Setup</a><br/>
    126       </div>
    127       <a href="#section-7.4.3">7.4.3. Bluetooth</a><br/>
    128       <a href="#section-7.4.4">7.4.4. Near-Field Communications</a><br/>
    129       <a href="#section-7.4.5">7.4.5. Minimum Network Capability</a><br/>
    130       <a href="#section-7.4.6">7.4.6. Sync Settings</a><br/>
    131     </div>
    132     <a href="#section-7.5">7.5. Cameras</a><br/>
    133     <div style="margin-left: 2em;">
    134       <a href="#section-7.5.1">7.5.1. Rear-Facing Camera</a><br/>
    135       <a href="#section-7.5.2">7.5.2. Front-Facing Camera</a><br/>
    136       <a href="#section-7.5.3">7.5.3. Camera API Behavior</a><br/>
    137       <a href="#section-7.5.4">7.5.4. Camera Orientation</a><br/>
    138     </div>
    139     <a href="#section-7.6">7.6. Memory and Storage</a><br/>
    140     <div style="margin-left: 2em;">
    141       <a href="#section-7.6.1">7.6.1. Minimum Memory and Storage</a><br/>
    142       <a href="#section-7.6.2">7.6.2. Shared External Storage</a><br/>
    143     </div>
    144     <a href="#section-7.7">7.7. USB</a><br/>
    145   </div>
    146   <a href="#section-8">8. Performance Compatibility</a><br/>
    147   <a href="#section-9">9. Security Model Compatibility</a><br/>
    148   <div style="margin-left: 2em;">
    149     <a href="#section-9.1">9.1. Permissions</a><br/>
    150     <a href="#section-9.2">9.2. UID and Process Isolation</a><br/>
    151     <a href="#section-9.3">9.3. Filesystem Permissions</a><br/>
    152     <a href="#section-9.4">9.4. Alternate Execution Environments</a><br/>
    153     <a href="#section-9.5">9.5. Multi-User Support</a><br/>
    154     <a href="#section-9.6">9.6. Premium SMS Warning</a><br/>
    155     <a href="#section-9.7">9.7. Kernel Security Features</a><br/>
    156     <a href="#section-9.8">9.8. Privacy</a><br/>
    157     <a href="#section-9.9">9.9. Full-Disk Encryption</a><br/>
    158   </div>
    159   <a href="#section-10">10. Software Compatibility Testing</a><br/>
    160   <div style="margin-left: 2em;">
    161     <a href="#section-10.1">10.1. Compatibility Test Suite</a><br/>
    162     <a href="#section-10.2">10.2. CTS Verifier</a><br/>
    163     <a href="#section-10.3">10.3. Reference Applications</a><br/>
    164   </div>
    165   <a href="#section-11">11. Updatable Software</a><br/>
    166   <a href="#section-12">12. Document Changelog</a><br/>
    167   <a href="#section-13">13. Contact Us</a><br/>
    168 </div>
    169 
    170 <div style="page-break-before: always;"></div>
    171 
    172 <a name="section-1"></a><h2 id="section-1">1. Introduction</h2>
    173 <p>This document enumerates the requirements that must be met in order for
    174 devices to be compatible with Android 4.4.</p>
    175 <p>The use of "must", "must not", "required", "shall", "shall not", "should",
    176 "should not", "recommended", "may" and "optional" is per the IETF standard
    177 defined in RFC2119 [<a href="#resources01">Resources, 1</a>].</p>
    178 <p>As used in this document, a "device implementer" or "implementer" is a
    179 person or organization developing a hardware/software solution running Android
    180 4.4. A "device implementation" or "implementation" is the hardware/software
    181 solution so developed.</p>
    182 <p>To be considered compatible with Android 4.4, device implementations
    183 MUST meet the requirements presented in this Compatibility Definition,
    184 including any documents incorporated via reference.</p>
    185 <p>Where this definition or the software tests described in <a
    186 href="#section-10">Section 10</a> is silent, ambiguous, or incomplete, it is
    187 the responsibility of the device implementer to ensure compatibility with
    188 existing implementations.</p>
    189 <p>For this reason, the Android Open Source Project [<a
    190 href="#resources03">Resources, 3</a>] is both the reference and preferred
    191 implementation of Android. Device implementers are strongly encouraged to base
    192 their implementations to the greatest extent possible on the "upstream" source
    193 code available from the Android Open Source Project. While some components can
    194 hypothetically be replaced with alternate implementations this practice is
    195 strongly discouraged, as passing the software tests will become substantially
    196 more difficult. It is the implementer's responsibility to ensure full
    197 behavioral compatibility with the standard Android implementation, including
    198 and beyond the Compatibility Test Suite. Finally, note that certain component
    199 substitutions and modifications are explicitly forbidden by this document.</p>
    200 <a name="section-2"></a><h2 id="section-2">2. Resources</h2>
    201 <ol>
    202 <a name="resources01"></a><li id="resources01">IETF RFC2119 Requirement Levels: <a href="http://www.ietf.org/rfc/rfc2119.txt">http://www.ietf.org/rfc/rfc2119.txt</a></li>
    203 <a name="resources02"></a><li id="resources02">Android Compatibility Program Overview: <a href="http://source.android.com/compatibility/index.html">http://source.android.com/compatibility/index.html</a></li>
    204 <a name="resources03"></a><li id="resources03">Android Open Source Project: <a href="http://source.android.com/">http://source.android.com/</a></li>
    205 <a name="resources04"></a><li id="resources04">API definitions and documentation: <a href="http://developer.android.com/reference/packages.html">http://developer.android.com/reference/packages.html</a></li>
    206 <a name="resources05"></a><li id="resources05">Android Permissions reference: <a href="http://developer.android.com/reference/android/Manifest.permission.html">http://developer.android.com/reference/android/Manifest.permission.html</a></li>
    207 <a name="resources06"></a><li id="resources06">android.os.Build reference: <a href="http://developer.android.com/reference/android/os/Build.html">http://developer.android.com/reference/android/os/Build.html</a></li>
    208 <a name="resources07"></a><li id="resources07">Android 4.4 allowed version strings: <a href="http://source.android.com/compatibility/4.4/versions.html">http://source.android.com/compatibility/4.4/versions.html</a></li>
    209 <a name="resources08"></a><li id="resources08">Renderscript: <a href="http://developer.android.com/guide/topics/graphics/renderscript.html">http://developer.android.com/guide/topics/graphics/renderscript.html</a></li>
    210 <a name="resources09"></a><li id="resources09">Hardware Acceleration: <a href="http://developer.android.com/guide/topics/graphics/hardware-accel.html">http://developer.android.com/guide/topics/graphics/hardware-accel.html</a></li>
    211 <a name="resources10"></a><li id="resources10">android.webkit.WebView class: <a href="http://developer.android.com/reference/android/webkit/WebView.html">http://developer.android.com/reference/android/webkit/WebView.html</a></li>
    212 <a name="resources11"></a><li id="resources11">HTML5: <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/">http://www.whatwg.org/specs/web-apps/current-work/multipage/</a></li>
    213 <a name="resources12"></a><li id="resources12">HTML5 offline capabilities: <a href="http://dev.w3.org/html5/spec/Overview.html#offline">http://dev.w3.org/html5/spec/Overview.html#offline</a></li>
    214 <a name="resources13"></a><li id="resources13">HTML5 video tag: <a href="http://dev.w3.org/html5/spec/Overview.html#video">http://dev.w3.org/html5/spec/Overview.html#video</a></li>
    215 <a name="resources14"></a><li id="resources14">HTML5/W3C geolocation API: <a href="http://www.w3.org/TR/geolocation-API/">http://www.w3.org/TR/geolocation-API/</a></li>
    216 <a name="resources15"></a><li id="resources15">HTML5/W3C webstorage API: <a href="http://www.w3.org/TR/webstorage/">http://www.w3.org/TR/webstorage/</a></li>
    217 <a name="resources16"></a><li id="resources16">HTML5/W3C IndexedDB API: <a href="http://www.w3.org/TR/IndexedDB/">http://www.w3.org/TR/IndexedDB/</a></li>
    218 <a name="resources17"></a><li id="resources17">Dalvik Virtual Machine specification: available in the Android source code, at dalvik/docs</li>
    219 <a name="resources18"></a><li id="resources18">AppWidgets: <a href="http://developer.android.com/guide/practices/ui_guidelines/widget_design.html">http://developer.android.com/guide/practices/ui_guidelines/widget_design.html</a></li>
    220 <a name="resources19"></a><li id="resources19">Notifications: <a href="http://developer.android.com/guide/topics/ui/notifiers/notifications.html">http://developer.android.com/guide/topics/ui/notifiers/notifications.html</a></li>
    221 <a name="resources20"></a><li id="resources20">Application Resources: <a href="http://code.google.com/android/reference/available-resources.html">http://code.google.com/android/reference/available-resources.html</a></li>
    222 <a name="resources21"></a><li id="resources21">Status Bar icon style guide: <a href="http://developer.android.com/guide/practices/ui_guidelines/icon_design_status_bar.html">http://developer.android.com/guide/practices/ui_guidelines/icon_design_status_bar.html</a></li>
    223 <a name="resources22"></a><li id="resources22">Search Manager: <a href="http://developer.android.com/reference/android/app/SearchManager.html">http://developer.android.com/reference/android/app/SearchManager.html</a></li>
    224 <a name="resources23"></a><li id="resources23">Toasts: <a href="http://developer.android.com/reference/android/widget/Toast.html">http://developer.android.com/reference/android/widget/Toast.html</a></li>
    225 <a name="resources24"></a><li id="resources24">Themes: <a href="http://developer.android.com/guide/topics/ui/themes.html">http://developer.android.com/guide/topics/ui/themes.html</a></li>
    226 <a name="resources25"></a><li id="resources25">R.style class: <a href="http://developer.android.com/reference/android/R.style.html">http://developer.android.com/reference/android/R.style.html</a></li>
    227 <a name="resources26"></a><li id="resources26">Live Wallpapers: <a href="http://developer.android.com/resources/articles/live-wallpapers.html">http://developer.android.com/resources/articles/live-wallpapers.html</a></li>
    228 <a name="resources27"></a><li id="resources27">Android Device Administration: <a href="http://developer.android.com/guide/topics/admin/device-admin.html">http://developer.android.com/guide/topics/admin/device-admin.html</a></li>
    229 <a name="resources28"></a><li id="resources28">DevicePolicyManager reference: <a href="http://developer.android.com/reference/android/app/admin/DevicePolicyManager.html">http://developer.android.com/reference/android/app/admin/DevicePolicyManager.html</a></li>
    230 <a name="resources29"></a><li id="resources29">Android Accessibility Service APIs: <a href="http://developer.android.com/reference/android/accessibilityservice/package-summary.html">http://developer.android.com/reference/android/accessibilityservice/package-summary.html</a></li>
    231 <a name="resources30"></a><li id="resources30">Android Accessibility APIs: <a href="http://developer.android.com/reference/android/view/accessibility/package-summary.html">http://developer.android.com/reference/android/view/accessibility/package-summary.html</a></li>
    232 <a name="resources31"></a><li id="resources31">Eyes Free project: <a href="http://http://code.google.com/p/eyes-free">http://code.google.com/p/eyes-free</a></li>
    233 <a name="resources32"></a><li id="resources32">Text-To-Speech APIs: <a href="http://developer.android.com/reference/android/speech/tts/package-summary.html">http://developer.android.com/reference/android/speech/tts/package-summary.html</a></li>
    234 <a name="resources33"></a><li id="resources33">Reference tool documentation (for adb, aapt, ddms, systrace): <a href="http://developer.android.com/guide/developing/tools/index.html">http://developer.android.com/guide/developing/tools/index.html</a></li>
    235 <a name="resources34"></a><li id="resources34">Android apk file description: <a href="http://developer.android.com/guide/topics/fundamentals.html">http://developer.android.com/guide/topics/fundamentals.html</a></li>
    236 <a name="resources35"></a><li id="resources35">Manifest files: <a href="http://developer.android.com/guide/topics/manifest/manifest-intro.html">http://developer.android.com/guide/topics/manifest/manifest-intro.html</a></li>
    237 <a name="resources36"></a><li id="resources36">Monkey testing tool: <a href="http://developer.android.com/guide/developing/tools/monkey.html">http://developer.android.com/guide/developing/tools/monkey.html</a></li>
    238 <a name="resources37"></a><li id="resources37">Android android.content.pm.PackageManager class and Hardware Features List: <a href="http://developer.android.com/reference/android/content/pm/PackageManager.html">http://developer.android.com/reference/android/content/pm/PackageManager.html</a></li>
    239 <a name="resources38"></a><li id="resources38">Supporting Multiple Screens: <a href="http://developer.android.com/guide/practices/screens_support.html">http://developer.android.com/guide/practices/screens_support.html</a></li>
    240 <a name="resources39"></a><li id="resources39">android.util.DisplayMetrics: <a href="http://developer.android.com/reference/android/util/DisplayMetrics.html">http://developer.android.com/reference/android/util/DisplayMetrics.html</a></li>
    241 <a name="resources40"></a><li id="resources40">android.content.res.Configuration: <a href="http://developer.android.com/reference/android/content/res/Configuration.html">http://developer.android.com/reference/android/content/res/Configuration.html</a></li>
    242 <a name="resources41"></a><li id="resources41">android.hardware.SensorEvent: <a href="http://developer.android.com/reference/android/hardware/SensorEvent.html">http://developer.android.com/reference/android/hardware/SensorEvent.html</a></li>
    243 <a name="resources42"></a><li id="resources42">Bluetooth API: <a href="http://developer.android.com/reference/android/bluetooth/package-summary.html">http://developer.android.com/reference/android/bluetooth/package-summary.html</a></li>
    244 <a name="resources43"></a><li id="resources43">NDEF Push Protocol: <a href="http://source.android.com/compatibility/ndef-push-protocol.pdf">http://source.android.com/compatibility/ndef-push-protocol.pdf</a></li>
    245 <a name="resources44"></a><li id="resources44">MIFARE MF1S503X: <a href="http://www.nxp.com/documents/data_sheet/MF1S503x.pdf">http://www.nxp.com/documents/data_sheet/MF1S503x.pdf</a></li>
    246 <a name="resources45"></a><li id="resources45">MIFARE MF1S703X: <a href="http://www.nxp.com/documents/data_sheet/MF1S703x.pdf">http://www.nxp.com/documents/data_sheet/MF1S703x.pdf</a></li>
    247 <a name="resources46"></a><li id="resources46">MIFARE MF0ICU1: <a href="http://www.nxp.com/documents/data_sheet/MF0ICU1.pdf">http://www.nxp.com/documents/data_sheet/MF0ICU1.pdf</a></li>
    248 <a name="resources47"></a><li id="resources47">MIFARE MF0ICU2: <a href="http://www.nxp.com/documents/short_data_sheet/MF0ICU2_SDS.pdf">http://www.nxp.com/documents/short_data_sheet/MF0ICU2_SDS.pdf</a></li>
    249 <a name="resources48"></a><li id="resources48">MIFARE AN130511: <a href="http://www.nxp.com/documents/application_note/AN130511.pdf">http://www.nxp.com/documents/application_note/AN130511.pdf</a></li>
    250 <a name="resources49"></a><li id="resources49">MIFARE AN130411: <a href="http://www.nxp.com/documents/application_note/AN130411.pdf">http://www.nxp.com/documents/application_note/AN130411.pdf</a></li>
    251 <a name="resources50"></a><li id="resources50">Camera orientation API: <a href="http://developer.android.com/reference/android/hardware/Camera.html#setDisplayOrientation(int)">http://developer.android.com/reference/android/hardware/Camera.html#setDisplayOrientation(int)</a></li>
    252 <a name="resources51"></a><li id="resources51">Camera: <a href="http://developer.android.com/reference/android/hardware/Camera.html">http://developer.android.com/reference/android/hardware/Camera.html</a></li>
    253 <a name="resources52"></a><li id="resources52">Android Open Accessories: <a href="http://developer.android.com/guide/topics/usb/accessory.html">http://developer.android.com/guide/topics/usb/accessory.html</a></li>
    254 <a name="resources53"></a><li id="resources53">USB Host API: <a href="http://developer.android.com/guide/topics/usb/host.html">http://developer.android.com/guide/topics/usb/host.html</a></li>
    255 <a name="resources54"></a><li id="resources54">Android Security and Permissions reference: <a href="http://developer.android.com/guide/topics/security/permissions.html">http://developer.android.com/guide/topics/security/permissions.html</a></li>
    256 <a name="resources55"></a><li id="resources55">Apps for Android: <a href="http://code.google.com/p/apps-for-android">http://code.google.com/p/apps-for-android</a></li>
    257 <a name="resources56"></a><li id="resources56">Android DownloadManager: <a href="http://developer.android.com/reference/android/app/DownloadManager.html">http://developer.android.com/reference/android/app/DownloadManager.html</a></li>
    258 <a name="resources57"></a><li id="resources57">Android File Transfer: <a href="http://www.android.com/filetransfer">http://www.android.com/filetransfer</a></li>
    259 <a name="resources58"></a><li id="resources58">Android Media Formats: <a href="http://developer.android.com/guide/appendix/media-formats.html">http://developer.android.com/guide/appendix/media-formats.html</a></li>
    260 <a name="resources59"></a><li id="resources59">HTTP Live Streaming Draft Protocol: <a href="http://tools.ietf.org/html/draft-pantos-http-live-streaming-03">http://tools.ietf.org/html/draft-pantos-http-live-streaming-03</a></li>
    261 <a name="resources60"></a><li id="resources60">NFC Connection Handover: <a href="http://www.nfc-forum.org/specs/spec_list/#conn_handover/">http://www.nfc-forum.org/specs/spec_list/#conn_handover</a></li>
    262 <a name="resources61"></a><li id="resources61">Bluetooth Secure Simple Pairing Using NFC: <a href="http://www.nfc-forum.org/resources/AppDocs/NFCForum_AD_BTSSP_1_0.pdf">http://www.nfc-forum.org/resources/AppDocs/NFCForum_AD_BTSSP_1_0.pdf</a></li>
    263 <a name="resources62"></a>
    264 <li id="resources62">Wi-Fi Multicast API: <a href="http://developer.android.com/reference/android/net/wifi/WifiManager.MulticastLock.html">http://developer.android.com/reference/android/net/wifi/WifiManager.MulticastLock.html</a></li>
    265 <a name="resources63"></a><li id="resources63">Action Assist: <a href="http://developer.android.com/reference/android/content/Intent.html#ACTION_ASSIST">http://developer.android.com/reference/android/content/Intent.html#ACTION_ASSIST</a></li>
    266 <a name="resources64"></a><li id="resources64">USB Charging Specification: <a href="http://www.usb.org/developers/devclass_docs/USB_Battery_Charging_1.2.pdf">http://www.usb.org/developers/devclass_docs/USB_Battery_Charging_1.2.pdf</a></li>
    267 <a name="resources65"></a><li id="resources65">Android Beam: <a href="http://developer.android.com/guide/topics/nfc/nfc.html">http://developer.android.com/guide/topics/nfc/nfc.html</a></li>
    268 <a name="resources66"></a><li id="resources66">Android USB Audio: <a href="http://developer.android.com/reference/android/hardware/usb/UsbConstants.html#USB_CLASS_AUDIO">http://developer.android.com/reference/android/hardware/usb/UsbConstants.html#USB_CLASS_AUDIO</a></li>
    269 <a name="resources67"></a><li id="resources67">Android NFC Sharing Settings: <a href="http://developer.android.com/reference/android/provider/Settings.html#ACTION_NFCSHARING_SETTINGS">http://developer.android.com/reference/android/provider/Settings.html#ACTION_NFCSHARING_SETTINGS</a></li>
    270 <a name="resources68"></a>
    271 <li id="resources68">Wi-Fi Direct (Wi-Fi P2P): <a href="http://developer.android.com/reference/android/net/wifi/p2p/WifiP2pManager.html">http://developer.android.com/reference/android/net/wifi/p2p/WifiP2pManager.html</a></li>
    272 <a name="resources69"></a><li id="resources69">Lock and Home Screen Widget: <a href="http://developer.android.com/reference/android/appwidget/AppWidgetProviderInfo.html">http://developer.android.com/reference/android/appwidget/AppWidgetProviderInfo.html</a></li>
    273 <a name="resources70"></a><li id="resources70">UserManager reference: <a href="http://developer.android.com/reference/android/os/UserManager.html">http://developer.android.com/reference/android/os/UserManager.html</a></li>
    274 <a name="resources71"></a><li id="resources71">External Storage reference: <a
    275 href="http://source.android.com/devices/tech/storage">http://source.android.com/devices/tech/storage</a></li>
    276 <a name="resources72"></a><li id="resources72">External Storage APIs: <a href="http://developer.android.com/reference/android/os/Environment.html">http://developer.android.com/reference/android/os/Environment.html</a></li>
    277 <a name="resources73"></a><li id="resources73">SMS Short Code: <a href="http://en.wikipedia.org/wiki/Short_code">http://en.wikipedia.org/wiki/Short_code</a></li>
    278 <a name="resources74"></a><li id="resources74">Media Remote Control Client: <a href="http://developer.android.com/reference/android/media/RemoteControlClient.html">http://developer.android.com/reference/android/media/RemoteControlClient.html</a></li>
    279 <a name="resources75"></a><li id="resources75">Display Manager: <a href="http://developer.android.com/reference/android/hardware/display/DisplayManager.html">http://developer.android.com/reference/android/hardware/display/DisplayManager.html</a></li>
    280 <a name="resources76"></a><li id="resources76">Dreams: <a href="http://developer.android.com/reference/android/service/dreams/DreamService.html">http://developer.android.com/reference/android/service/dreams/DreamService.html</a></li>
    281 <a name="resources77"></a><li id="resources77">Android Application Development-Related Settings: <a href="http://developer.android.com/reference/android/provider/Settings.html#ACTION_APPLICATION_DEVELOPMENT_SETTINGS">http://developer.android.com/reference/android/provider/Settings.html#ACTION_APPLICATION_DEVELOPMENT_SETTINGS</a></li>
    282 <a name="resources78"></a><li id="resources78">Camera: <a href="http://developer.android.com/reference/android/hardware/Camera.Parameters.html">http://developer.android.com/reference/android/hardware/Camera.Parameters.html</a></li>
    283 <a name="resources79"></a><li id="resources79">EGL Extension-EGL_ANDROID_RECORDABLE: <a href="http://www.khronos.org/registry/egl/extensions/ANDROID/EGL_ANDROID_recordable.txt">http://www.khronos.org/registry/egl/extensions/ANDROID/EGL_ANDROID_recordable.txt</a></li>
    284 <a name="resources80"></a><li id="resources80">Motion Event API: <a href="http://developer.android.com/reference/android/view/MotionEvent.html">http://developer.android.com/reference/android/view/MotionEvent.html</a></li>
    285 <a name="resources81"></a><li id="resources81">Touch Input Configuration: <a href="http://source.android.com/devices/tech/input/touch-devices.html">http://source.android.com/devices/tech/input/touch-devices.html</a></li>
    286 <a name="resources82"></a><li id="resources82">Unicode 6.1.0: <a href="http://www.unicode.org/versions/Unicode6.1.0/">http://www.unicode.org/versions/Unicode6.1.0/</a></li>
    287 <a name="resources83"></a><li id="resources83">WebView compatibility: <a href="http://www.chromium.org/">http://www.chromium.org/</a></li>
    288 <a name="resources84"></a><li id="resources84">Android Device Owner App: <a href="http://developer.android.com/reference/android/app/admin/DevicePolicyManager.html#isDeviceOwnerApp(java.lang.String)">http://developer.android.com/reference/android/app/admin/DevicePolicyManager.html#isDeviceOwnerApp(java.lang.String)</a></li>
    289 <a name="resources85"></a><li id="resources85">WifiManager API: <a href="http://developer.android.com/reference/android/net/wifi/WifiManager.html">http://developer.android.com/reference/android/net/wifi/WifiManager.html</a></li>
    290 <a name="resources86"></a><li id="resources86">RTC Hardware Coding Requirements: <a href="http://www.webmproject.org/hardware/rtc-coding-requirements/">http://www.webmproject.org/hardware/rtc-coding-requirements/</a></li>
    291 <a name="resources87"></a><li id="resources87">Settings.Secure LOCATION_MODE: <a
    292 href="http://developer.android.com/reference/android/provider/Settings.Secure.html#LOCATION_MODE">http://developer.android.com/reference/android/provider/Settings.Secure.html#LOCATION_MODE</a></li>
    293 <a name="resources88"></a><li id="resources88">Content Resolver: <a href="http://developer.android.com/reference/android/content/ContentResolver.html">http://developer.android.com/reference/android/content/ContentResolver.html</a></li>
    294 <a name="resources89"></a><li id="resources89">SettingInjectorService: <a
    295 href="http://developer.android.com/reference/android/location/SettingInjectorService.html">http://developer.android.com/reference/android/location/SettingInjectorService.html</a></li>
    296 <a name="resources90"></a><li id="resources90">Host-based Card Emulation: <a href="http://developer.android.com/guide/topics/connectivity/nfc/hce.html">http://developer.android.com/guide/topics/connectivity/nfc/hce.html</a></li>
    297 <a name="resources91"></a><li id="resources91">Telephony Provider: <a href="http://developer.android.com/reference/android/provider/Telephony.html">http://developer.android.com/reference/android/provider/Telephony.html</a></li>
    298 </ol>
    299 <p>Many of these resources are derived directly or indirectly from the Android
    300 SDK, and will be functionally identical to the information in that SDK's
    301 documentation. In any cases where this Compatibility Definition or the
    302 Compatibility Test Suite disagrees with the SDK documentation, the SDK
    303 documentation is considered authoritative. Any technical details provided in
    304 the references included above are considered by inclusion to be part of this
    305 Compatibility Definition.</p>
    306 
    307 <a name="section-3"></a><h2 id="section-3">3. Software</h2>
    308 <a name="section-3.1"></a><h3 id="section-3.1">3.1. Managed API Compatibility</h3>
    309 <p>The managed (Dalvik-based) execution environment is the primary vehicle for
    310 Android applications. The Android application programming interface (API) is
    311 the set of Android platform interfaces exposed to applications running in the
    312 managed VM environment. Device implementations MUST provide complete
    313 implementations, including all documented behaviors, of any documented API
    314 exposed by the Android SDK [<a href="#resources04">Resources, 4</a>].</p>
    315 <p>Device implementations MUST NOT omit any managed APIs, alter API interfaces
    316 or signatures, deviate from the documented behavior, or include no-ops, except
    317 where specifically allowed by this Compatibility Definition.</p>
    318 <p>This Compatibility Definition permits some types of hardware for which
    319 Android includes APIs to be omitted by device implementations. In such cases,
    320 the APIs MUST still be present and behave in a reasonable way. See
    321 <a href="#section-7">Section 7</a> for specific requirements for this scenario.
    322 </p>
    323 
    324 <a name="section-3.2"></a><h3 id="section-3.2">3.2. Soft API Compatibility</h3>
    325 <p>In addition to the managed APIs from Section 3.1, Android also includes a
    326 significant runtime-only "soft" API, in the form of such things such as
    327 Intents, permissions, and similar aspects of Android applications that cannot
    328 be enforced at application compile time.</p>
    329 <a name="section-3.2.1"></a><h4 id="section-3.2.1">3.2.1. Permissions</h4>
    330 <p>Device implementers MUST support and enforce all permission constants as
    331 documented by the Permission reference page [<a
    332 href="#resources05">Resources, 5</a>]. Note that Section 9 lists additional
    333 requirements related to the Android security model.</p>
    334 <a name="section-3.2.2"></a><h4 id="section-3.2.2">3.2.2. Build Parameters</h4>
    335 <p>The Android APIs include a number of constants on the <code>android.os.Build</code>
    336 class [<a href="#resources06">Resources, 6</a>] that are intended to describe
    337 the current device. To provide consistent, meaningful values across device
    338 implementations, the table below includes additional restrictions on the
    339 formats of these values to which device implementations MUST conform.</p>
    340 <table>
    341 <tbody>
    342 <tr>
    343 <td><b>Parameter</b></td>
    344 <td><b>Comments</b></td>
    345 </tr>
    346 <tr>
    347 <td>VERSION.RELEASE</td>
    348 <td>The version of the currently-executing Android system, in human-readable
    349 format. This field MUST have one of the string values defined in [<a
    350 href="#resources07">Resources, 7</a>].</td>
    351 </tr>
    352 <tr>
    353 <td>VERSION.SDK</td>
    354 <td>The version of the currently-executing Android system, in a format
    355 accessible to third-party application code. For Android 4.4, this
    356 field MUST have the integer value 19.</td>
    357 </tr>
    358 <tr>
    359 <td>VERSION.SDK_INT</td>
    360 <td>The version of the currently-executing Android system, in a format
    361 accessible to third-party application code. For Android 4.4, this
    362 field MUST have the integer value 19.</td>
    363 </tr>
    364 <tr>
    365 <td>VERSION.INCREMENTAL</td>
    366 <td>A value chosen by the device implementer designating the specific build of
    367 the currently-executing Android system, in human-readable format. This value
    368 MUST NOT be re-used for different builds made available to end users. A typical use
    369 of this field is to indicate which build number or source-control change
    370 identifier was used to generate the build. There are no requirements on the
    371 specific format of this field, except that it MUST NOT be null or the empty
    372 string ("").</td>
    373 </tr>
    374 <tr>
    375 <td>BOARD</td>
    376 <td>A value chosen by the device implementer identifying the specific internal
    377 hardware used by the device, in human-readable format. A possible use of this
    378 field is to indicate the specific revision of the board powering the device.
    379 The value of this field MUST be encodable as 7-bit ASCII and match the regular expression
    380 <code>"^[a-zA-Z0-9.,_-]+$"</code>.</td>
    381 </tr>
    382 <tr>
    383 <td>BRAND</td>
    384 <td>A value reflecting the brand name associated with the device as
    385 known to the end users. MUST be in human-readable format and SHOULD represent
    386 the manufacturer of the device or the company brand under which the device is
    387 marketed. The value of this field MUST be encodable as 7-bit ASCII and match the
    388 regular expression <code>"^[a-zA-Z0-9.,_-]+$"</code>.
    389 </td>
    390 </tr>
    391 <tr>
    392 <td>CPU_ABI</td>
    393 <td>The name of the instruction set (CPU type + ABI convention) of native code.
    394 See <a href="#section-3.3">Section 3.3: Native API Compatibility</a>.
    395 </td>
    396 </tr>
    397 <tr>
    398 <td>CPU_ABI2</td>
    399 <td>The name of the second instruction set (CPU type + ABI convention) of native code.
    400 See <a href="#section-3.3">Section 3.3: Native API Compatibility</a>.
    401 </td>
    402 </tr>
    403 <tr>
    404 <td>DEVICE</td>
    405 <td>A value chosen by the device implementer containing the development name or
    406 code name identifying the configuration of the hardware features and industrial
    407 design of the device. The value of this field MUST be encodable as 7-bit ASCII
    408 and match the regular expression <code>"^[a-zA-Z0-9.,_-]+$"</code>.
    409 </td>
    410 </tr>
    411 <tr>
    412 <td>FINGERPRINT</td>
    413 <td>A string that uniquely identifies this build. It SHOULD be reasonably
    414 human-readable. It MUST follow this template:
    415 <br/><code>$(BRAND)/$(PRODUCT)/$(DEVICE):$(VERSION.RELEASE)/$(ID)/$(VERSION.INCREMENTAL):$(TYPE)/$(TAGS)</code><br/>
    416 For example:
    417 <br/><code>acme/myproduct/mydevice:4.4/KRT16/3359:userdebug/test-keys</code><br/>
    418 The fingerprint MUST NOT include whitespace characters. If other fields included in the
    419 template above have whitespace characters, they MUST be replaced in the build
    420 fingerprint with another character, such as the underscore ("_") character.
    421 The value of this field MUST be encodable as 7-bit ASCII.</td>
    422 </tr>
    423 <tr>
    424 <td>HARDWARE</td>
    425 <td>The name of the hardware (from the kernel command line or /proc).  It SHOULD be
    426 reasonably human-readable. The value of this field MUST be encodable as 7-bit ASCII and
    427 match the regular expression <code>"^[a-zA-Z0-9.,_-]+$"</code>.</td>
    428 </tr>
    429 <tr>
    430 <td>HOST</td>
    431 <td>A string that uniquely identifies the host the build was built on, in
    432 human readable format. There are no requirements on the specific format of
    433 this field, except that it MUST NOT be null or the empty string ("").</td>
    434 </tr>
    435 <tr>
    436 <td>ID</td>
    437 <td>An identifier chosen by the device implementer to refer to a specific
    438 release, in human readable format. This field can be the same as
    439 android.os.Build.VERSION.INCREMENTAL, but SHOULD be a value sufficiently
    440 meaningful for end users to distinguish between software builds. The value of
    441 this field MUST be encodable as 7-bit ASCII and match the regular expression
    442 <code>"^[a-zA-Z0-9.,_-]+$"</code>.
    443 </td>
    444 </tr>
    445 <tr>
    446 <td>MANUFACTURER</td>
    447 <td>The trade name of the Original Equipment Manufacturer (OEM) of the product.
    448 There are no requirements on the specific format of this field, except that it
    449 MUST NOT be null or the empty string ("").</td>
    450 </tr>
    451 <tr>
    452 <td>MODEL</td>
    453 <td>A value chosen by the device implementer containing the name of the device
    454 as known to the end user. This SHOULD be the same name under which the device
    455 is marketed and sold to end users. There are no requirements on the specific
    456 format of this field, except that it MUST NOT be null or the empty string
    457 ("").</td>
    458 </tr>
    459 <tr>
    460 <td>PRODUCT</td>
    461 <td>A value chosen by the device implementer containing the development name or
    462 code name of the specific product (SKU) that SHOULD be unique within the same
    463 brand. MUST be human-readable, but is not necessarily intended for view by end
    464 users. The value of this field MUST be encodable as 7-bit ASCII and match the
    465 regular expression <code>"^[a-zA-Z0-9.,_-]+$"</code>.
    466 </td>
    467 </tr>
    468 <tr>
    469 <td>SERIAL</td>
    470 <td>A hardware serial number, which MUST be available. The value of this field MUST be encodable
    471 as 7-bit ASCII and match the regular expression
    472 <code>"^([a-zA-Z0-9]{6,20})$"</code>.</td>
    473 </tr>
    474 <tr>
    475 <td>TAGS</td>
    476 <td>A comma-separated list of tags chosen by the device implementer that
    477 further distinguishes the build. For example, "unsigned,debug". The value of
    478 this field MUST be encodable as 7-bit ASCII and match the regular expression
    479 <code>"^[a-zA-Z0-9.,_-]+$"</code>.</td>
    480 </tr>
    481 <tr>
    482 <td>TIME</td>
    483 <td>A value representing the timestamp of when the build occurred.</td>
    484 </tr>
    485 <tr>
    486 <td>TYPE</td>
    487 <td>A value chosen by the device implementer specifying the runtime
    488 configuration of the build. This field SHOULD have one of the values
    489 corresponding to the three typical Android runtime configurations: "user",
    490 "userdebug", or "eng". The value of this field MUST be
    491 encodable as 7-bit ASCII and match the regular expression
    492 <code>"^[a-zA-Z0-9.,_-]+$"</code>.</td>
    493 </tr>
    494 <tr>
    495 <td>USER</td>
    496 <td>A name or user ID of the user (or automated user) that generated the
    497 build. There are no requirements on the specific format of this field, except
    498 that it MUST NOT be null or the empty string ("").</td>
    499 </tr>
    500 </tbody>
    501 </table>
    502 <a name="section-3.2.3"></a><h4 id="section-3.2.3">3.2.3. Intent Compatibility</h4>
    503 <p>
    504 Device implementations MUST honor Android's loose-coupling Intent system, as
    505 described in the sections below. By "honored", it is meant that the device
    506 implementer MUST provide an Android Activity or Service that specifies a
    507 matching Intent filter and binds to and implements correct behavior for each
    508 specified Intent pattern.</p>
    509 <a name="section-3.2.3.1"></a><h4 id="section-3.2.3.1">3.2.3.1. Core Application Intents</h4>
    510 <p>The Android upstream project defines a number of core applications, such as
    511 contacts, calendar, photo gallery, music player, and so on. Device implementers
    512 MAY replace these applications with alternative versions.</p>
    513 <p>However, any such alternative versions MUST honor the same Intent patterns
    514 provided by the upstream project. For example, if a device contains an
    515 alternative music player, it must still honor the Intent pattern issued by
    516 third-party applications to pick a song.</p>
    517 <p>The following applications are considered core Android system
    518 applications:</p>
    519 <ul>
    520 <li>Desk Clock</li>
    521 <li>Browser</li>
    522 <li>Calendar</li>
    523 <li>Contacts</li>
    524 <!--<li>Email</li>-->
    525 <li>Gallery</li>
    526 <li>GlobalSearch</li>
    527 <li>Launcher</li>
    528 <!-- <li>LivePicker (that is, the Live Wallpaper picker application; MAY be omitted
    529 if the device does not support Live Wallpapers, per Section 3.8.5.)</li> -->
    530 <!-- <li>Messaging (AKA "Mms")</li> -->
    531 <li>Music</li>
    532 <!-- <li>Phone</li> -->
    533 <li>Settings</li>
    534 <!-- <li>SoundRecorder</li> -->
    535 </ul>
    536 <p>The core Android system applications include various Activity, or Service
    537 components that are considered "public".  That is, the attribute
    538 "android:exported" may be absent, or may have the value "true".</p>
    539 <p>For every Activity or Service defined
    540 in one of the core Android system apps that is not marked as non-public via an
    541 android:exported attribute with the value "false", device implementations MUST
    542 include a component of the same type implementing the same Intent filter
    543 patterns as the core Android system app.</p>
    544 <p>In other words, a device implementation MAY replace core Android system
    545 apps; however, if it does, the device implementation MUST support all Intent
    546 patterns defined by each core Android system app being replaced.</p>
    547 <a name="section-3.2.3.2"></a><h4 id="section-3.2.3.2">3.2.3.2. Intent Overrides</h4>
    548 <p>As Android is an extensible platform, device implementations MUST allow each
    549 Intent pattern referenced in Section 3.2.3.1 to be overridden by third-party
    550 applications. The upstream Android open source implementation allows this by
    551 default; device implementers MUST NOT attach special privileges to system
    552 applications' use of these Intent patterns, or prevent third-party
    553 applications from binding to and assuming control of these patterns. This
    554 prohibition specifically includes but is not limited to disabling the
    555 "Chooser" user interface that allows the user to select between multiple
    556 applications which all handle the same Intent pattern.</p>
    557 <p>However, device implementations MAY provide default activities for specific
    558 URI patterns (eg. http://play.google.com) if the default activity provides a
    559 more specific filter for the data URI. For example, an intent filter specifying
    560 the data URI "http://www.android.com" is more specific than the browser filter
    561 for "http://". Device implementations MUST provide a user interface for users
    562 to modify the default activity for intents.</p>
    563 
    564 <a name="section-3.2.3.3"></a><h4 id="section-3.2.3.3">3.2.3.3. Intent Namespaces</h4>
    565 <p>Device implementations MUST NOT include any Android component that honors any
    566 new Intent or Broadcast Intent patterns using an ACTION, CATEGORY, or other
    567 key string in the android.* or com.android.* namespace. Device implementers
    568 MUST NOT include any Android components that honor any new Intent or Broadcast
    569 Intent patterns using an ACTION, CATEGORY, or other key string in a package
    570 space belonging to another organization. Device implementers MUST NOT alter or
    571 extend any of the Intent patterns used by the core apps listed in Section
    572 3.2.3.1. Device implementations MAY include Intent patterns using
    573 namespaces clearly and obviously associated with their own organization.</p>
    574 <p>This prohibition is analogous to that specified for Java language classes
    575 in Section 3.6.</p>
    576 
    577 <a name="section-3.2.3.4"></a><h4 id="section-3.2.3.4">3.2.3.4. Broadcast Intents</h4>
    578 <p>Third-party applications rely on the platform to broadcast certain Intents
    579 to notify them of changes in the hardware or software environment.
    580 Android-compatible devices MUST broadcast the public broadcast Intents in
    581 response to appropriate system events. Broadcast Intents are described in the
    582 SDK documentation.</p>
    583 
    584 <a name="section-3.2.3.5"></a><h4 id="section-3.2.3.5">3.2.3.5. Default App Settings</h4>
    585 <p>Android 4.4 adds settings that allow users to select their default Home and
    586 SMS applications. Device implementations MUST provide a similar user settings
    587 menu for each, compatible with the Intent filter pattern and API methods
    588 described in the SDK documentation [<a href="#resources91">Resources, 91</a>].
    589 </p>
    590 
    591 <a name="section-3.3"></a><h3 id="section-3.3">3.3. Native API Compatibility</h3>
    592 <a name="section-3.3.1"></a><h4 id="section-3.3.1">3.3.1 Application Binary Interfaces</h4>
    593 <p>Managed code running in Dalvik can call into native code provided in the
    594 application .apk file as an ELF .so file compiled for the appropriate device
    595 hardware architecture. As native code is highly dependent on the underlying
    596 processor technology, Android defines a number of Application Binary
    597 Interfaces (ABIs) in the Android NDK, in the file
    598 <code>docs/CPU-ARCH-ABIS.html</code>. If a device implementation is compatible
    599 with one or more defined ABIs, it SHOULD implement compatibility with the
    600 Android NDK, as below.</p>
    601 <p>If a device implementation includes support for an Android ABI, it:</p>
    602 <ul>
    603 <li>MUST include support for code running in the managed environment to call
    604 into native code, using the standard Java Native Interface (JNI)
    605 semantics</li>
    606 <li>MUST be source-compatible (i.e. header compatible) and binary-compatible
    607 (for the ABI) with each required library in the list below</li>
    608 <li>MUST accurately report the native Application Binary Interface (ABI)
    609 supported by the device, via the <code>android.os.Build.CPU_ABI</code>
    610 API and <code>android.os.Build.CPU_ABI2</code> parameters.</li>
    611 <li>MUST report, via <code>android.os.Build.CPU_ABI2</code>, only those ABIs
    612 documented in the latest version of the Android NDK, in the file 
    613 <code>docs/CPU-ARCH-ABIS.html</code></li>
    614 <li>MUST report, via <code>android.os.Build.CPU_ABI</code>, only one of the
    615 ABIs listed below</li>
    616   <ul>
    617   <li>armeabi-v7a</li>
    618   <li>x86</li>
    619   <li>mips</li>
    620   </ul>
    621 <li>SHOULD be built using the source code and header files available in the
    622 upstream Android Open Source Project</li>
    623 </ul>
    624 <p>The following native code APIs MUST be available to apps that include
    625 native code:</p>
    626 <ul>
    627 <li>libc (C library)</li>
    628 <li>libm (math library)</li>
    629 <li>Minimal support for C++</li>
    630 <li>JNI interface</li>
    631 <li>liblog (Android logging)</li>
    632 <li>libz (Zlib compression)</li>
    633 <li>libdl (dynamic linker)</li>
    634 <li>libGLESv1_CM.so (OpenGL ES 1.0)</li>
    635 <li>libGLESv2.so (OpenGL ES 2.0)</li>
    636 <li>libGLESv3.so (OpenGL ES 3.0)</li>
    637 <li>libEGL.so (native OpenGL surface management)</li>
    638 <li>libjnigraphics.so</li>
    639 <li>libOpenSLES.so (OpenSL ES 1.0.1 audio support)</li>
    640 <li>libOpenMAXAL.so (OpenMAX AL 1.0.1 support)</li>
    641 <li>libandroid.so (native Android activity support)</li>
    642 <li>Support for OpenGL, as described below</li>
    643 </ul>
    644 <p>Note that future releases of the Android NDK may introduce support for
    645 additional ABIs. If a device implementation is not compatible with an existing
    646 predefined ABI, it MUST NOT report support for any ABI at all.</p>
    647 <p>Note that device implementations MUST include libGLESv3.so and it MUST symlink (symbolic)
    648 link to libGLESv2.so. On device implementations that declare support for OpenGL ES 3.0, libGLESv2.so
    649 MUST export the OpenGL ES 3.0 function symbols in addition to the OpenGL ES 2.0 function symbols.</p>
    650 <p>Native code compatibility is challenging. For this reason, it should be
    651 repeated that device implementers are VERY strongly encouraged to use the
    652 upstream implementations of the libraries listed above to help ensure
    653 compatibility.</p>
    654 
    655 <a name="section-3.4"></a><h3 id="section-3.4">3.4. Web Compatibility</h3>
    656 <a name="section-3.4.1"></a><h4 id="section-3.4.1">3.4.1. WebView Compatibility</h4>
    657 <p>The Android Open Source implementation uses code from the Chromium
    658 Project to implement the <code>android.webkit.WebView</code> [<a href="#resources10">Resources, 10</a>] . Because it is not feasible
    659 to develop a comprehensive test suite for a web rendering system, device
    660 implementers MUST use the specific upstream build of Chromium in the WebView
    661 implementation. Specifically:</p>
    662 <ul>
    663 <li>Device <code>android.webkit.WebView</code> implementations MUST be based
    664 on the Chromium build from the upstream Android Open Source Project for Android 4.4.
    665 This build includes a specific set of functionality and security fixes for the
    666 WebView. [<a href="#resources83">Resources, 83</a>]</li>
    667 <li>The user agent string reported by the WebView MUST be in this format:<br/>
    668     <code>Mozilla/5.0 (Linux; Android $(VERSION); $(LOCALE); $(MODEL)
    669 Build/$(BUILD)) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0
    670 $(CHROMIUM_VER) Mobile Safari/537.36</code>
    671   <ul>
    672   <li>The value of the $(VERSION) string MUST be the same as the value for
    673 <code>android.os.Build.VERSION.RELEASE</code>.</li>
    674   <li>The value of the $(LOCALE) string is optional, SHOULD follow the ISO
    675 conventions for country code and language, and SHOULD refer to the current
    676 configured locale of the device. If omitted, the trailing semicolon MUST
    677 also be removed.</li>
    678   <li>The value of the $(MODEL) string MUST be the same as the value for
    679 <code>android.os.Build.MODEL</code>.</li>
    680   <li>The value of the $(BUILD) string MUST be the same as the value for
    681 <code>android.os.Build.ID</code>.</li>
    682   <li>The value of the $(CHROMIUM_VER) string MUST be the version of Chromium in
    683 the upstream Android Open Source Project.</li>
    684   <li>Device implementations MAY omit <code>Mobile</code> in the user agent
    685 string.</li>
    686   </ul>
    687 </li>
    688 </ul>
    689 <p>The WebView component SHOULD include support for as much of HTML5 [<a
    690 href="#resources11">Resources, 11</a>] as possible.</p>
    691 <a name="section-3.4.2"></a><h4 id="section-3.4.2">3.4.2. Browser Compatibility</h4>
    692 <p>Device implementations MUST include a standalone Browser application for
    693 general user web browsing. The standalone Browser MAY be based on a
    694 browser technology other than WebKit. However, even if an alternate Browser
    695 application is used, the <code>android.webkit.WebView</code> component
    696 provided to third-party applications MUST be based on WebKit, as described in
    697 Section 3.4.1.</p>
    698 <p>Implementations MAY ship a custom user agent string in the standalone
    699 Browser application.</p>
    700 <p>The standalone Browser application (whether based on the upstream
    701 WebKit Browser application or a third-party replacement) SHOULD include support
    702 for as much of HTML5 [<a href="#resources11">Resources, 11</a>] as possible.
    703 Minimally, device implementations MUST support each of these APIs associated
    704 with HTML5:</p>
    705 <ul>
    706 <li>application cache/offline operation [<a href="#resources12">Resources, 12</a>]</li>
    707 <li>the &lt;video&gt; tag [<a href="#resources13">Resources, 13</a>]</li>
    708 <li>geolocation [<a href="#resources14">Resources, 14</a>]</li>
    709 </ul>
    710 <p>Additionally, device implementations MUST support the HTML5/W3C webstorage
    711 API [<a href="#resources15">Resources, 15</a>], and SHOULD support the
    712 HTML5/W3C IndexedDB API [<a href="#resources16">Resources, 16</a>]. <i>Note
    713 that as the web development standards bodies are transitioning to favor
    714 IndexedDB over webstorage, IndexedDB is expected to become a required
    715 component in a future version of Android.</i></p>
    716 
    717 <a name="section-3.5"></a><h3 id="section-3.5">3.5. API Behavioral Compatibility</h3>
    718 <p>The behaviors of each of the API types (managed, soft, native, and web)
    719 must be consistent with the preferred implementation of the upstream Android
    720 Open Source Project [<a href="#resources03">Resources, 3</a>]. Some specific areas
    721 of compatibility are:</p>
    722 <ul>
    723 <li>Devices MUST NOT change the behavior or semantics of a standard Intent</li>
    724 <li>Devices MUST NOT alter the lifecycle or lifecycle semantics of a
    725     particular type of system component (such as Service, Activity,
    726     ContentProvider, etc.)</li>
    727 <li>Devices MUST NOT change the semantics of a standard permission</li>
    728 </ul>
    729 <p>The above list is not comprehensive. The Compatibility Test Suite (CTS)
    730 tests significant portions of the platform for behavioral compatibility, but
    731 not all. It is the responsibility of the implementer to ensure behavioral
    732 compatibility with the Android Open Source Project.  For this reason, device
    733 implementers SHOULD use the source code available via the Android Open Source
    734 Project where possible, rather than re-implement significant parts of the
    735 system.</p>
    736 
    737 
    738 <a name="section-3.6"></a><h3 id="section-3.6">3.6. API Namespaces</h3>
    739 <p>Android follows the package and class namespace conventions defined by the
    740 Java programming language. To ensure compatibility with third-party
    741 applications, device implementers MUST NOT make any prohibited modifications
    742 (see below) to these package namespaces:</p>
    743 <ul>
    744 <li>java.*</li>
    745 <li>javax.*</li>
    746 <li>sun.*</li>
    747 <li>android.*</li>
    748 <li>com.android.*</li>
    749 </ul>
    750 <p>Prohibited modifications include:</p>
    751 <ul>
    752 <li>Device implementations MUST NOT modify the publicly exposed APIs on the
    753 Android platform by changing any method or class signatures, or by removing
    754 classes or class fields.</li>
    755 <li>Device implementers MAY modify the underlying implementation of the APIs,
    756 but such modifications MUST NOT impact the stated behavior and Java-language
    757 signature of any publicly exposed APIs.</li>
    758 <li>Device implementers MUST NOT add any publicly exposed elements (such as
    759 classes or interfaces, or fields or methods to existing classes or interfaces)
    760 to the APIs above.</li>
    761 </ul>
    762 <p>A "publicly exposed element" is any construct which is not decorated with
    763 the "@hide" marker as used in the upstream Android source code. In other
    764 words, device implementers MUST NOT expose new APIs or alter existing APIs in
    765 the namespaces noted above. Device implementers MAY make internal-only
    766 modifications, but those modifications MUST NOT be advertised or otherwise
    767 exposed to developers.</p>
    768 <p>Device implementers MAY add custom APIs, but any such APIs MUST NOT be in a
    769 namespace owned by or referring to another organization. For instance, device
    770 implementers MUST NOT add APIs to the com.google.* or similar namespace; only
    771 Google may do so. Similarly, Google MUST NOT add APIs to other companies'
    772 namespaces. Additionally, if a device implementation includes custom APIs
    773 outside the standard Android namespace, those APIs MUST be packaged in an
    774 Android shared library so that only apps that explicitly use them (via the
    775 <code>&lt;uses-library&gt;</code> mechanism) are affected by the increased
    776 memory usage of such APIs.</p>
    777 <p>If a device implementer proposes to improve one of the package namespaces
    778 above (such as by adding useful new functionality to an existing API, or
    779 adding a new API), the implementer SHOULD visit source.android.com and begin
    780 the process for contributing changes and code, according to the information on
    781 that site.</p>
    782 <p>Note that the restrictions above correspond to standard conventions for
    783 naming APIs in the Java programming language; this section simply aims to
    784 reinforce those conventions and make them binding through inclusion in this
    785 compatibility definition.</p>
    786 
    787 <a name="section-3.7"></a><h3 id="section-3.7">3.7. Virtual Machine Compatibility</h3>
    788 <p>Device implementations MUST support the full Dalvik Executable (DEX)
    789 bytecode specification and Dalvik Virtual Machine semantics [<a
    790 href="#resources17">Resources, 17</a>].</p>
    791 <p>Device implementations MUST configure Dalvik to allocate memory in
    792 accordance with the upstream Android platform, and as specified by the following
    793 table.  (See <a href="#section-7.1.1">Section 7.1.1</a> for screen size and screen
    794 density definitions.)</p>
    795 
    796 <p>Note that memory values specified below are considered minimum values,
    797 and device implementations MAY allocate more memory per application.</p>
    798 <table>
    799 <tbody>
    800 <tr>
    801 <td><b>Screen Size</b></td>
    802 <td><b>Screen Density</b></td>
    803 <td><b>Application Memory</b></td>
    804 </tr>
    805 <tr>
    806 <td>small / normal / large</td>
    807 <td>ldpi / mdpi</td>
    808 <td>16MB</td>
    809 </tr>
    810 <tr>
    811 <td>small / normal / large</td>
    812 <td>tvdpi / hdpi</td>
    813 <td>32MB</td>
    814 </tr>
    815 <tr>
    816 <td>small / normal / large</td>
    817 <td>xhdpi</td>
    818 <td>64MB</td>
    819 </tr>
    820 <tr>
    821 <td>small / normal / large</td>
    822 <td>400dpi</td>
    823 <td>96MB</td>
    824 </tr>
    825 <tr>
    826 <td>small / normal / large</td>
    827 <td>xxhdpi</td>
    828 <td>128MB</td>
    829 </tr>
    830 <tr>
    831 <td>small / normal / large</td>
    832 <td>xxxhdpi</td>
    833 <td>256MB</td>
    834 </tr>
    835 <tr>
    836 <td>xlarge</td>
    837 <td>mdpi</td>
    838 <td>32MB</td>
    839 </tr>
    840 <tr>
    841 <td>xlarge</td>
    842 <td>tvdpi / hdpi</td>
    843 <td>64MB</td>
    844 </tr>
    845 <tr>
    846 <td>xlarge</td>
    847 <td>xhdpi</td>
    848 <td>128MB</td>
    849 </tr>
    850 <tr>
    851 <td>xlarge</td>
    852 <td>400dpi</td>
    853 <td>192MB</td>
    854 </tr>
    855 <tr>
    856 <td>xlarge</td>
    857 <td>xxhdpi</td>
    858 <td>256MB</td>
    859 </tr>
    860 <tr>
    861 <td>xlarge</td>
    862 <td>xxxhdpi</td>
    863 <td>512MB</td>
    864 </tr>
    865 </tbody>
    866 </table>
    867 
    868 <a name="section-3.8"></a><h3 id="section-3.8">3.8. User Interface Compatibility</h3>
    869 
    870 <a name="section-3.8.1"></a><h4 id="section-3.8.1">3.8.1. Launcher (Home Screen)</h4>
    871 <p>Android includes a launcher application (home screen) and support for third party applications to replace the device
    872 launcher (home screen). Device implementations that allow third party applications to replace the device home screen
    873 MUST declare the platform feature <code>android.software.home_screen</code>.</p>
    874 
    875 <a name="section-3.8.2"></a><h4 id="section-3.8.2">3.8.2. Widgets</h4>
    876 <p>Android defines a component type and corresponding API and lifecycle that allows applications to expose an "AppWidget"
    877 to the end user [<a href="#resources18">Resources, 18</a>]. Device implementations that support embedding widgets on the
    878 home screen MUST meet the following requirements and declare support for platform feature <code>android.software.app_widgets</code>.</p>
    879 <ul>
    880  <li>Device launchers MUST include built-in support for AppWidgets, and expose user
    881       interface affordances to add, configure, view, and remove AppWidgets directly within the Launcher.</li>
    882  <li>Device implementations MUST be capable of rendering widgets that are 4 x 4 in the standard grid size.
    883      (See the App Widget Design Guidelines in the Android SDK documentation [<a href="#resources18">Resources, 18</a>] for details.</li>
    884  <li>Device implementations that include support for lock screen MUST support application widgets on the lock screen.</li>
    885 </ul>
    886 
    887 <a name="section-3.8.3"></a><h4 id="section-3.8.3">3.8.3. Notifications</h4>
    888 <p>Android includes APIs that allow developers to notify users of notable
    889 events [<a href="#resources19">Resources, 19</a>], using hardware and software
    890 features of the device.</p>
    891 <p>Some APIs allow applications to perform notifications or attract attention
    892 using hardware, specifically sound, vibration, and light. Device implementations
    893 MUST support notifications that use hardware features, as described in the SDK
    894 documentation, and to the extent possible with the device implementation
    895 hardware. For instance, if a device implementation includes a vibrator, it
    896 MUST correctly implement the vibration APIs. If a device implementation lacks
    897 hardware, the corresponding APIs MUST be implemented as no-ops. Note that this
    898 behavior is further detailed in <a href="#section-7">Section 7.</a></p>
    899 <p>Additionally, the implementation MUST correctly render all resources
    900 (icons, sound files, etc.) provided for in the APIs [<a
    901 href="#resources20">Resources, 20</a>], or in the
    902 Status/System Bar icon style guide [<a href="#resources21">Resources, 21</a>].
    903 Device implementers MAY provide an alternative user experience for
    904 notifications than that provided by the reference Android Open Source
    905 implementation; however, such alternative notification systems MUST support
    906 existing notification resources, as above.</p>
    907 <p>Android includes support for rich notifications, such as interactive
    908 Views for ongoing notifications. Device implementations MUST properly display
    909 and execute rich notifications, as documented in the Android APIs.</p>
    910 <a name="section-3.8.4"></a><h4 id="section-3.8.4">3.8.4. Search</h4>
    911 <p>Android includes APIs [<a href="#resources22">Resources, 22</a>] that allow
    912 developers to incorporate search into their applications, and expose their
    913 application's data into the global system search. Generally speaking, this
    914 functionality consists of a single, system-wide user interface that allows users
    915 to enter queries, displays suggestions as users type, and displays results. The
    916 Android APIs allow developers to reuse this interface to provide search within
    917 their own apps, and allow developers to supply results to the common global
    918 search user interface.</p>
    919 <p>Device implementations MUST include a single, shared, system-wide search
    920 user interface capable of real-time suggestions in response to user input.
    921 Device implementations MUST implement the APIs that allow developers to reuse
    922 this user interface to provide search within their own applications. Device
    923 implementations MUST implement the APIs that allow third-party applications to
    924 add suggestions to the search box when it is run in global search mode. If no
    925 third-party applications are installed that make use of this functionality,
    926 the default behavior SHOULD be to display web search engine results and
    927 suggestions.</p>
    928 <a name="section-3.8.5"></a><h4 id="section-3.8.5">3.8.5. Toasts</h4>
    929 <p>Applications can use the "Toast" API (defined in [<a
    930 href="#resources23">Resources, 23</a>]) to
    931 display short non-modal strings to the end user, that disappear after a brief
    932 period of time. Device implementations MUST display Toasts from applications
    933 to end users in some high-visibility manner.</p>
    934 
    935 <a name="section-3.8.6"></a><h4 id="section-3.8.6">3.8.6. Themes</h4>
    936 <p>Android provides "themes" as a mechanism for applications to apply styles
    937 across an entire Activity or application.</p>
    938 <p>Android includes a "Holo" theme family as a set of defined styles for 
    939 application developers to use if they want to match the Holo theme look and 
    940 feel as defined by the Android SDK [<a href="#resources24">Resources, 24</a>]. 
    941 Device implementations MUST NOT alter any of the Holo theme attributes exposed 
    942 to applications [<a href="#resources25">Resources, 25</a>].</p>
    943 <p>Android also includes a "Device Default" theme family as a set of defined
    944 styles for application developers to use if they want to match the look and feel
    945 of the device theme as defined by the device implementer. Device implementations
    946 MAY modify the DeviceDefault theme attributes exposed to applications
    947 [<a href="#resources25">Resources, 25</a>].</p>
    948 <p>From version 4.4, Android now supports a new variant theme with translucent system bars, 
    949 allowing application developers to fill the area behind the status and
    950 navigation bar with their app content. To enable a consistent developer
    951 experience in this configuration, it is important the status bar icon style
    952 is maintained across different device implementations. Therefore, Android
    953 device implementations MUST use white for system status icons (such as signal
    954 strength and battery level) and notifications issued by the system, unless the
    955 icon is indicating a problematic status
    956 [<a href="#resources25">Resources, 25</a>].</p>
    957 
    958 <a name="section-3.8.7"></a><h4 id="section-3.8.7">3.8.7. Live Wallpapers</h4>
    959 <p>Android defines a component type and corresponding API and lifecycle that
    960 allows applications to expose one or more "Live Wallpapers" to the end user
    961 [<a href="#resources26">Resources, 26</a>]. Live Wallpapers are animations,
    962 patterns, or similar images with limited input capabilities that display as a
    963 wallpaper, behind other applications.</p>
    964 <p>Hardware is considered capable of reliably running live wallpapers if it
    965 can run all live wallpapers, with no limitations on functionality, at a
    966 reasonable framerate with no adverse affects on other applications. If
    967 limitations in the hardware cause wallpapers and/or applications to crash,
    968 malfunction, consume excessive CPU or battery power, or run at unacceptably
    969 low frame rates, the hardware is considered incapable of running live
    970 wallpaper. As an example, some live wallpapers may use an Open GL 1.0 or 2.0
    971 context to render their content. Live wallpaper will not run reliably on
    972 hardware that does not support multiple OpenGL contexts because the live
    973 wallpaper use of an OpenGL context may conflict with other applications that
    974 also use an OpenGL context.</p>
    975 <p>Device implementations capable of running live wallpapers reliably as
    976 described above SHOULD implement live wallpapers. Device implementations
    977 determined to not run live wallpapers reliably as described above MUST NOT
    978 implement live wallpapers.</p>
    979 <a name="section-3.8.8"></a><h4 id="section-3.8.8">3.8.8. Recent Application Display</h4>
    980 <p>The upstream Android source code includes a user interface for
    981 displaying recent applications using a thumbnail image of the application's
    982 graphical state at the moment the user last left the application. Device
    983 implementations MAY alter or eliminate this user interface; however, a future
    984 version of Android is planned to make more extensive use of this
    985 functionality. Device implementations are strongly encouraged to use the
    986 upstream Android user interface (or a similar thumbnail-based interface)
    987 for recent applications, or else they may not be compatible with a future
    988 version of Android.</p>
    989 <a name="section-3.8.9"></a><h4 id="section-3.8.9">3.8.9. Input Management</h4>
    990 <p>Android includes support for Input Management and support for third party input method editors.
    991 Device implementations that allow users to use third party input methods on the device MUST declare the platform feature
    992 <code>android.software.input_methods</code> and support IME APIs as defined in the Android SDK documentation.</p>
    993 <p>Device implementations that declare the <code>android.software.input_methods</code> feature MUST provide a user-accessible mechanism
    994 to add and configure third party input methods. Device implementations MUST display the settings interface in response to the
    995 <code>android.settings.INPUT_METHOD_SETTINGS</code> intent.</p>
    996 
    997 <a name="section-3.8.10"></a><h4 id="section-3.8.10">3.8.10. Lock Screen Media Remote Control</h4>
    998 <p>Android includes support for Remote Control API that lets media applications integrate with playback controls
    999 that are displayed in a remote view like the device lock screen [<a href="#resources74">Resources, 74</a>]. Device implementations 
   1000 that support lock screen in the device and allow users to add widgets on the home screen MUST
   1001 include support for embedding remote controls in the device lock screen [<a href="#resources69">Resources, 69</a>].</p>
   1002 
   1003 <a name="section-3.8.11"></a><h4 id="section-3.8.11">3.8.11. Dreams</h4>
   1004 <p>Android includes support for interactive screensavers called Dreams [<a href="#resources76">Resources, 76</a>].
   1005 Dreams allows users to interact with applications when a charging device is idle, or docked in a desk dock. Device implementations
   1006 MUST include support for Dreams and provide a settings option for users to configure Dreams.</p>
   1007 
   1008 <a name="section-3.8.12"></a><h4 id="section-3.8.12">3.8.12. Location</h4>
   1009 <p>Location modes MUST be displayed in the Location menu within Settings [<a
   1010 href="#resources87">Resources, 87</a>]. Location services provided through the
   1011 <code>SettingInjectorService</code> introduced in Android 4.4 must be displayed 
   1012 in the same Location menu [<a href="#resources89">Resources, 89</a>].</p>
   1013 
   1014 <a name="section-3.8.13"></a><h4 id="section-3.8.13">3.8.13. Unicode</h4>
   1015 <p>Android 4.4 includes support for color emoji characters. Android device
   1016 implementations MUST provide an input method to the user for the Emoji
   1017 characters defined in Unicode 6.1 [<a href="#resources82">Resources, 82</a>]
   1018 and MUST be capable of rendering these emoji characters in color glyph.</p>
   1019 
   1020 <a name="section-3.9"></a><h3 id="section-3.9">3.9. Device Administration</h3>
   1021 <p>Android includes features that allow security-aware applications
   1022 to perform device administration functions at the system level, such as enforcing
   1023 password policies or performing remote wipe, through the Android Device
   1024 Administration API [<a href="#resources27">Resources, 27</a>]. Device
   1025 implementations MUST provide an implementation of the <code>DevicePolicyManager</code>
   1026 class [<a href="#resources28">Resources, 28</a>]. Device implementations that include support for lock screen
   1027 MUST support the full range of device administration policies defined in the Android SDK
   1028 documentation [<a href="#resources27">Resources, 27</a>].</p>
   1029 <p>Device implementations MAY have a preinstalled application performing device
   1030 administration functions but this application MUST NOT be set out-of-the box
   1031 as the default Device Owner app [<a href="#resources84">Resources, 84</a>].</p>
   1032 
   1033 <a name="section-3.10"></a><h3 id="section-3.10">3.10. Accessibility</h3>
   1034 <p>Android provides an accessibility layer that helps users with disabilities
   1035 to navigate their devices more easily. In addition, Android provides
   1036 platform APIs that enable accessibility service implementations to receive
   1037 callbacks for user and system events and generate alternate feedback mechanisms,
   1038 such as text-to-speech, haptic feedback, and trackball/d-pad navigation
   1039 [<a href="#resources29">Resources, 29</a>]. Device implementations MUST provide an
   1040 implementation of the Android accessibility framework consistent with the
   1041 default Android implementation.  Specifically, device implementations MUST meet
   1042 the following requirements.</p>
   1043 <ul>
   1044  <li>Device implementations MUST support third party accessibility service
   1045      implementations through the <code>android.accessibilityservice</code>
   1046      APIs [<a href="#resources30">Resources, 30</a>].</li>
   1047  <li>Device implementations MUST generate <code>AccessibilityEvents</code>
   1048      and deliver these events to all registered <code>AccessibilityService
   1049      </code> implementations in a manner consistent with the default Android
   1050      implementation.</li>
   1051  <li>Device implementations MUST provide a user-accessible mechanism to enable
   1052      and disable accessibility services, and MUST display this interface in
   1053      response to the
   1054      <code>android.provider.Settings.ACTION_ACCESSIBILITY_SETTINGS</code>
   1055      intent.</li>
   1056 </ul>
   1057 <p>Additionally, device implementations SHOULD provide an implementation
   1058 of an accessibility service on the device, and SHOULD provide a mechanism
   1059 for users to enable the accessibility service during device setup.  An open
   1060 source implementation of an accessibility service is available from the Eyes
   1061 Free project [<a href="#resources31">Resources, 31</a>].</p>
   1062 
   1063 <a name="section-3.11"></a><h3 id="section-3.11">3.11. Text-to-Speech</h3>
   1064 <p>Android includes APIs that allow applications to make use of
   1065 text-to-speech (TTS) services, and allows service providers to provide
   1066 implementations of TTS services [<a href="#resources32">Resources, 32</a>].
   1067 Device implementations MUST meet these requirements related to the Android TTS
   1068 framework:</p>
   1069 <ul>
   1070   <li>Device implementations MUST support the Android TTS framework APIs and
   1071       SHOULD include a TTS engine supporting the languages available on the
   1072       device. Note that the upstream Android open source software includes a
   1073       full-featured TTS engine implementation.</li>
   1074   <li>Device implementations MUST support installation of third-party TTS
   1075       engines.</li>
   1076   <li>Device implementations MUST provide a user-accessible interface that allows
   1077       users to select a TTS engine for use at the system level.</li>
   1078 </ul>
   1079 
   1080 <a name="section-4"></a><h2 id="section-4">4. Application Packaging Compatibility</h2>
   1081 <p>Device implementations MUST install and run Android ".apk" files as
   1082 generated by the "aapt" tool included in the official Android SDK [<a
   1083 href="#resources33">Resources, 33</a>].</p>
   1084 <p>Devices implementations MUST NOT extend either the .apk [<a
   1085 href="#resources34">Resources, 34</a>], Android Manifest [<a
   1086 href="#resources35">Resources, 35</a>],
   1087 Dalvik bytecode [<a href="#resources17">Resources, 17</a>], or renderscript
   1088 bytecode formats in such a way that would prevent those files from installing
   1089 and running correctly on other compatible devices. Device implementers SHOULD
   1090 use the reference upstream implementation of Dalvik, and the reference
   1091 implementation's package management system.</p>
   1092 
   1093 <a name="section-5"></a><h2 id="section-5">5. Multimedia Compatibility</h2>
   1094 <p>Device implementations MUST include at least one form of audio output, such as
   1095 speakers, headphone jack, external speaker connection, etc.</p>
   1096 <a name="section-5.1"></a><h3 id="section-5.1">5.1. Media Codecs</h3>
   1097 <p>Device implementations MUST support the core media formats specified
   1098 in the Android SDK documentation [<a href="#resources58">Resources, 58</a>] except
   1099 where explicitly permitted in this document. Specifically, device implementations
   1100 MUST support the media formats, encoders, decoders, file types and container
   1101 formats defined in the tables below. All of these codecs are provided as
   1102 software implementations in the preferred Android implementation from the Android
   1103 Open Source Project.</p>
   1104 
   1105 <p><strong>Please note that neither Google nor the Open Handset Alliance make any
   1106 representation that these codecs are unencumbered by third-party patents.
   1107 Those intending to use this source code in hardware or software products are
   1108 advised that implementations of this code, including in open source software
   1109 or shareware, may require patent licenses from the relevant patent
   1110 holders.</strong></p>
   1111 
   1112 <p>Note that these tables do not list specific bitrate requirements for
   1113 most video codecs because current device hardware does not necessarily support
   1114 bitrates that map exactly to the required bitrates specified by the relevant
   1115 standards. Instead, device implementations SHOULD support the highest bitrate
   1116 practical on the hardware, up to the limits defined by the specifications.</p>
   1117 <div style="page-break-before: always;"></div>
   1118 <table>
   1119 <tbody>
   1120 
   1121 <tr>
   1122 <th>Type</th>
   1123 <th>Format / Codec</th>
   1124 <th>Encoder</th>
   1125 <th>Decoder</th>
   1126 <th>Details</th>
   1127 <th>File Type(s) / Container Formats</th>
   1128 </tr>
   1129 
   1130 <tr>
   1131 <td rowspan="11">Audio</td>
   1132 <td>MPEG-4 AAC Profile (AAC LC)</td>
   1133 <td>REQUIRED for device implementations that include microphone hardware
   1134 and define <code>android.hardware.microphone</code>.</td>
   1135 <td style="text-align: center;">REQUIRED</td>
   1136 <td rowspan="1"> Support for mono/stereo/5.0/5.1* content with standard sampling rates from 8 to 48 kHz.</td>
   1137 <td rowspan="4">
   1138   <ul>
   1139     <li>3GPP (.3gp)</li>
   1140     <li>MPEG-4 (.mp4, .m4a)</li>
   1141     <li>ADTS raw AAC (.aac, decode in Android 3.1+, encode in Android 4.0+, ADIF not supported)</li>
   1142     <li>MPEG-TS (.ts, not seekable, Android 3.0+)</li>
   1143   </ul>
   1144 </td>
   1145 </tr>
   1146 
   1147 <tr>
   1148 <td>MPEG-4 HE AAC Profile (AAC+)</td>
   1149 <td>REQUIRED for device implementations that include microphone hardware and define android.hardware.microphone</td>
   1150 <td style="text-align: center;">REQUIRED</td>
   1151 <td>Support for mono/stereo/5.0/5.1* content with standard sampling rates from 16 to 48 kHz.</td>
   1152 </tr>
   1153 
   1154 <tr>
   1155 <td>MPEG-4 HE AAC v2 Profile (enhanced AAC+)</td>
   1156 <td>&nbsp;</td>
   1157 <td style="text-align: center;">REQUIRED</td>
   1158 <td>Support for mono/stereo/5.0/5.1* content with standard sampling rates from 16 to 48 kHz.</td>
   1159 </tr>
   1160 
   1161 <tr>
   1162 <td>MPEG-4 Audio Object Type ER AAC ELD (Enhanced Low Delay AAC)</td>
   1163 <td>REQUIRED for device implementations that include microphone hardware and define android.hardware.microphone</td>
   1164 <td style="text-align: center;">REQUIRED</td>
   1165 <td>Support for mono/stereo content with standard
   1166 sampling rates from 16 to 48 kHz.</td>
   1167 </tr>
   1168 
   1169 <tr>
   1170 <td>AMR-NB</td>
   1171 <td>REQUIRED for device implementations that include microphone hardware
   1172 and define <code>android.hardware.microphone</code>.</td>
   1173 <td style="text-align: center;">REQUIRED</td>
   1174 <td>4.75 to 12.2 kbps sampled @ 8kHz</td>
   1175 <td>3GPP (.3gp)
   1176 </td>
   1177 </tr>
   1178 
   1179 <tr>
   1180 <td>AMR-WB</td>
   1181 <td>REQUIRED for device implementations that include microphone hardware
   1182 and define <code>android.hardware.microphone</code>.</td>
   1183 <td style="text-align: center;">REQUIRED</td>
   1184 <td>9 rates from 6.60 kbit/s to 23.85 kbit/s sampled @ 16kHz</td>
   1185 <td>3GPP (.3gp)</td>
   1186 </tr>
   1187 
   1188 <tr>
   1189 <td>FLAC</td>
   1190 <td>&nbsp;</td>
   1191 <td style="text-align: center;">REQUIRED<br/><small>(Android 3.1+)</small></td>
   1192 <td>Mono/Stereo (no multichannel). Sample rates up to 48 kHz (but up to 44.1
   1193 kHz is recommended on devices with 44.1 kHz output, as the 48 to 44.1 kHz
   1194 downsampler does not include a low-pass filter). 16-bit recommended;
   1195 no dither applied for 24-bit.
   1196 </td>
   1197 <td>FLAC (.flac) only</td>
   1198 </tr>
   1199 
   1200 <tr>
   1201 <td>MP3</td>
   1202 <td>&nbsp;</td>
   1203 <td style="text-align: center;">REQUIRED</td>
   1204 <td>Mono/Stereo 8-320Kbps constant (CBR) or variable bit-rate (VBR)
   1205 </td>
   1206 <td>MP3 (.mp3)</td>
   1207 </tr>
   1208 
   1209 <tr>
   1210 <td>MIDI</td>
   1211 <td>&nbsp;</td>
   1212 <td style="text-align: center;">REQUIRED</td>
   1213 <td>MIDI Type 0 and 1. DLS Version 1 and 2. XMF and Mobile XMF. Support for ringtone formats RTTTL/RTX, OTA, and iMelody </td>
   1214 <td>
   1215   <ul>
   1216     <li>Type 0 and 1 (.mid, .xmf, .mxmf)</li>
   1217     <li>RTTTL/RTX (.rtttl, .rtx)</li>
   1218     <li>OTA (.ota)</li>
   1219     <li>iMelody (.imy)</li>
   1220   </ul>
   1221 </td>
   1222 </tr>
   1223 
   1224 <tr>
   1225 <td>Vorbis</td>
   1226 <td>&nbsp;</td>
   1227 <td style="text-align: center;">REQUIRED</td>
   1228 <td>&nbsp;</td>
   1229 <td>
   1230   <ul>
   1231     <li>Ogg (.ogg)</li>
   1232     <li>Matroska (.mkv)</li>
   1233   </ul>
   1234 </td>
   1235 </tr>
   1236 
   1237 <tr>
   1238 <td>PCM/WAVE</td>
   1239 <td style="text-align: center;">REQUIRED</td>
   1240 <td style="text-align: center;">REQUIRED</td>
   1241 <td>8-bit and 16-bit linear PCM** (rates up to limit of hardware).Devices MUST support sampling rates
   1242 for raw PCM recording at 8000,16000 and 44100 Hz frequencies</td>
   1243 <td>WAVE (.wav)</td>
   1244 </tr>
   1245 
   1246 <tr>
   1247 <td rowspan="5">Image</td>
   1248 <td>JPEG</td>
   1249 <td style="text-align: center;">REQUIRED</td>
   1250 <td style="text-align: center;">REQUIRED</td>
   1251 <td>Base+progressive</td>
   1252 <td>JPEG (.jpg)</td>
   1253 </tr>
   1254 
   1255 <tr>
   1256 <td>GIF</td>
   1257 <td>&nbsp;</td>
   1258 <td style="text-align: center;">REQUIRED</td>
   1259 <td>&nbsp;</td>
   1260 <td>GIF (.gif)</td>
   1261 </tr>
   1262 
   1263 <tr>
   1264 <td>PNG</td>
   1265 <td style="text-align: center;">REQUIRED</td>
   1266 <td style="text-align: center;">REQUIRED</td>
   1267 <td>&nbsp;</td>
   1268 <td>PNG (.png)</td>
   1269 </tr>
   1270 
   1271 <tr>
   1272 <td>BMP</td>
   1273 <td>&nbsp;</td>
   1274 <td style="text-align: center;">REQUIRED</td>
   1275 <td>&nbsp;</td>
   1276 <td>BMP (.bmp)</td>
   1277 </tr>
   1278 
   1279 
   1280 <tr>
   1281 <td>WEBP</td>
   1282 <td style="text-align: center;">REQUIRED</td>
   1283 <td style="text-align: center;">REQUIRED</td>
   1284 <td>&nbsp;</td>
   1285 <td>WebP (.webp)</td>
   1286 </tr>
   1287 
   1288 <tr>
   1289 <td rowspan="5">Video</td>
   1290 <td>H.263</td>
   1291 <td>REQUIRED for device implementations that include camera hardware
   1292 and define <code>android.hardware.camera</code> or
   1293 <code>android.hardware.camera.front</code>.</td>
   1294 <td style="text-align: center;">REQUIRED</td>
   1295 <td>&nbsp;</td>
   1296 <td>
   1297   <ul>
   1298     <li>3GPP (.3gp)</li>
   1299     <li>MPEG-4 (.mp4)</li>
   1300   </ul>
   1301 </td>
   1302 </tr>
   1303 
   1304 <tr>
   1305 <td>H.264 AVC</td>
   1306 <td>REQUIRED for device implementations that include camera hardware
   1307 and define <code>android.hardware.camera</code> or
   1308 <code>android.hardware.camera.front</code>.</td>
   1309 <td style="text-align: center;">REQUIRED</td>
   1310 <td>Baseline Profile (BP)</td>
   1311 <td>
   1312   <ul>
   1313     <li>3GPP (.3gp)</li>
   1314     <li>MPEG-4 (.mp4)</li>
   1315     <li>MPEG-TS (.ts, AAC audio only, not seekable, Android 3.0+)</li>
   1316   </ul>
   1317 </td>
   1318 </tr>
   1319 
   1320 <tr>
   1321 <td>MPEG-4 SP</td>
   1322 <td>&nbsp;</td>
   1323 <td style="text-align: center;">REQUIRED</td>
   1324 <td>&nbsp;</td>
   1325 <td>3GPP (.3gp)</td>
   1326 </tr>
   1327 
   1328 <tr>
   1329 <td>VP8****</td>
   1330 <td style="text-align: center;">REQUIRED<br/><small>(Android 4.3+)</small></td>
   1331 <td style="text-align: center;">REQUIRED<br/><small>(Android 2.3.3+)</small></td>
   1332 <td>&nbsp;</td>
   1333 <td><a href="http://www.webmproject.org/">WebM</a> (.webm) and Matroska (.mkv, Android 4.0+)***</td>
   1334 </tr>
   1335 
   1336 <tr>
   1337 <td>VP9</td>
   1338 <td>&nbsp;</td>
   1339 <td style="text-align: center;">REQUIRED<br/><small>(Android 4.4+)</small></td>
   1340 <td>&nbsp;</td>
   1341 <td><a href="http://www.webmproject.org/">WebM</a> (.webm) and Matroska (.mkv,
   1342 Android 4.0+)***</td>
   1343 </tr>
   1344 
   1345 </tbody></table>
   1346 <ul>
   1347 <li>*Note: Only downmix of 5.0/5.1 content is required; recording or rendering more than 2 channels is optional.</li>
   1348 <li>**Note: 16-bit linear PCM capture is mandatory. 8-bit linear PCM capture is not mandatory.</li>
   1349 <li>***Note: Device implementations SHOULD support writing Matroska WebM files.</li>
   1350 <li>****Note: For acceptable quality of web video streaming and video-conference
   1351 services, device implementations SHOULD use a hardware VP8 codec that meets the
   1352 requirements in [<a href="#resources86">Resources, 86</a>].</li>
   1353 </ul>
   1354 
   1355 <a name="section-5.2"></a><h3 id="section-5.2">5.2. Video Encoding</h3>
   1356 <p>Android device implementations that include a rear-facing camera and declare
   1357 <code>android.hardware.camera</code> SHOULD support the following H.264 video encoding
   1358 profiles.</p>
   1359 <table>
   1360   <thead>
   1361   <tr>
   1362     <th>&nbsp;</th>
   1363     <th>SD (Low quality)</th>
   1364     <th>SD (High quality)</th>
   1365     <th>HD (When supported by hardware)</th>
   1366   </tr>
   1367   </thead>
   1368   <tbody>
   1369   <tr>
   1370     <th>Video resolution</th>
   1371     <td>176 x 144 px</td>
   1372     <td>480 x 360 px</td>
   1373     <td>1280 x 720 px</td>
   1374   </tr>
   1375   <tr>
   1376     <th>Video frame rate</th>
   1377     <td>12 fps</td>
   1378     <td>30 fps</td>
   1379     <td>30 fps</td>
   1380   </tr>
   1381   <tr>
   1382     <th>Video bitrate</th>
   1383     <td>56 Kbps</td>
   1384     <td>500 Kbps or higher</td>
   1385     <td>2 Mbps or higher</td>
   1386   </tr>
   1387   <tr>
   1388     <th>Audio codec</th>
   1389     <td>AAC-LC</td>
   1390     <td>AAC-LC</td>
   1391     <td>AAC-LC</td>
   1392   </tr>
   1393   <tr>
   1394     <th>Audio channels</th>
   1395     <td>1 (mono)</td>
   1396     <td>2 (stereo)</td>
   1397     <td>2 (stereo)</td>
   1398   </tr>
   1399   <tr>
   1400     <th>Audio bitrate</th>
   1401     <td>24 Kbps</td>
   1402     <td>128 Kbps</td>
   1403     <td>192 Kbps</td>
   1404   </tr>
   1405   </tbody>
   1406 </table>
   1407 
   1408 <p>Android device implementations that include a rear-facing camera and declare
   1409 <code>android.hardware.camera</code> SHOULD support the following VP8 video encoding profiles</p>
   1410 <table>
   1411   <thead>
   1412   <tr>
   1413     <th>&nbsp;</th>
   1414     <th>SD (Low quality)</th>
   1415     <th>SD (High quality)</th>
   1416     <th>HD 720p <br/> (When supported by hardware)</th>
   1417     <th>HD 1080p <br/>(When supported by hardware)</th>
   1418   </tr>
   1419   </thead>
   1420   <tbody>
   1421   <tr>
   1422     <th>Video resolution</th>
   1423     <td>320 x 180 px</td>
   1424     <td>640 x 360 px</td>
   1425     <td>1280 x 720 px</td>
   1426     <td>1920 x 1080 px</td>
   1427   </tr>
   1428   <tr>
   1429     <th>Video frame rate</th>
   1430     <td>30 fps</td>
   1431     <td>30 fps</td>
   1432     <td>30 fps</td>
   1433     <td>30 fps</td>
   1434   </tr>
   1435   <tr>
   1436     <th>Video bitrate</th>
   1437     <td>800 Kbps</td>
   1438     <td>2 Mbps</td>
   1439     <td>4 Mbps</td>
   1440     <td>10 Mbps</td>
   1441   </tr>
   1442   </tbody>
   1443 </table>
   1444 
   1445 <a name="section-5.3"></a><h3 id="section-5.3">5.3. Video Decoding</h3>
   1446 <p>Android device implementations SHOULD support the following VP8, VP9 and
   1447 H.264 video decoding profiles. Device implementations SHOULD also support
   1448 dynamic video resolution switching within the same stream for VP8, VP9 and
   1449 H.264 codecs.</p>
   1450 <table>
   1451   <thead>
   1452   <tr>
   1453     <th>&nbsp;</th>
   1454     <th>SD (Low quality)</th>
   1455     <th>SD (High quality)</th>
   1456     <th>HD 720p <br/> (When supported by hardware)</th>
   1457     <th>HD 1080p <br/>(When supported by hardware)</th>
   1458   </tr>
   1459   </thead>
   1460   <tbody>
   1461   <tr>
   1462     <th>Video resolution</th>
   1463     <td>320 x 180 px</td>
   1464     <td>640 x 360 px</td>
   1465     <td>1280 x 720 px</td>
   1466     <td>1920 x 1080 px</td>
   1467   </tr>
   1468   <tr>
   1469     <th>Video frame rate</th>
   1470     <td>30 fps</td>
   1471     <td>30 fps</td>
   1472     <td>30 fps</td>
   1473     <td>30 fps</td>
   1474   </tr>
   1475   <tr>
   1476     <th>Video bitrate</th>
   1477     <td>800 Kbps</td>
   1478     <td>2 Mbps</td>
   1479     <td>8 Mbps</td>
   1480     <td>20 Mbps</td>
   1481   </tr>
   1482   </tbody>
   1483 </table>
   1484 
   1485 <a name="section-5.4"></a><h3 id="section-5.4">5.4. Audio Recording</h3>
   1486 <p>When an application has used the <code>android.media.AudioRecord</code> API to
   1487 start recording an audio stream, device implementations that include microphone
   1488 hardware and declare <code>android.hardware.microphone</code> MUST sample and
   1489 record audio with each of these behaviors:</p>
   1490 <ul>
   1491 <li>The device SHOULD exhibit approximately flat amplitude versus frequency
   1492     characteristics; specifically, &plusmn;3 dB, from 100 Hz to 4000 Hz</li>
   1493 <li>Audio input sensitivity SHOULD be set such that a 90 dB sound power level
   1494     (SPL) source at 1000 Hz yields RMS of 2500 for 16-bit samples.</li>
   1495 <li>PCM amplitude levels SHOULD linearly track input SPL changes over at least
   1496     a 30 dB range from -18 dB to +12 dB re 90 dB SPL at the microphone.</li>
   1497 <li>Total harmonic distortion SHOULD be less than 1% for 1Khz at 90 dB SPL input level.</li>
   1498 </ul>
   1499 <p>In addition to the above recording specifications, when an application has
   1500 started recording an audio stream using the
   1501 <code>android.media.MediaRecorder.AudioSource.VOICE_RECOGNITION</code> audio
   1502 source:</p>
   1503 <ul>
   1504 <li>Noise reduction processing, if present, MUST be disabled.</li>
   1505 <li>Automatic gain control, if present, MUST be disabled.</li>
   1506 </ul>
   1507 <p>From Android 4.4, <code>android.media.MediaRecorder.AudioSource</code> class has a new
   1508 audio source: <code>REMOTE_SUBMIX</code>. Devices MUST properly implement the
   1509 <code>REMOTE_SUBMIX</code> audio source so that when an application uses the 
   1510 <code>android.media.AudioRecord</code> API to record from this audio source, 
   1511 it can capture a mix of all audio streams except for the following:</p>
   1512 <ul>
   1513 <li><code>STREAM_RING</code></li>
   1514 <li><code>STREAM_ALARM</code></li>
   1515 <li><code>STREAM_NOTIFICATION</code></li>
   1516 </ul>
   1517 <p><b>Note:</b> while some of the requirements outlined above are stated as
   1518 "SHOULD" since Android 4.3, the Compatibility Definition for a future version
   1519 is planned to change these to "MUST". That is, these requirements are optional
   1520 in Android 4.4 but <b>will be required</b> by a future version. Existing and new
   1521 devices that run Android are <b>very strongly encouraged to meet these
   1522 requirements</b>, or they will not be able to attain Android
   1523 compatibility when upgraded to the future version.</p>
   1524 <p>If the platform supports noise suppression technologies tuned for speech
   1525 recognition, the effect MUST be controllable from the 
   1526 <code>android.media.audiofx.NoiseSuppressor</code> API. Moreover, the "uuid"
   1527 field for the noise suppressor's effect descriptor MUST uniquely identify each
   1528 implementation of the noise suppression technology.</p>
   1529 
   1530 <a name="section-5.5"></a><h3 id="section-5.5">5.5. Audio Latency</h3>
   1531 <p>Audio latency is the time delay as an audio signal passes through a system.
   1532 Many classes of
   1533 applications rely on short latencies, to achieve real-time sound effects.</p>
   1534 <p>For the purposes of this section:</p>
   1535 <ul>
   1536 <li>"output latency" is defined as the interval between when an application
   1537 writes a frame of PCM-coded data and when the corresponding sound can be heard
   1538 by an external listener or observed by a transducer</li>
   1539 <li>"cold output latency" is defined as the output latency for the first frame, when
   1540     the audio output system has been idle and powered down prior to the request</li>
   1541 <li>"continuous output latency" is defined as the output latency for subsequent frames,
   1542     after the device is already playing audio</li>
   1543 <li>"input latency" is the interval between when an external sound is presented
   1544 to the device and when an application reads the corresponding frame of PCM-coded data</li>
   1545 <li>"cold input latency" is defined as the sum of lost input time
   1546     and the input latency for the first frame, when
   1547     the audio input system has been idle and powered down prior to the request</li>
   1548 <li>"continuous input latency" is defined as the input latency for subsequent frames,
   1549     while the device is already capturing audio</li>
   1550 <li>"OpenSL ES PCM buffer queue API" is the set of PCM-related OpenSL ES APIs within Android NDK;
   1551 see <i>NDK_root</i><code>/docs/opensles/index.html</code></li>
   1552 </ul>
   1553 <p>Per <a href="#section-5">Section 5</a>,
   1554 all compatible device implementations MUST include at least one form of audio output.
   1555 Device implementations SHOULD meet or exceed these output latency requirements:</p>
   1556 <ul>
   1557 <li>cold output latency of 100 milliseconds or less</li>
   1558 <li>continuous output latency of 45 milliseconds or less</li>
   1559 </ul>
   1560 <p>If a device implementation meets the requirements of this section
   1561 after any initial calibration
   1562 when using the OpenSL ES PCM buffer queue API,
   1563 for continuous output latency and cold output latency
   1564 over at least one supported audio output device, it MAY
   1565 report support for low-latency audio, by reporting the feature
   1566 "android.hardware.audio.low-latency" via the
   1567 <code>android.content.pm.PackageManager</code> class. [<a
   1568 href="#resources37">Resources, 37</a>] Conversely, if the device
   1569 implementation does not meet these requirements it MUST NOT report support for
   1570 low-latency audio.</p>
   1571 <p>
   1572 Per <a href="#section-7.2.5">Section 7.2.5</a>,
   1573 microphone hardware may be omitted by device implementations.</p>
   1574 <p>
   1575 Device implementations that include microphone
   1576 hardware and declare <code>android.hardware.microphone</code> SHOULD
   1577 meet these input audio latency requirements:</p>
   1578 <ul>
   1579 <li>cold input latency of 100 milliseconds or less</li>
   1580 <li>continuous input latency of 50 milliseconds or less</li>
   1581 </ul>
   1582 
   1583 <a name="section-5.6"></a><h3 id="section-5.6">5.6. Network Protocols</h3>
   1584 <p>Devices MUST support the media network protocols for audio and video playback
   1585 as specified in the Android SDK documentation
   1586 [<a href="#resources58">Resources, 58</a>].  Specifically, devices MUST support
   1587 the following media network protocols:</p>
   1588 <ul>
   1589 <li>RTSP (RTP, SDP)</li>
   1590 <li>HTTP(S) progressive streaming</li>
   1591 <li>HTTP(S) Live Streaming draft protocol, Version 3 [<a href="#resources59">Resources, 59</a>]</li>
   1592 </ul>
   1593 <a name="section-6"></a><h2 id="section-6">6. Developer Tools and Options Compatibility</h2>
   1594 
   1595 <a name="section-6.1"></a><h3 id="section-6.1">6.1. Developer Tools</h3>
   1596 <p>Device implementations MUST support the Android Developer Tools provided in the Android SDK.
   1597 Specifically, Android-compatible devices MUST be compatible with:</p>
   1598 <ul>
   1599 <li><b>Android Debug Bridge (known as adb)</b> [<a href="#resources33">Resources, 33</a>]<br/>
   1600 Device implementations MUST support all <code>adb</code> functions as
   1601 documented in the Android SDK. The device-side <code>adb</code> daemon MUST
   1602 be inactive by default, and there MUST be a user-accessible mechanism to turn
   1603 on the Android Debug Bridge.</li>
   1604 <li>Android includes support for secure adb. Secure adb enables adb on known authenticated hosts.
   1605 Device implementations MUST support secure adb.</li>
   1606 <li><b>Dalvik Debug Monitor Service (known as ddms)</b> [<a href="#resources33">Resources, 33</a>]<br/>
   1607 Device implementations MUST support all <code>ddms</code> features as documented in the
   1608 Android SDK. As <code>ddms</code> uses <code>adb</code>, support for
   1609 <code>ddms</code> SHOULD be inactive by default,
   1610 but MUST be supported whenever the user has activated the Android Debug
   1611 Bridge, as above.</li>
   1612 <li><b>Monkey</b> [<a href="#resources36">Resources, 36</a>]<br/>
   1613 Device implementations MUST include the Monkey framework, and make it
   1614 available for applications to use.</li>
   1615 <li><b>SysTrace</b> [<a href="#resources33">Resources, 33</a>]<br/>
   1616 Device implementations MUST support systrace tool as documented in the Android SDK.
   1617 Systrace must be inactive by default, and there MUST be a user-accessible mechanism to turn
   1618 on Systrace.</li>
   1619 </ul>
   1620 <p>Most Linux-based systems and Apple Macintosh systems recognize Android
   1621 devices using the standard Android SDK tools, without additional support;
   1622 however Microsoft Windows systems typically require a driver for new Android
   1623 devices. (For instance, new vendor IDs and sometimes new device IDs require
   1624 custom USB drivers for Windows systems.) If a device implementation is
   1625 unrecognized by the <code>adb</code> tool as provided in the standard Android
   1626 SDK, device implementers MUST provide Windows drivers allowing developers to
   1627 connect to the device using the <code>adb</code> protocol. These drivers MUST
   1628 be provided for Windows XP, Windows Vista, Windows 7, and Windows 8, in both 32-bit and
   1629 64-bit versions.</p>
   1630 
   1631 <a name="section-6.2"></a><h3 id="section-6.2">6.2. Developer Options</h3>
   1632 <p>Android includes support for developers to configure application development-related settings.
   1633 Device implementations MUST honor the android.settings.APPLICATION_DEVELOPMENT_SETTINGS intent to show
   1634 application development-related settings [<a href="#resources77">Resources, 77</a>]. The upstream Android
   1635 implementation hides the Developer Options menu by default, and enables users to launch Developer Options
   1636 after pressing seven (7) times on the Settings > About Device > Build Number menu item. Device implementations
   1637 MUST provide a consistent experience for Developer Options. Specifically, device implementations MUST hide
   1638 Developer Options by default and MUST provide a mechanism to enable Developer Options that is consistent with
   1639 the upstream Android implementation.</p>
   1640 
   1641 <a name="section-6.2.1"></a><h4 id="section-6.2.1">6.2.1. Experimental</h4>
   1642 <p>Android 4.4 introduces ART, an experimental Android runtime, accessible 
   1643 within the Developer Options menu for preview. Device
   1644 implementations SHOULD include ART (libart.so) and support dual boot from
   1645 Developer Options, but MUST keep Dalvik (libdvm.so) as the default runtime.</p>
   1646 
   1647 <a name="section-7"></a><h2 id="section-7">7. Hardware Compatibility</h2>
   1648 <p>If a device includes a particular hardware component that has a
   1649 corresponding API for third-party developers, the device implementation MUST
   1650 implement that API as described in the Android SDK documentation. If an API in
   1651 the SDK interacts with a hardware component that is stated to be optional and
   1652 the device implementation does not possess that component:</p>
   1653 <ul>
   1654 <li>complete class definitions (as documented by the SDK) for the component's
   1655 APIs MUST still be present</li>
   1656 <li>the API's behaviors MUST be implemented as no-ops in some reasonable
   1657 fashion</li>
   1658 <li>API methods MUST return null values where permitted by the SDK
   1659 documentation</li>
   1660 <li>API methods MUST return no-op implementations of classes where null
   1661 values are not permitted by the SDK documentation</li>
   1662 <li>API methods MUST NOT throw exceptions not documented by the SDK
   1663 documentation</li>
   1664 </ul>
   1665 <p>A typical example of a scenario where these requirements apply is the
   1666 telephony API: even on non-phone devices, these APIs must be implemented as
   1667 reasonable no-ops.</p>
   1668 <p>Device implementations MUST accurately report accurate hardware configuration
   1669 information via the <code>getSystemAvailableFeatures()</code> and
   1670 <code>hasSystemFeature(String)</code> methods on the
   1671 <code>android.content.pm.PackageManager</code> class. [<a
   1672 href="#resources37">Resources, 37</a>]</p>
   1673 
   1674 <a name="section-7.1"></a><h3 id="section-7.1">7.1. Display and Graphics</h3>
   1675 <p>Android includes facilities that automatically adjust application
   1676 assets and UI layouts appropriately for the device, to ensure that third-party
   1677 applications run well on a variety of hardware configurations [<a
   1678 href="#resources38">Resources, 38</a>]. Devices MUST properly implement these
   1679 APIs and behaviors, as detailed in this section.</p>
   1680 
   1681 <p>The units referenced by the requirements in this section are defined as follows:</p>
   1682 <ul>
   1683 <li>"Physical diagonal size" is the distance in inches between two opposing
   1684 corners of the illuminated portion of the display.</li>
   1685 <li>"dpi" (meaning "dots per inch") is the number of pixels encompassed by a
   1686 linear horizontal or vertical span of 1". Where dpi values are listed, both
   1687 horizontal and vertical dpi must fall within the range.</li>
   1688 <li>"Aspect ratio" is the ratio of the longer dimension of the screen to the
   1689 shorter dimension. For example, a display of 480x854 pixels would be 854 / 480
   1690 = 1.779, or roughly "16:9".</li>
   1691 <li>A "density-independent pixel" or ("dp") is the virtual pixel unit normalized to a
   1692 160 dpi screen, calculated as:
   1693 <code>pixels = dps * (density / 160)</code>.</li>
   1694 </ul>
   1695 
   1696 
   1697 <a name="section-7.1.1"></a><h4 id="section-7.1.1">7.1.1. Screen Configuration</h4>
   1698 
   1699 <p style="font-weight:bold;">Screen Size</p>
   1700 <p>The Android UI framework supports a variety of different screen sizes, and
   1701 allows applications to query the device screen size (aka "screen layout") via
   1702 <code>android.content.res.Configuration.screenLayout</code> with the
   1703 <code>SCREENLAYOUT_SIZE_MASK</code>. Device implementations MUST report the
   1704 correct screen size as defined in the Android SDK documentation
   1705 [<a href="#resources38">Resources, 38</a>] and determined by the upstream
   1706 Android platform. Specifically, device implementations must report the correct
   1707 screen size according to the following logical density-independent pixel (dp)
   1708 screen dimensions.</p>
   1709 <ul>
   1710 <li>Devices MUST have screen sizes of at least 426 dp x 320 dp ('small')</li>
   1711 <li>Devices that report screen size 'normal' MUST have screen sizes of at least
   1712 480 dp x 320 dp</li>
   1713 <li>Devices that report screen size 'large' MUST have screen sizes of at least
   1714 640 dp x 480 dp</li>
   1715 <li>Devices that report screen size 'xlarge' MUST have screen sizes of at least
   1716 960 dp x 720 dp</li>
   1717 </ul>
   1718 <p>In addition, devices MUST have screen sizes of at least 2.5 inches in
   1719 physical diagonal size.</p>
   1720 
   1721 <p>Devices MUST NOT change their reported screen size at any time.</p>
   1722 <p>Applications optionally indicate which screen sizes they support via the
   1723 <code>&lt;supports-screens&gt;</code> attribute in the AndroidManifest.xml
   1724 file. Device implementations MUST correctly honor applications' stated support
   1725 for small, normal, large, and xlarge screens, as described in the Android
   1726 SDK documentation.</p>
   1727 
   1728 <p style="font-weight:bold;">Screen Aspect Ratio</p>
   1729 <p>The aspect ratio MUST be a value from 1.3333 (4:3) to 1.86 (roughly 16:9)</p>
   1730 
   1731 <p style="font-weight:bold;">Screen Density</p>
   1732 <p>The Android UI framework defines a set of standard logical densities to
   1733 help application developers target application resources. Device
   1734 implementations MUST report one of the following logical Android framework
   1735 densities through the <code>android.util.DisplayMetrics</code> APIs, and MUST
   1736 execute applications at this standard density.
   1737 <ul>
   1738 <li>120 dpi, known as 'ldpi'</li>
   1739 <li>160 dpi, known as 'mdpi'</li>
   1740 <li>213 dpi, known as 'tvdpi'</li>
   1741 <li>240 dpi, known as 'hdpi'</li>
   1742 <li>320 dpi, known as 'xhdpi'</li>
   1743 <li>400 dpi, known as '400dpi'</li>
   1744 <li>480 dpi, known as 'xxhdpi'</li>
   1745 <li>640 dpi, known as 'xxxhdpi'</li>
   1746 </ul>
   1747 Device implementations SHOULD define the standard Android framework density
   1748 that is numerically closest to the physical density of the screen, unless that
   1749 logical density pushes the reported screen size below the minimum supported.
   1750 If the standard Android framework density that is numerically closest to the
   1751 physical density results in a screen size that is smaller than the smallest
   1752 supported compatible screen size (320 dp width), device implementations SHOULD
   1753 report the next lowest standard Android framework density.</p>
   1754 
   1755 <a name="section-7.1.2"></a><h4 id="section-7.1.2">7.1.2. Display Metrics</h4>
   1756 <p>Device implementations MUST report correct values for all display metrics
   1757 defined in <code>android.util.DisplayMetrics</code> [<a
   1758 href="#resources39">Resources, 39</a>].</p>
   1759 
   1760 <a name="section-7.1.3"></a><h4 id="section-7.1.3">7.1.3. Screen Orientation</h4>
   1761 <p>Devices MUST support dynamic orientation by applications to
   1762 either portrait or landscape screen orientation. That is, the device must
   1763 respect the application's request for a specific screen orientation. Device
   1764 implementations MAY select either portrait or landscape orientation as the
   1765 default.</p>
   1766 <p>Devices MUST report the correct value for the device's current orientation,
   1767 whenever queried via the android.content.res.Configuration.orientation,
   1768 android.view.Display.getOrientation(), or other APIs.</p>
   1769 <p>Devices MUST NOT change the reported screen size or density when changing
   1770 orientation.</p>
   1771 <p>Devices MUST report which screen orientations they support (
   1772 <code>android.hardware.screen.portrait</code> and/or
   1773 <code>android.hardware.screen.landscape</code>) and MUST report at least one
   1774 supported orientation.  For example, a device with a fixed-orientation
   1775 landscape screen, such as a television or laptop, MUST only report
   1776 <code>android.hardware.screen.landscape</code>.</p>
   1777 
   1778 <a name="section-7.1.4"></a><h4 id="section-7.1.4">7.1.4. 2D and 3D Graphics Acceleration</h4>
   1779 <p>Device implementations MUST support both OpenGL ES 1.0 and 2.0, as embodied
   1780 and detailed in the Android SDK documentations. Device implementations SHOULD support
   1781 OpenGL ES 3.0 on devices capable of supporting OpenGL ES 3.0.
   1782 Device implementations MUST also support Android Renderscript, as detailed in the Android SDK
   1783 documentation [<a href="#resources08">Resources, 8</a>].</p>
   1784 <p>Device implementations MUST also correctly identify themselves as
   1785 supporting OpenGL ES 1.0, OpenGL ES 2.0, or OpenGL ES 3.0. That is:</p>
   1786 <ul>
   1787 <li>The managed APIs (such as via the <code>GLES10.getString()</code> method)
   1788 MUST report support for OpenGL ES 1.0 and OpenGL ES 2.0 </li>
   1789 <li>The native C/C++ OpenGL APIs (that is, those available to apps via
   1790 libGLES_v1CM.so, libGLES_v2.so, or libEGL.so) MUST report support for
   1791 OpenGL ES 1.0 and OpenGL ES 2.0.</li>
   1792 <li>Device implementations that declare support for OpenGL ES 3.0 MUST support
   1793 OpenGL ES 3.0 managed APIs and include support for native C/C++ APIs. On device
   1794 implementations that declare support for OpenGL ES 3.0, libGLESv2.so MUST export the OpenGL ES 3.0
   1795 function symbols in addition to the OpenGL ES 2.0 function symbols.
   1796 </li>
   1797 </ul>
   1798 
   1799 <p>Device implementations MAY implement any desired OpenGL ES extensions.
   1800 However, device implementations MUST report via the OpenGL ES managed and
   1801 native APIs all extension strings that they do support, and conversely MUST
   1802 NOT report extension strings that they do not support.</p>
   1803 <p>Note that Android includes support for applications to optionally
   1804 specify that they require specific OpenGL texture compression formats. These
   1805 formats are typically vendor-specific. Device implementations are not required
   1806 by Android to implement any specific texture compression format. However,
   1807 they SHOULD accurately report any texture compression formats that they do
   1808 support, via the <code>getString()</code> method in the OpenGL API.</p>
   1809 
   1810 <p>Android includes a mechanism for applications to declare that they
   1811 wanted to enable hardware acceleration for 2D graphics at the Application,
   1812 Activity, Window or View level through the use of a manifest tag
   1813 <code>android:hardwareAccelerated</code> or direct API calls
   1814 [<a href="#resources09">Resources, 9</a>].</p>
   1815 <p>In Android 4.4, device implementations MUST enable hardware acceleration by
   1816 default, and MUST disable hardware acceleration if the developer so requests
   1817 by setting <code>android:hardwareAccelerated="false"</code> or disabling
   1818 hardware acceleration directly through the Android View APIs.</p>
   1819 <p>In addition, device implementations MUST exhibit behavior consistent with the
   1820 Android SDK documentation on hardware acceleration
   1821 [<a href="#resources09">Resources, 9</a>].</p>
   1822 <p>Android includes a <code>TextureView</code> object that lets developers
   1823 directly integrate hardware-accelerated OpenGL ES textures as rendering targets
   1824 in a UI hierarchy. Device implementations MUST support the <code>TextureView
   1825 </code> API, and MUST exhibit consistent behavior with the upstream Android
   1826 implementation.</p>
   1827 <p>Android includes support for <code>EGL_ANDROID_RECORDABLE</code>, a EGLConfig attribute
   1828 that indicates whether the EGLConfig supports rendering to an ANativeWindow that records images to a video.
   1829 Device implementations MUST support <code>EGL_ANDROID_RECORDABLE</code> extension [<a href="#resources79">Resources, 79</a>].</p>
   1830 
   1831 <a name="section-7.1.5"></a><h4 id="section-7.1.5">7.1.5. Legacy Application Compatibility Mode</h4>
   1832 <p>Android specifies a "compatibility mode" in which the framework
   1833 operates in an 'normal' screen size equivalent (320dp width) mode for the benefit
   1834 of legacy applications not developed for old versions of Android that pre-date
   1835 screen-size independence. Device implementations MUST include support for legacy
   1836 application compatibility mode as implemented by the upstream Android open source
   1837 code. That is, device implementations MUST NOT alter the triggers or thresholds at
   1838 which compatibility mode is activated, and MUST NOT alter the behavior of the
   1839 compatibility mode itself.</p>
   1840 
   1841 <a name="section-7.1.6"></a><h4 id="section-7.1.6">7.1.6. Screen Types</h4>
   1842 <p>Device implementation screens are classified as one of two types:</p>
   1843 <ul>
   1844 <li>Fixed-pixel display implementations: the screen is a single panel that supports only a
   1845 single pixel width and height. Typically the screen is physically integrated with
   1846 the device. Examples include mobile phones, tablets, and so on.</li>
   1847 <li>Variable-pixel display implementations: the device implementation either has no
   1848 embedded screen and includes a video output port such as VGA, HDMI or a wireless port
   1849 for display, or has an embedded screen that can change pixel dimensions. Examples
   1850 include televisions, set-top boxes, and so on.</li>
   1851 </ul>
   1852 <p style="font-weight: bold;">Fixed-Pixel Device Implementations</p>
   1853 <p>Fixed-pixel device implementations MAY use screens of any pixel dimensions, provided
   1854 that they meet the requirements defined this Compatibility Definition.</p>
   1855 <p>Fixed-pixel implementations MAY include a video output port for use with an
   1856 external display. However, if that display is ever used for running apps, the
   1857 device MUST meet the following requirements:</p>
   1858 <ul>
   1859 <li>The device MUST report the same screen configuration and display metrics, as detailed
   1860 in Sections 7.1.1 and 7.1.2, as the fixed-pixel display.</li>
   1861 <li>The device MUST report the same logical density as the fixed-pixel display.</li>
   1862 <li>The device MUST report screen dimensions that are the same as, or very close to,
   1863 the fixed-pixel display.</li>
   1864 </ul>
   1865 <p>For example, a tablet that is 7" diagonal size with a 1024x600 pixel resolution is
   1866 considered a fixed-pixel large mdpi display implementation.  If it contains a video
   1867 output port that displays at 720p or 1080p the device implementation MUST scale the output so that
   1868 applications are only executed in a large mdpi window, regardless of whether the fixed-pixel display
   1869 or video output port is in use.</p>
   1870 
   1871 <p style="font-weight: bold;">Variable-Pixel Device Implementations</p>
   1872 <p>Variable-pixel device implementations MUST support at least one of 1280x720,
   1873 1920x1080, or 3840x2160 (that is, 720p, 1080p, or 4K). Device implementations with
   1874 variable-pixel displays MUST NOT support any other screen configuration or
   1875 mode. Device implementations with variable-pixel screens MAY change screen
   1876 configuration or mode at runtime or boot-time. For example, a user of a
   1877 set-top box may replace a 720p display with a 1080p display, and the device
   1878 implementation may adjust accordingly.</p>
   1879 
   1880 <p>Additionally, variable-pixel device implementations MUST report the following
   1881 configuration buckets for these pixel dimensions:</p>
   1882 <ul>
   1883 <li>1280x720 (also known as 720p): 'large' screen size, 'tvdpi' (213 dpi)
   1884 density</li>
   1885 <li>1920x1080 (also known as 1080p): 'large' screen size, 'xhdpi' (320 dpi)
   1886 density</li>
   1887 <li>3840x2160 (also known as 4K): 'large' screen size, 'xxxhdpi' (640 dpi)
   1888 density</li>
   1889 </ul>
   1890 <p>For clarity, device implementations with variable pixel dimensions are
   1891 restricted to 720p, 1080p, or 4K in Android 4.4, and MUST be configured to report
   1892 screen size and density buckets as noted above.</p>
   1893 
   1894 <a name="section-7.1.7"></a><h4 id="section-7.1.7">7.1.7. Screen Technology</h4>
   1895 <p>The Android platform includes APIs that allow applications to render rich
   1896 graphics to the display. Devices MUST support all of these APIs as defined by
   1897 the Android SDK unless specifically allowed in this document.  Specifically:</p>
   1898 <ul>
   1899 <li>Devices MUST support displays capable of rendering 16-bit color graphics and
   1900 SHOULD support displays capable of 24-bit color graphics.</li>
   1901 <li>Devices MUST support displays capable of rendering animations.</li>
   1902 <li>The display technology used MUST have a pixel aspect ratio (PAR) between
   1903     0.9 and 1.1. That is, the pixel aspect ratio MUST be near square (1.0) with
   1904     a 10% tolerance.</li>
   1905 </ul>
   1906 <a name="section-7.1.8"></a><h4 id="section-7.1.8">7.1.8. External Displays</h4>
   1907 <p>Android includes support for secondary display to enable media sharing capabilities and
   1908 developer APIs for accessing external displays. If a device supports an external display either via
   1909 a wired, wireless or an embedded additional display connection then the device implementation MUST
   1910 implement the display manager API as described in the Android SDK documentation [<a href="#resources75">Resources, 75</a>].
   1911 Device implementations that support secure video output and are capable of supporting secure surfaces MUST declare support
   1912 for <code>Display.FLAG_SECURE</code>. Specifically, device implementations that declare support for <code>Display.FLAG_SECURE</code>,
   1913 MUST support <b>HDCP 2.x or higher</b> for Miracast wireless displays or <b>HDCP 1.2 or higher</b> for wired displays. The upstream
   1914 Android open source implementation includes support for wireless (Miracast) and wired (HDMI) displays that satisfies this requirement.</p>
   1915 
   1916 <a name="section-7.2"></a><h3 id="section-7.2">7.2. Input Devices</h3>
   1917 <a name="section-7.2.1"></a><h4 id="section-7.2.1">7.2.1. Keyboard</h4>
   1918 <p>Device implementations:</p>
   1919 <ul>
   1920 <li>MUST include support for the Input Management Framework (which allows third
   1921 party developers to create Input Management Engines - i.e. soft keyboard) as
   1922 detailed at <a href="http://developer.android.com">http://developer.android.com</a>
   1923 </li>
   1924 <li>MUST provide at least one soft keyboard implementation (regardless of whether
   1925 a hard keyboard is present)</li>
   1926 <li>MAY include additional soft keyboard implementations</li>
   1927 <li>MAY include a hardware keyboard</li>
   1928 <li>MUST NOT include a hardware keyboard that does not match one of the
   1929 formats specified in <code>android.content.res.Configuration.keyboard</code>
   1930 [<a href="#resources40">Resources, 40</a>] (that is, QWERTY, or 12-key)</li>
   1931 </ul>
   1932 <a name="section-7.2.2"></a><h4 id="section-7.2.2">7.2.2. Non-touch Navigation</h4>
   1933 <p>Device implementations:</p>
   1934 <ul>
   1935 <li>MAY omit a non-touch navigation option (that is, may omit a trackball, d-pad,
   1936 or wheel)</li>
   1937 <li>MUST report the correct value for
   1938 <code>android.content.res.Configuration.navigation</code>
   1939 [<a href="#resources40">Resources, 40</a>]</li>
   1940 <li>MUST provide a reasonable alternative user interface mechanism for the
   1941 selection and editing of text, compatible with Input Management Engines. The
   1942 upstream Android open source implementation includes a selection mechanism suitable
   1943 for use with devices that lack non-touch navigation inputs.</li>
   1944 </ul>
   1945 <a name="section-7.2.3"></a><h4 id="section-7.2.3">7.2.3. Navigation keys</h4>
   1946 <p>The Home, Recents and Back functions are essential to the Android navigation
   1947 paradigm. Device implementations MUST make these functions available to the user
   1948 at all times when running applications. These functions MAY be implemented via
   1949 dedicated physical buttons (such as mechanical or capacitive touch buttons), or
   1950 MAY be implemented using dedicated software keys on a distinct portion of the
   1951 screen, gestures, touch panel, etc. Android supports both implementations. All
   1952 of these functions MUST be accessible with a single action (e.g. tap,
   1953 double-click or gesture) when visible.</p>
   1954 <p>The Back and Recents functions SHOULD have a visible button or icon unless
   1955 hidden together with other navigation functions in full-screen mode. The Home
   1956 function MUST have a visible button or icon unless hidden together with other
   1957 navigation functions in full-screen mode.</p>
   1958 <p>The Menu function is deprecated in favor of action bar since Android 4.0.
   1959 Device implementations SHOULD NOT implement a dedicated physical button for
   1960 the Menu function. If the physical Menu button is implemented and the device
   1961 is running applications with <code>targetSdkVersion</code> &gt; 10, the device
   1962 implementation:</p>
   1963 <ul>
   1964   <li>for a device launching with Android 4.4, MUST display the action overflow
   1965     button on the action bar when the action bar is visible and the resulting action
   1966     overflow menu popu is not empty.</li>
   1967   <li>for an existing device launched with an earlier version but upgrading to
   1968     Android 4.4, SHOULD display the action overflow button on the action bar
   1969     when the action bar is visible and the resulting action overflow menu popup
   1970     is not empty.</li>
   1971   <li>MUST NOT modify the position of the action overflow popup displayed by
   1972   selecting the overflow button in the action bar.</li>
   1973   <li>MAY render the action overflow popup at a modified position on the screen
   1974   when it is displayed by selecting the physical menu button.</li>
   1975 </ul>
   1976 <p>For backwards compatibility, device implementations MUST make available the
   1977 Menu function to applications when <code>targetSdkVersion</code> &lt;= 10,
   1978 either by a phsyical button, a software key or gestures. This Menu function
   1979 should be presented unless hidden together with other navigation functions.</p>
   1980 <p>Android supports Assist action [<a href="#resources63">Resources, 63</a>].
   1981 Device implementations MUST make the Assist action available to the user at all
   1982 times when running applications. The Assist action SHOULD be implemented as a
   1983 long-press on the Home button or a swipe-up gesture on the software Home key.
   1984 This function MAY be implemented via another physical button, software key or
   1985 gestures, but MUST be accessible with a single action (e.g. tap, double-click or
   1986 gesture) when other navigation keys are visible.</p>
   1987 <p>Device implementations MAY use a distinct portion of the screen to display
   1988 the navigation keys, but if so, MUST meet these requirements:</p>
   1989 <ul>
   1990   <li>Device implementation navigation keys MUST use a distinct portion of the
   1991       screen, not available to applications, and MUST NOT obscure or otherwise
   1992       interfere with the portion of the screen available to applications.</li>
   1993   <li>Device implementations MUST make available a portion of the display to
   1994       applications that meets the requirements defined in
   1995       <a href="section-7.1.1">Section 7.1.1</a>.</li>
   1996   <li>Device implementations MUST display the navigation keys when applications
   1997       do not specify a system UI mode, or specify
   1998       <code>SYSTEM_UI_FLAG_VISIBLE</code>.</li>
   1999   <li>Device implementations MUST present the navigation keys in an unobtrusive
   2000       "low profile" (eg. dimmed) mode when applications specify
   2001       <code>SYSTEM_UI_FLAG_LOW_PROFILE</code>.</li>
   2002   <li>Device implementations MUST hide the navigation keys when applications
   2003       specify <code>SYSTEM_UI_FLAG_HIDE_NAVIGATION</code>.</li>
   2004 </ul>
   2005 <a name="section-7.2.4"></a><h4 id="section-7.2.4">7.2.4. Touchscreen input</h4>
   2006 <p>Device implementations SHOULD have a pointer input system of some kind (either mouse-like, or touch). However, if a device
   2007 implementation does not support a pointer input system, it MUST NOT report the <code>android.hardware.touchscreen</code> or
   2008 <code>android.hardware.faketouch</code> feature constant. Device implementations that do include a pointer input system:</p>
   2009 <ul>
   2010 <li>SHOULD support fully independently tracked pointers, if the device input system supports multiple pointers</li>
   2011 <li>MUST report the value of <code>android.content.res.Configuration.touchscreen</code> [<a href="#resources40">Resources, 40</a>]
   2012 corresponding to the type of the specific touchscreen on the device</li>
   2013 </ul>
   2014 
   2015 <p>Android includes support for a variety of touch screens, touch pads, and fake touch input devices.
   2016 Touch screen based device implementations are associated with a display [<a href="#resources81">Resources, 81</a>]
   2017 such that the user has the impression of directly manipulating items on screen. Since the user is directly touching the screen,
   2018 the system does not require any additional affordances to indicate the objects being manipulated.
   2019 In contrast, a fake touch interface provides a user input system that approximates a subset of touchscreen capabilities.
   2020 For example, a mouse or remote control that drives an on-screen cursor approximates touch, but requires the user to first
   2021 point or focus then click. Numerous input devices like the mouse, trackpad, gyro-based air mouse, gyro-pointer, joystick,
   2022 and multi-touch trackpad can support fake touch interactions. Android 4.0 includes the feature constant <code>android.hardware.faketouch</code>,
   2023 which corresponds to a high-fidelity non-touch (that is, pointer-based) input device such as a mouse or trackpad that can adequately emulate touch-based
   2024 input (including basic gesture support), and indicates that the device supports an emulated subset of touchscreen
   2025 functionality. Device implementations that declare the fake touch feature MUST meet the fake touch requirements in <a href="section 7.2.5">Section 7.2.5</a>.</p>
   2026 
   2027 <p>Device implementations MUST report the correct feature corresponding to the type of input used. Device implementations that
   2028 include a touchscreen (single-touch or better) MUST report the platform feature constant <code>android.hardware.touchscreen</code>.
   2029 Device implementations that report the platform feature constant <code>android.hardware.touchscreen</code> MUST also report the platform feature constant
   2030 <code>android.hardware.faketouch</code>. Device implementations that do not include a touchscreen (and rely on a pointer device only) MUST NOT report any
   2031 touchscreen feature, and MUST report only <code>android.hardware.faketouch</code> if they meet the fake touch requirements in <a href="section 7.2.5">Section 7.2.5</a>.</p>
   2032 
   2033 <a name="section-7.2.5"></a><h4 id="section-7.2.5">7.2.5. Fake touch input</h4>
   2034 <p>Device implementations that declare support for <code>android.hardware.faketouch</code></p>
   2035 <ul>
   2036 <li> MUST report the absolute X and Y screen positions of the pointer location and display a visual pointer on the screen [<a href="#resources80">Resources, 80</a>] </li>
   2037 <li> MUST report touch event with the action code [<a href="#resources80">Resources, 80</a>] that specifies the state change
   2038 that occurs on the pointer going <code>down</code> or <code>up</code> on the screen [<a href="#resources80">Resources, 80</a>] </li>
   2039 <li> MUST support pointer <code>down</code> and <code>up</code> on an object on the screen, which allows users to emulate tap on an object on the screen</li>
   2040 <li> MUST support pointer <code>down</code>, pointer <code>up</code>, pointer <code>down</code> then pointer <code>up</code> in the same place on an object on the screen
   2041 within a time threshold, which allows users to emulate double tap on an object on the screen [<a href="#resources80">Resources, 80</a>]</li>
   2042 <li>MUST support pointer <code>down</code> on an arbitrary point on the screen, pointer move to any other arbitrary point on the screen,
   2043 followed by a pointer <code>up</code>, which allows users to emulate a touch drag</li>
   2044 <li> MUST support pointer <code>down</code> then allow users to quickly move the object to a different position on the screen
   2045 and then pointer <code>up</code> on the screen, which allows users to fling an object on the screen</li>
   2046 </ul>
   2047 
   2048 <p>Devices that declare support for <code>android.hardware.faketouch.multitouch.distinct</code> MUST meet the requirements for
   2049 faketouch above, and MUST also support distinct tracking of two or more independent pointer inputs.</p>
   2050 
   2051 <a name="section-7.2.6"></a><h4 id="section-7.2.6">7.2.6. Microphone</h4>
   2052 <p>Device implementations MAY omit a microphone. However, if a device
   2053 implementation omits a microphone, it MUST NOT report the
   2054 <code>android.hardware.microphone</code> feature constant, and must implement
   2055 the audio recording API as no-ops, per <a href="section-7">Section 7</a>.
   2056 Conversely, device implementations that do possess a microphone:</p>
   2057 <ul>
   2058 <li>MUST report the <code>android.hardware.microphone</code> feature constant</li>
   2059 <li>SHOULD meet the audio quality requirements in <a href="section-5.4">Section 5.4</a></li>
   2060 <li>SHOULD meet the audio latency requirements in <a href="section-5.5">Section 5.5</a></li>
   2061 </ul>
   2062 
   2063 <a name="section-7.3"></a><h3 id="section-7.3">7.3. Sensors</h3>
   2064 <p>Android includes APIs for accessing a variety of sensor types. Devices
   2065 implementations generally MAY omit these sensors, as provided for in the
   2066 following subsections. If a device includes a particular sensor type that has a
   2067 corresponding API for third-party developers, the device implementation MUST
   2068 implement that API as described in the Android SDK documentation. For example,
   2069 device implementations:</p>
   2070 <ul>
   2071 <li>MUST accurately report the presence or absence of sensors per the
   2072 <code>android.content.pm.PackageManager</code> class. [<a
   2073 href="#resources37">Resources, 37</a>]</li>
   2074 <li>MUST return an accurate list of supported sensors via the
   2075 <code>SensorManager.getSensorList()</code> and similar methods</li>
   2076 <li>MUST behave reasonably for all other sensor APIs (for example, by
   2077 returning true or false as appropriate when applications attempt to register
   2078 listeners, not calling sensor listeners when the corresponding sensors are not
   2079 present; etc.)</li>
   2080 <li>MUST report all sensor measurements using the relevant International System
   2081 of Units (i.e. metric) values for each sensor type as defined in the Android SDK
   2082 documentation [<a href="#resources41">Resources, 41</a>]</li>
   2083 </ul>
   2084 <p>The list above is not comprehensive; the documented behavior of the Android
   2085 SDK is to be considered authoritative.</p>
   2086 <p>Some sensor types are synthetic, meaning they can be derived from data
   2087 provided by one or more other sensors. (Examples include the orientation
   2088 sensor, and the linear acceleration sensor.) Device implementations SHOULD
   2089 implement these sensor types, when they include the prerequisite physical
   2090 sensors.</p>
   2091 <p>Android includes a notion of a "streaming" sensor, which is
   2092 one that returns data continuously, rather than only when the data changes.
   2093 Device implementations MUST continuously provide periodic data samples for any
   2094 API indicated by the Android SDK documentation to be a streaming
   2095 sensor. Note that the device implementations MUST ensure that the sensor stream must not
   2096 prevent the device CPU from entering a suspend state or waking up from a suspend state.</p>
   2097 
   2098 <a name="section-7.3.1"></a><h4 id="section-7.3.1">7.3.1. Accelerometer</h4>
   2099 <p>Device implementations SHOULD include a 3-axis accelerometer. If a device
   2100 implementation does include a 3-axis accelerometer, it:</p>
   2101 <ul>
   2102 <li>SHOULD be able to deliver events at 120 Hz or greater. Note that while the
   2103 accelerometer frequency above is stated as "SHOULD" for Android 4.4, the Compatibility Definition
   2104 for a future version is planned to change these to "MUST". That is, these standards are
   2105 optional in Android but <b>will be required</b> in future versions. Existing and
   2106 new devices that run Android are <b>very strongly encouraged to meet these requirements
   2107 in Android</b> so they will be able to upgrade to the future platform releases
   2108 </li>
   2109 <li>MUST comply with the Android sensor coordinate system as detailed
   2110 in the Android APIs (see [<a href="#resources41">Resources, 41</a>])</li>
   2111 <li>MUST be capable of measuring from freefall up to twice gravity (2g) or
   2112 more on any three-dimensional vector</li>
   2113 <li>MUST have 8-bits of accuracy or more</li>
   2114 <li>MUST have a standard deviation no greater than 0.05 m/s^2</li>
   2115 </ul>
   2116 <a name="section-7.3.2"></a><h4 id="section-7.3.2">7.3.2. Magnetometer</h4>
   2117 <p>Device implementations SHOULD include a 3-axis magnetometer (i.e. compass.)
   2118 If a device does include a 3-axis magnetometer, it:</p>
   2119 <ul>
   2120 <li>MUST be able to deliver events at 10 Hz or greater</li>
   2121 <li>MUST comply with the Android sensor coordinate system as detailed
   2122 in the Android APIs (see [<a href="#resources41">Resources, 41</a>]).</li>
   2123 <li>MUST be capable of sampling a range of field strengths adequate to cover the
   2124 geomagnetic field</li>
   2125 <li>MUST have 8-bits of accuracy or more</li>
   2126 <li>MUST have a standard deviation no greater than 0.5 &micro;T</li>
   2127 </ul>
   2128 <a name="section-7.3.3"></a><h4 id="section-7.3.3">7.3.3. GPS</h4>
   2129 <p>Device implementations SHOULD include a GPS receiver. If a device
   2130 implementation does include a GPS receiver, it SHOULD include
   2131 some form of "assisted GPS" technique to minimize GPS lock-on time.</p>
   2132 <a name="section-7.3.4"></a><h4 id="section-7.3.4">7.3.4. Gyroscope</h4>
   2133 <p>Device implementations SHOULD include a gyroscope (i.e. angular change
   2134 sensor.) Devices SHOULD NOT include a gyroscope sensor unless a 3-axis
   2135 accelerometer is also included. If a device implementation includes a
   2136 gyroscope, it:</p>
   2137 <ul>
   2138 <li>MUST be temperature compensated.</li>
   2139 <li>MUST be capable of measuring orientation changes up to 5.5*Pi
   2140 radians/second (that is, approximately 1,000 degrees per second).</li>
   2141 <li>SHOULD be able to deliver events at 200 Hz or greater. Note that while the
   2142 gyroscope frequency above is stated as "SHOULD" for Android 4.4, the Compatibility Definition
   2143 for a future version is planned to change these to "MUST". That is, these standards are
   2144 optional in Android but <b>will be required</b> in future versions. Existing and
   2145 new devices that run Android are <b>very strongly encouraged to meet these requirements</b> 
   2146 so they will be able to upgrade to the future platform releases.
   2147 </li>
   2148 <li>MUST have 12-bits of accuracy or more</li>
   2149 <li>MUST have a variance no greater than 1e-7 rad^2 / s^2 per Hz (variance per Hz, or rad^2 / s).
   2150 The variance is allowed to vary with the sampling rate, but must be constrained by this value.
   2151 In other words, if you measure the variance of the gyro at 1 Hz sampling rate it should be no
   2152 greater than 1e-7 rad^2/s^2.</li>
   2153 <li>MUST have timestamps as close to when the hardware event happened as possible. The constant latency must be removed.</li>
   2154 </ul>
   2155 <a name="section-7.3.5"></a><h4 id="section-7.3.5">7.3.5. Barometer</h4>
   2156 <p>Device implementations MAY include a barometer (i.e. ambient air pressure
   2157 sensor.) If a device implementation includes a barometer, it:</p>
   2158 <ul>
   2159 <li>MUST be able to deliver events at 5 Hz or greater</li>
   2160 <li>MUST have adequate precision to enable estimating altitude</li>
   2161 <li>MUST be temperature compensated</li>
   2162 </ul>
   2163 <a name="section-7.3.6"></a><h4 id="section-7.3.6">7.3.6. Thermometer</h4>
   2164 <p>Device implementations MAY include an ambient thermometer (i.e. temperature
   2165 sensor). If present, it MUST be defined as <code>SENSOR_TYPE_AMBIENT_TEMPERATURE</code>
   2166 and it MUST measure the ambient (room) temperature in degrees Celsius.</p>
   2167 
   2168 <p>Device implementations MAY but SHOULD NOT include a CPU temperature sensor.
   2169 If present, it MUST be defined as <code>SENSOR_TYPE_TEMPERATURE</code>, it MUST
   2170 measure the temperature of the device CPU, and it MUST NOT measure any other
   2171 temperature. Note the <code>SENSOR_TYPE_TEMPERATURE</code> sensor type was
   2172 deprecated in Android 4.0.</p>
   2173 <a name="section-7.3.7"></a><h4 id="section-7.3.7">7.3.7. Photometer</h4>
   2174 <p>Device implementations MAY include a photometer (i.e. ambient light
   2175 sensor.)</p>
   2176 <a name="section-7.3.8"></a><h4 id="section-7.3.8">7.3.8. Proximity Sensor</h4>
   2177 <p>Device implementations MAY include a proximity sensor.  If a device
   2178 implementation does include a proximity sensor, it MUST measure the proximity
   2179 of an object in the same direction as the screen. That is, the proximity
   2180 sensor MUST be oriented to detect objects close to the screen, as the
   2181 primary intent of this sensor type is to detect a phone in use by the
   2182 user. If a device implementation includes a proximity sensor with any other
   2183 orientation, it MUST NOT be accessible through this API. If a device
   2184 implementation has a proximity sensor, it MUST be have 1-bit of accuracy or
   2185 more.</p>
   2186 
   2187 <a name="section-7.4"></a><h3 id="section-7.4">7.4. Data Connectivity</h3>
   2188 <a name="section-7.4.1"></a><h4 id="section-7.4.1">7.4.1. Telephony</h4>
   2189 <p>"Telephony" as used by the Android APIs and this document refers
   2190 specifically to hardware related to placing voice calls and sending SMS
   2191 messages via a GSM or CDMA network. While these voice calls may or may not be
   2192 packet-switched, they are for the purposes of Android considered
   2193 independent of any data connectivity that may be implemented using the same
   2194 network. In other words, the Android "telephony" functionality and APIs refer
   2195 specifically to voice calls and SMS; for instance, device implementations that
   2196 cannot place calls or send/receive SMS messages MUST NOT report the
   2197 "android.hardware.telephony" feature or any sub-features, regardless of
   2198 whether they use a cellular network for data connectivity.</p>
   2199 <p>Android MAY be used on devices that do not include telephony hardware.
   2200 That is, Android is compatible with devices that are not phones.
   2201 However, if a device implementation does include GSM or CDMA telephony, it
   2202 MUST implement full support for the API for that technology. Device
   2203 implementations that do not include telephony hardware MUST implement the full
   2204 APIs as no-ops.</p>
   2205 <a name="section-7.4.2"></a><h4 id="section-7.4.2">7.4.2. IEEE 802.11 (Wi-Fi)</h4>
   2206 <p>Android device implementations SHOULD include support for one or more
   2207 forms of 802.11 (b/g/a/n, etc.) If a device implementation does include
   2208 support for 802.11, it MUST implement the corresponding Android API.</p>
   2209 <p>Device implementations MUST implement the multicast API as described in
   2210 the SDK documentation [<a href="#resources62">Resources, 62</a>]. Device
   2211 implementations that do include Wi-Fi support MUST support multicast DNS (mDNS).
   2212 Device implementations MUST NOT filter mDNS packets (224.0.0.251) at any time
   2213 of operation including when the screen is not in an active state.</p>
   2214 
   2215 <a name="section-7.4.2.1"></a>
   2216 <h4 id="section-7.4.2.1">7.4.2.1. Wi-Fi Direct</h4>
   2217 <p>Device implementations SHOULD include support for Wi-Fi direct (Wi-Fi peer-to-peer).
   2218 If a device implementation does include support for Wi-Fi direct, it MUST implement the corresponding 
   2219 Android API as described in the SDK documentation [<a href="#resources68">Resources, 68</a>].
   2220 If a device implementation includes support for Wi-Fi direct, then it:</p>
   2221 <ul>
   2222   <li>MUST support regular Wi-Fi operation</li>
   2223   <li>SHOULD support concurrent Wi-Fi and Wi-Fi Direct operation</li>
   2224 </ul>
   2225 
   2226 <a name="section-7.4.2.2"></a><h4 id="section-7.4.2.2">7.4.2.2. Wi-Fi Tunneled Direct Link Setup</h4>
   2227 <p>Device implementations SHOULD include support for Wi-Fi Tunneled Direct Link
   2228 Setup (TDLS) as described in the Android SDK Documentation
   2229 [<a href="#resources85">Resources, 85</a>]. If a device implementation does
   2230 include support for TDLS and TDLS is enabled by the WiFiManager API, the device:
   2231 </p>
   2232 <ul>
   2233   <li>SHOULD use TDLS only when it is possible AND beneficial.</li>
   2234   <li>SHOULD have some heuristic and NOT use TDLS when its performance might be
   2235   worse than going through the Wi-Fi access point.</li>
   2236 </ul>
   2237 
   2238 <a name="section-7.4.3"></a><h4 id="section-7.4.3">7.4.3. Bluetooth</h4>
   2239 <p>Device implementations SHOULD include a Bluetooth transceiver. Device
   2240 implementations that do include a Bluetooth transceiver MUST enable the
   2241 RFCOMM-based Bluetooth API as described in the SDK documentation and declare
   2242 hardware feature android.hardware.bluetooth [<a href="#resources42">Resources, 42</a>].
   2243 Device implementations SHOULD implement relevant Bluetooth profiles, such as A2DP, AVRCP, OBEX, etc. as
   2244 appropriate for the device.</p>
   2245 
   2246 <p>Device implementations that do include support for Bluetooth GATT (generic attribute profile)
   2247 to enable communication with Bluetooth Smart or Smart Ready devices MUST enable the
   2248 GATT-based Bluetooth API as described in the SDK documentation and declare hardware feature
   2249 android.hardware.bluetooth_le [<a href="#resources42">Resources, 42</a>].</p>
   2250 
   2251 <a name="section-7.4.4"></a><h4 id="section-7.4.4">7.4.4. Near-Field Communications</h4>
   2252 <p>Device implementations SHOULD include a transceiver and related hardware
   2253 for Near-Field Communications (NFC). If a device implementation does include
   2254 NFC hardware, then it:</p>
   2255 <ul>
   2256   <li>MUST report the android.hardware.nfc feature from the
   2257       <code>android.content.pm.PackageManager.hasSystemFeature()</code> method.
   2258       [<a href="#resources37">Resources, 37</a>]</li>
   2259   <li>MUST be capable of reading and writing NDEF messages via the following NFC
   2260       standards:
   2261    <ul>
   2262     <li>MUST be capable of acting as an NFC Forum reader/writer
   2263         (as defined by the NFC Forum technical specification
   2264         NFCForum-TS-DigitalProtocol-1.0) via the following NFC standards:
   2265      <ul>
   2266       <li>NfcA (ISO14443-3A)</li>
   2267       <li>NfcB (ISO14443-3B) </li>
   2268       <li>NfcF (JIS 6319-4)</li>
   2269       <li>IsoDep (ISO 14443-4)</li>
   2270       <li>NFC Forum Tag Types 1, 2, 3, 4 (defined by the NFC Forum)</li>
   2271      </ul>
   2272     </li>
   2273    </ul>
   2274   </li>
   2275   <li>SHOULD be capable of reading and writing NDEF messages via the following
   2276       NFC standards. Note that while the NFC standards below are stated as
   2277       "SHOULD", the Compatibility Definition for a future version is planned to
   2278       change these to "MUST". That is, these standards are optional in this
   2279       version but <b>will be required</b> in future versions. Existing and new
   2280       devices that run this version of Android are <b>very strongly encouraged
   2281       to meet these requirements now</b> so they will be able to upgrade to the
   2282       future platform releases.
   2283     <ul>
   2284       <li>NfcV (ISO 15693)</li>
   2285     </ul>
   2286   </li>
   2287   <li>MUST be capable of transmitting and receiving data via the following
   2288       peer-to-peer standards and protocols:
   2289     <ul>
   2290       <li>ISO 18092</li>
   2291       <li>LLCP 1.0 (defined by the NFC Forum)</li>
   2292       <li>SDP 1.0 (defined by the NFC Forum)</li>
   2293       <li>NDEF Push Protocol [<a href="#resources43">Resources, 43</a>]</li>
   2294       <li>SNEP 1.0 (defined by the NFC Forum)</li>
   2295     </ul>
   2296   </li>
   2297   <li>MUST include support for Android Beam [<a href="#resources65">Resources, 65</a>]:
   2298    <ul>
   2299     <li>MUST implement the SNEP default server. Valid NDEF messages received
   2300         by the default SNEP server MUST be dispatched to applications using
   2301         the android.nfc.ACTION_NDEF_DISCOVERED intent. Disabling Android Beam
   2302         in settings MUST NOT disable dispatch of incoming NDEF message.</li>
   2303     <li>Device implementations MUST honor the android.settings.NFCSHARING_SETTINGS intent
   2304         to show NFC sharing settings [<a href="#resources67">Resources, 67</a>].</li>
   2305     <li>MUST implement the NPP server. Messages received by the NPP server MUST
   2306         be processed the same way as the SNEP default server.</li>
   2307     <li>MUST implement a SNEP client and attempt to send outbound P2P NDEF to
   2308         the default SNEP server when Android Beam is enabled. If no default
   2309         SNEP server is found then the client MUST attempt to send to an NPP
   2310         server.</li>
   2311     <li>MUST allow foreground activities to set the outbound P2P NDEF message
   2312         using android.nfc.NfcAdapter.setNdefPushMessage, and
   2313         android.nfc.NfcAdapter.setNdefPushMessageCallback, and
   2314         android.nfc.NfcAdapter.enableForegroundNdefPush.</li>
   2315     <li>SHOULD use a gesture or on-screen confirmation, such as 'Touch to Beam',
   2316         before sending outbound P2P NDEF messages.</li>
   2317     <li>SHOULD enable Android Beam by default</li>
   2318     <li>MUST support NFC Connection handover to Bluetooth when the device supports Bluetooth Object Push Profile.
   2319         Device implementations must support connection handover to Bluetooth when using android.nfc.NfcAdapter.setBeamPushUris,
   2320         by implementing the "Connection Handover version 1.2" [<a href="#resources60">Resources, 60</a>]
   2321         and "Bluetooth Secure Simple Pairing Using NFC version 1.0" [<a href="#resources61">Resources, 61</a>]
   2322         specs from the NFC Forum. Such an implementation MUST implement the
   2323         handover LLCP service with service name "urn:nfc:sn:handover" for
   2324         exchanging the handover request/select records over NFC, and it MUST use
   2325         the Bluetooth Object Push Profile for the actual Bluetooth data
   2326         transfer. For legacy reasons (to remain compatible with Android 4.1
   2327         devices), the implementation SHOULD still accept SNEP GET requests for
   2328         exchanging the handover request/select records over NFC. However an
   2329         implementation itself SHOULD NOT send SNEP GET requests for performing
   2330         connection handover.</li>
   2331    </ul>
   2332   </li>
   2333   <li>MUST poll for all supported technologies while in NFC discovery mode.</li>
   2334   <li>SHOULD be in NFC discovery mode while the device is awake with the screen active
   2335       and the lock-screen unlocked.</li>
   2336 </ul>
   2337 
   2338 <p>(Note that publicly available links are not available for the JIS, ISO, and
   2339 NFC Forum specifications cited above.)</p>
   2340 <p>Android 4.4 introduces support for NFC Host Card Emulation (HCE) mode. If a
   2341 device implementation does include an NFC controller capable of HCE and
   2342 Application ID (AID) routing, then it:</p>
   2343 <ul>
   2344   <li>MUST report the <code>android.hardware.nfc.hce</code> feature constant
   2345   </li>
   2346   <li>MUST support NFC HCE APIs as defined in the Android SDK
   2347   [<a href="#resources90">Resources, 90</a>]</li>
   2348 </ul>
   2349 <p>Additionally, device implementations MAY include reader/writer support for
   2350 the following MIFARE technologies.</p>
   2351 <ul>
   2352   <li>MIFARE Classic (NXP MF1S503x [<a href="#resources44">Resources, 44</a>],
   2353       MF1S703x [<a href="#resources45">Resources, 45</a>])</li>
   2354   <li>MIFARE Ultralight (NXP MF0ICU1 [<a href="#resources46">Resources, 46</a>],
   2355       MF0ICU2 [<a href="#resources47">Resources, 47</a>])</li>
   2356   <li>NDEF on MIFARE Classic (NXP AN130511 [<a href="#resources48">Resources, 48</a>],
   2357       AN130411 [<a href="#resources49">Resources, 49</a>])</li>
   2358 </ul>
   2359 <p>Note that Android includes APIs for these MIFARE types. If a
   2360 device implementation supports MIFARE in the reader/writer role, it:</p>
   2361 <ul>
   2362   <li>MUST implement the corresponding Android APIs as documented by the
   2363   Android SDK</li>
   2364   <li>MUST report the feature com.nxp.mifare from the
   2365   <code>android.content.pm.PackageManager.hasSystemFeature()</code> method.
   2366   [<a href="#resources37">Resources, 37</a>] Note that this is not a standard
   2367   Android feature, and as such does not appear as a constant on the
   2368   <code>PackageManager</code> class.</li>
   2369   <li>MUST NOT implement the corresponding Android APIs nor report the
   2370   com.nxp.mifare feature unless it also implements general NFC support as
   2371   described in this section</li>
   2372 </ul>
   2373 <p>If a device implementation does not include NFC hardware, it MUST NOT
   2374 declare the android.hardware.nfc feature from the
   2375 <code>android.content.pm.PackageManager.hasSystemFeature()</code> method [<a
   2376 href="#resources37">Resources, 37</a>], and MUST implement the Android NFC
   2377 API as a no-op.</p>
   2378 <p>As the classes <code>android.nfc.NdefMessage</code> and
   2379 <code>android.nfc.NdefRecord</code> represent a protocol-independent data
   2380 representation format, device implementations MUST implement these APIs even
   2381 if they do not include support for NFC or declare the android.hardware.nfc
   2382 feature.</p>
   2383 <a name="section-7.4.5"></a><h4 id="section-7.4.5">7.4.5. Minimum Network Capability</h4>
   2384 <p>Device implementations MUST include support for one or more forms of data
   2385 networking. Specifically, device implementations MUST include support for at
   2386 least one data standard capable of 200Kbit/sec or greater. Examples of
   2387 technologies that satisfy this requirement include EDGE, HSPA, EV-DO, 802.11g,
   2388 Ethernet, etc.</p>
   2389 <p>Device implementations where a physical networking standard (such as
   2390 Ethernet) is the primary data connection SHOULD also include support for at
   2391 least one common wireless data standard, such as 802.11 (Wi-Fi).</p>
   2392 <p>Devices MAY implement more than one form of data connectivity.</p>
   2393 
   2394 <a name="section-7.4.6"></a><h4 id="section-7.4.6">7.4.6. Sync Settings</h4>
   2395 <p>Device implementations MUST have the master auto-sync setting on by default
   2396 so that the method <code>getMasterSyncAutomatically()</code> returns
   2397 &quot;true&quot; [<a href="#resources88">Resources, 88</a>].</p>
   2398 
   2399 <a name="section-7.5"></a><h3 id="section-7.5">7.5. Cameras</h3>
   2400 <p>Device implementations SHOULD include a rear-facing camera, and MAY include
   2401 a front-facing camera. A rear-facing camera is a camera located on the side of
   2402 the device opposite the display; that is, it images scenes on the far side of
   2403 the device, like a traditional camera. A front-facing camera is a camera
   2404 located on the same side of the device as the display; that is, a camera
   2405 typically used to image the user, such as for video conferencing and similar
   2406 applications.</p>
   2407 <a name="section-7.5.1"></a><h4 id="section-7.5.1">7.5.1. Rear-Facing Camera</h4>
   2408 <p>Device implementations SHOULD include a rear-facing camera. If a device
   2409 implementation includes a rear-facing camera, it:</p>
   2410 <ul>
   2411 <li>MUST have a resolution of at least 2 megapixels</li>
   2412 <li>SHOULD have either hardware auto-focus, or software auto-focus implemented
   2413 in the camera driver (transparent to application software)</li>
   2414 <li>MAY have fixed-focus or EDOF (extended depth of field) hardware</li>
   2415 <li>MAY include a flash. If the Camera includes a flash, the flash lamp MUST
   2416 NOT be lit while an android.hardware.Camera.PreviewCallback instance has been
   2417 registered on a Camera preview surface, unless the application has explicitly
   2418 enabled the flash by enabling the <code>FLASH_MODE_AUTO</code> or
   2419 <code>FLASH_MODE_ON</code> attributes of a <code>Camera.Parameters</code>
   2420 object. Note that this constraint does not apply to the device's built-in
   2421 system camera application, but only to third-party applications using
   2422 <code>Camera.PreviewCallback</code>.</li>
   2423 </ul>
   2424 <a name="section-7.5.2"></a><h4 id="section-7.5.2">7.5.2. Front-Facing Camera</h4>
   2425 <p>Device implementations MAY include a front-facing camera. If a device
   2426 implementation includes a front-facing camera, it:</p>
   2427 <ul>
   2428 <li>MUST have a resolution of at least VGA (that is, 640x480 pixels)</li>
   2429 <li>MUST NOT use a front-facing camera as the default for the Camera API.
   2430 That is, the camera API in Android has specific support for front-facing
   2431 cameras, and device implementations MUST NOT configure the API to to treat a
   2432 front-facing camera as the default rear-facing camera, even if it is the only
   2433 camera on the device.</li>
   2434 <li>MAY include features (such as auto-focus, flash, etc.)
   2435 available to rear-facing cameras as described in Section 7.5.1.</li>
   2436 <li>MUST horizontally reflect (i.e. mirror) the stream displayed by an app in a
   2437 CameraPreview, as follows:</li>
   2438 <ul>
   2439 <li>If the device implementation is capable of being rotated by user (such as
   2440 automatically via an accelerometer or manually via user input), the camera
   2441 preview MUST be mirrored horizontally relative to the device's current
   2442 orientation.</li>
   2443 <li>If the current application has explicitly requested that the Camera
   2444 display be rotated via a call to the
   2445 <code>android.hardware.Camera.setDisplayOrientation()</code> [<a
   2446 href="#resources50">Resources, 50</a>] method, the camera preview MUST be
   2447 mirrored horizontally relative to the orientation specified by the
   2448 application.</li>
   2449 <li>Otherwise, the preview MUST be mirrored along the device's default horizontal axis.</li>
   2450 </ul>
   2451 <li>MUST mirror the image displayed by the postview in the same manner as
   2452 the camera preview image stream. (If the device implementation does not
   2453 support postview, this requirement obviously does not apply.)</li>
   2454 <li>MUST NOT mirror the final captured still image or video streams returned
   2455 to application callbacks or committed to media storage</li>
   2456 </ul>
   2457 <a name="section-7.5.3"></a><h4 id="section-7.5.3">7.5.3. Camera API Behavior</h4>
   2458 <p>Device implementations MUST implement the following behaviors for the
   2459 camera-related APIs, for both front- and rear-facing cameras:</p>
   2460 <ol>
   2461 <li>If an application has never called
   2462 <code>android.hardware.Camera.Parameters.setPreviewFormat(int)</code>, then the
   2463 device MUST use <code>android.hardware.PixelFormat.YCbCr_420_SP</code> for
   2464 preview data provided to application callbacks.</li>
   2465 <li>If an application registers an <code>android.hardware.Camera.PreviewCallback
   2466 </code> instance and the system calls the <code>onPreviewFrame()</code> method
   2467 when the preview format is YCbCr_420_SP, the data in the <code>byte[]</code>
   2468 passed into <code>onPreviewFrame()</code> must further be in the NV21 encoding
   2469 format. That is, NV21 MUST be the default.</li>
   2470 <li>Device implementations MUST support the YV12 format (as denoted by the
   2471 <code>android.graphics.ImageFormat.YV12</code> constant) for camera previews
   2472 for both front- and rear-facing cameras.  (The hardware video encoder and camera
   2473 may use any native pixel format, but the device implementation MUST support conversion
   2474 to YV12.)</li>
   2475 </ol>
   2476 <p>Device implementations MUST implement the full Camera API included in the
   2477 Android SDK documentation [<a href="#resources51">Resources, 51</a>]),
   2478 regardless of whether the device includes hardware autofocus or other
   2479 capabilities. For instance, cameras that lack autofocus MUST still call any
   2480 registered <code>android.hardware.Camera.AutoFocusCallback</code> instances (even though
   2481 this has no relevance to a non-autofocus camera.) Note that this does apply
   2482 to front-facing cameras; for instance, even though most front-facing cameras
   2483 do not support autofocus, the API callbacks must still be "faked" as
   2484 described.</p>
   2485 <p>Device implementations MUST recognize and honor each parameter name defined
   2486 as a constant on the <code>android.hardware.Camera.Parameters</code> class, if the
   2487 underlying hardware supports the feature. If the device hardware does not
   2488 support a feature, the API must behave as documented. Conversely, Device
   2489 implementations MUST NOT honor or recognize string constants passed
   2490 to the <code>android.hardware.Camera.setParameters()</code> method other than
   2491 those documented as constants on the
   2492 <code>android.hardware.Camera.Parameters</code>.  That is,
   2493 device implementations MUST support all standard Camera parameters if the
   2494 hardware allows, and MUST NOT support custom Camera parameter types.
   2495 For instance, device implementations that support image capture using high dynamic range (HDR)
   2496 imaging techniques MUST support camera parameter <code>Camera.SCENE_MODE_HDR</code>
   2497 [<a href="#resources78">Resources, 78</a>]).</p>
   2498 <p>Device implementations MUST broadcast the <code>Camera.ACTION_NEW_PICTURE</code>
   2499 intent whenever a new picture is taken by the camera and the entry of the picture
   2500 has been added to the media store.</p>
   2501 <p>Device implementations MUST broadcast the <code>Camera.ACTION_NEW_VIDEO</code>
   2502 intent whenever a new video is recorded by the camera and the entry of the picture
   2503 has been added to the media store.</p>
   2504 <a name="section-7.5.4"></a><h4 id="section-7.5.4">7.5.4. Camera Orientation</h4>
   2505 <p>Both front- and rear-facing cameras, if present, MUST be oriented so that
   2506 the long dimension of the camera aligns with the screen's long dimension. That
   2507 is, when the device is held in the landscape orientation, cameras MUST
   2508 capture images in the landscape orientation. This applies regardless of the
   2509 device's natural orientation; that is, it applies to landscape-primary devices
   2510 as well as portrait-primary devices.</p>
   2511 
   2512 <a name="section-7.6"></a><h3 id="section-7.6">7.6. Memory and Storage</h3>
   2513 <a name="section-7.6.1"></a><h4 id="section-7.6.1">7.6.1. Minimum Memory and Storage</h4>
   2514 <p>Device implementations MUST have at least 340MB of memory available to the
   2515 kernel and userspace. The 340MB MUST be in addition to any memory dedicated to
   2516 hardware components such as radio, video, and so on that is not under the
   2517 kernel's control.</p>
   2518 <p>Device implementations with less than 512MB of memory available to the kernel
   2519 and userspace MUST return the value &quot;true&quot; for
   2520 <code>ActivityManager.isLowRamDevice()</code>.</p>
   2521 <p>Device implementations MUST have at least 1GB of non-volatile storage available
   2522 for application private data. That is, the <code>/data</code> partition MUST be at
   2523 least 1GB. Device implementations that run Android are <b>very strongly encouraged to
   2524 have at least 2GB of non-volatile storage for application private data</b> so they will be
   2525 able to upgrade to the future platform releases.</p>
   2526 
   2527 <p>The Android APIs include a Download Manager that applications may use to
   2528 download data files [<a href="#resources56">Resources, 56</a>]. The device
   2529 implementation of the Download Manager MUST be capable of downloading individual
   2530 files of at least 100MB in size to the default "cache" location.</p>
   2531 <a name="section-7.6.2"></a><h4 id="section-7.6.2">7.6.2. Shared External Storage</h4>
   2532 <p>Device implementations MUST offer shared storage for applications. The
   2533 shared storage provided MUST be at least 1GB in size.</p>
   2534 <p>Device implementations MUST be configured with shared storage mounted by
   2535 default, "out of the box". If the shared storage is not mounted on the Linux
   2536 path <code>/sdcard</code>, then the device MUST include a Linux symbolic link
   2537 from <code>/sdcard</code> to the actual mount point.</p>
   2538 <p>Device implementations MUST enforce as documented the
   2539 <code>android.permission.WRITE_EXTERNAL_STORAGE</code> permission on this
   2540 shared storage. Shared storage MUST otherwise be writable by any application
   2541 that obtains that permission.</p>
   2542 <p>Device implementations MAY have hardware for user-accessible removable
   2543 storage, such as a Secure Digital card. Alternatively, device implementations
   2544 MAY allocate internal (non-removable) storage as shared storage for apps. The
   2545 upstream Android Open Source Project includes an implementation that uses
   2546 internal device storage for shared external storage APIs; device implementations
   2547 SHOULD use this configuration and software implementation.</p>
   2548 <p>Regardless of the form of shared storage used, device implementations MUST
   2549 provide some mechanism to access the contents of shared storage from a host
   2550 computer, such as USB mass storage (UMS) or Media Transfer Protocol (MTP). Device
   2551 implementations MAY use USB mass storage, but SHOULD use Media Transfer
   2552 Protocol. If the device implementation supports Media Transfer Protocol:</p>
   2553 <ul>
   2554 <li>The device implementation SHOULD be compatible with the reference Android
   2555 MTP host, Android File Transfer [<a href="#resources57">Resources, 57</a>].</li>
   2556 <li>The device implementation SHOULD report a USB device class of <code>0x00</code>.</li>
   2557 <li>The device implementation SHOULD report a USB interface name of 'MTP'.</li>
   2558 </ul>
   2559 <p>If the device implementation lacks USB ports, it MUST provide a host
   2560 computer with access to the contents of shared storage by some other means,
   2561 such as a network file system.</p>
   2562 <p>It is illustrative to consider two common examples. If a device
   2563 implementation includes an SD card slot to satisfy the shared storage
   2564 requirement, a FAT-formatted SD card 1GB in size or larger MUST be included
   2565 with the device as sold to users, and MUST be mounted by default.
   2566 Alternatively, if a device implementation uses internal fixed storage to
   2567 satisfy this requirement, that storage MUST be 1GB in size or larger
   2568 and mounted on <code>/sdcard</code> (or <code>/sdcard</code>
   2569 MUST be a symbolic link to the physical location if it is mounted elsewhere.)</p>
   2570 <p>Device implementations that include multiple shared storage paths (such as
   2571 both an SD card slot and shared internal storage) MUST NOT allow Android
   2572 applications to write to the secondary external storage, except for their
   2573 package-specific directories on the secondary external storage, but SHOULD
   2574 expose content from both storage paths transparently through Android's media
   2575 scanner service and android.provider.MediaStore.</p>
   2576 
   2577 <a name="section-7.7"></a><h3 id="section-7.7">7.7. USB</h3>
   2578 <p>Device implementations SHOULD include a USB client port, and SHOULD include
   2579 a USB host port.</p>
   2580 <p>If a device implementation includes a USB client port:</p>
   2581 <ul>
   2582 <li>the port MUST be connectable to a USB host with a standard USB-A port</li>
   2583 <li>the port SHOULD use the micro USB form factor on the device side. Existing and
   2584 new devices that run Android are <b>very strongly encouraged to meet these requirements
   2585 in Android</b> so they will be able to upgrade to the future platform releases</li>
   2586 <li>the port SHOULD be centered in the middle of an edge. Device implementations SHOULD either
   2587 locate the port on the bottom of the device (according to natural orientation) or enable software
   2588 screen rotation for all apps (including home screen), so that the display draws correctly when the device
   2589 is oriented with the port at bottom. Existing and new devices that run Androidare <b>very strongly
   2590 encouraged to meet these requirements in Android</b> so they will be able to upgrade to future platform releases.</li>
   2591 <li>if the device has other ports (such as a non-USB charging port) it SHOULD be on the same edge as the
   2592 micro-USB port</li>
   2593 <li>it MUST allow a host connected to the device to access the contents of the
   2594 shared storage volume using either USB mass storage or Media Transfer
   2595 Protocol</li>
   2596 <li>it MUST implement the Android Open Accessory API and specification as documented
   2597 in the Android SDK documentation, and MUST declare support for the hardware
   2598 feature <code>android.hardware.usb.accessory</code> [<a href="#resources52">Resources,
   2599 52</a>]</li>
   2600 <li>it MUST implement the USB audio class as documented in the Android SDK documentation [<a href="#resources66">Resources, 66</a>]</li>
   2601 <li>it SHOULD implement support for USB battery charging specification [<a href="#resources64">Resources, 64</a>]
   2602 Existing and new devices that run Android are <b>very strongly encouraged to
   2603 meet these requirements</b>
   2604 so they will be able to upgrade to the future platform releases</li>
   2605 <li>The value of iSerialNumber in USB standard device descriptor MUST be equal to the value of android.os.Build.SERIAL.</li>
   2606 </ul>
   2607 <p>If a device implementation includes a USB host port:</p>
   2608 <ul>
   2609 <li>it MAY use a non-standard port form factor, but if so MUST ship with a
   2610 cable or cables adapting the port to standard USB-A</li>
   2611 <li>it MUST implement the Android USB host API as documented in the Android
   2612 SDK, and MUST declare support for the hardware feature
   2613 <code>android.hardware.usb.host</code> [<a href="#resources53">Resources, 53</a>]</li>
   2614 </ul>
   2615 <p>Device implementations MUST implement the Android Debug Bridge. If a device
   2616 implementation omits a USB client port, it MUST implement the Android Debug
   2617 Bridge via local-area network (such as Ethernet or 802.11)</p>
   2618 
   2619 <a name="section-8"></a><h2 id="section-8">8. Performance Compatibility</h2>
   2620 <p>Device implementations MUST meet the key performance metrics of an Android-
   2621 compatible device defined in the table below:</p>
   2622 <table><tbody><tr>
   2623 <td><b>Metric</b></td>
   2624 <td><b>Performance Threshold</b></td>
   2625 <td><b>Comments</b></td>
   2626 </tr>
   2627 <tr>
   2628 <td>Application Launch Time</td>
   2629 <td>The following applications should launch within the specified time.<ul>
   2630 <li>Browser: less than 1300ms</li>
   2631 <li>Contacts: less than 700ms</li>
   2632 <li>Settings: less than 700ms</li>
   2633 </ul></td>
   2634 <td>The launch time is measured as the total time to
   2635 complete loading the default activity for the application, including the time
   2636 it takes to start the Linux process, load the Android package into the Dalvik
   2637 VM, and call onCreate.</td>
   2638 </tr>
   2639 <tr>
   2640 <td>Simultaneous Applications</td>
   2641 <td>When multiple applications have been launched, re-launching an
   2642 already-running application after it has been launched must take less than the
   2643 original launch time.</td>
   2644 <td>&nbsp;</td>
   2645 </tr>
   2646 </tbody>
   2647 </table>
   2648 
   2649 <a name="section-9"></a><h2 id="section-9">9. Security Model Compatibility</h2>
   2650 <p>Device implementations MUST implement a security model consistent with the
   2651 Android platform security model as defined in Security and Permissions
   2652 reference document in the APIs [<a href="#resources54">Resources, 54</a>] in the
   2653 Android developer documentation. Device implementations MUST support
   2654 installation of self-signed applications without requiring any additional
   2655 permissions/certificates from any third parties/authorities.  Specifically,
   2656 compatible devices MUST support the security mechanisms described in the
   2657 follow sub-sections.</p>
   2658 <a name="section-9.1"></a><h3 id="section-9.1">9.1. Permissions</h3>
   2659 <p>Device implementations MUST support the Android permissions model as
   2660 defined in the Android developer documentation [<a
   2661 href="#resources54">Resources, 54</a>]. Specifically,
   2662 implementations MUST enforce each permission defined as described in the SDK
   2663 documentation; no permissions may be omitted, altered, or ignored.
   2664 Implementations MAY add additional permissions, provided the new permission ID
   2665 strings are not in the android.* namespace.</p>
   2666 <a name="section-9.2"></a><h3 id="section-9.2">9.2. UID and Process Isolation</h3>
   2667 <p>Device implementations MUST support the Android application sandbox model,
   2668 in which each application runs as a unique Unix-style UID and in a separate
   2669 process.  Device implementations MUST support running multiple applications as
   2670 the same Linux user ID, provided that the applications are properly signed and
   2671 constructed, as defined in the Security and Permissions reference [<a
   2672 href="#resources54">Resources, 54</a>].</p>
   2673 <a name="section-9.3"></a><h3 id="section-9.3">9.3. Filesystem Permissions</h3>
   2674 <p>Device implementations MUST support the Android file access permissions
   2675 model as defined in the Security and Permissions reference [<a
   2676 href="#resources54">Resources, 54</a>].</p>
   2677 <a name="section-9.4"></a><h3 id="section-9.4">9.4. Alternate Execution Environments</h3>
   2678 <p>Device implementations MAY include runtime environments that execute
   2679 applications using some other software or technology than the Dalvik virtual
   2680 machine or native code. However, such alternate execution environments MUST
   2681 NOT compromise the Android security model or the security of installed Android
   2682 applications, as described in this section.</p>
   2683 <p>Alternate runtimes MUST themselves be Android applications, and abide by
   2684    the standard Android security model, as described elsewhere in Section 9.</p>
   2685 <p>Alternate runtimes MUST NOT be granted access to resources protected by
   2686    permissions not requested in the runtime's AndroidManifest.xml file via the
   2687    <code>&lt;uses-permission&gt;</code> mechanism.</p>
   2688 <p>Alternate runtimes MUST NOT permit applications to make use of features
   2689    protected by Android permissions restricted to system applications.</p>
   2690 <p>Alternate runtimes MUST abide by the Android sandbox model.  Specifically:</p>
   2691 <ul>
   2692 <li>Alternate runtimes SHOULD install apps via the PackageManager into
   2693     separate Android sandboxes (that is, Linux user IDs, etc.)</li>
   2694 <li>Alternate runtimes MAY provide a single Android sandbox shared by all
   2695     applications using the alternate runtime</li>
   2696 <li>Alternate runtimes and installed applications using an alternate runtime
   2697     MUST NOT reuse the sandbox of any other app installed on the device, except
   2698     through the standard Android mechanisms of shared user ID and signing
   2699     certificate</li>
   2700 <li>Alternate runtimes MUST NOT launch with, grant, or be granted access to
   2701     the sandboxes corresponding to other Android applications</li>
   2702 </ul>
   2703 <p>Alternate runtimes MUST NOT be launched with, be granted, or grant to other
   2704    applications any privileges of the superuser (root), or of any other user ID.</p>
   2705 <p>The .apk files of alternate runtimes MAY be included in the system image of
   2706    a device implementation, but MUST be signed with a key distinct
   2707    from the key used to sign other applications included with the device
   2708    implementation.</p>
   2709 <p>When installing applications, alternate runtimes MUST obtain user consent
   2710    for the Android permissions used by the application. That is, if an
   2711    application needs to make use of a device resource for which there is a
   2712    corresponding Android permission (such as Camera, GPS, etc.), the alternate
   2713    runtime MUST inform the user that the application will be able to access
   2714    that resource. If the runtime environment does not record application
   2715    capabilities in this manner, the runtime environment MUST list all
   2716    permissions held by the runtime itself when installing any application
   2717    using that runtime.</p>
   2718 
   2719 <a name="section-9.5"></a><h3 id="section-9.5">9.5. Multi-User Support </h3>
   2720 <p>Android includes support for multiple users and provides support for full user isolation
   2721 [<a href="#resources70">Resources, 70</a>].</p>
   2722 <p>Device implementations MUST meet these requirements related to multi-user support [<a href="#resources71">Resources, 71</a>]:</p>
   2723 <ul>
   2724 <li>As the behavior of the telephony APIs on devices with multiple users is currently undefined, device implementations that
   2725 declare android.hardware.telephony MUST NOT enable multi-user support. </li>
   2726 <li>Device implementations MUST, for each user, implement a security model consistent with the Android platform security model
   2727 as defined in Security and Permissions reference document in the APIs [Resources, 54]</li>
   2728 <li>Android includes support for restricted profiles, a feature that allows device owners to manage additional users and their capabilities
   2729 on the device. With restricted profiles, device owners can quickly set up separate environments for additional users to work in, with the ability to
   2730 manage finer-grained restrictions in the apps that are available in those environments. Device implementations that include support for multiple users
   2731 MUST include support for restricted profiles. The upstream Android Open Source Project includes an implementation that satisfies this requirement.</li>
   2732 </ul>
   2733 
   2734 <p>Each user instance on an Android device MUST have separate and isolated external storage directories. Device implementations MAY store multiple users' data on the same volume or filesystem.
   2735 However, the device implementation MUST ensure that applications owned by and running on behalf a given user cannot list, read, or write to data owned by any other user.
   2736 Note that removable media, such as SD card slots, can allow one user to access another's data by means of a host PC. For this reason, device implementations that use removable media for the
   2737 external storage APIs MUST encrypt the contents of the SD card if multi-user is enabled using a key stored only on non-removable media accessible only to the system. As this will make the 
   2738 media unreadable by a host PC, device implementations will be required to switch to MTP or a similar system to provide host PCs with access to the current user's data. Accordingly, device
   2739 implementations MAY but SHOULD NOT enable multi-user if they use removable media [<a href="#resources72">Resources, 72</a>] for primary external storage.</p>
   2740 
   2741 <a name="section-9.6"></a><h3 id="section-9.6">9.6. Premium SMS Warning</h3>
   2742 <p>Android includes support for warning users for any outgoing premium SMS message [<a href="#resources73">Resources, 73</a>] . Premium SMS messages are text messages sent to a service registered with a carrier that may incur a charge to the user.
   2743 Device implementations that declare support for <code>android.hardware.telephony</code> MUST warn users before sending a SMS message to numbers identified by regular expressions defined in <code>/data/misc/sms/codes.xml</code> file in the device.
   2744 The upstream Android Open Source Project provides an implementation that satisfies this requirement.
   2745 </p>
   2746 
   2747 <a name="section-9.7"></a><h3 id="section-9.7">9.7. Kernel Security Features</h3>
   2748 <p>The Android Sandbox includes features that can use the Security-Enhanced
   2749 Linux (SELinux) mandatory access control (MAC) system and other security
   2750 features in the Linux kernel. SELinux or any other security features, if
   2751 implemented below the Android framework:</p>
   2752 <ul>
   2753 <li>MUST maintain compatibility with existing applications</li>
   2754 <li>MUST not have a visible user interface, even when violations are detected
   2755 </li>
   2756 <li>SHOULD NOT be user or developer configurable</li>
   2757 </ul>
   2758 <p>If any API for configuration of policy is exposed to an application that can
   2759 affect another application (such as a Device Administration API), the API MUST
   2760 NOT allow configurations that break compatibility.</p>
   2761 <p>Devices MUST implement SELinux and meet the following requirements, which
   2762 are satisfied by the reference implementation in the upstream Android Open
   2763 Source Project.</p>
   2764 <ul>
   2765 <li>it MUST support a SELinux policy that allows the SELinux mode to be set on
   2766 a per-domain basis with:</li>
   2767 <ul>
   2768   <li>domains that are in enforcing mode in the upstream Android Open Source
   2769   implementation (such as installd, netd, and vold) MUST be in enforcing mode
   2770   </li>
   2771   <li>domain(s) for third-party applications SHOULD remain in permissive mode to
   2772    ensure continued compatibility</li>
   2773 </ul>
   2774 <li>it SHOULD load policy from <code>/sepolicy</code> file on the device</li>
   2775 <li>it MUST support dynamic updates of the SELinux policy file without requiring
   2776 a system image update</li>
   2777 <li>it MUST log any policy violations without breaking applications or affecting
   2778 system behavior</li>
   2779 </ul>
   2780 
   2781 <p>Device implementations SHOULD retain the default SELinux policy provided in
   2782 the upstream Android Open Source Project, until they have first audited their
   2783 additions to the SELinux policy. Device implementations MUST be compatible with
   2784 the upstream Android Open Source Project.</p>
   2785 
   2786 <a name="section-9.8"></a><h3 id="section-9.8">9.8. Privacy</h3>
   2787 <p>If the device implements functionality in the system that captures the
   2788 contents displayed on the screen and/or records the audio stream played on the
   2789 device, it MUST continuously notify the user whenever this functionality is
   2790 enabled and actively capturing/recording.</p>
   2791 
   2792 <a name="section-9.9"></a><h3 id="section-9.9">9.9. Full-Disk Encryption</h3>
   2793 <p>IF the device has lockscreen, the device MUST support full-disk
   2794 encryption.</p>
   2795 
   2796 <a name="section-10"></a><h2 id="section-10">10. Software Compatibility Testing</h2>
   2797 <p>Device implementations MUST pass all tests described in this section.</p>
   2798 <p>However, note that no software test package is fully comprehensive. For
   2799 this reason, device implementers are very strongly encouraged to make the
   2800 minimum number of changes as possible to the reference and preferred
   2801 implementation of Android available from the Android Open Source Project.
   2802 This will minimize the risk of introducing bugs that create incompatibilities
   2803 requiring rework and potential device updates.</p>
   2804 <a name="section-10.1"></a><h3 id="section-10.1">10.1. Compatibility Test Suite</h3>
   2805 <p>Device implementations MUST pass the Android Compatibility Test Suite (CTS)
   2806 [<a href="#resources02">Resources, 2</a>] available from the Android Open Source
   2807 Project, using the final shipping software on the device. Additionally, device
   2808 implementers SHOULD use the reference implementation in the Android Open
   2809 Source tree as much as possible, and MUST ensure compatibility in cases of
   2810 ambiguity in CTS and for any reimplementations of parts of the reference
   2811 source code.</p>
   2812 <p>The CTS is designed to be run on an actual device. Like any software, the
   2813 CTS may itself contain bugs.  The CTS will be versioned independently of this
   2814 Compatibility Definition, and multiple revisions of the CTS may be released
   2815 for Android 4.4. Device implementations MUST pass the latest CTS version
   2816 available at the time the device software is completed.</p>
   2817 <a name="section-10.2"></a><h3 id="section-10.2">10.2. CTS Verifier</h3>
   2818 <p>Device implementations MUST correctly execute all applicable cases in the
   2819 CTS Verifier. The CTS Verifier is included with the Compatibility Test Suite,
   2820 and is intended to be run by a human operator to test functionality that
   2821 cannot be tested by an automated system, such as correct functioning of a
   2822 camera and sensors.</p>
   2823 <p>The CTS Verifier has tests for many kinds of hardware, including some
   2824 hardware that is optional. Device implementations MUST pass all tests for
   2825 hardware which they possess; for instance, if a device possesses an
   2826 accelerometer, it MUST correctly execute the Accelerometer test case in the
   2827 CTS Verifier. Test cases for features noted as optional by this Compatibility
   2828 Definition Document MAY be skipped or omitted.</p>
   2829 <p>Every device and every build MUST correctly run the CTS Verifier, as noted
   2830 above. However, since many builds are very similar, device implementers are
   2831 not expected to explicitly run the CTS Verifier on builds that differ only in
   2832 trivial ways. Specifically, device implementations that differ from an
   2833 implementation that has passed the CTS Verifier only by the set of included
   2834 locales, branding, etc. MAY omit the CTS Verifier test.</p>
   2835 <a name="section-10.3"></a><h3 id="section-10.3">10.3. Reference Applications</h3>
   2836 <p>Device implementers MUST test implementation compatibility using the
   2837 following open source applications:</p>
   2838 <ul>
   2839 <li>The "Apps for Android" applications [<a href="#resources55">Resources, 55</a>]</li>
   2840 <li>Replica Island (available in Google Play Store)</li>
   2841 </ul>
   2842 <p>Each app above MUST launch and behave correctly on the implementation, for
   2843 the implementation to be considered compatible.</p>
   2844 
   2845 
   2846 <a name="section-11"></a><h2 id="section-11">11. Updatable Software</h2>
   2847 <p>Device implementations MUST include a mechanism to replace the entirety of
   2848 the system software. The mechanism need not perform "live" upgrades - that
   2849 is, a device restart MAY be required.</p>
   2850 <p>Any method can be used, provided that it can replace the entirety of the
   2851 software preinstalled on the device. For instance, any of the following
   2852 approaches will satisfy this requirement:</p>
   2853 <ul>
   2854 <li>Over-the-air (OTA) downloads with offline update via reboot</li>
   2855 <li>"Tethered" updates over USB from a host PC</li>
   2856 <li>"Offline" updates via a reboot and update from a file on removable
   2857 storage</li>
   2858 </ul>
   2859 <p>The update mechanism used MUST support updates without wiping user data.
   2860 That is, the update mechanism MUST preserve application private data
   2861 and application shared data. Note that the upstream Android software includes
   2862 an update mechanism that satisfies this requirement.</p>
   2863 <p>If an error is found in a device implementation after it has been released
   2864 but within its reasonable product lifetime that is determined in consultation
   2865 with the Android Compatibility Team to affect the compatibility of third-party
   2866 applications, the device implementer MUST correct the error via a software
   2867 update available that can be applied per the mechanism just described.</p>
   2868 
   2869 <a name="section-12"></a><h2 id="section-12">12. Document Changelog</h2>
   2870 <p>The following table contains a summary of the changes to the Compatibility Definition in this release.</p>
   2871 <table width="100%" border="1">
   2872   <tr>
   2873     <th width="25%" scope="col">Section(s)</th>
   2874     <th width="75%" scope="col">Summary of change</th>
   2875   </tr>
   2876   <tr>
   2877     <td>3.2.2. Build Parameters</td>
   2878     <td>Revised descriptions of BRAND, DEVICE, and PRODUCT. SERIAL is now
   2879 required.</td>
   2880   </tr>
   2881   <tr>
   2882     <td>3.2.3.5. Default App Settings</td>
   2883     <td>New section that adds requirement to comply with new default
   2884     application settings</td>
   2885   </tr>
   2886   <tr>
   2887     <td>3.3.1 Application Binary Interfaces</td>
   2888     <td>Clarified allowed values for the <code>android.os.Build.CPU_ABI</code>
   2889      and <code>android.os.Build.CPU_ABI2</code> parameters.</td>
   2890   </tr>
   2891   <tr>
   2892     <td>3.4.1. WebView Compatibility</td>
   2893     <td>Added Chromium as required WebView implementation.</td>
   2894   </tr>
   2895   <tr>
   2896     <td>3.7. Virtual Machine Compatibility</td>
   2897     <td>Added requirement for xxhdpi and 400dpi screen densities.</td>
   2898   </tr>
   2899   <tr>
   2900     <td>3.8.6. Themes</td>
   2901     <td>Updated to reflect use of translucent system bars.</td>
   2902   </tr>
   2903   <tr>
   2904     <td>3.8.12. Location</td>
   2905     <td>New section that adds requirement location settings be centralized.</td>
   2906   </tr>
   2907   <tr>
   2908     <td>3.8.13. Unicode</td>
   2909     <td>New section that adds requirement for emoji support.</td>
   2910   </tr>
   2911   <tr>
   2912     <td>3.9. Device Administration</td>
   2913     <td>Noted preinstalled administrative applications cannot be the default 
   2914      Device Owner application.</td>
   2915   </tr>
   2916   <tr>
   2917     <td>5.1. Media Codecs</td>
   2918     <td>Added VP9 decoder requirement. Added recommended specification for
   2919      hardware VP8 codecs.</td>
   2920   </tr>
   2921   <tr>
   2922     <td>5.3. Video Decoding</td>
   2923     <td>Added VP9. Added recommendation for dynamic resolution switching.</td> 
   2924   </tr>
   2925   <tr>
   2926     <td>5.4. Audio Recording</td>
   2927     <td>Added <code>REMOTE_SUBMIX</code> as new required audio source. Made use
   2928      of <code>android.media.audiofx.NoiseSuppressor</code> API a requirement.</td>
   2929   </tr>
   2930   <tr>
   2931     <td>6.2.1 Experimental</td>
   2932     <td>New section that introduces the ART runtime and requires Dalvik as the
   2933       default runtime.</td>
   2934   </tr>
   2935   <tr>
   2936     <td>7.1.1. Screen Configuration</td>
   2937     <td>Replaced 1.85 aspect ratio with 1.86. Added 400dpi screen density.</td>
   2938   </tr>
   2939   <tr>
   2940     <td>7.1.6. Screen Types</td>
   2941     <td>Added 640 dpi (4K) resolution configuration.</td>
   2942   </tr>
   2943   <tr>
   2944     <td>7.2.3. Navigation keys</td>
   2945     <td>Added Recents function as essential; demoted Menu function in priority.</td>
   2946   </tr>
   2947   <tr>
   2948     <td>7.3.6. Thermometer</td>
   2949     <td>Added SENSOR_TYPE_AMBIENT_TEMPERATURE as recommended thermometer.</td>
   2950   </tr>
   2951   <tr>
   2952     <td>7.4.2.2. Wi-Fi Tunneled Direct Link Setup</td>
   2953     <td>New section that adds support for Wi-Fi Tunneled Direct Link Setup
   2954      (TDLS).</td>
   2955   </tr>
   2956   <tr>
   2957     <td>7.4.4. Near-Field Communications</td>
   2958     <td>Added Host Card Emulation (HCE) as a requirement. Replaced SNEP GET with
   2959      Logical Link Control Protocol (LLCP) and added the Bluetooth Object Push
   2960      Profile as a requirement.</td>
   2961   </tr>
   2962   <tr>
   2963     <td>7.4.6. Sync Settings</td>
   2964     <td>New section that adds requirement auto-sync data be enabled by default.</td>
   2965   </tr>
   2966   <tr>
   2967     <td>7.6.1. Minimum Memory and Storage</td>
   2968     <td>Added <code>ActivityManager.isLowRamDevice()</code> setting requirement
   2969     for devices with less than 512MB of memory. Increased storage requirements 
   2970     from 512MB and 1GB to 1GB and 2GB, respectively.</td>
   2971   </tr>
   2972   <tr>
   2973     <td>7.6.2. Shared "External" Storage</td>
   2974     <td>Editorial fixes such as change of section name, and moved text that fits
   2975      in this section from section 9.5. Noted applications may write to their
   2976      package-specific directories on secondary external storage.</td> 
   2977   </tr>
   2978   <tr>
   2979     <td>7.7. USB</td>
   2980     <td>Added requirement all devices report a USB serial number.</td>
   2981   </tr>
   2982   <tr>
   2983     <td>9.5. Multi-User Support</td>
   2984     <td>Moved non multi-user specific text to  section 7.6.2.</td>
   2985   </tr>
   2986   <tr>
   2987     <td>9.7. Kernel Security Features</td>
   2988     <td>Rewritten to note switch of SELinux to enforcing mode and requirement
   2989      SELinux output not be rendered in the user interface.</td>
   2990   </tr>
   2991   <tr>
   2992     <td>9.8. Privacy</td>
   2993     <td>New section that adds requirement audio and video recording must trigger
   2994      continuous notifications to the user.</td>
   2995   </tr>
   2996   <tr>
   2997     <td>9.9. Full-Disk Encryption</td>
   2998     <td>New section that adds requirement devices with lockscreen support full-disk encryption.</td>
   2999   </tr>
   3000   <tr>
   3001     <td>12. Document Changelog</td>
   3002     <td>New section that summarizes changes in the CDD by section.</td>
   3003   </tr>
   3004 </table>
   3005 <p>&nbsp;</p>
   3006 
   3007 <a name="section-13"></a><h2 id="section-13">13. Contact Us</h2>
   3008 <p>You can contact the document authors at <a
   3009 href="mailto:compatibility (a] android.com">compatibility (a] android.com</a> for
   3010 clarifications and to bring up any issues that you think the document does not
   3011 cover.</p>
   3012 
   3013 <div style="page-break-before: always;"></div>
   3014 
   3015 <div id="footerContent" xmlns:pdf="http://whatever">
   3016 <pdf:pagenumber/>
   3017 </div>
   3018 </body>
   3019 </html>
   3020