Android is an operating system based on Linux with a Java programming interface. It provides tools, e.g. a compiler, debugger and a device emulator as well as its own Java Virtual machine (Dalvik Virtual Machine - DVM).
Android is officially guided by the Open Handset Alliance but in reality Google leads the project.
Android supports 2-D and 3-D graphics using the OpenGL libraries and supports data storage in a SQLite database.
Every Android applications runs in its own process and under its own user id which is generated automatically by the Android system during deployment. Therefore the application is isolated from other running applications and a misbehaving application cannot easily harm other Android applications.
An Android application consists out of the following parts:
Activity- represents the presentation layer of an Android application, e.g. a screen which the user sees. An Android application can have several activities and it can be switched between them during runtime of the application.
Views- the User interface of an Activities is built with widget classes which inherit from
android.view.View. The layout of the views is managed by
android.view.ViewGroups. Views often have attributes which can be used to change their appearance and behavior.
Services- perform background tasks without providing an UI. They can notify the user via the notification framework in Android.
ContentProvider- provides data to applications, via a content provider your application can share data with other applications. Android contains a SQLite DB which can serve as data provider
Intents- are asynchronous messages which allow the application to request functionality from other services or activities. An application can call directly a service or activity (explicit intent) or ask the Android system for registered services and applications for an intent (implicit intents). For example the application could ask via an intent for a contact application. Applications register themselves to an intent via an
Intentsare a powerful concept as they allow the creation of loosely coupled applications.
BroadcastReceiver- receives system messages and implicit intents, can be used to react to changed conditions in the system. An application can register as a
BroadcastReceiverfor certain events and can be started if such an event occurs.
Widgets- interactive components primary used on the Android homescreen to display certain data and to allow the user to have quick access the the information
Other Android components are Live Folders and Android Live Wallpapers. Live Folders display data on the homescreen without launching the corresponding application.
Android uses a special virtual machine, e.g. the Dalvik Virtual Machine. Dalvik uses special bytecode. Therefore you cannot run standard Java bytecode on Android. Android provides a tool
dx which allows to convert Java Class files into
dex (Dalvik Executable) files. Android applications are packed into an
.apk (Android Package) file by the program
aapt (Android Asset Packaging Tool) To simplify development Google provides the Android Development Tools (ADT) for Eclipse. The ADT automatically performs the conversion from class to dex files and creates the apk during deployment.
Android defines certain permissions for certain tasks. For example if the application wants to access the Internet it must define in its configuration file that it would like to use the related permission. During the installation of an Android application the user receives a screen in which he needs to confirm the required permissions of the application.