over a half of devices still running the old build. Ice Cream Sandwich will come as a push from Google to end the bane of Android developers existence -- fragmentationAndroid's next version, Ice Cream Sandwich, is around the corner. It is not likely to beat iOS5 to the market, as some had thought, but new devices and support will be available by the end of the year. Yet, the dominant Android version in the wild is still currently Frozen Yogurt with
On the flip side, Honeycomb is running on less than 2% of Android devices. Part of this is the lack of apps capable of running well on Android tablets. Google has been hard at work fixing that. If Google has its way, developers would build for Honeycomb first and use Ice Cream Sandwich to port functionality back to handsets. Below is an overview of how Android plans on fixing the fra
Ice Cream Sandwich allows developers to create apps in multi-plane or single plane layouts for tablets and handsets. There are couple ways to do this, according to Google's Scott Main. For tablet apps that display multiple fragments, developers can use that same activity for handsets yet only show one fragment at a time, swapping when necessary. The second and more complicated, option is to use separate activities to host each fragment on a handset.
The second option includes code that can become relatively complex. Fragments should be developed to" be highly compartmentalized," Main wrote. Noteworthy is to not "manipulate one fragment directly from another and to keep all code that concerns content "in a fragment inside a fragment." To avoid calling one fragment from another, make sure that each fragment has its own callback interface.
Another important aspect of Ice Cream Sandwich will be the ability to help developers navigate different screen sizes. There are Android handsets with screens anywhere between 3 and 5 inches. Tablets are not much better, with Samsung itself in the midst of releasing Galaxy Tabs in seven, 8.9 and 10.1-inch varieties.
The way Android handles this is by using a callback system similar to how developers use minimum version SDKs to state how far into Android's history the app will go back. Yet, instead of setting parameters for Froyo or Gingerbread as the lowest supported system, minimums are set for screen size. Take a look at the code below for a large tablet-optimized app.
Screen fragmentation is always going to be one of the trickier problems with Android. Yet, Ice Cream Sandwich reconciles the problem better than any other version of the platform yet. It brings the fork that Android took when Honeycomb came out and brings it back to parallel courses as opposed to divergent. Like iOS, there will be options available to make an app both handset-optimized and for tablets, and let those apps run effectively. The value of Android tablets will go up tremendously when a majority of developers release apps with tablets in mind.
The way Ice Cream Sandwich is set up, it may actually be better to develop with Honeycomb specifically in mind and then recourse the code back towards handsets by adjusting the way the fragments are handled. Let us know in the comments what you think the best tract for development is.
One thing is clear though, Android developers will have to work out the problems that Ice Cream Sandwich purports to fix for a while before any real functional apps come to market. The ICS SDK is not yet out. Think of Apple and Microsoft, which have both have had iOS 5 beta and Windows Phone Mango available to developers through the summer. If all ICS does is attempt to put an end to screen and version fragmentation (and bring the Honeycomb toolbar to handsets), it will be simple for developers to integrate into existing applications. Sometimes the simplest update is the most powerful.
Yet, Google may need to give more lead-time to developers if it expects any measurable Ice Cream Sandwich adoption by the end of the year. The device manufacturers no doubt have ICS devices ready to come out. That does not mean anything if the ecosystem is not ready to support it.