November 26, 2014

Android 2.2: A Developer's Perspective

So, Android 2.2 is upon us. While there is no hardware running it (yet), we do have the new SDK, NDK, development tools, and all sorts of good stuff. So, the question is, what’s this all mean?

In many ways, Android developers with existing apps will not have much, if anything, to do to get their apps to work on Android 2.2. The only true “change” I have seen to the core is that fill_parent is now known as match_parent, though the older value will still be supported in a deprecated fashion. I see nothing that absolutely requires serious app overhauls, the way that multiple screen sizes or the revamped contacts API did. You might want to switch to the newer managed dialog methods, for example, but (AFAICT) your app will not immediately break by using the older methods.

Rather, most of the programming improvements are all new things you can take advantage of, but are not really forced upon you. If you want to advise Android regarding your app’s interest in being moved to the SD card, there’s a manifest entry to add. If you want to take advantage of the Cloud-to-Device Messaging API, there’s an add-on for that (in limited access beta for now). Optional APIs were added for application data backup, custom speech recognizers, camera zoom levels, device policy management, and so on — all of which you can use or ignore at your discretion.

Some of the benefits will come outside the realm of programming. If you do not have your own top-level exception handler tied to Flurry, DroidDrop, or similar services, you can leverage the crash report capability built into the Android Market. Update-all and auto-update of apps on the Market will accelerate deployment of newer versions of your apps. And everybody will relish the speed you get from the new JIT-enabled Dalvik VM and the V8 Javascript engine.

So, on the surface, it appears that Android 2.2 is goodness with few downsides. Of course, with the SDK only being available for ~36 hours, we may yet run into major regressions or other calamities. But Froyo went how I would expect Gingerbread and future releases to go — the core remains largely unchanged, new APIs are added you can optionally leverage, and lots of stuff gets added around and outside of app development.



  • Julius

    Perhaps a little off topic – do you tend to build a version of your app for each version of the OS? Or a one size fits all?

  • Acer_Liquid

    Can you comment on how easy or hard it is for manufacturers to release updates to 2.2 compared to what they had to do for the 1.6 -> 2.1 upgrade? Rumor is that it should be easier this time around.

  • http://mylockandroid.blogspot.com myLock

    Nope, 2.2 appears to have broken my app. The change doesn't appear to be documented, but I can no longer use a translucent or transparent window in conjunction with FLAG_DISMISS_KEYGUARD to clear/replace the lockscreen. Prior to 2.2 only FLAG_SHOW_WHEN_LOCKED was getting blocked while translucent, I assumed that was done since its allowed to be used on top of even the secure pattern lockscreen

  • http://profile.yahoo.com/K2B5OEMGQV37CKMJ265AWMH3FM Jodie

    superdry sale Wake up and smile.
    coach factory outlet Will enjoy life.
    nike high heels Without you I was lonely.
    coach outlet online ternal is still
    air max tn Every minute, every second, every hour, every day.
    coach outlet store This is the future I want.