Upload
praveenpv7
View
219
Download
0
Embed Size (px)
Citation preview
7/30/2019 Android Sandwich Seminar 1201
1/7
Android Framework
The following diagram shows the major components of the Android operating system:
Applications
Android will ship with a set of core applications including an email client, SMS
program, calendar, maps, browser, contacts, Wi-Fi and others. All applications are
written using the Java programming language.
7/30/2019 Android Sandwich Seminar 1201
2/7
Application Framework
By providing an open development platform, Android offers developers the ability
to build extremely rich and innovative applications. Developers are free to take
advantage of the device hardware, access location information, run background
services, set alarms, add notifications to the status bar, and much, much more.The
application architecture is designed to simplify the reuse of components; any
application can publish its capabilities and any other application may then make
use of those capabilities.
Underlying all applications is a set of services and systems, including:
A rich and extensible set of Views that can be used to build an application,including lists, grids, text boxes, buttons, and even an embeddable web
browser
Content Providers: Enables applications to access data from otherapplications (such as Contacts), or to share their own data. Content providers
manage access to a structured set of data. They encapsulate the data, and
provide mechanisms for defining data security. Content providers are the
standard interface that connects data in one process with code running in
another process.Android itself includes content providers that manage data
such as audio, video, images, and personal contact information.
Resource Manager: Provides access to non-code resources such as localized
strings, graphics, and layout files. Externalizing your resources also allowsyou to provide alternative resources thatsupport specific device
configurations such as different languages or screen sizes, which becomes
increasingly important as more Android-powered devicesbecome available
with different configurations. In order to providecompatibility with
7/30/2019 Android Sandwich Seminar 1201
3/7
different configurations, you must organize resources in your project's res/
directory, using various sub-directories that group resources by type and
configuration.
Notification Manager:It enables all applications to display custom alerts inthe status bar. Notifications can take different forms:
A persistent icon that goes in the status bar and is accessible through thelauncher, (when the user selects it, a designated Intent can be launched),
Turning on or flashing LEDs on the device, or Alerting the user by flashing the backlight, playing a sound, or vibrating. An Activity Manager that manages the lifecycle of applications and provides
a common navigation backstack.
Activities in the system are managed as an activity stack. When a new
activity is started, it is placed on the top of the stack and becomes the running
activity -- the previous activity always remains below it in the stack, and will not
come to the foreground again until the new activity exits.
An activity has essentially four states:
If an activity in the foreground of the screen (at the top of the stack), it isactive or running.
If an activity has lost focus but is still visible (that is, a new non-full-sized ortransparent activity has focus on top of your activity), it ispaused. A paused
activity is completely alive (it maintains all state and member informationand remains attached to the windowmanager), but can be killed by the
system in extreme low memory situations.
7/30/2019 Android Sandwich Seminar 1201
4/7
If an activity is completely obscured by another activity, it is stopped. It stillretains all state and member information, however,it is no longer visible to
the user so its window is hidden and it will often be killed by the system
when memory is needed elsewhere.
If an activity is paused or stopped, the system can drop the activity frommemory by either asking it to finish, or simply killing its process. When it is
displayed again to the user, it must be completely restarted and restored to
its previous state.
7/30/2019 Android Sandwich Seminar 1201
5/7
ACTIVITY LIFE CYCLE
7/30/2019 Android Sandwich Seminar 1201
6/7
Libraries
Android includes a set of C/C++ libraries used by various components of the
Android system.
Some of the core libraries are listed below:
System C libraryo A BSD-derived implementation of the standard C system library
(libc), tuned for embedded Linux-based devices
Media Librarieso Based on Packet Videos Open CORE; the libraries support playback
and recording of many popular audio and video formats, as well as
static image files, including MPEG4, H.264, MP3, AAC, AMR, JPG,
and PNG
Surface Managero Manages access to the display subsystem and seamlessly composites
2D and 3D graphic layers from multiple applications
LibWebCoreo A modern web browser engine which powers both the Android
browser and an embeddable web view
SGL - the underlying 2D graphics engine 3D libraries -
o An implementation based on OpenGL ES 1.0 APIs; thelibraries use either hardware 3D acceleration (where
available) or the included, highly optimized 3D software
rasterizer
7/30/2019 Android Sandwich Seminar 1201
7/7
FreeType - bitmap and vector font rendering SQLite
o A powerful and lightweight relational database engineavailable to all applications.
Android Runtime
Android includes a set of core libraries that provides most of the functionality
available in the core libraries of the Java programming language.
Every Android application runs in its own process, with its own instance of the
Dalvik virtual machine. Dalvik has been written so that a device can run multiple
VMs efficiently. The Dalvik VM executes files in the Dalvik Executable (.dex)
format which is optimized for minimal memory footprint. The VM is register-
based, and runs classes compiled by a Java language compiler that have been
transformed into the .dex format by the included "dx" tool.
The Dalvik VM relies on the Linux kernel for underlying functionality such as
threading and low-level memory management.
Linux Kernel
Android relies on Linux version 2.6 for core system services such as security,
memory management, process management, network stack, and driver model. The
kernel also acts as an abstraction layer between the hardware and the rest of the
software stack.