Android 2.3 6 whats new

Android 2.3.3 APIs

In this document

Android 2.3.3 ( GINGERBREAD_MR1 ) is a small feature release that adds several improvements and APIs to the Android 2.3 platform.

For developers, the Android 2.3.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 2.3.3, use the Android SDK Manager to download the platform into your SDK.

Android 2.3 6 whats new

API Overview

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

Near Field Communications (NFC)

Android 2.3.3 provides improved and extended support for NFC, to allow applications to interact with more types of tags in new ways.

A new, comprehensive set of APIs give applications read and write access to a wider range of standard tag technologies, including:

  • NFC-A (ISO 14443-3A)
  • NFC-B (ISO 14443-3B)
  • NFC-F (JIS 6319-4)
  • NFC-V (ISO 15693)
  • ISO-DEP (ISO 14443-4)
  • MIFARE Classic
  • MIFARE Ultralight
  • NFC Forum NDEF tags

The platform also provides a limited peer-to-peer communication protocol and API. Foreground Activities can use the API to register an NDEF message that will get pushed to other NFC devices when they connect.

Advanced tag dispatching now gives applications more control over how and when they are launched, when an NFC tag is discovered. Previously, the platform used a single-step intent dispatch to notify interested applications that a tag was discovered. The platform now uses a four-step process that enables the foreground application to take control of a tag event before it is passed to any other applications ( android.nfc.NfcAdapter.enableForegroundDispatch() ). The new dispatch process also lets apps listen for specific tag content and tag technologies, based on two new intent actions — android.nfc.action.NDEF_DISCOVERED and android.nfc.action.TECH_DISCOVERED .

Android 2.3 6 whats new

The NFC API is available in the android.nfc and android.nfc.tech packages. The key classes are:

  • NfcAdapter. which represents the NFC hardware on the device.
  • NdefMessage. which represents an NDEF data message, the standard format in which "records" carrying data are transmitted between devices and tags. An NDEF message certain many NDEF records of different types. Applications can receive these messages from NDEF_DISCOVERED. TECH_DISCOVERED. or TAG_DISCOVERED Intents.
  • NdefRecord. delivered in an NdefMessage. which describes the type of data being shared and carries the data itself.
  • Tag. which represents a tag scanned by the device. Multiple types of tags are supported, based on the underlying tag technology.
  • TagTechnology. an interface that gives applications access to tag properties and I/O operations based on the technologies present in the tag. For a full list of tag technologies supported in Android 2.3.3, see android.nfc.tech .

NFC communication relies on wireless technology in the device hardware, and is not present in all Android devices. Android devices that do not support NFC will return a null object when getDefaultAdapter(Context) is called, and context.getPackageManager().hasSystemFeature(PackageManager.FEATURE_NFC) will return false. 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.

Android 2.3 6 whats new

Additionally, developers can request filtering on Google Play, 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.

For more information, read the NFC developer guide.

Android 2.3.3 adds platform and API support for Bluetooth nonsecure socket connections. This lets applications communicate with simple devices that may not offer a UI for authentication. See createInsecureRfcommSocketToServiceRecord(java.util.UUID) and listenUsingInsecureRfcommWithServiceRecord(java.lang.String, java.util.UUID) for more information.

  • A new BitmapRegionDecoder class lets applications decode a rectangle region from an image. The API is particularly useful when an original image is large and and the application only need parts of the image.
  • A new inPreferQualityOverSpeed field in BitmapFactory.Options allows applications to use a more accurate but slightly slower IDCT method in JPEG decode. This in turn improves the quality of the reconstructed image.

Media framework

  • A new MediaMetadataRetriever class provides a unified interface for retrieving frame and metadata from an input media file.
  • MediaRecorder.AudioEncoder and MediaRecorder.OutputFormat include new fields for specifying AMR Wideband and AAC formats.

Speech recognition

The speech-recognition API includes new constants to let you manage voice search results in new ways. Although the new constants are not needed for normal use of speech recognition, you could use them to offer a different view of voice search results in your application. For information, see RecognizerResultsIntent .

The Android 2.3.3 platform delivers an updated version of the framework API. The Android 2.3.3 API is assigned an integer identifier — 10 — 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.3.3 in your application, you need compile the application against the Android library that is provided in the Android 2.3.3 SDK platform. Depending on your needs, you might also need to add an android:minSdkVersion="10" 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, read What is API Level?

Top 10 features in Android 2.3 (Gingerbread)

The long awaited Gingerbread release is out. along with a plethora of user and developer oriented features that will delight and amaze. For me, I'm just excited to have another excuse to use the word "plethora" in a sentence. I mean, really, how often does that happen?

