When Android was young in 2008, every developer working on an application for the platform was taking a huge risk. But for some early adopters, that risk yielded massive rewards. Today, there are more than 1 billion active Android users worldwide, and building applications for this blockbuster platform is no longer such a great risk.
Chet Haase, Android UI Toolkit team lead at Google, and Reto Meier, scalable developer advocacy group lead at Google, urged developers in their keynote talk at the Android Developer Conference in San Francisco today to find new ways to take risks in Android.
Said Meier, “Today, of course, the ecosystem is a lot more mature. Finding new ways to increase the risk is key if you want those big returns. You need to invest early in things not everyone has gotten on board with.”
To that end, the pair detailed the new APIs and capabilities in Android 5.0 Lollipop, which was released earlier this month. Chief among those APIs is the new Android Materials API.
The Materials API is actually an umbrella for an entirely redesigned UI for Android. Using it, developers can add drop shadows to UI elements, use wipes to transition between screens, and add animations to objects on screen.
“For the most part,” said Haase, “you do not have to do that much to create a basic Material Design application. If you opt into the theme, you get a lot of it for free. We’ve implemented it for the standard widget set. If you want to go beyond that, go for it, but don’t be overwhelmed by the APIs: It’s standard Android programming.”
Haase said that opting into Materials means getting drop shadows, touch-reactive ripples on screen, and new animation capabilities ranging from curve-based movement of objects on screens to support of scalable vector graphics icons.
Another area where Lollipop will be noticeably different for developers and users is in the lock screen, where notifications will now appear. The goal is to allow users to quickly see why their phone rang or vibrated. Haase said that this change did not come without new security controls to keep information private.
“An important aspect of this is privacy: If you’re an enterprise, you don’t want message headers displayed on the lock screen. There are two ways for users to react to that. On the developer side, you have spheres of visibility. There is private info that you can only log in to see. In between, maybe for corporate e-mail, it’s OK to let people know that Chet has received that e-mail, but not the message header. Finally, there’s a completely secret category. The user side also has a way, through settings, to change what they want,” he said.
Another major change in Lollipop is the change from Dalvik to ART, the Android Runtime. “In Lollipop, it’s the default and the only option. It’s the runtime for everybody,” said Haase. “Dalvik no longer exists. This is a good thing. It’s more performant; it has fewer and faster garbage collection pauses. We have a separate heap for large objects like bitmaps. Before, if garbage collection needed to make space, it would walk the entire heap looking for space, and large objects fragmented the space. You’d get pause times of 15 to 20 milliseconds. With ART, now we have a separate allocation area for large bitmaps, which makes it faster to allocate for large or small objects. It’s now a moving collector; when your application goes into the background, it can defragment the heap, which was never possible in Dalvik.”
Haase and Meier went on to advocate for wearable devices and the new Google TV device for development. Meier said that these are the platforms where developers can reap the most rewards for investing their time.