page.title=Android 2.0, Release 1 sdk.platform.version=2.0 sdk.platform.apiLevel=5 sdk.platform.majorMinor=major sdk.platform.releaseDate=October 2009 sdk.platform.deployableDate=November 2009 @jd:body

In this document

  1. Platform Highlights
  2. Built-in Applications
  3. Locales
  4. Emulator Skins
  5. Developer Features
  6. Framework API
    1. API level
    2. API changes summary
    3. API differences report »

See Also

  1. Adding SDK Components

Date: {@sdkPlatformReleaseDate}
API Level: {@sdkPlatformApiLevel}

Android {@sdkPlatformVersion} is a {@sdkPlatformMajorMinor} platform release deployable to Android-powered handsets starting in {@sdkPlatformDeployableDate}. The release includes new features for users and developers, as well as changes in the Android framework API.

For developers, the Android {@sdkPlatformVersion} 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 is fully compliant and includes no external libraries.

To get started developing or testing against the Android {@sdkPlatformVersion} platform, use the Android SDK and AVD Manager tool to download the platform into your Android 1.6 or later SDK. For more information, see Adding SDK Components.

Platform Highlights

For a list of new user features and platform highlights, see the Android {@sdkPlatformVersion} Platform Highlights document.

Built-in Applications

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

  • Alarm Clock
  • Browser
  • Calculator
  • Camcorder
  • Camera
  • Contacts
  • Custom Locale (developer app)
  • Dev Tools (developer app)
  • Dialer
  • Email
  • Gallery
  • Gestures Builder
  • IME for Japanese text input
  • Messaging
  • Music
  • Settings
  • Spare Parts (developer app)

Locales

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 {@sdkPlatformVersion} 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.

    Emulator Skins

    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:

    For more information about how to develop an application that displays and functions properly on all Android-powered devices, see Supporting Multiple Screens.

    Developer Features

    The sections below provide information about new developer features offered by the downloadable Android 2.0 platform component.

    Ant Support

    Framework API

    The sections below provide information about the application framework API provided by the Android {@sdkPlatformVersion} platform.

    API level

    The Android {@sdkPlatformVersion} platform delivers an updated version of the framework API. As with previous versions, the Android {@sdkPlatformVersion} API is assigned an integer identifier — {@sdkPlatformApiLevel} — 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 {@sdkPlatformVersion} in your application, you need to set the proper value, "{@sdkPlatformApiLevel}", in the attributes of the <uses-sdk> element in your application's manifest.

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

    API changes summary

    Bluetooth

    Sync adapters

    Account Manager

    Contacts

    WebView

    Camera

    Media

    Other Framework

    Key events executed on key-up

    Android 2.0 is designed to run on devices that use virtual keys for HOME, MENU, BACK, and SEARCH, rather than physical keys. To support the best user experience on those devices, the Android platform now executes these buttons at key-up, for a key-down/key-up pair, rather than key-down. This helps prevent accidental button events and lets the user press the button area and then drag out of it without generating an event.

    This change in behavior should only affect your application if it is intercepting button events and taking an action on key-down, rather than on key-up. Especially if your application is intercepting the BACK key, you should make sure that your application is handling the key events properly.

    In general, intercepting the BACK key in an application is not recommended, however, if your application is doing so and it invokes some action on key-down, rather than key-up, you should modify your code.

    If your application will use APIs introduced in Android 2.0 (API Level 5), you can take advantage of new APIs for managing key-event pairs:

    If you want to update a legacy application so that its handling of the BACK key works properly for both Android 2.0 and older platform versions, you can use an approach similar to that shown above. Your code can catch the target button event on key-down, set a flag to track the key event, and then also catch the event on key-up, executing the desired action if the tracking flag is set. You'll also want to watch for focus changes and clear the tracking flag when gaining/losing focus.

    API differences report

    For a detailed view of API changes in Android {@sdkPlatformVersion} (API Level {@sdkPlatformApiLevel}), as compared to the previous version, see the API Differences Report.