0% found this document useful (0 votes)
18 views3 pages

9 - An Overview of The Android Architecture

The document provides an overview of the Android architecture, detailing its software stack which includes applications, a Linux kernel, Android Runtime (ART), libraries, and an application framework. It explains how Android applications are primarily written in Java or Kotlin, compiled into bytecode, and then translated to native instructions for execution. The architecture emphasizes performance, efficiency, and the reuse of application components.

Uploaded by

omarimamdev
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views3 pages

9 - An Overview of The Android Architecture

The document provides an overview of the Android architecture, detailing its software stack which includes applications, a Linux kernel, Android Runtime (ART), libraries, and an application framework. It explains how Android applications are primarily written in Java or Kotlin, compiled into bytecode, and then translated to native instructions for execution. The architecture emphasizes performance, efficiency, and the reuse of application components.

Uploaded by

omarimamdev
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

9 - An Overview of the Android Architecture

9.1 The Android Software Stack


Android is structured in the form of a software stack comprising applications, an operating system, runtime
environment, middle-ware, services and libraries.
![[attachments/CleanShot Nitro PDF Pro-Android Studio Flamingo Essentials - Java - Neil Smyth.pdf (Page
102 of 817)-2023-08-11 at [email protected]|600]]
9.2 The Linux Kernel
At the bottom of the #Android software stack, The #LinuxKernel provides a level of abstraction between the
device hardware and the upper layers of the #Android software stack. Based on Linux version 2.6, the kernel
provides preemptive multitasking, low-level core system services such as memory, process and power
management in addition to providing a network stack and device drivers for hardware such as the device
display, WiFi and audio.
#Android only uses the #LinuxKernel, which was originally developed for use in traditional computers in the
form of desktops and servers.
9.3 Android Runtime - ART
When an #Android app is built with #AndroidStudio, it is compiled into an intermediate #bytecode format
(referred to as #DEX format). When the app is subsequently loaded onto the device, the #AndroidRuntime
(#ART) uses a process referred to as #Ahead-of-Time ( #AOT ) compilation to translate the bytecode down
to the native instructions required by the device processor. This format is known as
#ExecutableandLinkableFormat ( #ELF).
Each time the application is subsequently launched, the ELF executable version is run, resulting in faster
application performance and improved battery life.
This contrasts with #Just-in-Time ( #JIT) compilation used in older Android implementations whereby the
bytecode was translated within a Virtual Machine each time the application was launched.
9.4 Android Libraries
In addition to a set of standard #Java development libraries, the #Android development environment also
includes the #AndroidLibraries. These are a set of Java-based libraries that are specific to Android
development.
A summary of some key core Android libraries available to the Android developer:
1. **android.app** - provides access to the application model and is the cornerstone of all
Android applications
2. **android.content** - facilitates content access, publishing and messaging between
applications and application components
3. **android.database** - used to access data published by content providers and includes
SQLite database management classes
4. **android.graphics** - a low-level 2-D graphics drawing API including colors, points, filters,
rectangles and canvases
5. **android.hardware** - presents an API providing access to hardware such as the
accelerometer and light sensor
6. **android.opengl** - a java interface to OpenGL ES 3D graphics rendering API
7. **android.os** - provides applications with access to standard operating system services
including messages, system services and inter-process communication
8. **android.media** - provides classes to enable playback of audio and video
9. **android.net** - the network stack. Includes android.net.wifi, which provides access to the
device's wireless stack
10. **android.print** - includes a set of classes that enable content to be sent to configured
printers from within Android applications
11. **android.provider** - a set of convenience classes that provide access to standard Android
content provider databases such as those maintained by the calendar and contact applications
12. **android.text** - used to render and manipulate text on a device display
13. **android.util** - a set of utility classes for performing tasks such as string and number
conversion, XML handling and date and time manipulation
14. **android.view** - the fundamental building blocks of application user interfaces
15. **android.widget** - a rich collection of pre-built user interface components such as buttons,
labels, list views, layout managers, radio buttons, etc.
16. **android.webkit** - a set of classes intended to allow web-browsing capabilities to be built
into applications
9.4.1 C/C++ Libraries
The #Android runtime core libraries outlined in the previous section are Java-based and provide the primary
APIs for developers writing Android applications. It is important to not that the core libraries are, in fact,
essentially Java "wrappers" around a set of C/C++ based libraries. When making calls, for example, to the
android.opengl library to draw 3D graphics on the device display, the library actually ultimately makes calls
to the OpenGL ES C++ library which, in turn, works with the underlying Linux kernel to perform the drawing
tasks.
C/C++ libraries are included to fulfill a wide and diverse range of functions including 2D and 3D graphics
drawing, SSL communication, SQLite database management, audio and video playback, bitmap and vector
font rendering, display subsystem and graphic layer management and an implementation of the standard #C
system library ( #libc).
In practice, we access these libraries solely through the Java-based Android core library APIs. If direct
access to these libraries is needed, one can use the Android Native Development Kit (NDK), to call the
native methods of non-Java or Kotlin programming languages from within #Java code using
#JavaNativeInterface
9.5 Application Framework
The application framework is a set of services that collectively form the environment in which Android
applications run and are managed. This framework implements the concept that Android applications are
constructed from reusable, interchangeable and replaceable components. This concept is taken a step
further in that an application is also able to publish its capabilities along with any corresponding data so that
they can be found and reused by other applications.
The Android framework includes the following key services:
Activity Manager - controls all aspects of the application lifecycle and activity stack
Content Providers - allows application to publish and share data with other applications
Resource Manager - provides access to non-code embedded resources such as strings, color
settings and user interface layouts
Notifications Manager - allows application to display alerts and notifications to the user
View System - an extensible set of views used to create application user interfaces
Package Manager - the system by which applications are able to find out information about other
applications currently installed on the device
Telephony Manager - provides information to the application about the telephony services
available on the device such as status and subscriber information
Location Manager - provides access to the location services allowing an application to receive
updates about location changes
9.6 Applications
Located at the top of the Android software stack are the applications. These comprise both the native apps
provided with the particular Android implementation (for example web browser and email applications) and
the third party apps installed by the user after purchase.
9.7 Summary
A good Android development knowledge foundation requires an understanding of the overall architecture of
Android. Android is implemented in the form of a software stack architecture consisting of a Linux kernel,
a runtime environment and corresponding libraries, an application framework and a set of applications.
Applications are predominantly written in Java or Kotlin and compiled down to bytecode format within the
Android Studio build environment. When the application is subsequently installed on a device, this bytecode
is compiled down by the Android Runtime (ART) to the native format used by the CPU. The key goals of the
Android architecture are performance and efficiency, both in application execution and in the
implementation
of reuse in application design.

You might also like