分享好友 最新动态首页 最新动态分类 切换频道
Android 2.2 Platform
2024-12-27 02:27
  1. Platform Highlights
  2. Revisions
  3. API Level
  4. Framework API Changes
  5. Built-in Applications
  6. Locales
  7. Emulator Skins
  1. API Differences Report »
  1. Adding SDK Components

API Level: 8

Android 2.2 Platform

Android 2.2 is a minor platform release including user features, developer features, API changes, and bug fixes. For information on developer features and API changes, see the Framework API section.

For developers, the Android 2.2 platform is available as a downloadable component for the Android SDK. The downloadable platform includes a fully compliant Android library and system image, as well as a set of emulator skins, sample applications, and more. The downloadable platform includes no external libraries.

To get started developing or testing against the Android 2.2 platform, use the Android SDK and AVD Manager tool to download the platform into your SDK. For more information, see Adding SDK Components. If you are new to Android, download the SDK Starter Package first.

For a list of new user features and platform highlights, see the Android 2.2 Platform Highlights document.

The sections below provide notes about successive releases of the Android 2.2 platform component for the Android SDK, as denoted by revision number. To determine what revision(s) of the Android 2.2 platforms are installed in your SDK environment, refer to the "Installed Packages" listing in the Android SDK and AVD Manager.

The Android 2.2 platform delivers an updated version of the framework API. The Android 2.2 API is assigned an integer identifier — 8 — that is stored in the system itself. This identifier, called the "API Level", allows the system to correctly determine whether an application is compatible with the system, prior to installing the application.

To use APIs introduced in Android 2.2 in your application, you need to set the proper value, "8", in the attributes of the element in your application's manifest.

For more information about how to use API Level, see the API Levels document.

The sections below provide information about changes made to the application framework API provided by the Android 2.2 platform.

The Android platform now allows applications to request installation onto the device's external storage media (such as the SD card), as an alternative to installation onto the device's internal memory.

Application developers can express the preferred installation location for their applications by means of a new attribute of in the manifest file, . The attribute supports three values: , , and . At install time, the system checks the value of and installs the application according to the preferred location, if possible. If the application has requested external installation, the system installs it into a private, encrypted partition in the external media. Once an application .apk is installed externally, the system lets the user change the storage location of the .apk and move it onto the device's internal memory if needed (and vice versa), through Manage Applications in the user settings.

By default, the system installs all applications onto the device's internal memory, except for those that explicitly request external installation. This means that the system will always install legacy applications onto internal memory, since they do not have access to the attribute. However, it is possible to configure and compile a legacy application such that it is installed internally on older versions of the platform and externally on Android 2.2 and later platforms, if necessary.

Note that requesting installation onto the device's external media is not suitable for all applications, particularly because the external media may be removable and unmounting/remounting may disrupt the user experience and system settings.

For more information about setting a preferred install location for your application, including a discussion of what types of applications should and should not request external installation, please read the App Install Location document.

The platform now provides a generalized backup service that applications can use to backup and restore user data, to ensure that users can maintain their data when switching devices or reinstalling the application. The Backup Manager handles the work of transporting the application data to and from the backup storage area in the cloud. The Backup Manager can store any type of data, from arbitrary data to files, and manages backup and restore operations in an atomic manner. For more information, see Data Backup.

  • New OpenGL ES 2.0 APIs in .
  • New , , and classes and utility methods for using ETC1 for texture compression.
  • New class.
  • New to enable compression from YUV to JPEG and manipulation of YUV data.
  • New APIs in for managing audio focus, transport control, transient loss of audio focus, ducking.
  • New broadcast intent for routing audio to SCO — with extras indicating new state.
  • New APIs in to detect completion of sound-loading.
  • New APIs in for auto pause and resume.
  • New APIs in for specifying audio settings for number of channels, encoding and sampling rates, sampling rate.
  • New APIs for adding files to the media database, so that they are automatically scanned. See and .
  • The platform provides new speech-recognition APIs that allow applications to have a richer interaction with the available voice recognizer. For example, the APIs are sufficient to integrate voice recognition deeply into an IME.
  • The platform also provides a base class that lets third-party developers create plug-in recognition engines.
  • New interface to receive callbacks.
  • New extras that let a requester app specify details as preferred language, minimum length in milliseconds, and so on.
  • Changes to camera preview API to improve efficieny of preview pipeline.
  • New display orientation for camera (it can now work in portrait orientation).
  • New APIs in for managing zoom level.
  • New APIs for querying and setting device camera settings such as focal length, exposure, zoom level, view angle, and others.
  • New utility for video and image thumbnails.
  • New and classes enable apps to determine device hardware camera capablities.
  • New support in for retrieving GPS and focal length.

