News Archive (1999-2012) | 2013-current at LinuxGizmos | IoT & Embedded News Portal |    About   

Google preps Honeycomb developers for ‘Ice Cream Sandwich’

Sep 20, 2011 — by LinuxDevices Staff — from the LinuxDevices Archive — views

Google provided some tips to help developers of Android 3.x (“Honeycomb”) tablet applications prepare for its upcoming “Ice Cream Sandwich” (ICS) build. Tips and techniques include how to block Honeycomb apps from being used on small screens, as well as optimizing the apps for ICS handsets by creatively using modular “fragments.”

Google has made no attempt to hush talk of "Ice Cream Sandwich" (ICS), and now has dropped some more hints about the platform. Expected in October, this next build of Android promises to unify elements of the Android 2.x smartphone branch and Android 3.x ("Honeycomb") branch of the platform for tablets.

On Sept. 19, he Android development team paved the way for developers by warning developers what to expect from ICS and how to treat their existing applications going forward. However, Google stopped short of releasing the much-anticipated ICS software developer kit (SDK) to enable developers to begin writing apps.

"Although Honeycomb remains tablets-only, the upcoming Ice Cream Sandwich (ICS) release will support big screens, small screens, and everything in between," wrote Scott Main (pictured), lead technical writer for Android. "This is the way Android will stay from now on: the same version runs on all screen sizes."

Main cautioned that while it is true that some Honeycomb apps were designed to run solely on a large screen, this will no longer be the case with the arrival of ICS. This is because Android apps are forward-compatible. That is, an app developed for Honeycomb is compatible with a device running ICS, which could be a tablet, a phone, or perhaps Android-powered TVs.

Main recommended that developers who have written Honeycomb apps should either prevent installation on smaller screens or "preferably" support smaller screens with the same developer kit. Main then provided instructions for how a developer might prevent their app from being used on phones, whose screens tend to be three to five inches.

Main also recommended that developers who want their Honeycomb app to run on any sized device should update their program to run on smaller screens using a single APK.

"Optimizing for handsets can be tricky if your designs currently use all of a large screen to deliver content," Main noted. "It's worth the effort, though, because Ice Cream Sandwich brings the Honeycomb APIs to handsets and you'll significantly increase the user base for your app. Using a single APK for all devices also simplifies your updating and publishing process and makes it easier for users to identify your app."

To enable Honeycomb tablet apps to run smoothly on handsets, he advised programmers to build their app around Android "fragments," code chunks developers can reuse in different combinations. First announced in January with the preliminary Honeycomb SDK, and further revealed in February, fragments can be used to bridge the gap between single-pane layouts on handsets and multi-pane layouts on tablets.


In Honeycomb and ICS, "activities" can house dual "fragments" on larger tablet screens (right). On handsets (left) they can be split into two sequential activities, each of which houses one of the fragments.

Source: Google

Main explained how alternative layout files can define different combinations of fragments, as well as "keep fragment code modular, simplify action bar management, and let the system handle all the back stack work."

This approach hinges upon the use of another concept called "activities." For example, in the image above, Activity A is the main activity. It uses different layouts to display either one or two fragments at a time, depending on the screen size. On the small handset screen on the left, the layout contains only Fragment A (the list view). On a tablet screen on the right, the layout contains both Fragment A and Fragment B, he noted.

Main also offered some tips on converting Honeycomb's "Action Bar" menu to Android handsets. The image below, for example, shows how only two action items fit on the handset, so the remaining menu items are moved to the traditional menu, and the tabs appear in a separate row. On the tablet, more action items can fit in the action bar, as do the tabs, Main explained.


Items in the Honeycomb action bar (right) may need to be split up on ICS handsets (left)

Source: Google
(Click to enlarge)

Main noted that developers won't be able to test their layouts for smaller screens without a handset running Honeycomb. But the SDK is coming in October, so it won't be long before developers can get their hands on the software package. Accordingly, he warned Android developers not to publish their changes until they can test them on a device or emulator running ICS.

In the meantime, Google is offering a compromise. Developers can test their alternative layouts by using the "land" qualifier for tablets.

The first ICS device is expected to be the Samsung Droid Prime (or Nexus Prime) on Verizon Wireless, slated for a November launch to entice holiday shoppers. However, neither Google nor Samsung nor Verizon will confirm this rumor. The Prime is expected to be Verizon's alternative to offering the Samsung Galaxy S II handset, which is being offered under various names by the other major carriers, starting with Sprint with its recently released Epic 4G Touch.

Clint Boulton is a writer for eWEEK.


This article was originally published on LinuxDevices.com and has been donated to the open source community by QuinStreet Inc. Please visit LinuxToday.com for up-to-date news and articles about Linux and open source.



Comments are closed.