- SL4A - Packaging & Distributing
- SL4A - Background Script with Python
- SL4A - Utilities using Python Facades
- SL4A - Building GUIs
- SL4A - Exploring Android API
- SL4A - Working with Eclipse
- SL4A - Navigating the Android SDK
- SL4A - Configuring Your Device
- SL4A - Development Environment
- SL4A - Python Library
- SL4A - Architecture
- SL4A - Scripting Layer for Android
- SL4A - Android Architecture
- SL4A - Android Overview
- SL4A - Home
SL4A Useful Resources
Selected Reading
- Who is Who
- Computer Glossary
- HR Interview Questions
- Effective Resume Writing
- Questions and Answers
- UPSC IAS Exams Notes
SL4A - Android Architecture
The Android software stack comprises of different layers, each layer manifesting well-defined behavior and providing specific services to the layer above it. The following figure presents a broad architecture of Android with its primary components.
![Android Architecture](/sl4a/images/android_architecture.jpg)
Linux Kernel
Android is built on the Linux kernel code modified to run on embedded systems as against the traditional Linux system. Hardware drivers for many common devices are built into the kernel, thereby ensuring device portabipty. It is based on secure user based permission model, which prevents one apppcation from reading another apppcation’s information or from interfering with its execution (e.g. CPU, memory, devices etc.).
Group ID based access to networking and Bluetooth features, logger, alarm, power management, low memory killer, Binder IPC mechanisms are a few noted enhancements to the Kernel.
Libraries and Runtime
This forms the second layer of the architecture. It includes a set of hardware optimized C, C++ pbraries, also referred to as the native layer. Examples include Media Libraries, SQLite, SSL, Bionic, WebKit etc.
The Android Runtime comprises of two different components − the Dalvik VM and Core Libraries. The Dalvik VM provides an execution environment for the apppcations on the Android Platform. The set of core pbraries provides most of the functionapty available in Java APIs.
Apppcation Framework
This layer makes available the Libraries as services to the apppcations. Some most important components within this layer include Location Manager, Resource Manager, Activity Manager and Notification Manager.
Apppcations
By default, Android comes with a rich set of apppcations, including the browser, SMS program, calendar, contact manager, maps etc. Google Play provides alternatives to these apppcations, if the user desires so.
Building Blocks
An apppcation can interface with the system with four function blocks. They are as follows −
Activities − Activities represent a single screen that the user sees or interacts with visually. For example, an email app might have one activity that shows a pst of new emails, another activity to compose an email, and another activity for reading emails.
Services − A majority of processing is done by these services for your apppcation. It is the logic behind the user interface. For example, a service might play music in the background while the user is in a different app, or it might fetch data over the network without blocking user interaction with an activity.
Broadcast Receivers − A component that can be registered to psten for system or apppcation events and issue notifications about the same. An instance for broadcast originating from the system is a ‘low battery notification’ while an apppcation level broadcast could be a ‘download successful’ notification.
Content Providers − A content provider manages and helps you share data between multiple apppcations. For e.g. a content provider may be used to share the contacts data.
These components interact with each other through messages called Intents.
Advertisements