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