page.title=Android 2.3 Platform sdk.platform.version=2.3 sdk.platform.apiLevel=9 @jd:body

In this document

  1. Revisions
  2. API Overview
  3. API Level
  4. Built-in Applications
  5. Locales
  6. Emulator Skins

Reference

  1. API Differences Report »

See Also

  1. Adding SDK Components

API Level: {@sdkPlatformApiLevel}

For developers, the Android {@sdkPlatformVersion} platform is available as a downloadable component for the Android SDK. The downloadable platform includes an Android library and system image, as well as a set of emulator skins and more. The downloadable platform includes no external libraries.

To get started developing or testing against Android {@sdkPlatformVersion}, use the Android SDK Manager 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 high-level introduction to Android {@sdkPlatformVersion}, see the Platform Highlights.

Revisions

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

Android {@sdkPlatformVersion}, Revision 1 (December 2010)
Dependencies:

Requires SDK Tools r8 or higher.

API Overview

The sections below provide a technical overview of what's new for developers in {@sdkPlatformVersion}, including new features and changes in the framework API since the previous version.

SIP-based VoIP

The platform now includes a SIP protocol stack and framework API that lets developers build internet telephony applications. Using the API, applications can offer voice calling features without having to manage sessions, transport-level communication, or audio — these are handled transparently by the platform's SIP API and services.

The SIP API is available in the {@link android.net.sip android.net.sip} package. The key class is {@link android.net.sip.SipManager}, which applications use to set up and manage SIP profiles, then initiate audio calls and receive audio calls. Once an audio call is established, applications can mute calls, turn on speaker mode, send DTMF tones, and more. Applications can also use the {@link android.net.sip.SipManager} to create generic SIP connections.

