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

Introduction To Android

The document provides an introduction to the Android operating system. It discusses that Android is a Linux-based OS designed for touchscreen mobile devices. It was initially developed by Android Inc. and later acquired by Google. The document outlines Android's architecture which includes the Linux kernel layer, native libraries and runtime layer, and application framework layer. It also summarizes the key components of Android including activities, services, content providers and broadcast receivers. Finally, it briefly compares the Dalvik Virtual Machine used in Android to the Java Virtual Machine.

Uploaded by

bhuvangates
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
102 views

Introduction To Android

The document provides an introduction to the Android operating system. It discusses that Android is a Linux-based OS designed for touchscreen mobile devices. It was initially developed by Android Inc. and later acquired by Google. The document outlines Android's architecture which includes the Linux kernel layer, native libraries and runtime layer, and application framework layer. It also summarizes the key components of Android including activities, services, content providers and broadcast receivers. Finally, it briefly compares the Dalvik Virtual Machine used in Android to the Java Virtual Machine.

Uploaded by

bhuvangates
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 35

Introduction to Android

B.Bhuvaneswaran
Assistant Professor (SS)
Department of Computer Science & Engineering
Rajalakshmi Engineering College
Thandalam
Chennai 602 105
[email protected]

Contents
Introduction
Android version and API Level
The Big picture
Comparison of DVM and JVM
Android Features
Application Fundamentals
Android Application Components

B.Bhuvaneswaran, AP (SS) / CSE / REC

Introduction
A Linux based Operating System designed
primarily for touch screen mobile devices.
Initially developed by Android Inc and
later purchased by Google in 2005.
The first Android powered device was sold
in Oct 2008.
Android is Open Source and Google
releases code under Apache2 license.
Google Play Store.

B.Bhuvaneswaran, AP (SS) / CSE / REC

Open Android.
What it means to be open and why would
you care?

http://www.apache.org/licenses/LICENSE-2.0.html

B.Bhuvaneswaran, AP (SS) / CSE / REC

Brief History Android

2009

SDK 1.5 (Cupcake)

SDK 1.6 (Donut)

Support Wide VGA

SDK 2.0/2.0.1/2.1 (Eclair)

New soft keyboard with autocomplete feature

Revamped UI, browser

2010

SDK 2.2 (Froyo)

Flash support, tethering

SDK 2.3 (Gingerbread)

UI update, system-wide copy-paste

B.Bhuvaneswaran, AP (SS) / CSE / REC

2011

SDK 3.0/3.1/3.2 (Honeycomb) for tablets only

SDK 4.0/4.0.1/4.0.2/4.0.3 (Ice Cream


Sandwich)

New UI for tablets, support multi-core processors

Changes to the UI, Voice input, NFC

2012

SDK 4.1/4.1.1/4.2(Jelly Bean)

Performance optimization, refined UI

Honeycomb

Ice cream Sandwich

Android 3.0-3.2

Android 4.0+

B.Bhuvaneswaran, AP (SS) / CSE / REC

Jelly Bean 4.1+

API Level
Platform Version

API Level

Version Name

Android 4.2

17

Jelly bean

Android 4.1, 4.1.1

16

Jelly bean

Android 4.0.3,
4.0.4
Android 4.0, 4.0.1,
4.0.2
Android 3.2

15

13

Ice cream
sandwich
Ice cream
sandwich
Honey Comb

Android 3.1.x

12

Honey Comb

Android 3.0.x

11

Honey Comb

Android 2.3.4
Android 2.3.3

10

Gingerbread

14

B.Bhuvaneswaran, AP (SS) / CSE / REC

API Level
Platform
Version
Android 2.3.2
Android 2.3.1
Android 2.3
Android 2.2.x

API Level

Version Name

Gingerbread

Froyo

Android 2.1.x

Eclair

Android 2.0.1

Eclair

Android 2.0

Eclair

Android 1.6

Donut

Android 1.5

B.Bhuvaneswaran, AP (SS) / CSE / REC

Cupcake

API Level

Android API levels can be divided to three


main groups:

Android 1.5 - 2.3 (API levels 3-10) - Android


made specifically for smartphones.
Android 3.0 - 3.2 (API levels 11-13) Honeycomb, Android made for tablets.
Android 4 (API levels 14-) - Ice Cream
Sandwich - Current generation, a big merge
with tons of additional functionality, totally
revamped Android version, for both phone and
tablets.
B.Bhuvaneswaran, AP (SS) / CSE / REC

Choosing API Level


Depends Device support
Application forward compatibility
Application backward compatibility

B.Bhuvaneswaran, AP (SS) / CSE / REC

The Big Picture

B.Bhuvaneswaran, AP (SS) / CSE / REC

The Red Layer-The Linux Kernel


