page.title=Android 4.0.3 Platform sdk.platform.version=4.0.3 sdk.platform.apiLevel=15 @jd:body

In this document

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

Reference

  1. API Differences Report »

API Level: {@sdkPlatformApiLevel}

Android {@sdkPlatformVersion} is an incremental release of the Android 4.x (Ice Cream Sandwich) platform family. This release includes new features for users and developers, API changes, and various bug fixes.

For developers, the Android {@sdkPlatformVersion} platform is available as a downloadable component for the Android SDK. The development 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 start 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 overview of the new user and developer features, see the Platform Highlights.

Development Platform Revisions

The sections below provide notes about successive revisions of the Android {@sdkPlatformVersion} development platform for the Android SDK, as denoted by revision number. To determine what revisions you have installed in your SDK environment, refer to the "Installed Packages" listing in the Android SDK Manager.

Important: To download the new Android 4.0.x system components from the Android SDK Manager, you must first update the SDK tools to revision 14 or later and restart the Android SDK Manager. If you do not, the Android 4.0.x system components will not be available for download.

Revision 3 (March 2012)

Maintenance update. The system version is 4.0.4.

Note: This system image includes support for emulator hardware graphics acceleration when used with SDK Tools r17 or higher. (more info)

Dependencies:
SDK Tools r17 or higher is required.

Revision 2 (January 2012)

Maintenance update. The system version is 4.0.3.

Dependencies:
SDK Tools r14 or higher is required.

Revision 1 (December 2011)

Initial release. The system version is 4.0.3.

Dependencies:
SDK Tools r14 or higher is required.

API Overview

The sections below provide a technical overview of new APIs in Android 4.0.3.

Table of Contents

  1. Social stream API in Contacts Provider
  2. Calendar Provider
  3. Home screen widgets
  4. Spell-checking
  5. Bluetooth
  6. UI toolkit
  7. Accessibility
  8. Text-to-speech
  9. Database
  10. Intents
  11. Camera
  12. Permissions

Social stream API in Contacts Provider

Applications that use social stream data such as status updates and check-ins can now sync that data with each of the user’s contacts, providing items in a stream along with photos for each.

The database table that contains an individual contact’s social stream is defined by {@link android.provider.ContactsContract.StreamItems}, the Uri for which is nested within the {@link android.provider.ContactsContract.RawContacts} directory to which the stream items belong. Each social stream table includes several columns for metadata about each stream item, such as an icon representing the source (an avatar), a label for the item, the primary text content, comments about the item (such as responses from other people), and more. Photos associated with a stream are stored in another table, defined by {@link android.provider.ContactsContract.StreamItemPhotos}, which is available as a sub-directory of the {@link android.provider.ContactsContract.StreamItems} Uri.

See {@link android.provider.ContactsContract.StreamItems} and {@link android.provider.ContactsContract.StreamItemPhotos} for more information.

To read or write social stream items for a contact, an application must request permission from the user by declaring <uses-permission android:name="android.permission.READ_SOCIAL_STREAM"> and/or <uses-permission android:name="android.permission.WRITE_SOCIAL_STREAM"> in their manifest files.

Calendar Provider

Home screen widgets

Starting from Android 4.0, home screen widgets should no longer include their own padding. Instead, the system now automatically adds padding for each widget, based the characteristics of the current screen. This leads to a more uniform, consistent presentation of widgets in a grid. To assist applications that host home screen widgets, the platform provides a new method {@link android.appwidget.AppWidgetHostView#getDefaultPaddingForWidget(android.content.Context, android.content.ComponentName, android.graphics.Rect) getDefaultPaddingForWidget()}. Applications can call this method to get the system-defined padding and account for it when computing the number of cells to allocate to the widget.

Spell-checking

Bluetooth

New public methods {@link android.bluetooth.BluetoothDevice#fetchUuidsWithSdp()} and {@link android.bluetooth.BluetoothDevice#getUuids()} let apps determine the features (UUIDs) supported by a remote device. In the case of {@link android.bluetooth.BluetoothDevice#fetchUuidsWithSdp()}, the system performs a service discovery on the remote device to get the UUIDs supported, then broadcasts the result in an {@link android.bluetooth.BluetoothDevice#ACTION_UUID} intent.

UI toolkit

New methods {@link android.app.Fragment#setUserVisibleHint(boolean) setUserVisibleHint()} and {@link android.app.Fragment#getUserVisibleHint() getUserVisibleHint()} allow a fragment to set a hint of whether or not it is currently user-visible. The system defers the start of fragments that are not user-visible until the loaders for visible fragments have run. The visibility hint is "true" by default.

Graphics

Accessibility

Text-to-speech

Database

Intents

Adds new categories for targeting common types of applications on the device, such as {@link android.content.Intent#CATEGORY_APP_BROWSER}, {@link android.content.Intent#CATEGORY_APP_CALENDAR}, {@link android.content.Intent#CATEGORY_APP_MAPS}, and more.

Camera

Permissions

The following are new permissions:

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

API Level

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 an Android platform that supports API level {@sdkPlatformApiLevel} or higher. Depending on your needs, you might also need to add an android:minSdkVersion="{@sdkPlatformApiLevel}" attribute to the {@code <uses-sdk>} element.

For more information, see the API Levels document.

Built-in Applications

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

  • API Demos
  • Browser
  • Calculator
  • Calendar
  • Camera
  • Clock
  • Custom Locale
  • Dev Tools
  • Downloads
  • Email
  • Gallery
  • Gestures Builder
  • Messaging
  • Music
  • People
  • Phone
  • Search
  • Settings
  • Speech Recorder
  • Widget Preview

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 3.0 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, South Africa (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 bokmål, 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 the following emulator skins:

    To test your application on an emulator that represents the latest Android device, you can create an AVD with the new WXGA720 skin (it's an xhdpi, normal screen device). Note that the emulator currently doesn't support the new on-screen navigation bar for devices without hardware navigation buttons, so when using this skin, you must use keyboard keys Home for the Home button, ESC for the Back button, and F2 or Page-up for the Menu button.

    However, due to performance issues in the emulator when running high-resolution screens such as the one for the WXGA720 skin, we recommend that you primarily use the traditional WVGA800 skin (hdpi, normal screen) to test your application.