Android 5, or Lollipop, represents the most revolutionary upgrade to the Android operating system to date. It introduces many exciting, new features for users, plus a host of new APIs and access to cutting edge technologies for developers. The most significant, and obvious, changes have to be the new Material Design UI and the ability to deploy Lollipop on wearables, TVs, and in our cars.
It’s not a bad idea to have a quick look at how Android 5 appears to the user, before exploring what it means for us as developers.
Lollipop from a user’s perspective
The first thing any Android 5 user will will be aware of, other than the expanded and improved notifications bar and a more functional lock screen, is the new visual language-Material Design. They will notice how almost everything they touch or interact with responds with an animation. These simple onscreen behaviors are intended to provide the user with a clear, and intuitive, visual feedback. Another interesting change is the new Overview feature which replaces Recent apps, allowing individual documents and entire apps to be available.
Perhaps the most interesting departure, from the user’s point of view, that Lollipop makes from previous versions is how they will now encounter it on their television sets, in their cars, and on wearable devices, such as watches and glasses. Those with these wearables will undoubtedly want these apps that take advantage of the two new sensors that Lollipop introduces, such as the heart rate and tilt sensors.
Lollipop from a developer’s perspective
From a developer’s point of view, Android 5 provides far more exciting prospects than a prettier UI, improved battery life, and a better lock screen. For us, with over 5,000 new APIs, a whole new design language and dozens of new features and technologies, Android 5 gives us the most powerful set of tools yet. Not only is Android now more powerful, it is also easier to program than before. With a truly helpful IDE, and APIs that are designed for ease of use, developing an app has never been simpler or less daunting. If you want to turn your ideas into a reality, then Android 5 is the way. It is truer now than it has ever been that we are limited only by the power of our imagination.
The Material Design UI paradigm is far more than an attractive and easier to understand interface. It is a serious design language, with some important points to make about how we interact with our devices. Inspired by ideas of how materials of the future might behave, such material can be thought of as a dynamic and responsive piece of paper, which can move, change shape and size, split apart, join together, and exist in three dimensions. It is this added dimension, with real-time, programmable shadows that gives Material Design its sense of depth. The way content is displayed on material is also dynamic and Google suggests that we think of it as “smart ink”. There a few design rules that need to be considered when building apps using Material Design, and we will cover these when we return to the subject in later chapters. From a practical point of view, the SDK provides us with two versions of material theme (light and dark) and two widgets:
CardView for simple content and
RecyclerView for lists. We can also define and customize the shadows, animations, and drawables our apps use.
One of the most exciting opportunities that Lollipop offers us as developers is the ability to create apps for devices other than phones and tablets. Android 5 makes it possible to write apps for screens as small as wrist watches or as large as home cinemas, including anything in between.
Android 5 makes coding for TV sets very similar to coding for handsets. The major differences are size, viewing distances and the way that the TV apps are generally navigated with a remote control and D-pad. The Android 5 SDK comes equipped with purpose-built themes and layouts, which make it simple for us to deploy an app built for a tablet, onto a TV, or vice versa.
When it comes to designing apps for wearables, issues such as power consumption and restricted screen size become some of the more important deciding factors. For this reason, Android 5 imposes a strict time-out policy on wearable apps. As all Android wearable apps need to be installed on a handset first, we have the opportunity to present the content on either the wearable or the parent device. Despite these restrictions, and the fact that not all features are available on wearables (such as web browsing), the addition of an API for the new heart-rate sensor, provides the developers interested in creating health and fitness based apps with new and exciting opportunities.
Android in our cars offers another new field introduced by Lollipop. The emphasis here rests entirely on safety: only messaging and audio features are allowed to run on in-car apps. This means that when developing apps for cars, we need to take into account which features will be disabled for safety reasons