0% found this document useful (0 votes)
67 views

Android Unit-1

Android is an open source software stack that consists of Java applications running on a Java-based framework and Dalvik virtual machine. The architecture includes a Linux kernel, native libraries, Android runtime (including Dalvik VM and core Java libraries), and applications. Key components of the Android framework include the activity manager, content providers, telephony manager, and location manager. Applications are at the top layer and include both pre-installed apps like the SMS client and apps developed by third parties. The fundamental building blocks of Android apps are activities, services, broadcast receivers, and content providers.
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)
67 views

Android Unit-1

Android is an open source software stack that consists of Java applications running on a Java-based framework and Dalvik virtual machine. The architecture includes a Linux kernel, native libraries, Android runtime (including Dalvik VM and core Java libraries), and applications. Key components of the Android framework include the activity manager, content providers, telephony manager, and location manager. Applications are at the top layer and include both pre-installed apps like the SMS client and apps developed by third parties. The fundamental building blocks of Android apps are activities, services, broadcast receivers, and content providers.
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/ 11

ANDROID INTORDUCTION

Session-1

Introduction to Android

RENAISSANCE SOFTLABS ANDINTRO 001


ANDROID INTORDUCTION
Contents

1. Introduction to Android ............................................................................................... 3


1.1 OS v/s Software stacks: ............................................................................................ 3
1.2 Architecture: ............................................................................................................ 4
Android Architecture Diagram: ...................................................................................... 4
1.2.1 Linux Kernel ........................................................................................................... 5
1.2.2 Libraries................................................................................................................. 5
1.2.3 Some of the important native libraries include the following: ............................... 5
1.2.3.1 Surface Manager:............................................................................................. 5
1.2.4 OpenGL: ..................................................................... Error! Bookmark not defined.
1.3 Android Runtime ...................................................................................................... 5
1.3.1 Dalvik Virtual Machine .......................................................................................... 6
1.3.1.1 CoreJavaLibraries ............................................................................................. 6
1.3.2 Important blocks of Application framework are: ................................................... 6
1.4 Applications.............................................................................................................. 7
2. Building blocks of Android: .......................................................................................... 8
3. Android API levels(versions & version names) ........................................................... 10

RENAISSANCE SOFTLABS ANDINTRO 002


ANDROID INTORDUCTION
1. Introduction to Android
Android is a software stack developed by Google and is based on Linux OS. Android consists
of java applications running on a Java based object oriented application framework on top
of java core libraries running on a Dalvik Virtual Machine.

1.1 OS v/s Software stacks:


The OS is the core kernel of the system, and the software stack is the software sitting on
top of the kernel which enhances and expands the functionality of the system.

In Linux, the kernel is the OS. The software stack sitting on top of the kernel can include
things like:

 window manager
 Applications for managing the system

So things like a control panel application to edit system settings aren't part of the operating
system. They're part of the software stack on top of the operating system.

Android is currently primarily developed by Google. Android allows background processing,


provides a rich user interface library, supports 2-D and 3-D graphics using the OpenGL
libraries, access to the file system and provides an embedded SQLite database. Android
applications consist of different components and can re-use components of other
applications. This leads to the concept of a task in Android; an application can re-use other
Android components to archive a task. For example you can trigger from your application
another application which has itself registered with the Android system to handle photos.
In this other application you select a photo and return to your application to use the
selected photo.

RENAISSANCE SOFTLABS ANDINTRO 003


ANDROID INTORDUCTION
1.2 Architecture:
Being an Android user you may know how the basic functions such as making a call, sending
a text message, changing the system settings, install or uninstall apps etc. Well! All Android
users know these, but not enough for a developer. Then what else details are a developer
required to know about Android, I’ll explain. To be a developer, you should know all the key
concepts of Android. That is, you should know all the nuts and bolts of Android OS.

Here we start:

Android Architecture Diagram:

The above figure shows the diagram of Android Architecture. The Android OS can be
referred to as a software stack of different layers, where each layer is a group of
several program components. Together it includes operating system, middleware and
important applications. Each layer in the architecture provides different services to the
layer just above it. We will examine the features of each layer in detail.
RENAISSANCE SOFTLABS ANDINTRO 004
ANDROID INTORDUCTION
1.2.1 Linux Kernel
The basic layer is the Linux kernel. The whole Android OS is built on top of the Linux 2.6
Kernel with some further architectural changes made by Google. It is this Linux that
interacts with the hardware and contains all the essential hardware drivers. Drivers are
programs that control and communicate with the hardware. For example, consider the
Bluetooth function. All devices have Bluetooth hardware in it. Therefore the kernel must
include a Bluetooth driver to communicate with the Bluetooth hardware. The Linux kernel
also acts as an abstraction layer between the hardware and other software layers. Android
uses the Linux for all its core functionality such as Memory management, process
management, networking, security settings etc. As the Android is built on a most popular
and proven foundation, it made the porting of Android to variety of hardware, a relatively
painless task.

1.2.2 Libraries
The next layer is the Android’s native libraries. It is this layer that enables the device to
handle different types of data. These libraries are written in c or c++ language and are
specific for a particular hardware.

1.2.3 Some of the important native libraries include the following:


1.2.3.1 Surface Manager:
It is used for compositing window manager with off-screen buffering. Off-screen buffering
means you can’t directly draw into the screen, but your drawings go to the off-screen
buffer. There it is combined with other drawings and form the final screen the user will see.
This off screen buffer is the reason behind the transparency of windows.