New device policy management APIs allow developers to write "device administrator" applications that can control security features of the device, such as the minimum password strength, data wipe, and so on. Users can select the administrators that are enabled on their devices. For more information, see the classees or the example application code in DeviceAdminSample.java.

  • New UI modes "car mode" and "night mode" and let applications adjust their application UI for specific user modes.
  • New that lets Views detect and handle transformation gestures that involve more than one pointer (multitouch) using the supplied MotionEvents.
  • Improvements in the way that multitouch events are reported in objects.
  • The layout attribute is renamed to . This affects both XML and Java code (see ). Note that the platform will continue to honor uses of in legacy applications.
  • New layout attributes , , and let developers customize the bottom strip of TabWidgets.
  • Better support for managed dialogs in Activity.
  • New method lets you schedule a periodic sync with a specific account, authority, and extras at the given frequency.
  • For specifying the application's preferred install location (see App Installation on External Storage Media, above):
    • New attribute of the element. Specifies the default install location defined by an application.
  • For managing user data backup (see Backup manager, above, for more information):
    • New attribute of the element. Specifies the component name of the BackupAgent subclass provided by the application to handle backup/restore operations, if any.
    • New attribute of the element. Boolean value that indicates whether the application is prepared to attempt a restore of any backed-up dataset, even if the backup is apparently from a newer version of the application than is currently installed on the device.
  • For managing the platform's JIT compiler:
    • New attribute of the element. Boolean value that specifies whether to disable JIT compiler optimizations when running the application.
  • — Any device administration broadcast receiver must require this permission, to ensure that only the system can interact with it.
  • — Allows an application to call .
  • — Any must require this permission, to ensure that only the system can interact with it.
  • — Allows an application to set the system time.

For a detailed view of all API changes in Android 2.2 (API Level 8), see the API Differences Report.

The system image included in the downloadable platform provides these built-in applications:

  • Alarm Clock
  • Browser
  • Calculator
  • Camera
  • Contacts
  • Custom Locale (developer app)
  • Dev Tools (developer app)
  • Email
  • Gallery
  • IMEs for Japanese, Chinese, and Latin text input
  • Messaging
  • Music
  • Phone
  • Settings
  • Spare Parts (developer app)