Before getting to the good stuff, I have a couple of disclaimers regarding Gingerbread that you should be aware of:

  1. You can't have it. Not on a real phone, until December 16th when you can shell out $529 for a new Nexus S phone ($199 with 2 year servitude, er, I mean contract).  There is no word on when or if Gingerbread will be available on other phones. Even the Nexus One, which up until now has always gotten updates before any other phone, won't be getting Gingerbread for "a few weeks". Most users don't even have 2.2 yet.
  2. It's not Android 3.0. Gingerbread is a minor release, which will be replaced next year with the big 3.0 Honeycomb release. Andy Rubin, the father of Android, demonstrated an Android tablet from Motorola yesterday, and it was running Honeycomb, not Gingerbread. I'm sure we'll see new tablets with Gingerbread just like we saw them with FroYo, but if you're looking for the mythical Tablet-optimized version of Android, this is not the droid you're looking for.

There are dozens of changes in 2.3 but I'm just going to pick 10 that stick out as being especially useful or game changing. As usual, I'll break this up into 5 user features and 5 developer features. First up: goodies for users.

User features

  1. New on-screen keyboard. The standard keyboard has been greatly improved in Android 2.3, with faster input and more intuitive typing. Even cut-and-paste got a makeover.
  2. Streamlined user interface. New color schemes and various UI changes and polish make Android more consistent and simpler to use.
  3. Application and power management. Android 2.3 provides better insight into what is running in the background, how much memory and CPU time it is using, and even lets you kill misbehaving apps. Yes, after months of telling us we don't need a task killer, they give us a task killer. Enjoy your chuckle, iPhone fans.
  4. SIP Internet calling. Voice over IP is integrated directly into Android 2.3. Unfortunately you'll have to get a SIP account from a third party, and the ability might be curtailed on some carriers.
  5. Download management. All your downloads from your browser, email, and other apps, can now be viewed and controlled from one place.

Developer features

  1. Native development. The ability to write Android programs or parts of programs isn't new but in Android 2.3 it gets a huge boost with Release 5 of the Native Development Kit (NDK). For example you can now receive input and sensor events, produce sound, manipulate 3D graphics contexts, access assets and storage, and more all from native code. They even added a NativeActivity class that lets you write your lifecycle callbacks in native code.
  2. JVM speed. For Java developers, 2.3 adds a number of speedups, most notably a concurrent garbage collector. According to Google garbage collection pauses will be under 3ms, which is small enough not to be noticed in a 30fps or even 60fps game. New JIT optimizations make Dalvik code run even faster than before.
  3. Faster event distribution. In previous versions of Android, just holding your finger down on the screen would cause whatever program was running to slow down, sometimes dramatically. This is all fixed in Android 2.3.
  4. Multimedia. Rich audio effects like reverb and headphone virtualization can be applied to local tracks or globally across multiple tracks. The platform adds built-in support for VP8/WebM video, plus AAC and AMR wideband encoding. Also, there are now official APIs for accessing the front and rear cameras. There is some limited support for extra large (tablet and TV) displays.
  5. Near Field Communications (NFC). In Japan, NFC is a Big Deal, and the hope is that it will catch on in the rest of the world too. It has all kinds of uses, for example with the right hardware and software you could use your phone as a replacement for your credit card to make point of sale purchases. Using the NFC API apps can respond to NFC tags embedded in stockers, posters, and even other devices.

For a full list of changes see the Android 2.3 Platform Highlights and the API Differences Report. According to statistics on the API Differences page, Android 2.3 is 2.93% different compared to Android 2.2, with 764 additions, 263 changes, and 40 removals. Android 2.3 will be available later this month on the Nexus S phone from Samsung, and from other vendors next year.

Keep watching the Platform Versions Dashboard to see what kind of market share this new Android version achieves over time. I advise all developers to test their apps on the 2.3 emulator now to make sure they run, but keep in mind it will be a while before there are enough 2.3 devices in the field for it to make a viable target.

Shameless plug alert: Counting 2.3, there are now 5 different versions of Android in active use, starting with version 1.5. Making your apps compatible with all these versions is a major focus of my book, Hello, Android. Free examples with source code are included.

Related posts

  • The Best Way to Answer “What’s Your Biggest Weakness?” “You’ve told me about your strengths—now, can you share what you consider to be your biggest weakness?” It’s the question that nobody...

  • Download WhatsApp for BlackBerry Z10, Q10, Z3, Q5, 9900, 9800 January 7, 2015 Download WhatsApp for BlackBerry Z10, Q10, Z3, Q5, 9900, 9800 and all other devices WhatsApp is the best and...

  • The Best Ereader for Android Reading ebooks on Android used to be just okay. Now it's awesome. While there are plenty of sweet apps for reading books on your phone or tablet, Play Books has...

  • Can you say taco? A host of new emojis landed on iPhones and iPads earlier this week with the iOS 9.1 update, including middle fingers, unicorns and tacos, leaving Android users a little left...

  • LogoGuess The Word Answers and Cheats Logo Guess Answers Logo Guess is a difficult, competitive app-branding game that tests your knowledge of global brands and icons. Created by XIN WENWEI,...