The platform’s underlying SIP stack and services are available on devices at the discretion of the manufacturer and associated carrier. For this reason, applications should use the {@link android.net.sip.SipManager#isApiSupported isApiSupported()} method to check whether SIP support is available, before exposing calling functionality to users.

To use the SIP API, applications must request permission from the user by declaring <uses-permission android:name="android.permission.INTERNET"> and <uses-permission android:name="android.permission.USE_SIP"> in their manifest files.

Additionally, developers can request filtering on Android Market, such that their applications are not discoverable to users whose devices do not include the platform’s SIP stack and services. To request filtering, add <uses-feature android:name="android.software.sip" android:required="true"> and <uses-feature android:name="android.software.sip.voip"> to the application manifest.

To look at a sample application that uses the SIP API, see SIP Demo.

Near Field Communications (NFC)

Android 2.3 includes an NFC stack and framework API that lets developers read NDEF tags that are discovered as a user touches an NFC-enabled device to tag elements embedded in stickers, smart posters, and even other devices.

The platform provides the underlying NFC services that work with the device hardware to discover tags when they come into range. On discovering a tag, the platform notifies applications by broadcasting an Intent, appending the tag's NDEF messages to the Intent as extras. Applications can create Intent filters to recognize and handle targeted tags and messages. For example, after receiving a tag by Intent, applications extract the NDEF messages, store them, alert the user, or handle them in other ways.

The NFC API is available in the {@link android.nfc} package. The key classes are:

NFC communication relies on wireless technology in the device hardware, so support for the platform's NFC features on specific devices is determined by their manufacturers. To determine the NFC support on the current device, applications can call {@link android.nfc.NfcAdapter#isEnabled isEnabled()} to query the {@link android.nfc.NfcAdapter}. The NFC API is always present, however, regardless of underlying hardware support.

To use the NFC API, applications must request permission from the user by declaring <uses-permission android:name="android.permission.NFC"> in their manifest files.

Additionally, developers can request filtering on Android Market, such that their applications are not discoverable to users whose devices do not support NFC. To request filtering, add <uses-feature android:name="android.hardware.nfc" android:required="true"> to the application's manifest.

To look at a sample application that uses the NFC API, see NFCDemo.

Gyroscope and other sensors

Android 2.3 adds platform and API support for several new sensor reading types — gyroscope, rotation vector, linear acceleration, gravity, and barometer. Developers can use the new sensor readings to create applications that respond quickly and smoothly to precise changes in device position and motion. The Sensor API reports gyroscope and other sensor changes to interested applications, whether they are running on the application framework or in native code.

Note that the specific set of hardware sensors available on any given device varies at the discretion of the device manufacturer.

Developers can request filtering in Android Market, such that their applications are not discoverable to users whose devices do not offer a gyroscope sensor. To do so, add <uses-feature android:name="android.hardware.sensor.gyroscope" android:required="true"> to the application manifest.

For API details, see {@link android.hardware.Sensor}.

Multiple cameras support

Applications can now make use of any cameras that are available on a device, for either photo or video capture. The {@link android.hardware.Camera} lets applications query for the number of cameras available and the unique characteristics of each.

To look at sample code for accessing a front-facing camera, see CameraPreview.java in the ApiDemos sample application.

The Camera API also adds:

Mixable audio effects

The platform's media framework adds support for new per-track or global audio effects, including bass boost, headphone virtualization, equalization, and reverb.

To look at sample code for audio effects, see AudioFxDemo.java in the ApiDemos sample application.

The media framework also adds:

Download manager

The platform includes a new {@link android.app.DownloadManager} system service that handles long-running HTTP downloads. Applications can request that a URI be downloaded to a particular destination file. The DownloadManager will conduct the download in the background, taking care of HTTP interactions and retrying downloads after failures or across connectivity changes and system reboots.

StrictMode

To help developers monitor and improve the performance of their applications, the platform offers a new system facility called {@link android.os.StrictMode}. When implemented in an application, StrictMode catches and notifies the developer of accidental disk or network activity that could degrade application performance, such as activity taking place on the application's main thread (where UI operations are received and animations are also taking place). Developers can evaluate the network and disk usages issues raised in StrictMode and correct them if needed, keeping the main thread more responsive and preventing ANR dialogs from being shown to users.

For more information about how to use StrictMode to optimize your application, see the class documentation and sample code at {@link android.os.StrictMode android.os.StrictMode}.

UI Framework

Extra Large Screens

The platform now supports extra large screen sizes, such as those that might be found on tablet devices. Developers can indicate that their applications are designed to support extra large screen sizes by adding a <supports screens ... android:xlargeScreens="true"> element to their manifest files. Applications can use a new resource qualifier, xlarge, to tag resources that are specific to extra large screens. For details on how to support extra large and other screen sizes, see Supporting Multiple Screens.

Graphics

Content Providers

Location

Storage

Package Manager

Telephony

Native access to Activity lifecycle, windows

Android 2.3 exposes a broad set of APIs to applications that use native code. Framework classes of interest to such applications include:

For full information on working with native code or to download the NDK, see the Android NDK page.

Dalvik Runtime

New manifest elements and attributes

New Permissions

New Feature Constants

The platform adds several new hardware features that developers can declare in their application manifests as being required by their applications. This lets developers control how their application is filtered, when published on Android Market.

For full information about how to declare features and use them for filtering, see the documentation for <uses-feature>.

API differences report

For a detailed view of all API changes in Android {@sdkPlatformVersion} (API Level {@sdkPlatformApiLevel}), see the API Differences Report.

API Level

The Android {@sdkPlatformVersion} platform delivers an updated version of the framework API. 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 compile the application against the Android library that is provided in the Android {@sdkPlatformVersion} SDK platform. Depending on your needs, you might also need to add an android:minSdkVersion="{@sdkPlatformApiLevel}" attribute to the <uses-sdk> element in the application's manifest. If your application is designed to run only on Android 2.3 and higher, declaring the attribute prevents the application from being installed on earlier versions of the platform.

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

Built-in Applications

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

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

Locales

The system image included in the downloadable SDK 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).

  • Arabic, Egypt (ar_EG)
  • Arabic, Israel (ar_IL)
  • Bulgarian, Bulgaria (bg_BG)
  • Catalan, Spain (ca_ES)
  • Czech, Czech Republic (cs_CZ)
  • Danish, Denmark(da_DK)
  • German, Austria (de_AT)
  • German, Switzerland (de_CH)
  • German, Germany (de_DE)
  • German, Liechtenstein (de_LI)
  • Greek, Greece (el_GR)
  • English, Australia (en_AU)
  • English, Canada (en_CA)
  • English, Britain (en_GB)
  • English, Ireland (en_IE)
  • English, India (en_IN)
  • English, New Zealand (en_NZ)
  • English, Singapore(en_SG)
  • English, US (en_US)
  • English, Zimbabwe (en_ZA)
  • Spanish (es_ES)
  • Spanish, US (es_US)
  • Finnish, Finland (fi_FI)
  • French, Belgium (fr_BE)
  • French, Canada (fr_CA)
  • French, Switzerland (fr_CH)
  • French, France (fr_FR)
  • Hebrew, Israel (he_IL)
  • Hindi, India (hi_IN)
  • Croatian, Croatia (hr_HR)
  • Hungarian, Hungary (hu_HU)
  • Indonesian, Indonesia (id_ID)
  • Italian, Switzerland (it_CH)
  • Italian, Italy (it_IT)
  • Japanese (ja_JP)
  • Korean (ko_KR)
  • Lithuanian, Lithuania (lt_LT)
  • Latvian, Latvia (lv_LV)
  • Norwegian-Bokmol, Norway(nb_NO)
  • Dutch, Belgium (nl_BE)
  • Dutch, Netherlands (nl_NL)
  • Polish (pl_PL)
  • Portuguese, Brazil (pt_BR)
  • Portuguese, Portugal (pt_PT)
  • Romanian, Romania (ro_RO)
  • Russian (ru_RU)
  • Slovak, Slovakia (sk_SK)
  • Slovenian, Slovenia (sl_SI)
  • Serbian (sr_RS)
  • Swedish, Sweden (sv_SE)
  • Thai, Thailand (th_TH)
  • Tagalog, Philippines (tl_PH)
  • Turkish, Turkey (tr_TR)
  • Ukrainian, Ukraine (uk_UA)
  • Vietnamese, Vietnam (vi_VN)
  • Chinese, PRC (zh_CN)
  • Chinese, Taiwan (zh_TW)
  • Note: The Android platform may support more locales than are included in the SDK system image. All of the supported locales are available in the Android Open Source Project.

    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.