The system image included in the downloadable platform provides a variety of built-in locales. In some cases, region-specific strings are available for the locales. In other cases, a default version of the language is used. The languages that are available in the Android 2.2 system image are listed below (with language_country/region locale descriptor).

  • Chinese, PRC (zh_CN)
  • Chinese, Taiwan (zh_TW)
  • Czech (cs_CZ)
  • Dutch, Netherlands (nl_NL)
  • Dutch, Belgium (nl_BE)
  • English, US (en_US)
  • English, Britain (en_GB)
  • English, Canada (en_CA)
  • English, Australia (en_AU)
  • English, New Zealand (en_NZ)
  • English, Singapore(en_SG)
  • French, France (fr_FR)
  • French, Belgium (fr_BE)
  • French, Canada (fr_CA)
  • French, Switzerland (fr_CH)
  • German, Germany (de_DE)
  • German, Austria (de_AT)
  • German, Switzerland (de_CH)
  • German, Liechtenstein (de_LI)
  • Italian, Italy (it_IT)
  • Italian, Switzerland (it_CH)
  • Japanese (ja_JP)
  • Korean (ko_KR)
  • Polish (pl_PL)
  • Russian (ru_RU)
  • Spanish (es_ES)
  • Localized UI strings match the locales that are accessible through Settings.

    The downloadable platform includes a set of emulator skins that you can use for modeling your application in different screen sizes and resolutions. The emulator skins are:

    • QVGA (240x320, low density, small screen)
    • WQVGA (240x400, low density, normal screen)
    • FWQVGA (240x432, low density, normal screen)
    • HVGA (320x480, medium density, normal screen)
    • WVGA800 (480x800, high density, normal screen)
    • WVGA854 (480x854 high density, normal screen)
    最新文章
    朗玛信息:招商证券投资者于12月10日调研我司
    证券之星消息,2024年12月10日朗玛信息(300288)发布公告称招商证券顾佳 刘晓珊于2024年12月10日调研我司。具体内容如下:问:公司进行医学人工智能大模型的产品研发的优势有哪些?答:公司从 2014年起深耕互联网医疗领域,旗下“39健康网
    淄川SEO整站优化,全面提升网站排名与用户满意度
    淄川SEO整站优化服务,旨在全面提升网站在搜索引擎中的排名及用户访问体验,通过综合策略优化网站结构、内容与外部链接,实现网站在搜索引擎结果中的高效展示和用户访问的便捷优化。随着互联网的快速发展,网站已经成为企业展示自身形象、
    演绎“后武侠”
    《天龙八部之宿敌》,许嵩为大型网络游戏《天龙八部3》谱写的游戏主题曲,歌曲于2011年9月20日发布。 如果说《断桥残雪》是表达一种情绪,《清明雨上》是一种情感,《半城烟沙》是一种情操,那《宿敌》则可看作一种情怀。字里行间里流淌的
    摩登天使商家版软件 1.1.2
    没有加固或未知加固INTERNET访问网络连接,可能产生GPRS流量WRITE_EXTERNAL_STORAGE允许程序写入外部存储,如SD卡上写文件ACCESS_NETWORK_STATE获取网络信息状态,如当前的网络连接是否有效ACCESS_WIFI_STATE获取当前WiFi接入的状态以及WLA
    诗词已解“怀素身长五尺四祢生词赋抛江夏”代表什么动物最新热门
    生肖字谜诗怀素才情深似海身长五尺四传扬。祢生词赋如蛇舞智慧灵性显光芒。抛却凡尘如江夏生肖之谜隐其中。五尺身躯藏玄机蛇影藏于热门词。诗解:此诗以怀素的才情开始暗指生肖中的蛇象征智慧与灵性。五尺身躯暗示龙的雄伟但结合整体语境更
    揭秘花茶前十大品种排名!了解花茶的世界,让你不再茶饮白痴!
    花茶,作为一种别具特色的茶类,蕴含着丰富的文化底蕴和独特的品味体验。它不同于传统的茶叶,将茶叶与花朵巧妙融合,赋予茶饮以花香的独特韵味,给人带来耳目一新的感受。这种独特的制作工艺和口感特点,引发了人们对其品种排名的好奇心理
    seo伪原创违法吗(seo伪原创 有用吗)
    大家好,今天小编关注到一个比较有意思的话题,就是关于seo伪原创违法吗的问题,于是小编就整理了3个相关介绍seo伪原创违法吗的解答,让我们一起看看吧。SEO靠采集站赚钱现在还行不行?百中搜优化靠谱吗?伪原创文章要怎么写?现在的话靠采
    用Linux云服务器搭建网站,看这一篇就够了!
    搭建网站,很多人会选择手动搭建,或者直接选购镜像,一键部署网站。如果需要将网站发布到网络并对用户提供访问服务,则还需进行注册域名、网站备案、域名解析。 如果有小伙伴对这类内容有兴趣,留言区举手&
    高清屏幕设计_今日电脑高清屏幕设计教程
    摘要:高清屏幕设计,今日电脑高清屏幕设计教程,新片场素材小编罗雯菲高清屏幕设计,今日电脑高清屏幕设计教程相关内容整理,如果您对高清屏幕设计,今日电脑高清屏幕设计教程感兴趣欢迎访问免费阅读。高清屏幕设计,今日电脑高清屏幕设计教程
    相关文章
    推荐文章
    发表评论
    0评