Cupcake: Sweetness comes with some caveats…

Lately everyone has been excited about the new 1.5 SDK update to Android. Codenamed cupcake, this update will bring many desired features to the Android platform. However it seems that this update will cause headaches as well. Google developer Dan Morril warns that “some of you will need to fix some problems in your apps before you can start taking advantage of Android 1.5.”

What does this mean? Wasn’t the SDK supposed to be stable for once after the release of 1.0? Yes. However, if you’ve been a sloppy coder (We all have at one point or the other!) you might want to check out your application if it uses any of the following:

  1. Internal API’s.  If you implemented internal API’s that were present, but undocumented, watch out!  These will likely be broken by 1.5 or higher iterations of the Android software.  While these cute hacks were nifty for getting things like, ahem, Bluetooth, ahem support, they were little more than that: hacks.
  2. Directly manipulating settings.  Did you code an application that silently changed settings on the phone, say the brightness of the screen, or volume of ringer?  Well now you have to launch a screen to allow the user to manually tweak these settings.  More or less a security measure, this creates more transparency in applications.
  3. Your Layout is TOO Big!!!  If you have more than 10 levels or 30 layouts in a row for a screen, you are either programming the Great Wall application, or you have way too many layouts.  Trim it down or your application will crash in 1.5.
  4. Bad hardware assumptions.  Don’t ass|u|me.  Android will run on anything in the future. I mean anything ranging from your grandmother’s flip phone to that toaster you cheapskate bought your friends as a housewarming present (Was I not supposed to mention that?).  Therefore program as such.  Expect your program to be used in EXTREME circumstances. If your application can’t run on a device that looks like this:
    don’t bother.
  5. Incautious Rotations. The new version of Android will rotate based on orientation. Therefore you should prepare your application to rotate anywhere anytime.

Though upgrading might be a pain, know that you do this for future compatibility extending far into the future. If you build your code once right the proper way, you will never have to build it again. Good luck with your 1.5 applications. I look forward to reviewing them, and writing a few of my own.