1.2.3.2 Media framework:


Media framework provides different media codecs allowing the recording and playback of
different media formats

1.2.3.3 SQLite:
SQLite is the database engine used in android for data storage purposes

1.2.3.4 WebKit:
It is the browser engine used to display HTML content.

RENAISSANCE SOFTLABS ANDINTRO 005


ANDROID INTORDUCTION
1.3 Android Runtime
Android Runtime consists of Dalvik Virtual machine and Core Java libraries.

1.3.1 Dalvik Virtual Machine


It is a type of JVM used in android devices to run apps and is optimized for low processing
power and low memory environments. Unlike the JVM, the Dalvik Virtual Machine doesn’t
run .class files, instead it runs .dex files. .dex files are built from .class file at the time of
compilation and provide higher efficiency in low resource environments.

1.3.1.1 CoreJavaLibraries
These are different from Java SE and Java ME libraries. However these libraries provide
most of the functionalities defined in the Java SE libraries.

1.3.1.2 Application Framework


These are the blocks that our applications directly interact with. These programs manage
the basic functions of phone like resource management, voice call management etc. As a
developer, you just consider these are some basic tools with which we are building our
applications.

1.3.2 Important blocks of Application framework are:

1.3.2.1 Activity Manager:


Manages the activity life cycle of applications

1.3.2.2 Content Providers:


Manage the data sharing between applications

1.3.2.3 Telephony Manager:


Manages all voice calls. We use telephony manager if we want to access voice calls in
our application.

1.3.2.4 Location Manager:


Location management, using GPS or cell tower

1.3.2.5 Resource Manager:


Manage the various types of resources we use in our Application.

RENAISSANCE SOFTLABS ANDINTRO 006


ANDROID INTORDUCTION
1.4 Applications
Applications are the top layer in the android architecture and this is where our applications
are going to fit. Several standard applications come pre-installed with every device, such as:

 SMS client app


 Dialer
 Web browser
 Contact manager

As a developer we are able to write an app which replaces any existing system app. That is,
you are not limited in accessing any particular feature. You are practically limitless and can
whatever you want to do with the android (as long as the users of your app permit it). Thus
Android is opening endless opportunities to the developer.

RENAISSANCE SOFTLABS ANDINTRO 007


ANDROID INTORDUCTION
2. Building blocks of Android:
The fundamental building blocks / components of Android are:

1. Activities

2. Services

3. Broadcast Receivers

4. Content Providers.

Activity is the basic building block of every visible android application. It provides the
means to render a UI. Every screen in an application is an activity by itself. Though they
work together to present an application sequence, each activity is an independent entity.

Service is another building block of android applications which does not provide a UI. It is a
program that can run in the background for an indefinite period.

Broadcast Receiver is yet another type of component that can receive and respond to any
broadcast announcements.

Content Providers are a separate league of components that expose a specific set of data
to applications.

The means of communication between the above mentioned components is through

1. Intents

2. Intent Filters

Intents are messages that are passed between components. One component that wants to
invoke another has to only express its' "intent" to do a job. And any other component that
exists and has claimed that it can do such a job through "intent-filters", is invoked by the
android platform to accomplish the job. This means, both the components are not aware of
each other's existence and can still work together to give the desired result for the end-
user.

This dotted line connection between components is achieved through the combination of
intents, intent-filters and the android platform.

RENAISSANCE SOFTLABS ANDINTRO 008


ANDROID INTORDUCTION
This leads to huge possibilities like:

1. Mix and match or rather plug and play of components at runtime

2. Replacing the inbuilt android applications with custom developed applications

3. Component level reuse within and across applications

4. Service orientation to the most granular level, if I may say

Intent is a bundle of information, a passive data structure that holds an abstract description
f the operation to be performed. (or in the case of broadcasts, a description of an event
that has happened and is being announced).

RENAISSANCE SOFTLABS ANDINTRO 009


ANDROID INTORDUCTION
3. Android API levels(versions & version names)
API v/s version

API Level is an integer value that uniquely identifies the framework API revision offered by a
version of the Android platform.

Version of android usually adds more features for users.

A device running Android with version X will usually support applications written for API X
and below.

This means if you want your app to support API 8, devices version 8 will be able to run it,
but also devices of version 9, 10, 11, etc.

RENAISSANCE SOFTLABS ANDINTRO 0010


ANDROID INTORDUCTION
The API level identifier will play a key role in ensuring the best possible experience for users
and application developers:

It lets the Android platform describe the maximum framework API revisions that it
supports.

It lets applications describe the framework API revision that they require

It lets the system to avoid installation of applications on the user’s device, such that version
incompatible applications are not installed on the device.

Each Android platform version stores its API Level identifier internally, in the Android
system itself.

Applications can use a manifest element provided by the framework API ‘<uses-sdk>’ to
describe the minimum and maximum API under which they are able to run, as well as the
preferred API level that they are designed to support. The element offers three key
attributes:

android:minSdkVersion- Specifies the minimum API Level on which the application is able to
run , default value is ‘1’.

android:targetSdkVersion- Specifies the API Level on which the application is designed to


run , value will be the API Level developer has selected while making the application.

android:maxSdkVersion- Specifies the maximum API Level on which the application is able
to run.

RENAISSANCE SOFTLABS ANDINTRO 0011

You might also like