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