Developers
Android 2.2 Platform
by Adriano Tornatore on mag.20, 2010, under Android, Developers
API Level: 8
Android 2.2 is a minor platform release including user
features, developer features, API changes, and bug
fixes. For information on developer features and API changes, see the
Framework API section.
For developers, the Android 2.2 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
includes no external libraries.
To get started developing or testing against the Android
2.2 platform, use the Android SDK and AVD Manager tool 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.
Platform Highlights
For a list of new user features and platform highlights, see the Android
2.2 Platform Highlights document.
Revisions
The sections below provide notes about successive releases of
the Android 2.2 platform component for the Android SDK, as denoted by
revision number. To determine what revision(s) of the Android
2.2 platforms are installed in your SDK environment, refer to
the “Installed Packages” listing in the Android SDK and AVD Manager.
//

Android 2.2, Revision 1 (May 2010)
- Dependencies:
- Requires SDK Tools r6 or higher.
- Tools:
- Adds support for building with Android library projects. See SDK Tools, r6 for information.
API Level
The Android 2.2 platform delivers an updated version of
the framework API. The Android 2.2 API
is assigned an integer identifier —
8 — 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.2 in your
application, you need to set the proper value, “8″, in the
android:minSdkVersion 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.
Framework API Changes
The sections below provide information about changes made to the application
framework API provided by the Android 2.2 platform.
App installation on external storage media
The Android platform now allows applications to request installation onto the
device’s external storage media (such as the SD card), as an alternative to
installation onto the device’s internal memory.
Application developers can express the preferred installation location for
their applications by means of a new attribute of <manifest>
in the manifest file, . The attribute supports three values:
android:installLocation
"internalOnly", "preferExternal", and
"auto". At install time, the system checks the value of
android:installLocation and installs the application
.apk according to the preferred location, if possible. If the
application has requested external installation, the system installs it into a
private, encrypted partition in the external media. Once an application .apk is
installed externally, the system lets the user change the storage location of
the .apk and move it onto the device’s internal memory if needed (and vice
versa), through Manage Applications in the user settings.
By default, the system installs all applications onto the device’s internal
memory, except for those that explicitly request external installation. This
means that the system will always install legacy applications onto internal
memory, since they do not have access to the
android:installLocation attribute. However, it is possible to
configure and compile a legacy application such that it is installed internally
on older versions of the platform and externally on Android 2.2 and later
platforms, if necessary.
Note that requesting installation onto the device’s external media is not
suitable for all applications, particularly because the external media may be
removable and unmounting/remounting may disrupt the user experience and system
settings.
For more information about setting a preferred install location for your
application, including a discussion of what types of applications should and
should not request external installation, please read the App Install Location
document.
Data backup
The platform now provides a generalized backup service that
applications can use to backup and restore user data, to ensure that users can
maintain their data when switching devices or reinstalling the application. The
Backup Manager handles the work of transporting the application data to and from
the backup storage area in the cloud. The Backup Manager can store any type of
data, from arbitrary data to files, and manages backup and restore operations
in an atomic manner. For more information, see Data Backup.
Graphics
- New OpenGL ES 2.0 APIs in
android.opengl.GLES20. - New
ETC1,ETC1Util, andETC1Util.ETC1Textureclasses and utility methods for using ETC1 for texture compression. - New
ImageFormatclass. - New
YUV image format APIto enable compression from YUV to JPEG and manipulation of YUV data.
Media
- New APIs in
android.media.AudioManagerfor managing audio focus, transport control, transient loss of audio focus, ducking. - New broadcast intent for routing audio to SCO —
ACTION_SCO_AUDIO_STATE_CHANGEDwith extras indicating new state. - New APIs in
SoundPoolto detect completion of sound-loading. - New APIs in
SoundPoolfor auto pause and resume. - New APIs in
MediaRecorderfor specifying audio settings for number of channels, encoding and sampling rates, sampling rate. - New APIs for adding files to the media database, so that they are automatically scanned. See
MediaScannerConnection.scanFileandMediaScannerConnection.OnScanCompletedListener.
Speech recognition and third-party recognition engines
- The platform provides new speech-recognition APIs that allow applications to have a richer interaction with the available voice recognizer. For example, the APIs are sufficient to integrate voice recognition deeply into an IME.
- The platform also provides a
RecognitionServicebase class that lets third-party developers create plug-in recognition engines. - New
RecognitionListenerinterface to receive callbacks. - New
RecognizerIntentextras that let a requester app specify details as preferred language, minimum length in milliseconds, and so on.
Camera and camcorder
- Changes to camera preview API to improve efficieny of preview pipeline.
- New display orientation for camera (it can now work in portrait orientation).
- New APIs in
android.hardware.Camerafor managing zoom level. - New APIs
android.hardware.Camera.Parametersfor querying and setting device camera settings such as focal length, exposure, zoom level, view angle, and others. - New
thumbnailutility for video and image thumbnails. - New
CamcorderProfileandCamcorderProfileclasses enable apps to determine device hardware camera capablities. - New support in
android.media.ExifInterfacefor retrieving GPS and focal length.
Device policy manager
New device policy management APIs allow developers to write “device
administrator” applications that can control security features of the device,
such as the minimum password strength, data wipe, and so on. Users can select
the administrators that are enabled on their devices. For more information, see
the android.app.admin classees or the example
application code in DeviceAdminSample.java.
UI Framework
- New UI modes “car mode” and “night mode” and
UiModeManagerlet applications adjust their application UI for specific user modes. - New
ScaleGestureDetectorthat lets Views detect and handle transformation gestures that involve more than one pointer (multitouch) using the supplied MotionEvents. - Improvements in the way that multitouch events are reported in
MotionEventobjects. - The layout attribute
fill_parentis renamed tomatch_parent. This affects both XML and Java code (seeViewGroup.LayoutParams). Note that the platform will continue to honor uses offill_parentin legacy applications. - New layout attributes
tabStripEnabled,tabStripRight, andtabStripLeftlet developers customize the bottom strip of TabWidgets. - Better support for managed dialogs in Activity.
Accounts and sync
- New method
AddPeriodicSync()lets you schedule a periodic sync with a specific account, authority, and extras at the given frequency.
New manifest elements and attributes
- For specifying the application’s preferred install location (see App Installation on External Storage Media, above):
- New
android:installLocationattribute of the<manifest>element. Specifies the default install location defined by an application.
- New
- For managing user data backup (see Backup manager, above, for more information):
- New
android:backupAgentattribute of the
<application>element. Specifies the component name of the
BackupAgent subclass provided by the application to handle backup/restore
operations, if any. - New
android:restoreAnyVersionattribute of the
<application>element. Boolean value that indicates whether
the application is prepared to attempt a restore of any backed-up dataset, even
if the backup is apparently from a newer version of the application than is
currently installed on the device.
- New
- For managing the platform’s JIT compiler:
- New
android:vmSafeModeattribute of the<application>element. Boolean value that specifies whether to disable JIT compiler optimizations when running the application.
- New
Permissions
android.permission.BIND_DEVICE_ADMIN— Any device administration broadcast receiver must require this permission, to ensure that only the system can interact with it.android.permission.KILL_BACKGROUND_PROCESSES— Allows an application to callkillBackgroundProcesses(String).android.permission.BIND_WALLPAPER— AnyWallpaperServicemust require this permission, to ensure that only the system can interact with it.android.permission.SET_TIME— Allows an application to set the system time.
API differences report
For a detailed view of all API changes in Android 2.2 (API
Level 8), see the API
Differences Report.
Built-in Applications
The system image included in the downloadable platform provides these
built-in applications:
|
|
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 2.2 system
image are listed below (with language_country/region locale
descriptor).
|
|
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:
- QVGA (240×320, low density, small screen)
- WQVGA (240×400, low density, normal screen)
- FWQVGA (240×432, low density, normal screen)
- HVGA (320×480, medium density, normal screen)
- WVGA800 (480×800, high density, normal screen)
- WVGA854 (480×854 high density, normal screen)
For more information about how to develop an application that displays
and functions properly on all Android-powered devices, see Supporting Multiple
Screens.
Android Emulator Controller (.net)
by flotruglio on apr.30, 2010, under Android, C#, Developers
one of our developers is working on a project to create a handler for the Android emulator that solves the annoying problem that every day we slow down!
read the full story on his blog “Android Emulator Controller”
Android Developers Guide
by flotruglio on apr.19, 2010, under Developers, gtug
This month for the monthly GTUG Palermo meeting, we show to you how to develop an Android Applications, with us Massimo Carli author of “Android Developers guide” (the first italian book regarding android developing) a showcase with the developers (including me) ..and much more..don’t miss the meeting at the Mondadori Multicenter (Via Ruggero Settimo, 16 – Palermo) when? in April 21 at the 17.30
visit the official GTUG Palermo website: http://sites.google.com/site/palermogtug/eventi/04-2010
Android: ViewFlipper Animation like News & Weather
by admin on mar.28, 2010, under Android, Developers
In thie tutorial we can learn how to solve a common problem in Android project, to have more info regarding Android project i suggest to you to download the ADT Android Pluglins and Eclipse.
Let’s start with a little basics around Android development. (continue reading…)
Orange Dot Net
by flotruglio on mar.23, 2010, under .NET, C#, Developers
Now ready the registration form
follow us on linkedin or register here
Visual Studio 2010 Community Tour April
by flotruglio on mar.19, 2010, under .NET, Developers
Visual Studio 2010 Community Tour, April 14, 2010
On the occasion of the release of Visual Studio 2010, Microsoft Italy and OrangeDotnet organize a new conference dedicated to all developers, with the exceptional presence of Vittorio Bertocci directly from Microsoft Corporation (Redmond), Lorenzo Barbieri by Microsoft Italy and with the staff of OrangeDotNet.
The event is absolutely free, after registration, and for the first time will be kind of full-day.
Google ready to launch a Microblogging Search Engine
by flotruglio on mar.07, 2010, under Developers
Google prepares to launch a service that indexes and ranks content from microblogging services like Twitter. Since it’s very easy to post updates and the posts are usually very short, micro-blogging services are great for live blogging, posting real-time information about an event.
Twitter’s search engine has two important drawbacks: it’s limited to Twitter and it sorts the results by date. While there are other search engines like Tweefind that try to sort Twitter posts by relevancy and search engines like Twingly that index multiple microblogging sites, none of them does a great job. (continue reading…)
a useful HTML5+JetPack’s use case, know page differences!
by flotruglio on feb.04, 2010, under Developers
Recently, I visited a blog post with associated comments organized as a tree. I thought it would be hard to come back later for reading only the modifications, that is, the comments added since my last visit. So, I have got an idea, a use case involving HTML5 and JetPack.
So, how to improve a blog (or a forum) reading experience ?
Well, HTML5 support provides offline data storage, that is, client-side storage. Then, everytime a user visits a page, like a blog or forum page, it’s possible to store the page visit’s date on the client-side. With the last visit’s date, HTML5 enables to highlight, to emphasize with a different color the added or modified sections (<div> sections with a timestamp ?) since the previous visit.
And I imagine a Jetpack extension could leverage that stored information to emphasize these kind of sections.Such a feature has an interesting potential. It would be a small, but very useful feature, like an introduction to the HTML5+JetPack potential. And beyond emphasizing sections, the HTML5 capabilities open the door to execute time-based actions (using, for example, JetPack extensions).
In my personal optionion, i think that it would be interesting to think at a use case that show these features!
(my new project?…mmm)
Mozilla Firefox and Jetpack
by Adriano Tornatore on feb.01, 2010, under Developers, javascript
A new type of “Browser Customization” tool started to be a real developing tool for addons in Mozilla Firefox.
Mozilla Labs released the version 0.7 of Jetpack!
I will not explain how to use and how to install it (you could even watch video tutorial on the website) but i will show a little example of it.
Once you installed Jetpack, a special tab (about:jetpack) will appear with several tabs: a smart description, a list of installed Jetpack addons, a developing window, tutorial with some demos, memory usage monitor and api tutorial. In tutorial tab there are examples about scripting under this API but not all are working..
Anyway, there is a script that is checking every minute how many unread mails you have in your gmail account and it shows an icon on your mozilla status bar. I edited it a little bit and now it will show a toast notification if new mails arrived. Here the code:
Android 2.1 released!
by flotruglio on gen.31, 2010, under Developers
Now it’s available the latest release of Android system, this new version (2.1) that does not add significant feature, but increase a little more the system stability and provide this standard applications:
- Alarm Clock
- Browser
- Calculator
- Camera
- Contacts
- Custom Locale (developer app)
- Dev Tools (developer app)
- Gallery
- IMEs for Japanese, Chinese, and Latin text input
- Messaging
- Music
- Phone
- Settings
- Spare Parts (developer app)

read the full post at Android Developers page