Developing for Android: what, where and how

By Rod Crawford |  1 Comment  |  Posted: April 15, 2010
Topics/Categories: Embedded Topics, Embedded - Integration & Debug  |  Tags:

The article provides fundamental guidelines for getting started in developing products and applications based on the Android platform. It reviews the content of the technology, some of the available tools and useful short cuts that have been applied.

The recent Consumer Electronics Show (CES) in Las Vegas showcased a wide variety of Android-based products ranging from smartphones to eReaders. Android looks set to capitalize on its initial design win successes. The open source platform from Google and the Open Handset Alliance (OHA) is already powering some of the world’s top-selling phones, and market analysts forecast that consumer adoption of ‘always on’ connected devices will increase significantly.

As handset manufacturers look to adopt this relatively new mobile operating system, other businesses are considering its open source and business-friendly licensing benefits for a wider range of consumer electronics products—from high-performance netbooks to digital media applications for the home, including set-top boxes and digital TVs.

The Android attraction

Like other open source technologies, the complete Android software stack is free for developers to use. But in another respect, Android is vitally different. The challenge with most open source initiatives is that the development community can pull them in any direction that they like. So, for those adopting open source technology to use in their product development there is usually a price to pay—either to refine and support the code in-house, or to buy a commercially supported implementation of the software.

Google avoids this scenario by working with the OHA—a group of technology and mobile companies that have come together to accelerate innovation—to set the roadmap for Android and invest in its long-term future. Its involvement reassures device manufacturers about Android’s longevity, and allows it to continue influencing its direction. It is this community influence that will ensure that Android remains a platform for new product development that is innovative and, by offering upgradeability and code compatibility, future-proofs designs. For those willing to take a pragmatic view of open source rather than a purist one, Android offers the best of both worlds.

Developing products with Android

Before Android came along, product OEMs would either buy an off-the-shelf software stack from a commercial vendor, or build their own using in-house resources. Those adopting Android have similar ‘make or buy’ choices open to them.

There are two distinct development phases. The first phase is to bring Android up and running on the chosen hardware platform. The second phase is to supplement it with application software for the target market.

There is a broad range of off-the-shelf development platforms available for Android today. Using one of these has dual benefits. First, it provides a ready-to-use reference design, which helps hardware developers quickly derive their own specialized Android-compatible platform. Second, it allows the software team to very quickly create, port and test new software using reference designs, while the hardware team works in parallel on the final device platform.

Developers have a growing choice of evaluation and development boards from third-party suppliers, including the low-cost BeagleBoard, a multi-media reference platform from ZiiLabs for developing multi-format HD applications (Figure 1), netbook reference boards from Pegatron, and other boards for specialist gaming applications.

Figure 1
Ziilabs offers Android reference platforms
Source: Ziilabs

Silicon vendors and ODMs wishing to develop reference platforms running Android can work with companies like Viosoft to create custom porting kits that enable the rapid deployment of Android on hardware reference platforms from these vendors. A custom Viosoft toolchain can automatically synchronize an OEM’s software porting team with the latest Android patches from silicon vendors and ODMs’ reference designs. This enables them to keep a reference design in step with the latest versions of the Android platform.

Choosing a toolchain

Like many software development projects, those targeting Android have a choice between downloading open source tools and getting the support they need from the development community, or buying (arguably) more technically advanced commercial tools and having the luxury of a support hotline to call. Some choose to use open source tools and supplement them with commercial offerings in key areas. For example, some commercial debuggers offer more sophisticated debug environments than the standard GNU debugger (gnu.org), allowing users to debug hybrid applications that consist of both Java and C++, or to profile Android applications.

Some third-party vendors even facilitate new support channels that can open up business models to developers. Those who want to create application-specific Android platforms as reference designs for others to develop (one example could be a media player) can do so and automate the process of rolling out software updates. Viosoft offers support processes for the Android platform that provide automated software updates for products based on that platform.

The latest releases of Android running on the ARM architecture allow developers to use the Native Development Kit (NDK) to port existing applications and carry out development in C and C++. This can be a big attraction for teams that have significant amounts of legacy C/C++ code already running on Linux, because they do not have to go to the trouble of re-writing it in the Java programming language for Android.

Using the NDK optimizes the code implementation for the specific hardware. The NDK allows developers to take advantage of advanced features in the processor platform, such as SIMD processing to accelerate media processing performance. Clearly, the language of choice for those developing new applications that do not directly require access to a platform’s hardware accelerators is Java, because it provides a richer, more abstract software platform that hides incompatibilities between different hardware platforms on which Android is deployed.

Other vendors addressing the market for Android are helping to adapt the technology for use in products other than handsets. ThunderSoft is a good example. With standard Android running on a handset, each time the user switches applications, the OS saves one application so that the other can occupy the entire display. ThunderSoft has adapted the handset-targeted user interface to allow it to be multi-windowed for devices like netbooks or digital TVs, which have larger displays and allow users to see more than one application running at a time (Figure 2).

Figure 2
ThunderSoft has developed a multi-window version of Android
Source: ThunderSoft

Managing larger displays is not the only challenge for those who aim to use Android for TV applications. Businesses with a track record in TVs have invested in complex applications software that was not originally intended to run on Android. Mentor Graphics is offering a service to combine its own graphics IP and customers’ existing DTV applications with the Android platform.

Quality drives the ecosystem

Software complexity has gone up exponentially in the last decade or so, and it is increasingly difficult for one company to develop absolutely everything in house and achieve a timely product launch. With Android, Google and the open source community are doing a lot of the heavy lifting by providing a roadmap and access to free code for the software stack. That is why the open source model—and Android in particular—is so attractive. At the same time, software has become more important than ever as a way for semiconductor companies to offer differentiated silicon solutions.

Manufacturers of embedded devices need a support infrastructure that enables them to develop cutting-edge devices quickly and affordably. Access to open source code alone is not enough to meet that goal. Fortunately, the Android ecosystem—a marketplace for technology, products and services that supports all phases of the Android development process—is thriving.

Teams who want to take the open source stack and do as much as they can in-house, can do so using open source development tools. There are also plenty of choices available to those who want to buy fully supported turnkey solutions.

By making it easier to access software and development systems, Android and its ecosystem create a level playing field for new entrants to compete with established OEMs, which helps to drive innovation in the industry. The ecosystem does more than provide solutions; it helps to drive the whole marketplace for Android-based solutions.

Creating the conditions for an effective, high-quality ecosystem takes much more than just listing partners on a website. Getting the best out of development tools, software and other open technologies requires a significant investment in optimization of the associated technologies with the processor architectures for current and future performance needs. Long-term investment in Android software optimizations yields cumulative performance improvements for key Android technologies like the Skia graphics engine and Dalvik Virtual Machine. This kind of research and development effort is central to attracting high-quality partners to a rich, Android-centric ecosystem where everyone benefits.

One Response to Developing for Android: what, where and how

  1. Pingback: 10 Reasons Why Developers Choose Android Over iOS

PLATINUM SPONSORS

Synopsys Cadence Design Systems Mentor - A Siemens Business
View All Sponsors