Android Architecture
Android Architecture
The foundation of the Android platform is the Linux kernel. For example, the
Android Runtime (ART) relies on the Linux kernel for underlying
functionalities such as threading and low-level memory management.
Android Runtime
For devices running Android version 5.0 (API level 21) or higher, each app
runs in its own process and with its own instance of the Android Runtime
(ART). ART is written to run multiple virtual machines on low-memory
devices by executing DEX files, a bytecode format designed specially for
Android that's optimized for minimal memory footprint. Build toolchains,
such as Jack, compile Java sources into DEX bytecode, which can run on the
Android platform.
Some of the major features of ART include the following:
Prior to Android version 5.0 (API level 21), Dalvik was the Android runtime. If
your app runs well on ART, then it should work on Dalvik as well, but the
reverse may not be true.
Android also includes a set of core runtime libraries that provide most of the
functionality of the Java programming language, including some Java 8
language features, that the Java API framework uses.
Many core Android system components and services, such as ART and HAL,
are built from native code that require native libraries written in C and C++.
The Android platform provides Java framework APIs to expose the
functionality of some of these native libraries to apps. For example, you can
access OpenGL ES through the Android framework’s Java OpenGL API to
add support for drawing and manipulating 2D and 3D graphics in your app.
If you are developing an app that requires C or C++ code, you can use the
Android NDK to access some of these native platform libraries directly from
your native code.
Java API Framework
A rich and extensible View System you can use to build an app’s UI,
including lists, grids, text boxes, buttons, and even an embeddable web
browser
Content Providers that enable apps to access data from other apps,
such as the Contacts app, or to share their own data
Developers have full access to the same framework APIs that Android
system apps use.
System Apps
Android comes with a set of core apps for email, SMS messaging, calendars,
internet browsing, contacts, and more. Apps included with the platform
have no special status among the apps the user chooses to install. So a
third-party app can become the user's default web browser, SMS messenger,
or even the default keyboard (some exceptions apply, such as the system's
Settings app).
The system apps function both as apps for users and to provide key
capabilities that developers can access from their own app. For example, if
your app would like to deliver an SMS message, you don't need to build that
functionality yourself—you can instead invoke whichever SMS app is already
installed to deliver a message to the recipient you specify.