Android 2.2 Platform

Source: Internet
Author: User
Document directory
  • Graphics
  • Media
  • Speech recognition and third-party recognition engines
  • Camera and camcorder
  • Device Policy Manager
  • UI framework
  • Accounts and sync
  • New manifest elements and attributes
  • Permissions
Android 2.2 platformin this document
  1. Platform highlights
  2. Revisions
  3. API level
  4. Framework API changes
  5. Built-in applications
  6. Locales
  7. Emulator skins
    Reference
    1. API differences report»
    See also
    1. Adding SDK Components

    API level: 8

    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 implements des a fully compliant Android library and system image, as well as a set of emulator skins, sample applications, and more. the downloadable platform provided des 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.

    Platform highlights

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

    Revisions

    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.


    Android 2.2, Revision 1(May 1, 2010)

    Dependencies:

    Requires SDK tools R6 or higher.

    Tools:

    Adds support for building with Android library projects. See SDK tools, R6 for information.

    API level

    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", inandroid:minSdkVersionAttributes of<uses-sdk>Element in your application's manifest.

    For more information about how to use API level, see the API levels document.

    Framework API changes

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

    APP installation on external storage media

    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<manifest>In the manifest file,android:installLocation. The attribute supports three values:"internalOnly","preferExternal", And"auto". At install time, the system checks the valueandroid:installLocationAnd INSTALLThe Application.apkAccording to the preferred location, if possible. if the application has requested external installation, the system installit 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. 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 instils all applications onto the device's internal memory, doesn t 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 toandroid:installLocationAttribute. 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, particle ly 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 shocould and shocould not request external installation, please read the app install location document.

    Data backup

    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.

    Graphics
    • New OpenGL ES 2.0 APIs inandroid.opengl.GLES20.
    • NewETC1,ETC1Util, AndETC1Util.ETC1TextureClasses and utility methods for using etc1 for texture compression.
    • NewImageFormatClass.
    • NewYUV image format APITo enable compression from YUV to JPEG and manipulation of YUV data.
    Media
    • New APIs inandroid.media.AudioManagerFor managing audio focus, transport control, transient loss of audio focus, ducking.
    • New broadcast intent for routing audio to SCO-ACTION_SCO_AUDIO_STATE_CHANGEDWith extras indicating new state.
    • New APIs inSoundPoolTo detect completion of sound-loading.
    • New APIs inSoundPoolFor auto pause and resume.
    • New APIs inMediaRecorderFor 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. SeeMediaScannerConnection.scanFileAndMediaScannerConnection.OnScanCompletedListener.
    Speech recognition and third-party recognition engines
    • The platform provides new speech-recognition APIs that allow applications to have a richer interaction with the available voice recognizer. For example, the APIS authorized to integrate voice recognition deeply into an IME.
    • The Platform also providesRecognitionServiceBase class that lets third-party developers create plug-in recognition engines.
    • NewRecognitionListenerInterface to receive callbacks.
    • NewRecognizerIntentExtras that let a requester app specify details as preferred language, minimum length in milliseconds, and so on.
    Camera and camcorder
    • 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 inandroid.hardware.CameraFor managing zoom level.
    • New APIsandroid.hardware.Camera.ParametersFor querying and setting device camera settings such as focal length, exposure, zoom level, view angle, and others.
    • NewthumbnailUtility for video and image thumbnails.
    • NewCamcorderProfileAndCamcorderProfileClasses enable apps to determine device hardware camera capablities.
    • New support inandroid.media.ExifInterfaceFor retrieving GPS and focal length.
    Device Policy Manager

    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, seeandroid.app.adminClassees or the example application code in deviceadminsample. java.

    UI framework
    • New UI Modes "Car mode" and "Night mode" andUiModeManagerLet applications adjust their application UI for specific user modes.
    • NewScaleGestureDetectorThat 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 inMotionEventObjects.
    • The layout attributefill_parentIs renamedmatch_parent. This affects both XML and Java code (seeViewGroup.LayoutParams). Note that the platform will continue to honor usesfill_parentIn legacy applications.
    • New layout attributestabStripEnabled,tabStripRight, AndtabStripLeftLet developers customize the bottom strip of tabwidgets.
    • Better support for managed dialogs in activity.
    Accounts and sync
    • New MethodAddPeriodicSync()Lets you schedule a periodic sync with a specific account, authority, and extras at the given frequency.
    New manifest elements and attributes
    • For specifying the application's preferred install location (See App installation on external storage media, above ):

      • Newandroid:installLocationAttribute of<manifest>Element. specifies the default install location defined by an application.
    • For Managing User Data Backup (see backup manager, above, for more information ):
      • Newandroid:backupAgentAttribute of<application>Element. specifies the component name of the backupagent subclass provided by the application to handle backup/restore operations, if any.
      • Newandroid:restoreAnyVersionAttribute of<application>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:
      • Newandroid:vmSafeModeAttribute of<application>Element. boolean value that specifies whether to disable JIT compiler optimizations when running the application.
    Permissions
    • android.permission.BIND_DEVICE_ADMIN-Any device administration broadcast protocol er must require this permission, to ensure that only the system can interact with it.
    • android.permission.KILL_BACKGROUND_PROCESSES-Allows an application to callkillBackgroundProcesses(String).
    • android.permission.BIND_WALLPAPER-AnyWallpaperServiceMust require this permission, to ensure that only the system can interact with it.
    • android.permission.SET_TIME-Allows an application to set the system time.
    API differences report

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

    Built-in applications

    The system image has ded 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 Japan, Chinese, and Latin text input
    • Messaging
    • Music
    • Phone
    • Settings
    • Spare parts (developer APP)
    Locales

    The system image has ded 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 versions that are available in the Android 2.2 System image are listed below (Language_Country/regionLocale 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)
  1. French, Canada (fr_ca)
  2. French, Switzerland (fr_ch)
  3. German, Germany (de_de)
  4. German, Austria (de_at)
  5. German, Switzerland (de_ch)
  6. German, Liechtenstein (de_li)
  7. Italian, Italy (it_it)
  8. Italian, Switzerland (it_ch)
  9. Japan ese (ja_jp)
  10. Korean (ko_kr)
  11. Polish (pl_pl)
  12. Russian (ru_ru)
  13. Spanish (es_es)
  14. Localized UI strings match the locales that are accessible through settings.

    Emulator skins

    The downloadable platform provided des 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)

    For more information about how to develop an application that displays and functions properly on all Android-powered devices, see supporting multiple screens.

    Export go to top

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.