Google Android 3.0 Honeycomb includes a new framework called Fragments, which allows developers to write apps with components that look different on different devices or even in different views. For instance, you could have an email app that shows only a list of messages in portrait mode, but when you tilt your tablet sideways the app can use the extra screen real estate to show a message list on the left and the body of an email message on the right.
One nifty thing about Fragments is that since they allow developers to slice up apps into little components, they’re not just useful for tablets. You can code an app to run on a large-screen tablet, and make sure it works on a smartphone with a 3 to 4 inch display without any major modifications.
But that doesn’t do much good if you want to code apps that run not only on new devices running Android 3.0 and up, but also want to make sure that your apps can run on the millions of phones already in the market that run Android 1.6 through 2.3.
This week Google released a new Fragments API which works with Android 1.6. That means developers can use the APIs to make sure that their apps which use Fragments can run on virtually any Android device available today. Developers can download the new library by looking for the package called “Android Compatibillity package” in the SDK Updater tool. The rest of us can just sit back and hope that this means we’ll start to see some Honeycomb apps ported to earlier versions of Android soon.