Archive for December, 2010

The Android Thread Police are coming….

As part of the Gingerbread release of android, a new API, StrictMode will allow developers to set a policy on a thread.

StrictMode is most commonly used to catch accidental disk or network access on the application’s main thread, where UI operations are received and animations take place. Keeping disk and network operations off the main thread makes for much smoother, more responsive applications. By keeping your application’s main thread responsive, you also prevent ANR dialogs from being shown to users.

StrictMode will only come into play if you select it and allows you to detect the following situations:

  • detect disk writes
  • detect disk reads
  • detect network usage
  • on a violation: log
  • on a violation: crash
  • on a violation: dropbox
  • on a violation: show an annoying dialog

Enabling StrictMode

StrictMode can be enabled in your applications onCreate method

public void onCreate() {
     if (DEVELOPER_MODE) {
         StrictMode.setThreadPolicy(new StrictMode.ThreadPolicy.Builder()

This blog post on the Android Developers blog by Brad Fitzpatrick will give you an overview of what you can expect. You can also check out the StrictMode API here for more details on what it allows.

, , , ,

No Comments

Major changes for Android Market client

Over the next two weeks Google will be rolling out a major update to the android market client. The changes will greatly improver the user experience as well as the browse-to-purchase experience. It will also be possible to develop richer games with the increase of the max size of .apk files to 50MB.

The Android Market engineering team has been hard at work on improving the Android Market experience for users and developers. Today, I’m pleased to announce a significant update to the Android Market client. Over the next two weeks, we’ll be rolling out a new Android Market client to all devices running Android 1.6 or higher.

This new Market client introduces important features that improve merchandising of applications, streamline the browse-to-purchase experience, and make it easier for developers to distribute their applications.

With a focus on improving discoverability and merchandising, we’ve introduced a new carousel on the home and category screens. Users can quickly flip through the carousel to view promoted applications and immediately go to the download page for the application they want. Developers have been very active in creating great Widgets and Live Wallpapers. To make it easier for users to find their favorites, we’re introducing two new categories for Widgets and Live Wallpapers. Applications that include Widgets and Wallpapers will be automatically added to those new categories. We’ll also be adding more categories for popular applications and games in the weeks ahead. In addition, the app details page now includes Related content, which makes it easier for users to quickly find apps of similar interest.

You can read more on this at Google’s Android Developer blog.

, ,

No Comments

Android 2.3 (Gingerbread) is the fastest Android yet and out now

Google have release Android 2.3 today and they are claiming that it is the fastest version yet. From a performance point of view, there is now Concurrent garbage collector, Faster event distribution and Updated video drivers. It looks like they are trying to push into the gamers market with many of these new features.

Here is an overview of the main features of Android 2.3 from the Google release:

Enhancements for game development: To improve overall responsiveness, we’ve added a new concurrent garbage collector and optimized the platform’s overall event handling. We’ve also given developers native access to more parts of the system by exposing a broad set of native APIs. From native code, applications can now access input and sensor events, EGL/OpenGL ES, OpenSL ES, and assets, as well a new framework for managing lifecycle and windows. For precise motion processing, developers can use several new sensor types, including gyroscope.

Rich multimedia: To provide a great multimedia environment for games and other applications, we’ve added support for the new video formats VP8 and WebM, as well as support for AAC and AMR-wideband encoding. The platform also provides new audio effects such as reverb, equalization, headphone virtualization, and bass boost.

New forms of communication: The platform now includes support for front-facing camera, SIP/VOIP, and Near Field Communications (NFC), to let developers include new capabilities in their applications.

See what applications are running

One personal gripe of mine has been the low battery time on Android. I recently upgraded my Xperia X10 to 2.1 and found the battery to last a bit longer but 2.3 has addressed the problem as well. As you can see from this screenshot, there is now a “Running” tab that allows you to see what applications are running. From here you can choose to close the app or report feedback to its developer.

Near Field Communications (NFC)

One of the new features that I am really excited about is Near Field Communications that allows the device to read NDEF tags. This is going to allow for the development of a whole host of applications. The obvious one being, “Swipe to pay” applications that will allow you to pay for goods using an app on your android device.

An NFC Reader application lets the user read and interact with near-field communication (NFC) tags. For example, the user can “touch” or “swipe” an NFC tag that might be embedded in a poster, sticker, or advertisement, then act on the data read from the tag. A typical use would be to read a tag at a restaurant, store, or event and then rate or register by jumping to a web site whose URL is included in the tag data. NFC communication relies on wireless technology in the device hardware, so support for the platform’s NFC features on specific devices is determined by their manufacturers.

Checkout the video below for an overview of all of the new features:

For more information about Android 2.3 visit the Platform Highlights page.

, , , , ,

No Comments