Copyright © 2010, Google Inc. 판권 소유.
compatibility@android.com
1. 소개
이 문서는 휴대폰이 Android 2.1과 호환되기 위해 충족되어야 하는 요구 사항을 나열합니다.
"해야 한다", "하지 말아야 한다", "필수", "해야 한다", "하지 말아야 한다", "해야 한다", "해서는 안된다", "권장한다", "할 수 있다" 및 "선택 사항"의 사용은 IETF 표준에 따른다. RFC2119 [ 리소스, 1 ]에 정의되어 있습니다.
이 문서에서 사용된 "기기 구현자" 또는 "구현자"는 Android 2.1을 실행하는 하드웨어/소프트웨어 솔루션을 개발하는 개인 또는 조직입니다. "장치 구현" 또는 "구현"은 그렇게 개발된 하드웨어/소프트웨어 솔루션입니다.
Android 2.1과 호환되는 것으로 간주되는 기기 구현:
- 참조를 통해 통합된 모든 문서를 포함하여 이 호환성 정의에 제시된 요구 사항을 충족해야 합니다(MUST).
- 기기 구현의 소프트웨어가 완료될 때 사용 가능한 최신 버전의 Android CTS(호환성 테스트 모음)를 통과해야 합니다(MUST). (CTS는 Android 오픈 소스 프로젝트[ 리소스, 2 ]의 일부로 사용할 수 있습니다.) CTS는 이 문서에 설명된 구성 요소의 전부는 아니지만 많은 부분을 테스트합니다.
이 정의 또는 CTS가 무음이거나 모호하거나 불완전한 경우 기존 구현과의 호환성을 보장하는 것은 기기 구현자의 책임입니다. 이러한 이유로 Android 오픈 소스 프로젝트[ 리소스, 3 ]는 Android의 참조이자 선호되는 구현입니다. 기기 구현자는 Android 오픈 소스 프로젝트에서 사용할 수 있는 "업스트림" 소스 코드를 기반으로 구현하는 것이 좋습니다. 일부 구성 요소는 가상으로 대체 구현으로 대체될 수 있지만 CTS 테스트를 통과하는 것이 훨씬 더 어려워지기 때문에 이 방법은 권장되지 않습니다. Compatibility Test Suite를 비롯한 표준 Android 구현과의 완전한 동작 호환성을 보장하는 것은 구현자의 책임입니다. 마지막으로 이 문서에서는 특정 구성 요소의 대체 및 수정을 명시적으로 금지하고 있습니다.
2. 자원
- IETF RFC2119 요구 사항 수준: http://www.ietf.org/rfc/rfc2119.txt
- Android 호환성 프로그램 개요: http://source.android.com/compatibility/index.html
- 안드로이드 오픈 소스 프로젝트: http://source.android.com/
- API 정의 및 문서: http://developer.android.com/reference/packages.html
- 안드로이드 권한 참조: http://developer.android.com/reference/android/Manifest.permission.html
- android.os.Build 참조: http://developer.android.com/reference/android/os/Build.html
- Android 2.1 허용 버전 문자열: http://source.android.com/compatibility/2.1/versions.html
- android.webkit.WebView 클래스: http://developer.android.com/reference/android/webkit/WebView.html
- HTML5: http://www.whatwg.org/specs/web-apps/current-work/multipage/
- Dalvik 가상 머신 사양: dalvik/docs의 Android 소스 코드에서 사용 가능
- 앱 위젯: http://developer.android.com/guide/practices/ui_guidelines/widget_design.html
- 알림: http://developer.android.com/guide/topics/ui/notifiers/notifications.html
- 애플리케이션 리소스: http://code.google.com/android/reference/available-resources.html
- 상태 표시줄 아이콘 스타일 가이드: http://developer.android.com/guide/practices/ui_guideline /icon_design.html#statusbarstructure
- 검색 관리자: http://developer.android.com/reference/android/app/SearchManager.html
- 토스트: http://developer.android.com/reference/android/widget/Toast.html
- 라이브 배경 화면: http://developer.android.com/resources/articles/live-wallpapers.html
- Android용 앱: http://code.google.com/p/apps-for-android
- 참조 도구 문서(adb, aapt, ddms용): http://developer.android.com/guide/developing/tools/index.html
- Android apk 파일 설명: http://developer.android.com/guide/topics/fundamentals.html
- 매니페스트 파일: http://developer.android.com/guide/topics/manifest/manifest-intro.html
- 원숭이 테스트 도구: http://developer.android.com/guide/developing/tools/monkey.html
- 다중 화면 지원: http://developer.android.com/guide/practices/screens_support.html
- android.content.res.Configuration: http://developer.android.com/reference/android/content/res/Configuration.html
- android.util.DisplayMetrics: http://developer.android.com/reference/android/util/DisplayMetrics.html
- android.hardware.Camera: http://developer.android.com/reference/android/hardware/Camera.html
- 센서 좌표 공간: http://developer.android.com/reference/android/hardware/SensorEvent.html
- Android 보안 및 권한 참조: http://developer.android.com/guide/topics/security/security.html
- 블루투스 API: http://developer.android.com/reference/android/bluetooth/package-summary.html
3. 소프트웨어
3.1. 관리형 API 호환성
관리형(Dalvik 기반) 실행 환경은 Android 애플리케이션을 위한 기본 수단입니다. Android API(응용 프로그래밍 인터페이스)는 관리되는 VM 환경에서 실행되는 애플리케이션에 노출되는 Android 플랫폼 인터페이스 집합입니다. 기기 구현은 문서화된 모든 동작을 포함하여 Android 2.1 SDK[ 리소스, 4 ]에 의해 노출된 문서화된 API의 완전한 구현을 제공해야 합니다(MUST).
3.2. 소프트 API 호환성
3.2.1. 권한
기기 구현자는 권한 참조 페이지[ 리소스, 5 ]에 설명된 대로 모든 권한 상수를 지원하고 시행해야 합니다(MUST). 섹션 10에는 Android 보안 모델과 관련된 추가 요구 사항이 나열되어 있습니다.
3.2.2. 빌드 매개변수
Android API에는 현재 기기를 설명하기 위한 android.os.Build
클래스 [ Resources, 6 ]에 대한 여러 상수가 포함되어 있습니다. 여러 기기 구현에서 일관되고 의미 있는 값을 제공하기 위해 아래 표에는 기기 구현에서 반드시 준수해야 하는 이러한 값의 형식에 대한 추가 제한사항이 포함되어 있습니다.
3.2.3. 의도 호환성
3.2.3.1. 핵심 애플리케이션 의도
다음 애플리케이션은 핵심 Android 시스템 애플리케이션으로 간주됩니다.
- 탁상시계
- 브라우저
- 달력
- 계산자
- 카메라
- 콘택트 렌즈
- 이메일
- 갤러리
- 글로벌서치
- 발사통
- LivePicker(즉, 라이브 배경 화면 선택기 응용 프로그램, 장치가 섹션 3.8.5에 따라 라이브 배경 화면을 지원하지 않는 경우 생략할 수 있음)
- 메시징(일명 "Mms")
- 음악
- 핸드폰
- 설정
- 녹음기
3.2.3.2. 의도 재정의
3.2.3.3. 인텐트 네임스페이스
이 금지는 섹션 3.6에서 Java 언어 클래스에 대해 지정된 것과 유사합니다.
3.2.3.4. 브로드캐스트 인텐트
3.3. 네이티브 API 호환성
- libc(C 라이브러리)
- libm(수학 라이브러리)
- JNI 인터페이스
- libz(Zlib 압축)
- liblog(안드로이드 로깅)
- C++에 대한 최소 지원
- 아래 설명된 대로 OpenGL 지원
3.4. 웹 API 호환성
많은 개발자와 애플리케이션은 사용자 인터페이스에 대해 android.webkit.WebView
클래스 [ Resources, 8 ]의 동작에 의존하므로 WebView 구현은 Android 구현 간에 호환되어야 합니다. Android 오픈 소스 구현은 WebKit 렌더링 엔진을 사용하여 WebView를 구현합니다.
- WebView는 Android 2.1용 업스트림 Android 오픈 소스 트리의 530.17 WebKit 빌드를 사용해야 합니다(MUST). 이 빌드에는 WebView에 대한 특정 기능 및 보안 수정 세트가 포함되어 있습니다.
- WebView에서 보고하는 사용자 에이전트 문자열은 다음 형식이어야 합니다.
Mozilla/5.0 (Linux; U; Android $(VERSION); $(LOCALE); $(MODEL) Build/$(BUILD)) AppleWebKit/530.17 (KHTML, like Gecko) Version/4.0 Mobile Safari/530.17
WebView 구성에는 HTML5 데이터베이스, 애플리케이션 캐시 및 지리적 위치 API에 대한 지원이 포함되어야 합니다[ 참고자료, 9 ]. WebView는 어떤 형식으로든 HTML5 <video>
태그에 대한 지원을 포함해야 합니다. 독립 실행형 브라우저 애플리케이션(업스트림 WebKit 브라우저 애플리케이션 기반이든 타사 대체 애플리케이션이든)은 WebView에 대해 방금 나열된 것과 동일한 HTML5 기능에 대한 지원을 포함해야 합니다(MUST).
3.5. API 동작 호환성
각 API 유형(관리형, 소프트, 네이티브 및 웹)의 동작은 업스트림 Android 오픈 소스 프로젝트의 기본 구현과 일치해야 합니다[ 참고자료, 3 ]. 특정 호환성 영역은 다음과 같습니다.
- 기기는 표준 인텐트의 동작이나 의미를 변경해서는 안 됩니다(MUST NOT).
- 장치는 특정 유형의 시스템 구성 요소(예: 서비스, 활동, ContentProvider 등)의 수명 주기 또는 수명 주기 의미 체계를 변경해서는 안 됩니다(MUST NOT).
- 장치는 특정 권한의 의미를 변경해서는 안 됩니다(MUST NOT).
3.6. API 네임스페이스
- 기기 구현은 메서드 또는 클래스 서명을 변경하거나 클래스 또는 클래스 필드를 제거하여 Android 플랫폼에서 공개적으로 노출된 API를 수정하면 안 됩니다(MUST NOT).
- 기기 구현자는 API의 기본 구현을 수정할 수 있지만 그러한 수정은 공개적으로 노출된 API의 명시된 동작 및 Java 언어 서명에 영향을 주어서는 안 됩니다(MUST NOT).
- 기기 구현자는 공개적으로 노출된 요소(예: 클래스 또는 인터페이스, 기존 클래스 또는 인터페이스에 대한 필드 또는 메서드)를 위의 API에 추가해서는 안 됩니다(MUST NOT).
3.7. 가상 머신 호환성
기기 구현은 전체 Dalvik Executable(DEX) 바이트코드 사양과 Dalvik 가상 머신 의미 체계를 지원해야 합니다(MUST)[ 참고자료, 10 ].
3.8. 사용자 인터페이스 호환성
3.8.1. 위젯
Android는 애플리케이션이 최종 사용자에게 "AppWidget"을 노출할 수 있도록 하는 구성 요소 유형과 해당 API 및 수명 주기를 정의합니다[ 참고자료, 11 ]. Android 오픈 소스 참조 릴리스에는 사용자가 홈 화면에서 AppWidget을 추가, 확인 및 제거할 수 있도록 하는 사용자 인터페이스 요소가 포함된 실행기 애플리케이션이 포함되어 있습니다.
3.8.2. 알림
Android에는 개발자가 사용자에게 주목할만한 이벤트를 알릴 수 있는 API가 포함되어 있습니다[ 리소스, 12 ]. 기기 구현자는 그렇게 정의된 각 알림 클래스에 대한 지원을 제공해야 합니다(MUST). 구체적으로: 소리, 진동, 조명 및 상태 표시줄.
또한 구현은 API [ 리소스, 13 ] 또는 상태 표시줄 아이콘 스타일 가이드 [ 리소스, 14 ]에 제공된 모든 리소스(아이콘, 사운드 파일 등)를 올바르게 렌더링해야 합니다(MUST). 기기 구현자는 참조 Android 오픈 소스 구현에서 제공하는 것보다 알림에 대한 대체 사용자 환경을 제공할 수 있습니다(MAY). 그러나 그러한 대체 알림 시스템은 위와 같이 기존 알림 리소스를 지원해야 합니다(MUST).
3.8.3. 검색
Android에는 개발자가 검색을 애플리케이션에 통합하고 애플리케이션 데이터를 전역 시스템 검색에 노출할 수 있도록 하는 API[ 리소스, 15 ]가 포함되어 있습니다. 일반적으로 이 기능은 사용자가 쿼리를 입력하고, 사용자가 입력할 때 제안을 표시하고, 결과를 표시할 수 있는 단일 시스템 전체 사용자 인터페이스로 구성됩니다. Android API를 통해 개발자는 이 인터페이스를 재사용하여 자체 앱 내에서 검색을 제공하고 개발자가 공통 글로벌 검색 사용자 인터페이스에 결과를 제공할 수 있습니다.
3.8.4. 토스트
애플리케이션은 "Toast" API([ Resources, 16 ]에 정의됨)를 사용하여 짧은 시간 후에 사라지는 짧은 비모달 문자열을 최종 사용자에게 표시할 수 있습니다. 기기 구현은 애플리케이션에서 최종 사용자에게 높은 가시성 방식으로 알림을 표시해야 합니다(MUST).
3.8.5. 라이브 배경 화면
Android는 애플리케이션이 최종 사용자에게 하나 이상의 "라이브 배경 화면"을 노출할 수 있도록 하는 구성 요소 유형과 해당 API 및 수명 주기를 정의합니다[ 참고자료, 17 ]. 라이브 배경 화면은 다른 응용 프로그램 뒤에 배경 화면으로 표시되는 제한된 입력 기능을 가진 애니메이션, 패턴 또는 유사한 이미지입니다.
4. 참조 소프트웨어 호환성
기기 구현자는 다음 오픈 소스 애플리케이션을 사용하여 구현 호환성을 테스트해야 합니다(MUST).
구현이 호환 가능한 것으로 간주되려면 위의 각 앱이 구현에서 올바르게 실행되고 작동해야 합니다(MUST).
또한 기기 구현은 다음 연기 테스트 애플리케이션 각각의 각 메뉴 항목(모든 하위 메뉴 포함)을 테스트해야 합니다(MUST).
위 애플리케이션의 각 테스트 사례는 기기 구현에서 올바르게 실행되어야 합니다(MUST).
5. 애플리케이션 패키징 호환성
기기 구현은 공식 Android SDK에 포함된 "aapt" 도구에 의해 생성된 대로 Android ".apk" 파일을 설치하고 실행해야 합니다[ 참고자료, 19 ].
기기 구현은 .apk [ 리소스, 20 ], Android 매니페스트 [ 리소스, 21 ] 또는 Dalvik 바이트코드 [ 리소스, 10 ] 형식을 확장하여 이러한 파일이 다른 호환 기기에서 올바르게 설치 및 실행되는 것을 방지하는 방식으로 확장해서는 안 됩니다(MUST NOT). . 기기 구현자는 Dalvik의 참조 업스트림 구현과 참조 구현의 패키지 관리 시스템을 사용해야 합니다(SHOULD).
6. 멀티미디어 호환성
장치 구현은 다음 멀티미디어 코덱을 지원해야 합니다(MUST). 이러한 모든 코덱은 Android 오픈 소스 프로젝트의 기본 Android 구현에서 소프트웨어 구현으로 제공됩니다.
7. Developer Tool Compatibility
- Android Debug Bridge (known as adb) [ Resources, 19 ]
Device implementations MUST support alladb
functions as documented in the Android SDK. The device-sideadb
daemon SHOULD be inactive by default, but there MUST be a user-accessible mechanism to turn on the Android Debug Bridge. - Dalvik Debug Monitor Service (known as ddms) [ Resources, 19 ]
Device implementations MUST support allddms
features as documented in the Android SDK. Asddms
usesadb
, support forddms
SHOULD be inactive by default, but MUST be supported whenever the user has activated the Android Debug Bridge, as above. - Monkey [ Resources, 22 ]
Device implementations MUST include the Monkey framework, and make it available for applications to use.
8. Hardware Compatibility
- class definitions for the component's APIs MUST be present
- the API's behaviors MUST be implemented as no-ops in some reasonable fashion
- API methods MUST return null values where permitted by the SDK documentation
- API methods MUST return no-op implementations of classes where null values are not permitted by the SDK documentation
8.1. Display
Android 2.1 includes facilities that perform certain automatic scaling and transformation operations under some circumstances, to ensure that third-party applications run reasonably well on a variety of hardware configurations [ Resources, 23 ]. Devices MUST properly implement these behaviors, as detailed in this section.
For Android 2.1, this are the most common display configurations:
Device implementations corresponding to one of the standard configurations above MUST be configured to report the indicated screen size to applications via the android.content.res.Configuration
[ Resources, 24 ] class.
- Device implementations MUST interpret resources in a .apk that lack a density qualifier as defaulting to "medium" (known as "mdpi" in the SDK documentation.)
- When operating on a "low" density screen, device implementations MUST scale down medium/mdpi assets by a factor of 0.75.
- When operating on a "high" density screen, device implementations MUST scale up medium/mdpi assets by a factor of 1.5.
- Device implementations MUST NOT scale assets within a density range, and MUST scale assets by exactly these factors between density ranges.
8.1.2. Non-Standard Display Configurations
8.1.3. Display Metrics
Device implementations MUST report correct valuesfor all display metrics defined in android.util.DisplayMetrics
[ Resources, 25 ].
8.2. Keyboard
- MUST include support for the Input Management Framework (which allows third party developers to create Input Management Engines -- ie soft keyboard) as detailed at developer.android.com
- MUST provide at least one soft keyboard implementation (regardless of whether a hard keyboard is present)
- MAY include additional soft keyboard implementations
- MAY include a hardware keyboard
- MUST NOT include a hardware keyboard that does not match one of the formats specified in
android.content.res.Configuration.keyboard
[ Resources, 24 ] (that is, QWERTY, or 12-key)
8.3. Non-touch Navigation
- MAY omit a non-touch navigation options (that is, may omit a trackball, d-pad, or wheel)
- MUST report the correct value for
android.content.res.Configuration.navigation
[ Resources, 24 ]
8.4. Screen Orientation
8.5. Touchscreen input
- MUST have a touchscreen
- MAY have either capacative or resistive touchscreen
- MUST report the value of
android.content.res.Configuration
[ Resources, 24 ] reflecting corresponding to the type of the specific touchscreen on the device
8.6. USB
- MUST implement a USB client, connectable to a USB host with a standard USB-A port
- MUST implement the Android Debug Bridge over USB (as described in Section 7)
- MUST implement the USB mass storage specification, to allow a host connected to the device to access the contents of the /sdcard volume
- SHOULD use the micro USB form factor on the device side
- MAY include a non-standard port on the device side, but if so MUST ship with a cable capable of connecting the custom pinout to standard USB-A port
8.7. Navigation keys
8.8. Wireless Data Networking
8.9. Camera
Device implementations MUST include a camera. The included camera:
- MUST have a resolution of at least 2 megapixels
- SHOULD have either hardware auto-focus, or software auto-focus implemented in the camera driver (transparent to application software)
- MAY have fixed-focus or EDOF (extended depth of field) hardware
- MAY include a flash. If the Camera includes a flash, the flash lamp MUST NOT be lit while an android.hardware.Camera.PreviewCallback instance has been registered on a Camera preview surface, unless the application has explicitly enabled the flash by enabling the
FLASH_MODE_AUTO
orFLASH_MODE_ON
attributes of aCamera.Parameters
object. Note that this constraint does not apply to the device's built-in system camera application, but only to third-party applications usingCamera.PreviewCallback
.
Device implementations MUST implement the following behaviors for the camera-related APIs:
- If an application has never called android.hardware.Camera.Parameters.setPreviewFormat(int), then the device MUST use android.hardware.PixelFormat.YCbCr_420_SP for preview data provided to application callbacks.
- If an application registers an android.hardware.Camera.PreviewCallback instance and the system calls the onPreviewFrame() method when the preview format is YCbCr_420_SP, the data in the byte[] passed into onPreviewFrame() must further be in the NV21 encoding format. (This is the format used natively by the 7k hardware family.) That is, NV21 MUST be the default.
Device implementations MUST implement the full Camera API included in the Android 2.1 SDK documentation [ Resources, 26 ]), regardless of whether the device includes hardware autofocus or other capabilities. For instance, cameras that lack autofocus MUST still call any registered android.hardware.Camera.AutoFocusCallback
instances (even though this has no relevance to a non-autofocus camera.)
8.10. Accelerometer
Device implementations MUST include a 3-axis accelerometer and MUST be able to deliver events at 50 Hz or greater. The coordinate system used by the accelerometer MUST comply with the Android sensor coordinate system as detailed in the Android APIs (see [ Resources, 27 ]).
8.11. Compass
Device implementations MUST include a 3-axis compass and MUST be able to deliver events 10 Hz or greater. The coordinate system used by the compass MUST comply with the Android sensor coordinate system as defined in the Android API (see [ Resources, 27 ]).
8.12. GPS
8.13. Telephony
See also Section 8.8, Wireless Data Networking.
8.14. Memory and Storage
8.15. Application Shared Storage
8.16. Bluetooth
Device implementations MUST include a Bluetooth transceiver. Device implementations MUST enable the RFCOMM-based Bluetooth API as described in the SDK documentation [ Resources, 29 ]. Device implementations SHOULD implement relevant Bluetooth profiles, such as A2DP, AVRCP, OBEX, etc. as appropriate for the device.
9. Performance Compatibility
10. Security Model Compatibility
Device implementations MUST implement a security model consistent with the Android platform security model as defined in Security and Permissions reference document in the APIs [ Resources, 28 ] in the Android developer documentation. Device implementations MUST support installation of self-signed applications without requiring any additional permissions/certificates from any third parties/authorities. Specifically, compatible devices MUST support the security mechanisms described in the follow sub-sections.
10.1. Permissions
Device implementations MUST support the Android permissions model as defined in the Android developer documentation [ Resources, 28 ]. Specifically, implementations MUST enforce each permission defined as described in the SDK documentation; no permissions may be omitted, altered, or ignored. Implementations MAY add additional permissions, provided the new permission ID strings are not in the android.* namespace.
10.2. UID and Process Isolation
Device implementations MUST support the Android application sandbox model, in which each application runs as a unique Unix-style UID and in a separate process. Device implementations MUST support running multiple applications as the same Linux user ID, provided that the applications are properly signed and constructed, as defined in the Security and Permissions reference [ Resources, 28 ].
10.3. Filesystem Permissions
Device implementations MUST support the Android file access permissions model as defined in as defined in the Security and Permissions reference [ Resources, 28 ].
11. Compatibility Test Suite
Device implementations MUST pass the Android Compatibility Test Suite (CTS) [ Resources, 2 ] available from the Android Open Source Project, using the final shipping software on the device. Additionally, device implementers SHOULD use the reference implementation in the Android Open Source tree as much as possible, and MUST ensure compatibility in cases of ambiguity in CTS and for any reimplementations of parts of the reference source code.
12. Updatable Software
- Over-the-air (OTA) downloads with offline update via reboot
- "Tethered" updates over USB from a host PC
- "Offline" updates via a reboot and update from a file on removable storage
13. Contact Us
You can contact the document authors at compatibility@android.com for clarifications and to bring up any issues that you think the document does not cover.