The sections below provide information about changes made to the application framework API provided by the Android 2.1 platform.
API level
The Android 2.1 platform delivers an updated version of the framework API. The Android 2.1 API is assigned an integer identifier — 7 — 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.1 in your application, you need to set the proper value, "7", 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
The following is a summary of some notable changes to the framework APIs.
Live Wallpapers
The following additions provide APIs for you to develop animated wallpapers:
- New
android.service.wallpaperpackage. - New
WallpaperInfoclass. - Updated
WallpaperManager.
Telephony
- New
SignalStrengthclass provides information about the device's current network signal. This can be acquired from the newonSignalStrengthsChanged(SignalStrength)callback. - New
onDataConnectionStateChanged(int, int)callback.
Views
- New
ViewmethodsisOpaque()andonDrawScrollBars(Canvas). - New
RemoteViewsmethodsaddView(int, RemoteViews)andremoveAllViews(int). - New
ViewGroupmethodsisChildrenDrawingOrderEnabled()andsetChildrenDrawingOrderEnabled(boolean).
WebKit
- New
WebStoragemethods to manipulate web storage databases. - New
GeolocationPermissionsmethods to get Geolocation permissions from, and set them on the WebView. - New
WebSettingsmethods to manage settings for app cache, web storage, and zooming based on screen density. - New
WebChromeClientmethods for handling video, browsing history, custom Views, app cache limits, and more.
API differences report
For a detailed view of all API changes in Android 2.1 (API Level 7), as compared to API Level 6, see the API Differences Report.




