06AndroidDev

Android devices continue to grow in popularity within the smartphone and tablet markets, and the demand for good applications on the platform is ever increasing. For those of you who may be curious about what it takes to develop an application for Android, let us take a look together at the key concepts you will need to know in order to get started.

Android is a free and open-source mobile platform that is currently shepherded and maintained by Google. What I mean by free is that anyone who wishes to use the core Android platform for their own hardware can freely obtain the source code and modify it for their specific device without needing to obtain any licensure from Google or pay a royalty. Android is also open-sourced under the Apache 2.0 license, which means that anyone may freely modify the Android code and distribute their modified version without being required to submit their modifications back to the platform, or in any way make those addition open source as well.

Because of these two elements, device manufacturers have been very receptive to using Android in their products. They are drawn in by the fact that they can customize the system to create differentiation, while still delivering a product that is part of a common platform for developers; and all this without any license fees from Google.

Android “Applications”
Android is somewhat unique in the way its applications are constructed. Unlike many popular mobile platforms, Android doesn’t clearly define a singular application concept. Instead, Android classifies an “application” as a loosely grouped-together package of screens that interact with the user (each known as an Activity) and background operations (known as Services).

Developers will find that the framework included in the Android software stack does not provide a global set of events to assist them in determining when a user launches or leaves their application as a whole. Instead, Android’s primary focus is on the user moving from one Activity to another, regardless of whether those two Activities were within the same application. With this model comes the ability to seamlessly launch portions of other applications from within your own, even if those applications were not bundled with the system.
#!
Services are the other main component of an Android application, designed to represent any operation an application may need to do in the background without direct user interaction. Services are a very important part of what makes Android such a powerful platform. They allow a developer to create portions of an application to execute for as long as necessary at any time, even when that application is not in the foreground. However, since Android does not provide hard-limits Service execution, it is up to developers to make sure they are being good citizens and not destroying the user’s battery in exchange for executing in the background.

System events: Android uses a mechanism known as Broadcasts to notify applications of system events. If an application needs to know when a device has finished booting, when the screen turns on and off, or about status changes in the network or battery, it can register to receive these broadcasts that the system generates when these events occur. The Broadcast system is also quite extensible; any application can generate a Broadcast. In this way, developers can create a powerful event-notification system within their own apps using Broadcasts.

About David Smith