*API Level:* **15**

Android 4.0.3 ([ICE_CREAM_SANDWICH_MR1](https://developer.android.com/reference/android/os/Build.VERSION_CODES#ICE_CREAM_SANDWICH_MR1)) is an incremental release of the[Android 4.0](https://developer.android.com/about/versions/android-4.0)([ICE_CREAM_SANDWICH](https://developer.android.com/reference/android/os/Build.VERSION_CODES#ICE_CREAM_SANDWICH)) platform family. This release includes new features for users and developers, API changes, and various bug fixes.

For developers, the Android 4.0.3 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. To get started developing or testing against Android 4.0.3, use the Android SDK Manager to download the platform into your SDK.

## 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](https://developer.android.com/about/versions/android-4.0.3#contacts)
2. [Calendar Provider](https://developer.android.com/about/versions/android-4.0.3#calendar)
3. [Home screen widgets](https://developer.android.com/about/versions/android-4.0.3#widgets)
4. [Spell-checking](https://developer.android.com/about/versions/android-4.0.3#textservices)
5. [Bluetooth](https://developer.android.com/about/versions/android-4.0.3#bluetooth)
6. [UI toolkit](https://developer.android.com/about/versions/android-4.0.3#ui)
7. [Accessibility](https://developer.android.com/about/versions/android-4.0.3#accessibility)
8. [Text-to-speech](https://developer.android.com/about/versions/android-4.0.3#tts)
9. [Database](https://developer.android.com/about/versions/android-4.0.3#database)
10. [Intents](https://developer.android.com/about/versions/android-4.0.3#intents)
11. [Camera](https://developer.android.com/about/versions/android-4.0.3#camera)
12. [Permissions](https://developer.android.com/about/versions/android-4.0.3#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 android.provider.ContactsContract.StreamItems, the Uri for which is nested within the[ContactsContract.RawContacts](https://developer.android.com/reference/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 android.provider.ContactsContract.StreamItemPhotos, which is available as a sub-directory of the android.provider.ContactsContract.StreamItems Uri.

See android.provider.ContactsContract.StreamItems and 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
- Adds the class[CalendarContract.Colors](https://developer.android.com/reference/android/provider/CalendarContract.Colors)to represent a color table in the[Calendar Provider](https://developer.android.com/guide/topics/providers/calendar-provider). The class provides fields for accessing colors available for a given account. Colors are referenced by[COLOR_KEY](https://developer.android.com/reference/android/provider/CalendarContract.ColorsColumns#COLOR_KEY)which must be unique for a given account name/type. These values can only be updated by the sync adapter.
- Adds[ALLOWED_AVAILABILITY](https://developer.android.com/reference/android/provider/CalendarContract.CalendarColumns#ALLOWED_AVAILABILITY)and[ALLOWED_ATTENDEE_TYPES](https://developer.android.com/reference/android/provider/CalendarContract.CalendarColumns#ALLOWED_ATTENDEE_TYPES)for exchange/sync support.
- Adds[TYPE_RESOURCE](https://developer.android.com/reference/android/provider/CalendarContract.AttendeesColumns#TYPE_RESOURCE)(such as conference rooms) for attendees and[AVAILABILITY_TENTATIVE](https://developer.android.com/reference/android/provider/CalendarContract.EventsColumns#AVAILABILITY_TENTATIVE), as well as[EVENT_COLOR_KEY](https://developer.android.com/reference/android/provider/CalendarContract.EventsColumns#EVENT_COLOR_KEY)for events.

### 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[getDefaultPaddingForWidget()](https://developer.android.com/reference/android/appwidget/AppWidgetHostView#getDefaultPaddingForWidget(android.content.Context, android.content.ComponentName, android.graphics.Rect)). 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

- For apps that accessing spell-checker services, a new[cancel()](https://developer.android.com/reference/android/view/textservice/SpellCheckerSession#cancel())method cancels any pending and running spell-checker tasks in a session.
- For spell-checker services, a new suggestions flag,[RESULT_ATTR_HAS_RECOMMENDED_SUGGESTIONS](https://developer.android.com/reference/android/view/textservice/SuggestionsInfo#RESULT_ATTR_HAS_RECOMMENDED_SUGGESTIONS), lets the services distinguish higher-confidence suggestions from lower-confidence ones. For example, a spell-checker could set the flag if an input word is not in the user dictionary but has likely suggestions, or not set the flag if an input word is not in the dictionary and has suggestions that are likely to be less useful.

  Apps connected to the spell-checker can use the[RESULT_ATTR_HAS_RECOMMENDED_SUGGESTIONS](https://developer.android.com/reference/android/view/textservice/SuggestionsInfo#RESULT_ATTR_HAS_RECOMMENDED_SUGGESTIONS)flag in combination with other suggestion attributes, as well as the[getSuggestionsAttributes()](https://developer.android.com/reference/android/view/textservice/SuggestionsInfo#getSuggestionsAttributes())and[getSuggestionsCount()](https://developer.android.com/reference/android/view/textservice/SuggestionsInfo#getSuggestionsCount())methods, to determine whether to mark input words as typos and offer suggestions.
- A new[FLAG_AUTO_CORRECTION](https://developer.android.com/reference/android/text/style/SuggestionSpan#FLAG_AUTO_CORRECTION)style for text spans indicates that auto correction is about to be applied to a word/text that the user is typing/composing. This type of suggestion is rendered differently, to indicate the auto correction is happening.

### Bluetooth

New public methods[fetchUuidsWithSdp()](https://developer.android.com/reference/android/bluetooth/BluetoothDevice#fetchUuidsWithSdp())and[getUuids()](https://developer.android.com/reference/android/bluetooth/BluetoothDevice#getUuids())let apps determine the features (UUIDs) supported by a remote device. In the case of[fetchUuidsWithSdp()](https://developer.android.com/reference/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[ACTION_UUID](https://developer.android.com/reference/android/bluetooth/BluetoothDevice#ACTION_UUID)intent.

### UI toolkit

New methods[setUserVisibleHint()](https://developer.android.com/reference/android/app/Fragment#setUserVisibleHint(boolean))and[getUserVisibleHint()](https://developer.android.com/reference/android/app/Fragment#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

- New method[setDefaultBufferSize(int, int)](https://developer.android.com/reference/android/graphics/SurfaceTexture#setDefaultBufferSize(int, int))in[SurfaceTexture](https://developer.android.com/reference/android/graphics/SurfaceTexture)sets the default size of the image buffers. This method may be used to set the image size when producing images with[Canvas](https://developer.android.com/reference/android/graphics/Canvas)(via[lockCanvas(Rect)](https://developer.android.com/reference/android/view/Surface#lockCanvas(android.graphics.Rect))), or OpenGL ES (via an EGLSurface).
- Adds definitions for the enums of the GL_OES_EGL_image_external OpenGL ES extension ---[GL_REQUIRED_TEXTURE_IMAGE_UNITS_OES](https://developer.android.com/reference/android/opengl/GLES11Ext#GL_REQUIRED_TEXTURE_IMAGE_UNITS_OES),[GL_SAMPLER_EXTERNAL_OES](https://developer.android.com/reference/android/opengl/GLES11Ext#GL_SAMPLER_EXTERNAL_OES),[GL_TEXTURE_BINDING_EXTERNAL_OES](https://developer.android.com/reference/android/opengl/GLES11Ext#GL_TEXTURE_BINDING_EXTERNAL_OES), and[GL_TEXTURE_EXTERNAL_OES](https://developer.android.com/reference/android/opengl/GLES11Ext#GL_TEXTURE_EXTERNAL_OES).

### Accessibility

- Clients of[RemoteViews](https://developer.android.com/reference/android/widget/RemoteViews)can now use the method[setContentDescription()](https://developer.android.com/reference/android/widget/RemoteViews#setContentDescription(int, java.lang.CharSequence))to set and get the content description of any View in the inflated layout.
- The methods[getMaxScrollX()](https://developer.android.com/reference/android/view/accessibility/AccessibilityRecord#getMaxScrollX()),[getMaxScrollY()](https://developer.android.com/reference/android/view/accessibility/AccessibilityRecord#getMaxScrollY()),[setMaxScrollX()](https://developer.android.com/reference/android/view/accessibility/AccessibilityRecord#setMaxScrollX(int)), and[setMaxScrollY()](https://developer.android.com/reference/android/view/accessibility/AccessibilityRecord#setMaxScrollY(int))allow apps to get and set the maximum scroll offset for an[AccessibilityRecord](https://developer.android.com/reference/android/view/accessibility/AccessibilityRecord)object.
- When touch-exploration mode is enabled, a new secure setting[ACCESSIBILITY_SPEAK_PASSWORD](https://developer.android.com/reference/android/provider/Settings.Secure#ACCESSIBILITY_SPEAK_PASSWORD)indicates whether the user requests the IME to speak text entered in password fields, even when a headset is not in use. By default, no password text is spoken unless a headset is in use.

### Text-to-speech

- Adds the new method[getFeatures()](https://developer.android.com/reference/android/speech/tts/TextToSpeech#getFeatures(java.util.Locale))for querying and enabling network TTS support.
- Adds a new listener class,[UtteranceProgressListener](https://developer.android.com/reference/android/speech/tts/UtteranceProgressListener), that engines can register to receive notification of speech-synthesis errors.

### Database

- A new[CrossProcessCursorWrapper](https://developer.android.com/reference/android/database/CrossProcessCursorWrapper)class lets content providers return results for a cross-process query more efficiently. The new class is a useful building block for wrapping cursors that will be sent to processes remotely. It can also transform normal[Cursor](https://developer.android.com/reference/android/database/Cursor)objects into[CrossProcessCursor](https://developer.android.com/reference/android/database/CrossProcessCursor)objects transparently.

  The[CrossProcessCursorWrapper](https://developer.android.com/reference/android/database/CrossProcessCursorWrapper)class fixes common performance issues and bugs that applications have encountered when implementing content providers.
- The[CursorWindow(java.lang.String)](https://developer.android.com/reference/android/database/CursorWindow#CursorWindow(java.lang.String))constructor now takes a name string as input. The system no longer distinguishes between local and remote cursor windows, so[CursorWindow(boolean)](https://developer.android.com/reference/android/database/CursorWindow#CursorWindow(boolean))is now deprecated.

### Intents

Adds new categories for targeting common types of applications on the device, such as[CATEGORY_APP_BROWSER](https://developer.android.com/reference/android/content/Intent#CATEGORY_APP_BROWSER),[CATEGORY_APP_CALENDAR](https://developer.android.com/reference/android/content/Intent#CATEGORY_APP_CALENDAR),[CATEGORY_APP_MAPS](https://developer.android.com/reference/android/content/Intent#CATEGORY_APP_MAPS), and more.

### Camera

- [MediaMetadataRetriever](https://developer.android.com/reference/android/media/MediaMetadataRetriever)adds the new constant[METADATA_KEY_LOCATION](https://developer.android.com/reference/android/media/MediaMetadataRetriever#METADATA_KEY_LOCATION)to let apps access retrieve location information for an image or video.
- [CamcorderProfile](https://developer.android.com/reference/android/media/CamcorderProfile)adds the QVGA (320x240) resolution profiles. Quality level is represented by the[QUALITY_QVGA](https://developer.android.com/reference/android/media/CamcorderProfile#QUALITY_QVGA).and[QUALITY_TIME_LAPSE_QVGA](https://developer.android.com/reference/android/media/CamcorderProfile#QUALITY_TIME_LAPSE_QVGA)constants.
- New methods[setVideoStabilization()](https://developer.android.com/reference/android/hardware/Camera.Parameters#setVideoStabilization(boolean)),[getVideoStabilization()](https://developer.android.com/reference/android/hardware/Camera.Parameters#getVideoStabilization()), and[isVideoStabilizationSupported()](https://developer.android.com/reference/android/hardware/Camera.Parameters#isVideoStabilizationSupported())let you check and manage video stabilization for a[Camera](https://developer.android.com/reference/android/hardware/Camera).

### Permissions

The following are new permissions:

- android.Manifest.permission#READ_SOCIAL_STREAM and android.Manifest.permission#WRITE_SOCIAL_STREAM: Allow a sync adapter to read and write social stream data to a contact in the shared Contacts Provider.

For a detailed view of all API changes in Android 4.0.3 (API Level 15), see the[API Differences Report](https://developer.android.com/sdk/api_diff/15/changes).

## API Level

The Android 4.0.3 API is assigned an integer identifier---**15**---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 4.0.3 in your application, you need compile the application against an Android platform that supports API level 15 or higher. Depending on your needs, you might also need to add an`android:minSdkVersion="15"`attribute to the[`<uses-sdk>`](https://developer.android.com/guide/topics/manifest/uses-sdk-element)element.

For more information, see the[API Levels](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)document.