Android runs on Linux.
Linux provides hardware abstraction layer.
Users never see Linux sub system.
The adb command shell opens Linux shell.

B.Bhuvaneswaran, AP (SS) / CSE / REC

The Green LayerNative Libraries and Android Runtime

Pieces borrowed from other open source


projects:

Webkit for fast HTML rendering


OpenGL for graphics
Media codecs
SQLite database

Dalvik Virtual Machine

B.Bhuvaneswaran, AP (SS) / CSE / REC

The Blue LayerApplication Framework & Applications

B.Bhuvaneswaran, AP (SS) / CSE / REC

Activity BackStack

Main activity calls activity2


backstack

main
Push
Operation
(Last in)

Activity 2

B.Bhuvaneswaran, AP (SS) / CSE / REC

Activity 2 is
visible on
screen
Main activity
goes in
background

Activity BackStack

From activity2, user presses back button


backstack

main
Pop
operation
(First Out)

Activity 2

B.Bhuvaneswaran, AP (SS) / CSE / REC

Main activity is
visible on
screen and
activity 2 is
destroyed

Java Source Code

Java Source
Code

Java
Compiler

Java
Compiler

Java Byte Code


Dex
Compiler

Java Byte
Code

Dalvik Byte Code

Java Byte Code

Dalvik Executable

JVM

DVM
B.Bhuvaneswaran, AP (SS) / CSE / REC

Differences between DVM and JVM


Machine

DVM

JVM

Architecture
base

Register

Stack

No of operations

fewer

more

File format

.dex

.class

Property

B.Bhuvaneswaran, AP (SS) / CSE / REC

Stack Based
POP 20
POP 7
ADD 20, 7, result
PUSH result

B.Bhuvaneswaran, AP (SS) / CSE / REC

Register Based

Add R3,R1,R2

B.Bhuvaneswaran, AP (SS) / CSE / REC

Android Java Consists of


Android Java
=
Java SE - AWT/Swing
+
Android API

B.Bhuvaneswaran, AP (SS) / CSE / REC

Android Features
Application framework enabling reuse
and replacement of components.
Dalvik Virtual Machine optimized for
mobile devices.
Optimized graphics powered by a
custom 2D graphics library; 3D graphics
based on the OpenGL ES 1.0 specification
(hardware acceleration optional).
SQLite for structured data storage.

B.Bhuvaneswaran, AP (SS) / CSE / REC

Media support for common audio, video, and still


image formats (MPEG4, H.264, MP3, AAC, AMR,
JPG, PNG, GIF).
GSM Telephony

Bluetooth, 3G, and Wi-Fi , Wi-Fi Direct, Wi-Fi


hotspot

(hardware dependent)

(hardware dependent)

Camera, GPS, compass, and accelerometer

(hardware dependent)

B.Bhuvaneswaran, AP (SS) / CSE / REC

Application Fundamentals

APK file format:

Application package file


Zip package format based on JAR file format

Apk holds

Code(.dex file)
Resources
Assets
Certificates
Manifest file

B.Bhuvaneswaran, AP (SS) / CSE / REC

Once .apk is installed on a device:

Own security sandbox


A unique Linux UserID
Own Virtual Machine
Own Linux process

B.Bhuvaneswaran, AP (SS) / CSE / REC

Android Application Components


Activities
Services
Content Providers
Broadcast Receivers

B.Bhuvaneswaran, AP (SS) / CSE / REC

Activity
An Activity is an application component
that provides a screen with which users
can interact in order to do something.
An activity is implemented as Subclass of
Activity.

B.Bhuvaneswaran, AP (SS) / CSE / REC

Services
A Service is an application component that
can perform long-running operations in
the background and does not provide a
user interface.
A service is implemented as a subclass of
Service.

B.Bhuvaneswaran, AP (SS) / CSE / REC

Content Providers
A content provider manages a shared set
of application data.
A content provider is implemented as a
subclass of ContentProvider.

B.Bhuvaneswaran, AP (SS) / CSE / REC

Broadcast Receivers
A broadcast receiver is a component that
responds to system-wide broadcast
announcements.
A broadcast receiver is implemented as a
subclass of BroadcastReceiver.

B.Bhuvaneswaran, AP (SS) / CSE / REC

B.Bhuvaneswaran, AP (SS) / CSE / REC

Summary
Android
Android
DVM Vs
Android
Android

Version and API


architecture
JVM
features
building blocks

B.Bhuvaneswaran, AP (SS) / CSE / REC

References

(1)http://developer.android.com/about/versions/index.html
(2)http://developer.android/reference/android/app/Activity.html

B.Bhuvaneswaran, AP (SS) / CSE / REC

B.Bhuvaneswaran, AP (SS) / CSE / REC

B.Bhuvaneswaran, AP (SS) / CSE / REC

You might also like