What's new in Android 1.6 (Donut)? Part 2: Developer features

What's new in Android 1.6 (Donut)? Part 2: Developer features

Summary: Over the next several weeks, Android 1.6 will be rolling out to customers via an over-the-air update. In addition to a number of user-facing features such as a new Android Market and a faster camera application, the Donut branch has a few goodies for developers as well. This article explores how to get 1.6 right now, and the developer-facing features inside.


Over the next several weeks, Android 1.6 will be rolling out to customers via an over-the-air update. In addition to a number of user-facing features such as a new Android Market and a faster camera application, the Donut branch has a few goodies for developers as well. This article explores how to get 1.6 right now, and the developer-facing features inside.

[ See also: What's new in Android 1.6? Part 1: User features ]

Continue reading: Getting 1.6 early >

Getting 1.6 early

Can't wait for the regular update? The 1.6 SDK is available for download now. It contains an emulator for a virtual Android device so you can develop and test your programs on your desktop machine. Windows, Linux, and MacOS are supported.

Want to see it running on a real phone? If you have an ADP1 or Google Ion phone, download the latest version from the HTC support site. Be sure to follow the link specifically for your hardware: Android Dev Phone 1, and Google I/O Device (Ion). I tried the directions for the Ion and they worked like a charm.

For other kinds of phones such as the T-Mobile G1 and MyTouch3G, Taylor Wimberly and Ben Marvin have written a couple of articles that have downloading and install instructions. Be sure to read all the warnings and comments about potential problems with a manual update, especially if you are running a custom or rooted Android ROM.

Now that you have 1.6, let's look at the developer-facing changes in the new version.

Continue reading: Developer features >

Developer features

1.6 is a minor release of Android, which means that there are only a handful of changes in the Android application programming interface (API). The official API diffs page lists 538 removals, additions, and other changes to the API between 1.5 (Cupcake) and 1.6 (Donut). However this number is misleading. When a class is deprecated in one place and moved to another, every method and field in the class is counted twice. So the actual number of changes is much lower. Here are the highlights:

  • Support for multiple screen sizes and densities. Applications targeting 1.6 are assumed to support different screen densities and sizes. They can still explicitly specify screen support either way with the supports-screens manifest tag.
  • New permissions. 1.6 programs must explicitly request the WRITE_EXTERNAL_STORAGE permission to be able to modify the contents of the SD card, and they must explicitly request the READ_PHONE_STATE permission to be able to be able to retrieve phone state info. Apps targeting earlier versions will always request these permissions implicitly.
  • New audio sources. In 1.6, you can record audio from the VOICE_CALL, VOICE_DOWNLINK, and VOICE_UPLINK channels (hardware permitting).
  • Text to speech (previously available as a 3rd party library).
  • Path-based permissions. In 1.5 you either had full access or no access to all the paths exposed by a Content Provider. In 1.6 the developer can restrict access based on particular paths.
  • Gesture strokes. Android 1.6 provides some limited support for defining gestures (distinctive finger movements) in your own applications. So far, none of the standard apps have taken advantage of this.
  • WiFi multicast. This will make it possible for apps running on the same WiFi network to discover and talk to each other.
  • OpenGL changes. Some of the classes in javax.microedition.khronos have been deprecated and moved to android.opengl. I'm not really sure they will stay there though, so there's no urgency to change your code. More interesting are the hints that Android will be supporting OpenGL 2.0 in a future release. You can now specify the OpenGL version number that you require in your Android manifest.
  • CDMA support. Unless you're generating GSM/CDMA tones in your program you probably don't care about this.
  • android.os.Build.VERSION_CODES. Before making a call to a new API, you can test to see which version of Android you are running on.

Continue reading: Schizo-screenia >


By far, the most important change in 1.6 is support for different screen sizes. This is the only change in 1.6 that most developers need to worry about. 1.6 is the first release that can really support screens that are larger or smaller than the standard 320x480 HVGA display that has been used so far on all Android phones. The first phone to take advantage of this will likely be the HTC Tatoo, which will have a 240x320 screen. The Motorola Sholes/Tao, due out later this year, will have a 480x800 screen, and some netbooks will use 480x854 or bigger.

When running an older application on a 1.6 phone, Android will attempt to scale the user interface to the new size. However, it doesn't always do a great job of this. Small screens are particularly difficult to support so on those phones Google decided to limit the Market so that 1.5 apps will not even appear in the list of available applications users can download. So it's important that all Android programs be updated sooner or later to target the new version. In a future article I'll explore how you can have a single program that support multiple screen sizes and versions of Android.

Topics: Telcos, Mobility, Software Development

Ed Burnette

About Ed Burnette

Ed Burnette is a software industry veteran with more than 25 years of experience as a programmer, author, and speaker. He has written numerous technical articles and books, most recently "Hello, Android: Introducing Google's Mobile Development Platform" from the Pragmatic Programmers.

Kick off your day with ZDNet's daily email newsletter. It's the freshest tech news and opinion, served hot. Get it.


Log in or register to join the discussion
  • Got it

    Got my Donut yesterday. The Market is much improved, but the rest is relatively minor in the scheme of things.

    My concern is the rumor that the G1 will be unable to accept future updates due to memory limitations. If that happens, I'll cancel my contract and go elsewhere, most likely the iPhone.
    • If google will allow...

      apps to be stored on the SD card without having to hack the phone then that would free up a lot of space.
      • There's not much point

        This is really only an issue on the G1 (Dream). All the newer Android phones have plenty of on-board flash memory with room to spare. There are a lot of drawbacks to running apps off the SD card. You can't hot swap it, you can't swap it at all unless you clone the ext2/3/4 partition on ALL your SD cards, and there is a performance hit even on Class 6 cards.
        Michael Kelly
        • Well I do not think that 512mb ....

          is enough (MYTOUCH 3G) as for hot swapping I do not have any need to, I have a big enough SD card.
          • That's 256 MB more than the G1

            And given that most apps average about 1 MB, that's over 200 apps it can hold MORE than the G1 in theory. Even if the real number is half that due to additions to the operating system, that's still over 100 more apps. I think the rare person who needs that many apps ought to be able to make do with installing APPS2SD if they really need it while allowing the masses to have speedy phones without the clutter.
            Michael Kelly
    • Don't think I'd go to the IPhone...

      ...to many other Android based phones worth looking at if the G1 comes to an end of life. I'll probably having something else before that happens anyway.
    • At some point you won't be able to update

      There always comes a point where old hardware can't get updates to new software. For example I can't run Windows 7 on a Pentium II machine. Hopefully by the time it happens to your G1 your contract will be over and you can get a cheap hardware upgrade too. Or you can just keep using your current software as you do now as long as it does what you need it to do. Or, you can use custom roms provided by the thriving Android modder community to extend the life of your hardware.
      Ed Burnette