Android platform

19
ANDROID Platform Architecture & Development Options

Transcript of Android platform

Page 1: Android platform

ANDROID

Platform Architecture & Development Options

Page 2: Android platform

• A robust, free, open-source operating system for mobile devices.

• Linux-based operating system designed primarily for touchscreen mobile devices such as smartphones and tablets computers, developed by Google in conjunction with Open Handset Alliance.

• Google releases the Android code as open source under the Apache license as Android Open Source Project (AOSP), led by a team at Google led by Andy Rubin.

• open customizable nature.• Android applications are written in

java and run in virtual machines. For this purpose Android features the Dalvik virtual machine which executes its own byte code.

WHAT IS ANDROID OS?

Page 3: Android platform

• Interface• Version History

INTERFACE & VERSION HISTORY

Version Release date Features

4.1.x Jelly Bean July 9, 2012 Audio chaining, Enhanced accessibility, Expandable notifications, Improved voice search, Google Wallet, Multichannel audio, USB audio

4.0.x Ice Cream Sandwich

October 19, 2011

Face Unlock, Improved camera app with zero shutter lag, Built-in photo editor, Android Beam, Stability improvements

3.x.x Honeycomb February 22, 2011

UI refinements, Connectivity for USB accessories, Ability to encrypt all user data

2.3.x Gingerbread December 6, 2010

UI updates, Improved battery efficiency, Support for NFC, Native support for SIP VoIP internet telephony

2.2 Froyo May 20, 2010 Performance optimizations, just in time compiler, tetheringand Wi-Fi hotspot capability, Adobe Flash support, enhanced Microsoft Exchange support, OpenGL ES 2.0 support

2.0, 2.1 Eclair October 26, 2009

Major UI update, Bluetooth 2.1 (new OPP and PBAP profiles), media framework improvements, Microsoft Exchange support

1.6 Donut September 15, 2009

Gesture support, support for higher screen resolutions (WVGA), text-to-speech engine, Virtual Private Network

1.5 Cupcake April 30, 2009 UI updates, on-screen keypad, video recording and playback, Bluetooth, accelerometer based application rotation

1.1 Initial Release February 2009 Initial release

Page 4: Android platform

DISTRIBUTION OF ANDROID VERSIONS

Version Release date API level

Distribution

(October 2, 2012)

4.1.x, 4.2 Jelly Bean July 9, 2012 16 1.8%

4.0.x Ice Cream Sandwich

October 19, 2011 14-15 23.7%

3.x.x Honeycomb

February 22, 2011 11-13 1.9%

2.3.x Gingerbread

December 6, 2010 9-10 55.8%

2.2 Froyo May 20, 2010 8 12.9%

2.0, 2.1 Eclair October 26, 2009 7 3.4%

1.6 Donut September 15, 2009 4 0.4%

1.5 Cupcake April 30, 2009 3 0.1%

Page 5: Android platform

• Applications run in a sandbox• Permission system for

applications for installation• Security software apps

SECURITY & PRIVACY

Page 6: Android platform

ARCHITECTURE

Page 7: Android platform

• Linux Kernel– Memory Management– Process Management– Networking– Security Settings– IPC– Drivers:

» Display Driver» Camera Driver» Flash Memory

Driver» Binder (IPC) Driver» Keypad Driver» Wi-Fi Driver» Audio Driver» Power Management

ARCHITECTURE LAYERS

Page 8: Android platform

• Includes– Surface Manager– Media framework– SQLite– Webkit– OpenGL– Free Type– SGL– SSL– libc

NATIVE LIBRARIES

Page 9: Android platform

• Dalvik Virtual Machine– A type of JVM used in android

devices to run apps– Register based VM– Dalvik Executable (.dex)– DX tool

• Core Java libraries– These are different from Java SE

and Java ME libraries. However, these libraries provide most of the functionalities defined in the Java SE libraries.

ANDROID RUNTIME

Page 10: Android platform

• Blocks that our application deals with directly– Activity Manager– Window Manager– Content Providers– View System– Package Manager– Telephony Manager– Resource Manager– Location Manager– Notification Manager

APPLICATION FRAMEWORK

Page 11: Android platform

• 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» Calendar» Maps

APPLICATIONS

Page 12: Android platform

• Activities• Services• Content Providers• Broadcast Receivers• Intents

ANDROID APPLICATION COMPONENTS

Page 13: Android platform

• Activities– Activity is an individual user interface

screen where view can be placed.– The widget in an activity can be created by

either pure java code or by adding XML code.

– Activity class.– Life cycle

– Active/Running State– Paused State– Stopped State– Destroyed/Dead State

Page 14: Android platform

• Services– Android application component that runs in

background and has no visual UI.– can be started by another Android

application component such as an activity or other services .

– services are less likely to be destroyed by Android system to free resources, than Activities.

– Service class.– Types

– Unbound services– Bound services

Page 15: Android platform

• Content Providers– provide a flexible way to make data available

across applications.– through content providers other applications are

able to query access or even modify the data you’ve created, as long as your content provider allows it. 

– ContentProvider class.

• Broadcast Receivers– used to receive messages that are broadcasted by

the Android system or other Android applications.– Examples

» Warning that the battery is getting low» Screen turned off» Change of time zone» The camera has been used to take a

picture

Page 16: Android platform

• Intents– component activating mechanism in Android.– constitutes the core message system in Android

and defines a message to activate a particular component.

– Types:• Explicit Intents• Implicit Intents

Page 17: Android platform

• Design Requirements• Design Overview

– 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.

• .dex file format• Zygote• Register-based Architecture• Security

DALVIK VM

Page 18: Android platform

.DEX FILE ANATOMY

Page 19: Android platform

Questions?