Revision 2
Last updated: Feb 17, 2013
Copyright © 2012, Google Inc. All rights reserved.
[email protected]
Table of Contents
2. Resources
3. Software
3.2. Soft API Compatibility
3.3. Native API Compatibility
3.4. Web Compatibility
3.5. API Behavioral Compatibility
3.6. API Namespaces
3.7. Virtual Machine Compatibility
3.8. User Interface Compatibility
3.8.2. Notifications
3.8.3. Search
3.8.4. Toasts
3.8.5. Themes
3.8.6. Live Wallpapers
3.8.7. Recent Application Display
3.8.8. Input Management Settings
3.8.9. Lock and Home Screen Widgets
3.8.10. Lock Screen Media Remote Control
3.8.11. Dreams
3.10 Accessibility
3.11 Text-to-Speech
5. Multimedia Compatibility
5.2. Video Encoding
5.3. Video Decoding
5.4. Audio Recording
5.5. Audio Latency
5.6. Network Protocols
7. Hardware Compatibility
7.1.2. Display Metrics
7.1.3. Screen Orientation
7.1.4. 2D and 3D Graphics Accleration
7.1.5. Legacy Application Compatibility Mode
7.1.6. Screen Types
7.1.7. Screen Technology
7.1.8. External Displays
7.3. Sensors
7.3.2. Magnetometer
7.3.3. GPS
7.3.4. Gyroscope
7.3.5. Barometer
7.3.6. Thermometer
7.3.7. Photometer
7.3.8. Proximity Sensor
7.4.2. IEEE 802.11 (WiFi)
7.4.3. Bluetooth
7.4.4. Near-Field Communications
7.4.5. Minimum Network Capability
7.5.2. Front-Facing Camera
7.5.3. Camera API Behavior
7.5.4. Camera Orientation
7.7. USB
9. Security Model Compatibility
9.2. UID and Process Isolation
9.3. Filesystem Permissions
9.4. Alternate Execution Environments
9.5. Multi-User Support
9.6. Premium SMS Warning
11. Updatable Software
12. Contact Us
Appendix A - Bluetooth Test Procedure
1. Introduction
This document enumerates the requirements that must be met in order for devices to be compatible with Android 4.2.
The use of "must", "must not", "required", "shall", "shall not", "should", "should not", "recommended", "may" and "optional" is per the IETF standard defined in RFC2119 [Resources, 1].
As used in this document, a "device implementer" or "implementer" is a person or organization developing a hardware/software solution running Android 4.2. A "device implementation" or "implementation" is the hardware/software solution so developed.
To be considered compatible with Android 4.2, device implementations MUST meet the requirements presented in this Compatibility Definition, including any documents incorporated via reference.
Where this definition or the software tests described in Section 10 is silent, ambiguous, or incomplete, it is the responsibility of the device implementer to ensure compatibility with existing implementations.
For this reason, the Android Open Source Project [Resources, 3] is both the reference and preferred implementation of Android. Device implementers are strongly encouraged to base their implementations to the greatest extent possible on the "upstream" source code available from the Android Open Source Project. While some components can hypothetically be replaced with alternate implementations this practice is strongly discouraged, as passing the software tests will become substantially more difficult. It is the implementer's responsibility to ensure full behavioral compatibility with the standard Android implementation, including and beyond the Compatibility Test Suite. Finally, note that certain component substitutions and modifications are explicitly forbidden by this document.
2. Resources
- IETF RFC2119 Requirement Levels: http://www.ietf.org/rfc/rfc2119.txt
- Android Compatibility Program Overview: http://source.android.com/docs/compatibility/index.html
- Android Open Source Project: http://source.android.com/
- API definitions and documentation: http://developer.android.com/reference/packages.html
- Android Permissions reference: http://developer.android.com/reference/android/Manifest.permission.html
- android.os.Build reference: http://developer.android.com/reference/android/os/Build.html
- Android 4.2 allowed version strings: http://source.android.com/docs/compatibility/4.2/versions.html
- Renderscript: http://developer.android.com/guide/topics/graphics/renderscript.html
- Hardware Acceleration: http://developer.android.com/guide/topics/graphics/hardware-accel.html
- android.webkit.WebView class: http://developer.android.com/reference/android/webkit/WebView.html
- HTML5: http://www.whatwg.org/specs/web-apps/current-work/multipage/
- HTML5 offline capabilities: http://dev.w3.org/html5/spec/Overview.html#offline
- HTML5 video tag: http://dev.w3.org/html5/spec/Overview.html#video
- HTML5/W3C geolocation API: http://www.w3.org/TR/geolocation-API/
- HTML5/W3C webdatabase API: http://www.w3.org/TR/webdatabase/
- HTML5/W3C IndexedDB API: http://www.w3.org/TR/IndexedDB/
- Dalvik Virtual Machine specification: available in the Android source code, at dalvik/docs
- AppWidgets: http://developer.android.com/guide/practices/ui_guidelines/widget_design.html
- Notifications: http://developer.android.com/guide/topics/ui/notifiers/notifications.html
- Application Resources: http://code.google.com/android/reference/available-resources.html
- Status Bar icon style guide: http://developer.android.com/guide/practices/ui_guidelines/icon_design_status_bar.html
- Search Manager: http://developer.android.com/reference/android/app/SearchManager.html
- Toasts: http://developer.android.com/reference/android/widget/Toast.html
- Themes: http://developer.android.com/guide/topics/ui/themes.html
- R.style class: http://developer.android.com/reference/android/R.style.html
- Live Wallpapers: https://android-developers.googleblog.com/2010/02/live-wallpapers.html
- Android Device Administration: http://developer.android.com/guide/topics/admin/device-admin.html
- DevicePolicyManager reference: http://developer.android.com/reference/android/app/admin/DevicePolicyManager.html
- Android Accessibility Service APIs: http://developer.android.com/reference/android/accessibilityservice/package-summary.html
- Android Accessibility APIs: http://developer.android.com/reference/android/view/accessibility/package-summary.html
- Eyes Free project: http://code.google.com/p/eyes-free
- Text-To-Speech APIs: http://developer.android.com/reference/android/speech/tts/package-summary.html
- Reference tool documentation (for adb, aapt, ddms, systrace): http://developer.android.com/guide/developing/tools/index.html
- Android apk file description: http://developer.android.com/guide/topics/fundamentals.html
- Manifest files: http://developer.android.com/guide/topics/manifest/manifest-intro.html
- Monkey testing tool: https://developer.android.com/studio/test/other-testing-tools/monkey
- Android android.content.pm.PackageManager class and Hardware Features List: http://developer.android.com/reference/android/content/pm/PackageManager.html
- Supporting Multiple Screens: http://developer.android.com/guide/practices/screens_support.html
- android.util.DisplayMetrics: http://developer.android.com/reference/android/util/DisplayMetrics.html
- android.content.res.Configuration: http://developer.android.com/reference/android/content/res/Configuration.html
- android.hardware.SensorEvent: http://developer.android.com/reference/android/hardware/SensorEvent.html
- Bluetooth API: http://developer.android.com/reference/android/bluetooth/package-summary.html
- NDEF Push Protocol: http://source.android.com/docs/compatibility/ndef-push-protocol.pdf
- MIFARE MF1S503X: http://www.nxp.com/documents/data_sheet/MF1S503x.pdf
- MIFARE MF1S703X: http://www.nxp.com/documents/data_sheet/MF1S703x.pdf
- MIFARE MF0ICU1: http://www.nxp.com/documents/data_sheet/MF0ICU1.pdf
- MIFARE MF0ICU2: http://www.nxp.com/documents/short_data_sheet/MF0ICU2_SDS.pdf
- MIFARE AN130511: http://www.nxp.com/documents/application_note/AN130511.pdf
- MIFARE AN130411: http://www.nxp.com/documents/application_note/AN130411.pdf
- Camera orientation API: http://developer.android.com/reference/android/hardware/Camera.html#setDisplayOrientation(int)
- Camera: http://developer.android.com/reference/android/hardware/Camera.html
- Android Open Accessories: http://developer.android.com/guide/topics/usb/accessory.html
- USB Host API: http://developer.android.com/guide/topics/usb/host.html
- Android Security and Permissions reference: http://developer.android.com/guide/topics/security/security.html
- Apps for Android: http://code.google.com/p/apps-for-android
- Android DownloadManager: http://developer.android.com/reference/android/app/DownloadManager.html
- Android File Transfer: http://www.android.com/filetransfer
- Android Media Formats: http://developer.android.com/guide/appendix/media-formats.html
- HTTP Live Streaming Draft Protocol: http://tools.ietf.org/html/draft-pantos-http-live-streaming-03
- NFC Connection Handover: http://www.nfc-forum.org/specs/spec_list/#conn_handover
- Bluetooth Secure Simple Pairing Using NFC: http://www.nfc-forum.org/resources/AppDocs/NFCForum_AD_BTSSP_1_0.pdf
- Wifi Multicast API: http://developer.android.com/reference/android/net/wifi/WifiManager.MulticastLock.html
- Action Assist: http://developer.android.com/reference/android/content/Intent.html#ACTION_ASSIST
- USB Charging Specification: http://www.usb.org/developers/devclass_docs/USB_Battery_Charging_1.2.pdf
- Android Beam: http://developer.android.com/guide/topics/nfc/nfc.html
- Android USB Audio: http://developer.android.com/reference/android/hardware/usb/UsbConstants.html#USB_CLASS_AUDIO
- Android NFC Sharing Settings: http://developer.android.com/reference/android/provider/Settings.html#ACTION_NFCSHARING_SETTINGS
- Wifi Direct (Wifi P2P): http://developer.android.com/reference/android/net/wifi/p2p/WifiP2pManager.html
- Lock and Home Screen Widget: http://developer.android.com/reference/android/appwidget/AppWidgetProviderInfo.html
- UserManager reference: http://developer.android.com/reference/android/os/UserManager.html
- External Storage reference: https://source.android.com/docs/core/storage
- External Storage APIs: http://developer.android.com/reference/android/os/Environment.html
- SMS Short Code: http://en.wikipedia.org/wiki/Short_code
- Media Remote Control Client: http://developer.android.com/reference/android/media/RemoteControlClient.html
- Display Manager: http://developer.android.com/reference/android/hardware/display/DisplayManager.html
- Dreams: http://developer.android.com/reference/android/service/dreams/DreamService.html
- Android Application Development-Related Settings: http://developer.android.com/reference/android/provider/Settings.html#ACTION_APPLICATION_DEVELOPMENT_SETTINGS
Many of these resources are derived directly or indirectly from the Android 4.2 SDK, and will be functionally identical to the information in that SDK's documentation. In any cases where this Compatibility Definition or the Compatibility Test Suite disagrees with the SDK documentation, the SDK documentation is considered authoritative. Any technical details provided in the references included above are considered by inclusion to be part of this Compatibility Definition.
3. Software
3.1. Managed API Compatibility
The managed (Dalvik-based) execution environment is the primary vehicle for Android applications. The Android application programming interface (API) is the set of Android platform interfaces exposed to applications running in the managed VM environment. Device implementations MUST provide complete implementations, including all documented behaviors, of any documented API exposed by the Android 4.2 SDK [Resources, 4].
Device implementations MUST NOT omit any managed APIs, alter API interfaces or signatures, deviate from the documented behavior, or include no-ops, except where specifically allowed by this Compatibility Definition.
This Compatibility Definition permits some types of hardware for which Android includes APIs to be omitted by device implementations. In such cases, the APIs MUST still be present and behave in a reasonable way. See Section 7 for specific requirements for this scenario.
3.2. Soft API Compatibility
In addition to the managed APIs from Section 3.1, Android also includes a significant runtime-only "soft" API, in the form of such things such as Intents, permissions, and similar aspects of Android applications that cannot be enforced at application compile time.
3.2.1. Permissions
Device implementers MUST support and enforce all permission constants as documented by the Permission reference page [Resources, 5]. Note that Section 10 lists additional requirements related to the Android security model.
3.2.2. Build Parameters
The Android APIs include a number of constants on the android.os.Build
class [Resources, 6] that are intended to describe
the current device. To provide consistent, meaningful values across device
implementations, the table below includes additional restrictions on the
formats of these values to which device implementations MUST conform.
Parameter | Comments |
android.os.Build.VERSION.RELEASE | The version of the currently-executing Android system, in human-readable format. This field MUST have one of the string values defined in [Resources, 7]. |
android.os.Build.VERSION.SDK | The version of the currently-executing Android system, in a format accessible to third-party application code. For Android 4.2, this field MUST have the integer value 17. |
android.os.Build.VERSION.SDK_INT | The version of the currently-executing Android system, in a format accessible to third-party application code. For Android 4.2, this field MUST have the integer value 17. |
android.os.Build.VERSION.INCREMENTAL | A value chosen by the device implementer designating the specific build of the currently-executing Android system, in human-readable format. This value MUST NOT be re-used for different builds made available to end users. A typical use of this field is to indicate which build number or source-control change identifier was used to generate the build. There are no requirements on the specific format of this field, except that it MUST NOT be null or the empty string (""). |
android.os.Build.BOARD | A value chosen by the device implementer identifying the specific internal
hardware used by the device, in human-readable format. A possible use of this
field is to indicate the specific revision of the board powering the device.
The value of this field MUST be encodable as 7-bit ASCII and match the regular expression
"^[a-zA-Z0-9.,_-]+$" . |
android.os.Build.BRAND | A value chosen by the device implementer identifying the name of the
company, organization, individual, etc. who produced the device, in
human-readable format. A possible use of this field is to indicate the OEM
and/or carrier who sold the device. The value of this field MUST be
encodable as 7-bit ASCII and match the regular expression
"^[a-zA-Z0-9.,_-]+$" .
|
android.os.Build.CPU_ABI | The name of the instruction set (CPU type + ABI convention) of native code. See Section 3.3: Native API Compatibility. |
android.os.Build.CPU_ABI2 | The name of the second instruction set (CPU type + ABI convention) of native code. See |