SlideShare ist ein Scribd-Unternehmen logo
1 von 11
Introduction to Android 6.x
Ilio Catallo, Eleonora Ciceri – Politecnico di Milano
ilio.catallo@polimi.it, eleonora.ciceri@polimi.it
What is Android?
¤ Android is an open-source software stack that includes
the operating system, middleware and built-in mobile
applications
¤ Based on a modified version of Linux
¤ The full source code can be downloaded
¤ Vendors add their own proprietary extensions to
differentiate their products from others
¤ Example: Samsung’s terminals are shipped with a custom
user interface called TouchWiz
2
Mobile development in a nutshell
2001 20092007
Prehistory
Developers
code in low-
level languages
(e.g., C++) and
need to
understand the
specific HW they
are coding for
Middle age
Symbian provides
proprietary APIs that
encourage the
development of rich
mobile apps
• Difficult to work with
different HW
implementations (e.g.,
GPS)
• Java code can be
executed in a JME, at
the price of restricted
access to the HW
Renaissance
iPhone and Windows Phone provide a
richer development environment for
mobile applications
• Built on a proprietary operating system
• Explicit application approval
mechanism
Modern time
Android offers a
unified approach to
application
development meant
to operate on any
compatible device
3
AndroidArchitecture
16 x CHAPTER 1 HELLO, ANDROID
Application Layer
Application Framework
Native Apps
(Contacts, Maps, Browser, etc.)
Graphics
(OpenGL, SGL, FreeType)
Third-Party Apps
Location-Based
Services
Telephony
Bluetooth / NFC /
Wi-Fi Direct
Notifications
Media
libc
SSL & Webkit Android Libraries
Android Run Time
SQLite
Views
Resource
Manager
Surface
Manager
Dalvik
Virtual Machine
Memory
Management
Process
Management
Power
Management
Hardware Drivers
(USB, Display, Bluetooth, etc.)
Content
Providers
Window
Manager
Activity
Manager
Package
Manager
Developer Apps
Libraries
Linux Kernel
FIGURE 1-1
The Dalvik Virtual Machine 4
Android architecture:
Kernel
¤ The Linux kernel handles low-level
hardware interactions, including drivers
and memory management
¤ The Android kernel is actually a branch of
the standard Linux kernel
¤ Several features have been added or
modified to tackle the mobile usage
scenario
¤ The most significant feature is a custom
power managementsolution (i.e.,
wakelocks) designed so that the
default state of the device is sleep
Meier c01.indd V1 - 11/24/2011 Page 16
16 x CHAPTER 1 HELLO, ANDROID
Application Layer
Application Framework
Native Apps
(Contacts, Maps, Browser, etc.)
Graphics
(OpenGL, SGL, FreeType)
Third-Party Apps
Location-Based
Services
Telephony
Bluetooth / NFC /
Wi-Fi Direct
Notifications
Media
libc
SSL & Webkit Android Libraries
Android Run Time
SQLite
Views
Resource
Manager
Surface
Manager
Dalvik
Virtual Machine
Memory
Management
Process
Management
Power
Management
Hardware Drivers
(USB, Display, Bluetooth, etc.)
Content
Providers
Window
Manager
Activity
Manager
Package
Manager
Developer Apps
Libraries
Linux Kernel
FIGURE 1-1
The Dalvik Virtual Machine
One of the key elements of Android is the Dalvik VM. Rather than using a traditional Java VM such
as Java ME, Android uses its own custom VM designed to ensure that multiple instances run effi-
ciently on a single device.
The Dalvik VM uses the device’s underlying Linux kernel to handle low-level functionality, includ-
ing security, threading, and process and memory management. It’s also possible to write C/C++
applications that run closer to the underlying Linux OS. Although you can do this, in most cases
there’s no reason you should need to.
If the speed and efficiency of C/C++ is required for your application, Android provides a native
development kit (NDK). The NDK is designed to enable you to create C++ libraries using the libc
and libm libraries, along with native access to OpenGL.
c01.indd 16c01.indd 16 4/11/2012 10:03:27 A4/11/2012 10:03:27 A
www.it-ebooks.info
5
Android architecture:
Android Run Time
¤ Android applications are:
¤ written in Java as the programming
language
¤ executed by means of a custom virtual
machine (VM) named Android Runtime
(ART)
¤ Every app runs in its own ART instance
Meier c01.indd V1 - 11/24/2011 Page 16
16 x CHAPTER 1 HELLO, ANDROID
Application Layer
Application Framework
Native Apps
(Contacts, Maps, Browser, etc.)
Graphics
(OpenGL, SGL, FreeType)
Third-Party Apps
Location-Based
Services
Telephony
Bluetooth / NFC /
Wi-Fi Direct
Notifications
Media
libc
SSL & Webkit Android Libraries
Android Run Time
SQLite
Views
Resource
Manager
Surface
Manager
Dalvik
Virtual Machine
Memory
Management
Process
Management
Power
Management
Hardware Drivers
(USB, Display, Bluetooth, etc.)
Content
Providers
Window
Manager
Activity
Manager
Package
Manager
Developer Apps
Libraries
Linux Kernel
FIGURE 1-1
The Dalvik Virtual Machine
One of the key elements of Android is the Dalvik VM. Rather than using a traditional Java VM such
as Java ME, Android uses its own custom VM designed to ensure that multiple instances run effi-
ciently on a single device.
The Dalvik VM uses the device’s underlying Linux kernel to handle low-level functionality, includ-
ing security, threading, and process and memory management. It’s also possible to write C/C++
applications that run closer to the underlying Linux OS. Although you can do this, in most cases
there’s no reason you should need to.
If the speed and efficiency of C/C++ is required for your application, Android provides a native
development kit (NDK). The NDK is designed to enable you to create C++ libraries using the libc
and libm libraries, along with native access to OpenGL.
c01.indd 16c01.indd 16 4/11/2012 10:03:27 A4/11/2012 10:03:27 A
www.it-ebooks.info
6
Android architecture:
Android Run Time
¤ Android runtime pros:
¤ ART creates an abstraction layer that
ensures developers not to worry about
specific HW implementations
¤ ART is designed so that multiple
instances run efficiently on a single
mobile device
Meier c01.indd V1 - 11/24/2011 Page 16
16 x CHAPTER 1 HELLO, ANDROID
Application Layer
Application Framework
Native Apps
(Contacts, Maps, Browser, etc.)
Graphics
(OpenGL, SGL, FreeType)
Third-Party Apps
Location-Based
Services
Telephony
Bluetooth / NFC /
Wi-Fi Direct
Notifications
Media
libc
SSL & Webkit Android Libraries
Android Run Time
SQLite
Views
Resource
Manager
Surface
Manager
Dalvik
Virtual Machine
Memory
Management
Process
Management
Power
Management
Hardware Drivers
(USB, Display, Bluetooth, etc.)
Content
Providers
Window
Manager
Activity
Manager
Package
Manager
Developer Apps
Libraries
Linux Kernel
FIGURE 1-1
The Dalvik Virtual Machine
One of the key elements of Android is the Dalvik VM. Rather than using a traditional Java VM such
as Java ME, Android uses its own custom VM designed to ensure that multiple instances run effi-
ciently on a single device.
The Dalvik VM uses the device’s underlying Linux kernel to handle low-level functionality, includ-
ing security, threading, and process and memory management. It’s also possible to write C/C++
applications that run closer to the underlying Linux OS. Although you can do this, in most cases
there’s no reason you should need to.
If the speed and efficiency of C/C++ is required for your application, Android provides a native
development kit (NDK). The NDK is designed to enable you to create C++ libraries using the libc
and libm libraries, along with native access to OpenGL.
c01.indd 16c01.indd 16 4/11/2012 10:03:27 A4/11/2012 10:03:27 A
www.it-ebooks.info
7
Android architecture:
Core Libraries
¤ The core Android libraries provide most of
the JSE environment
¤ Example: java.util.*
¤ Further libraries are added to the Java
standard libraries to provide specific
functionalities
¤ Example: user interface framework
android.view.*
Meier c01.indd V1 - 11/24/2011 Page 16
16 x CHAPTER 1 HELLO, ANDROID
Application Layer
Application Framework
Native Apps
(Contacts, Maps, Browser, etc.)
Graphics
(OpenGL, SGL, FreeType)
Third-Party Apps
Location-Based
Services
Telephony
Bluetooth / NFC /
Wi-Fi Direct
Notifications
Media
libc
SSL & Webkit Android Libraries
Android Run Time
SQLite
Views
Resource
Manager
Surface
Manager
Dalvik
Virtual Machine
Memory
Management
Process
Management
Power
Management
Hardware Drivers
(USB, Display, Bluetooth, etc.)
Content
Providers
Window
Manager
Activity
Manager
Package
Manager
Developer Apps
Libraries
Linux Kernel
FIGURE 1-1
The Dalvik Virtual Machine
One of the key elements of Android is the Dalvik VM. Rather than using a traditional Java VM such
as Java ME, Android uses its own custom VM designed to ensure that multiple instances run effi-
ciently on a single device.
The Dalvik VM uses the device’s underlying Linux kernel to handle low-level functionality, includ-
ing security, threading, and process and memory management. It’s also possible to write C/C++
applications that run closer to the underlying Linux OS. Although you can do this, in most cases
there’s no reason you should need to.
If the speed and efficiency of C/C++ is required for your application, Android provides a native
development kit (NDK). The NDK is designed to enable you to create C++ libraries using the libc
and libm libraries, along with native access to OpenGL.
c01.indd 16c01.indd 16 4/11/2012 10:03:27 A4/11/2012 10:03:27 A
www.it-ebooks.info
8
Android architecture:
Libraries
¤ The libraries contain all the code (C/C++
libraries) that provides the main features of
the Android OS
¤ Examples: WebKit, SSL, OpenGL
¤ The libraries are all internal
implementations of Android
¤ They are not directly exposed to the
published Android API
¤ The application framework layer
accesses these libraries through the ART
VM
Meier c01.indd V1 - 11/24/2011 Page 16
16 x CHAPTER 1 HELLO, ANDROID
Application Layer
Application Framework
Native Apps
(Contacts, Maps, Browser, etc.)
Graphics
(OpenGL, SGL, FreeType)
Third-Party Apps
Location-Based
Services
Telephony
Bluetooth / NFC /
Wi-Fi Direct
Notifications
Media
libc
SSL & Webkit Android Libraries
Android Run Time
SQLite
Views
Resource
Manager
Surface
Manager
Dalvik
Virtual Machine
Memory
Management
Process
Management
Power
Management
Hardware Drivers
(USB, Display, Bluetooth, etc.)
Content
Providers
Window
Manager
Activity
Manager
Package
Manager
Developer Apps
Libraries
Linux Kernel
FIGURE 1-1
The Dalvik Virtual Machine
One of the key elements of Android is the Dalvik VM. Rather than using a traditional Java VM such
as Java ME, Android uses its own custom VM designed to ensure that multiple instances run effi-
ciently on a single device.
The Dalvik VM uses the device’s underlying Linux kernel to handle low-level functionality, includ-
ing security, threading, and process and memory management. It’s also possible to write C/C++
applications that run closer to the underlying Linux OS. Although you can do this, in most cases
there’s no reason you should need to.
If the speed and efficiency of C/C++ is required for your application, Android provides a native
development kit (NDK). The NDK is designed to enable you to create C++ libraries using the libc
and libm libraries, along with native access to OpenGL.
c01.indd 16c01.indd 16 4/11/2012 10:03:27 A4/11/2012 10:03:27 A
www.it-ebooks.info
9
Android architecture:
Application Framework
¤ The application framework exposes the
Android capabilities that developers can
use in their applications
¤ Examples: window manager, location
manager, databases, telephony,
sensors
¤ The application framework defines the set
of APIs made available by the Android OS
Meier c01.indd V1 - 11/24/2011 Page 16
16 x CHAPTER 1 HELLO, ANDROID
Application Layer
Application Framework
Native Apps
(Contacts, Maps, Browser, etc.)
Graphics
(OpenGL, SGL, FreeType)
Third-Party Apps
Location-Based
Services
Telephony
Bluetooth / NFC /
Wi-Fi Direct
Notifications
Media
libc
SSL & Webkit Android Libraries
Android Run Time
SQLite
Views
Resource
Manager
Surface
Manager
Dalvik
Virtual Machine
Memory
Management
Process
Management
Power
Management
Hardware Drivers
(USB, Display, Bluetooth, etc.)
Content
Providers
Window
Manager
Activity
Manager
Package
Manager
Developer Apps
Libraries
Linux Kernel
FIGURE 1-1
The Dalvik Virtual Machine
One of the key elements of Android is the Dalvik VM. Rather than using a traditional Java VM such
as Java ME, Android uses its own custom VM designed to ensure that multiple instances run effi-
ciently on a single device.
The Dalvik VM uses the device’s underlying Linux kernel to handle low-level functionality, includ-
ing security, threading, and process and memory management. It’s also possible to write C/C++
applications that run closer to the underlying Linux OS. Although you can do this, in most cases
there’s no reason you should need to.
If the speed and efficiency of C/C++ is required for your application, Android provides a native
development kit (NDK). The NDK is designed to enable you to create C++ libraries using the libc
and libm libraries, along with native access to OpenGL.
c01.indd 16c01.indd 16 4/11/2012 10:03:27 A4/11/2012 10:03:27 A
www.it-ebooks.info
10
Android architecture:
Application
¤ This layer comprises the applications that
ship with the Android devices
¤ Examples: SMS application, music
player
¤ Moreover, in many cases Android devices
also ship with some proprietary Google
mobile apps
¤ Examples: Google Play Store, Gmail
email client
Meier c01.indd V1 - 11/24/2011 Page 16
16 x CHAPTER 1 HELLO, ANDROID
Application Layer
Application Framework
Native Apps
(Contacts, Maps, Browser, etc.)
Graphics
(OpenGL, SGL, FreeType)
Third-Party Apps
Location-Based
Services
Telephony
Bluetooth / NFC /
Wi-Fi Direct
Notifications
Media
libc
SSL & Webkit Android Libraries
Android Run Time
SQLite
Views
Resource
Manager
Surface
Manager
Dalvik
Virtual Machine
Memory
Management
Process
Management
Power
Management
Hardware Drivers
(USB, Display, Bluetooth, etc.)
Content
Providers
Window
Manager
Activity
Manager
Package
Manager
Developer Apps
Libraries
Linux Kernel
FIGURE 1-1
The Dalvik Virtual Machine
One of the key elements of Android is the Dalvik VM. Rather than using a traditional Java VM such
as Java ME, Android uses its own custom VM designed to ensure that multiple instances run effi-
ciently on a single device.
The Dalvik VM uses the device’s underlying Linux kernel to handle low-level functionality, includ-
ing security, threading, and process and memory management. It’s also possible to write C/C++
applications that run closer to the underlying Linux OS. Although you can do this, in most cases
there’s no reason you should need to.
If the speed and efficiency of C/C++ is required for your application, Android provides a native
development kit (NDK). The NDK is designed to enable you to create C++ libraries using the libc
and libm libraries, along with native access to OpenGL.
c01.indd 16c01.indd 16 4/11/2012 10:03:27 A4/11/2012 10:03:27 A
www.it-ebooks.info
11

Weitere ähnliche Inhalte

Was ist angesagt?

Android for Java Developers
Android for Java DevelopersAndroid for Java Developers
Android for Java DevelopersMarko Gargenta
 
Android for Java Developers at OSCON 2010
Android for Java Developers at OSCON 2010Android for Java Developers at OSCON 2010
Android for Java Developers at OSCON 2010Marko Gargenta
 
Android For Java Developers
Android For Java DevelopersAndroid For Java Developers
Android For Java DevelopersMike Wolfson
 
Getting started with android
Getting started with androidGetting started with android
Getting started with androidamitgb
 
BruceRamsland_Resume_12282015
BruceRamsland_Resume_12282015BruceRamsland_Resume_12282015
BruceRamsland_Resume_12282015Bruce Ramsland
 
Android operating system
Android operating systemAndroid operating system
Android operating systemDev Savalia
 
Best software development tools in 2021
Best software development tools in 2021Best software development tools in 2021
Best software development tools in 2021Samaritan InfoTech
 
Android- Introduction for Beginners
Android- Introduction for BeginnersAndroid- Introduction for Beginners
Android- Introduction for BeginnersTripti Tiwari
 
Ch1 hello, android
Ch1 hello, androidCh1 hello, android
Ch1 hello, androidJehad2012
 
Android architecture
Android architectureAndroid architecture
Android architectureHari Krishna
 
Android architecture
Android architectureAndroid architecture
Android architecturepoojapainter
 
An Introduction To Android
An Introduction To AndroidAn Introduction To Android
An Introduction To AndroidGoogleTecTalks
 
Curso de Desenvolvimento Mobile - Android - Stack
Curso de Desenvolvimento Mobile - Android - StackCurso de Desenvolvimento Mobile - Android - Stack
Curso de Desenvolvimento Mobile - Android - StackJackson F. de A. Mafra
 

Was ist angesagt? (20)

Android for Java Developers
Android for Java DevelopersAndroid for Java Developers
Android for Java Developers
 
Android for Java Developers at OSCON 2010
Android for Java Developers at OSCON 2010Android for Java Developers at OSCON 2010
Android for Java Developers at OSCON 2010
 
Android Internals
Android InternalsAndroid Internals
Android Internals
 
Android Operating System Architecture
Android Operating System ArchitectureAndroid Operating System Architecture
Android Operating System Architecture
 
Android For Java Developers
Android For Java DevelopersAndroid For Java Developers
Android For Java Developers
 
Getting started with android
Getting started with androidGetting started with android
Getting started with android
 
document
documentdocument
document
 
BruceRamsland_Resume_12282015
BruceRamsland_Resume_12282015BruceRamsland_Resume_12282015
BruceRamsland_Resume_12282015
 
Android
Android Android
Android
 
Android operating system
Android operating systemAndroid operating system
Android operating system
 
Android development tutorial
Android development tutorialAndroid development tutorial
Android development tutorial
 
Best software development tools in 2021
Best software development tools in 2021Best software development tools in 2021
Best software development tools in 2021
 
Android- Introduction for Beginners
Android- Introduction for BeginnersAndroid- Introduction for Beginners
Android- Introduction for Beginners
 
Ch1 hello, android
Ch1 hello, androidCh1 hello, android
Ch1 hello, android
 
Android architecture
Android architectureAndroid architecture
Android architecture
 
Gl android platform
Gl android platformGl android platform
Gl android platform
 
Android architecture
Android architectureAndroid architecture
Android architecture
 
An Introduction To Android
An Introduction To AndroidAn Introduction To Android
An Introduction To Android
 
Android Architecture
Android ArchitectureAndroid Architecture
Android Architecture
 
Curso de Desenvolvimento Mobile - Android - Stack
Curso de Desenvolvimento Mobile - Android - StackCurso de Desenvolvimento Mobile - Android - Stack
Curso de Desenvolvimento Mobile - Android - Stack
 

Andere mochten auch

Dalvik Vm & Jit
Dalvik Vm & JitDalvik Vm & Jit
Dalvik Vm & JitAnkit Somani
 
"JIT compiler overview" @ JEEConf 2013, Kiev, Ukraine
"JIT compiler overview" @ JEEConf 2013, Kiev, Ukraine"JIT compiler overview" @ JEEConf 2013, Kiev, Ukraine
"JIT compiler overview" @ JEEConf 2013, Kiev, UkraineVladimir Ivanov
 
Inside Android's Dalvik VM - NEJUG Nov 2011
Inside Android's Dalvik VM - NEJUG Nov 2011Inside Android's Dalvik VM - NEJUG Nov 2011
Inside Android's Dalvik VM - NEJUG Nov 2011Doug Hawkins
 
just in time JIT compiler
just in time JIT compilerjust in time JIT compiler
just in time JIT compilerMohit kumar
 
How to implement a simple dalvik virtual machine
How to implement a simple dalvik virtual machineHow to implement a simple dalvik virtual machine
How to implement a simple dalvik virtual machineChun-Yu Wang
 

Andere mochten auch (8)

Dalvik jit
Dalvik jitDalvik jit
Dalvik jit
 
Dalvik Vm & Jit
Dalvik Vm & JitDalvik Vm & Jit
Dalvik Vm & Jit
 
"JIT compiler overview" @ JEEConf 2013, Kiev, Ukraine
"JIT compiler overview" @ JEEConf 2013, Kiev, Ukraine"JIT compiler overview" @ JEEConf 2013, Kiev, Ukraine
"JIT compiler overview" @ JEEConf 2013, Kiev, Ukraine
 
Inside Android's Dalvik VM - NEJUG Nov 2011
Inside Android's Dalvik VM - NEJUG Nov 2011Inside Android's Dalvik VM - NEJUG Nov 2011
Inside Android's Dalvik VM - NEJUG Nov 2011
 
just in time JIT compiler
just in time JIT compilerjust in time JIT compiler
just in time JIT compiler
 
Java-java virtual machine
Java-java virtual machineJava-java virtual machine
Java-java virtual machine
 
Understanding the Dalvik Virtual Machine
Understanding the Dalvik Virtual MachineUnderstanding the Dalvik Virtual Machine
Understanding the Dalvik Virtual Machine
 
How to implement a simple dalvik virtual machine
How to implement a simple dalvik virtual machineHow to implement a simple dalvik virtual machine
How to implement a simple dalvik virtual machine
 

Ähnlich wie Introduction To Android

Ähnlich wie Introduction To Android (20)

Android Seminar
Android SeminarAndroid Seminar
Android Seminar
 
Android My Seminar
Android My SeminarAndroid My Seminar
Android My Seminar
 
Android Architecture design programming with java
Android Architecture design programming with javaAndroid Architecture design programming with java
Android Architecture design programming with java
 
Android seminar-report-body.doc
Android seminar-report-body.docAndroid seminar-report-body.doc
Android seminar-report-body.doc
 
Android Development - Session 2
Android Development - Session 2Android Development - Session 2
Android Development - Session 2
 
Android Development - Session 1
Android Development - Session 1Android Development - Session 1
Android Development - Session 1
 
Wifi Direct Based Chat And File Transfer Android Application
Wifi Direct Based Chat And File Transfer Android ApplicationWifi Direct Based Chat And File Transfer Android Application
Wifi Direct Based Chat And File Transfer Android Application
 
Android Training (Intro)
Android Training (Intro)Android Training (Intro)
Android Training (Intro)
 
Android Operating System
Android Operating System Android Operating System
Android Operating System
 
Android
AndroidAndroid
Android
 
rakesh
rakeshrakesh
rakesh
 
Android Technology
Android TechnologyAndroid Technology
Android Technology
 
Android Overview
Android OverviewAndroid Overview
Android Overview
 
Android OS
Android OSAndroid OS
Android OS
 
Introduction to Android
Introduction to Android Introduction to Android
Introduction to Android
 
01 02 - introduction - adroid stack
01  02 - introduction - adroid stack01  02 - introduction - adroid stack
01 02 - introduction - adroid stack
 
Android
Android Android
Android
 
Android development process- thorsignia
Android development process- thorsigniaAndroid development process- thorsignia
Android development process- thorsignia
 
Android complete basic Guide
Android complete basic GuideAndroid complete basic Guide
Android complete basic Guide
 
Android : Revolutionizing Mobile Devices
Android : Revolutionizing Mobile DevicesAndroid : Revolutionizing Mobile Devices
Android : Revolutionizing Mobile Devices
 

Mehr von ma-polimi

Android activities & views
Android activities & viewsAndroid activities & views
Android activities & viewsma-polimi
 
Android resources
Android resourcesAndroid resources
Android resourcesma-polimi
 
Broadcast Receivers in Android
Broadcast Receivers in AndroidBroadcast Receivers in Android
Broadcast Receivers in Androidma-polimi
 
Persistence in Android
Persistence in AndroidPersistence in Android
Persistence in Androidma-polimi
 
Intents in Android
Intents in AndroidIntents in Android
Intents in Androidma-polimi
 
Events and Listeners in Android
Events and Listeners in AndroidEvents and Listeners in Android
Events and Listeners in Androidma-polimi
 
Android Components & Manifest
Android Components & ManifestAndroid Components & Manifest
Android Components & Manifestma-polimi
 

Mehr von ma-polimi (8)

Android activities & views
Android activities & viewsAndroid activities & views
Android activities & views
 
Android resources
Android resourcesAndroid resources
Android resources
 
Broadcast Receivers in Android
Broadcast Receivers in AndroidBroadcast Receivers in Android
Broadcast Receivers in Android
 
Persistence in Android
Persistence in AndroidPersistence in Android
Persistence in Android
 
Intents in Android
Intents in AndroidIntents in Android
Intents in Android
 
Events and Listeners in Android
Events and Listeners in AndroidEvents and Listeners in Android
Events and Listeners in Android
 
Android Components & Manifest
Android Components & ManifestAndroid Components & Manifest
Android Components & Manifest
 
TakeNotes
TakeNotesTakeNotes
TakeNotes
 

Kürzlich hochgeladen

Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...RKavithamani
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application ) Sakshi Ghasle
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 

Kürzlich hochgeladen (20)

Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application )
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 

Introduction To Android

  • 1. Introduction to Android 6.x Ilio Catallo, Eleonora Ciceri – Politecnico di Milano ilio.catallo@polimi.it, eleonora.ciceri@polimi.it
  • 2. What is Android? ¤ Android is an open-source software stack that includes the operating system, middleware and built-in mobile applications ¤ Based on a modified version of Linux ¤ The full source code can be downloaded ¤ Vendors add their own proprietary extensions to differentiate their products from others ¤ Example: Samsung’s terminals are shipped with a custom user interface called TouchWiz 2
  • 3. Mobile development in a nutshell 2001 20092007 Prehistory Developers code in low- level languages (e.g., C++) and need to understand the specific HW they are coding for Middle age Symbian provides proprietary APIs that encourage the development of rich mobile apps • Difficult to work with different HW implementations (e.g., GPS) • Java code can be executed in a JME, at the price of restricted access to the HW Renaissance iPhone and Windows Phone provide a richer development environment for mobile applications • Built on a proprietary operating system • Explicit application approval mechanism Modern time Android offers a unified approach to application development meant to operate on any compatible device 3
  • 4. AndroidArchitecture 16 x CHAPTER 1 HELLO, ANDROID Application Layer Application Framework Native Apps (Contacts, Maps, Browser, etc.) Graphics (OpenGL, SGL, FreeType) Third-Party Apps Location-Based Services Telephony Bluetooth / NFC / Wi-Fi Direct Notifications Media libc SSL & Webkit Android Libraries Android Run Time SQLite Views Resource Manager Surface Manager Dalvik Virtual Machine Memory Management Process Management Power Management Hardware Drivers (USB, Display, Bluetooth, etc.) Content Providers Window Manager Activity Manager Package Manager Developer Apps Libraries Linux Kernel FIGURE 1-1 The Dalvik Virtual Machine 4
  • 5. Android architecture: Kernel ¤ The Linux kernel handles low-level hardware interactions, including drivers and memory management ¤ The Android kernel is actually a branch of the standard Linux kernel ¤ Several features have been added or modified to tackle the mobile usage scenario ¤ The most significant feature is a custom power managementsolution (i.e., wakelocks) designed so that the default state of the device is sleep Meier c01.indd V1 - 11/24/2011 Page 16 16 x CHAPTER 1 HELLO, ANDROID Application Layer Application Framework Native Apps (Contacts, Maps, Browser, etc.) Graphics (OpenGL, SGL, FreeType) Third-Party Apps Location-Based Services Telephony Bluetooth / NFC / Wi-Fi Direct Notifications Media libc SSL & Webkit Android Libraries Android Run Time SQLite Views Resource Manager Surface Manager Dalvik Virtual Machine Memory Management Process Management Power Management Hardware Drivers (USB, Display, Bluetooth, etc.) Content Providers Window Manager Activity Manager Package Manager Developer Apps Libraries Linux Kernel FIGURE 1-1 The Dalvik Virtual Machine One of the key elements of Android is the Dalvik VM. Rather than using a traditional Java VM such as Java ME, Android uses its own custom VM designed to ensure that multiple instances run effi- ciently on a single device. The Dalvik VM uses the device’s underlying Linux kernel to handle low-level functionality, includ- ing security, threading, and process and memory management. It’s also possible to write C/C++ applications that run closer to the underlying Linux OS. Although you can do this, in most cases there’s no reason you should need to. If the speed and efficiency of C/C++ is required for your application, Android provides a native development kit (NDK). The NDK is designed to enable you to create C++ libraries using the libc and libm libraries, along with native access to OpenGL. c01.indd 16c01.indd 16 4/11/2012 10:03:27 A4/11/2012 10:03:27 A www.it-ebooks.info 5
  • 6. Android architecture: Android Run Time ¤ Android applications are: ¤ written in Java as the programming language ¤ executed by means of a custom virtual machine (VM) named Android Runtime (ART) ¤ Every app runs in its own ART instance Meier c01.indd V1 - 11/24/2011 Page 16 16 x CHAPTER 1 HELLO, ANDROID Application Layer Application Framework Native Apps (Contacts, Maps, Browser, etc.) Graphics (OpenGL, SGL, FreeType) Third-Party Apps Location-Based Services Telephony Bluetooth / NFC / Wi-Fi Direct Notifications Media libc SSL & Webkit Android Libraries Android Run Time SQLite Views Resource Manager Surface Manager Dalvik Virtual Machine Memory Management Process Management Power Management Hardware Drivers (USB, Display, Bluetooth, etc.) Content Providers Window Manager Activity Manager Package Manager Developer Apps Libraries Linux Kernel FIGURE 1-1 The Dalvik Virtual Machine One of the key elements of Android is the Dalvik VM. Rather than using a traditional Java VM such as Java ME, Android uses its own custom VM designed to ensure that multiple instances run effi- ciently on a single device. The Dalvik VM uses the device’s underlying Linux kernel to handle low-level functionality, includ- ing security, threading, and process and memory management. It’s also possible to write C/C++ applications that run closer to the underlying Linux OS. Although you can do this, in most cases there’s no reason you should need to. If the speed and efficiency of C/C++ is required for your application, Android provides a native development kit (NDK). The NDK is designed to enable you to create C++ libraries using the libc and libm libraries, along with native access to OpenGL. c01.indd 16c01.indd 16 4/11/2012 10:03:27 A4/11/2012 10:03:27 A www.it-ebooks.info 6
  • 7. Android architecture: Android Run Time ¤ Android runtime pros: ¤ ART creates an abstraction layer that ensures developers not to worry about specific HW implementations ¤ ART is designed so that multiple instances run efficiently on a single mobile device Meier c01.indd V1 - 11/24/2011 Page 16 16 x CHAPTER 1 HELLO, ANDROID Application Layer Application Framework Native Apps (Contacts, Maps, Browser, etc.) Graphics (OpenGL, SGL, FreeType) Third-Party Apps Location-Based Services Telephony Bluetooth / NFC / Wi-Fi Direct Notifications Media libc SSL & Webkit Android Libraries Android Run Time SQLite Views Resource Manager Surface Manager Dalvik Virtual Machine Memory Management Process Management Power Management Hardware Drivers (USB, Display, Bluetooth, etc.) Content Providers Window Manager Activity Manager Package Manager Developer Apps Libraries Linux Kernel FIGURE 1-1 The Dalvik Virtual Machine One of the key elements of Android is the Dalvik VM. Rather than using a traditional Java VM such as Java ME, Android uses its own custom VM designed to ensure that multiple instances run effi- ciently on a single device. The Dalvik VM uses the device’s underlying Linux kernel to handle low-level functionality, includ- ing security, threading, and process and memory management. It’s also possible to write C/C++ applications that run closer to the underlying Linux OS. Although you can do this, in most cases there’s no reason you should need to. If the speed and efficiency of C/C++ is required for your application, Android provides a native development kit (NDK). The NDK is designed to enable you to create C++ libraries using the libc and libm libraries, along with native access to OpenGL. c01.indd 16c01.indd 16 4/11/2012 10:03:27 A4/11/2012 10:03:27 A www.it-ebooks.info 7
  • 8. Android architecture: Core Libraries ¤ The core Android libraries provide most of the JSE environment ¤ Example: java.util.* ¤ Further libraries are added to the Java standard libraries to provide specific functionalities ¤ Example: user interface framework android.view.* Meier c01.indd V1 - 11/24/2011 Page 16 16 x CHAPTER 1 HELLO, ANDROID Application Layer Application Framework Native Apps (Contacts, Maps, Browser, etc.) Graphics (OpenGL, SGL, FreeType) Third-Party Apps Location-Based Services Telephony Bluetooth / NFC / Wi-Fi Direct Notifications Media libc SSL & Webkit Android Libraries Android Run Time SQLite Views Resource Manager Surface Manager Dalvik Virtual Machine Memory Management Process Management Power Management Hardware Drivers (USB, Display, Bluetooth, etc.) Content Providers Window Manager Activity Manager Package Manager Developer Apps Libraries Linux Kernel FIGURE 1-1 The Dalvik Virtual Machine One of the key elements of Android is the Dalvik VM. Rather than using a traditional Java VM such as Java ME, Android uses its own custom VM designed to ensure that multiple instances run effi- ciently on a single device. The Dalvik VM uses the device’s underlying Linux kernel to handle low-level functionality, includ- ing security, threading, and process and memory management. It’s also possible to write C/C++ applications that run closer to the underlying Linux OS. Although you can do this, in most cases there’s no reason you should need to. If the speed and efficiency of C/C++ is required for your application, Android provides a native development kit (NDK). The NDK is designed to enable you to create C++ libraries using the libc and libm libraries, along with native access to OpenGL. c01.indd 16c01.indd 16 4/11/2012 10:03:27 A4/11/2012 10:03:27 A www.it-ebooks.info 8
  • 9. Android architecture: Libraries ¤ The libraries contain all the code (C/C++ libraries) that provides the main features of the Android OS ¤ Examples: WebKit, SSL, OpenGL ¤ The libraries are all internal implementations of Android ¤ They are not directly exposed to the published Android API ¤ The application framework layer accesses these libraries through the ART VM Meier c01.indd V1 - 11/24/2011 Page 16 16 x CHAPTER 1 HELLO, ANDROID Application Layer Application Framework Native Apps (Contacts, Maps, Browser, etc.) Graphics (OpenGL, SGL, FreeType) Third-Party Apps Location-Based Services Telephony Bluetooth / NFC / Wi-Fi Direct Notifications Media libc SSL & Webkit Android Libraries Android Run Time SQLite Views Resource Manager Surface Manager Dalvik Virtual Machine Memory Management Process Management Power Management Hardware Drivers (USB, Display, Bluetooth, etc.) Content Providers Window Manager Activity Manager Package Manager Developer Apps Libraries Linux Kernel FIGURE 1-1 The Dalvik Virtual Machine One of the key elements of Android is the Dalvik VM. Rather than using a traditional Java VM such as Java ME, Android uses its own custom VM designed to ensure that multiple instances run effi- ciently on a single device. The Dalvik VM uses the device’s underlying Linux kernel to handle low-level functionality, includ- ing security, threading, and process and memory management. It’s also possible to write C/C++ applications that run closer to the underlying Linux OS. Although you can do this, in most cases there’s no reason you should need to. If the speed and efficiency of C/C++ is required for your application, Android provides a native development kit (NDK). The NDK is designed to enable you to create C++ libraries using the libc and libm libraries, along with native access to OpenGL. c01.indd 16c01.indd 16 4/11/2012 10:03:27 A4/11/2012 10:03:27 A www.it-ebooks.info 9
  • 10. Android architecture: Application Framework ¤ The application framework exposes the Android capabilities that developers can use in their applications ¤ Examples: window manager, location manager, databases, telephony, sensors ¤ The application framework defines the set of APIs made available by the Android OS Meier c01.indd V1 - 11/24/2011 Page 16 16 x CHAPTER 1 HELLO, ANDROID Application Layer Application Framework Native Apps (Contacts, Maps, Browser, etc.) Graphics (OpenGL, SGL, FreeType) Third-Party Apps Location-Based Services Telephony Bluetooth / NFC / Wi-Fi Direct Notifications Media libc SSL & Webkit Android Libraries Android Run Time SQLite Views Resource Manager Surface Manager Dalvik Virtual Machine Memory Management Process Management Power Management Hardware Drivers (USB, Display, Bluetooth, etc.) Content Providers Window Manager Activity Manager Package Manager Developer Apps Libraries Linux Kernel FIGURE 1-1 The Dalvik Virtual Machine One of the key elements of Android is the Dalvik VM. Rather than using a traditional Java VM such as Java ME, Android uses its own custom VM designed to ensure that multiple instances run effi- ciently on a single device. The Dalvik VM uses the device’s underlying Linux kernel to handle low-level functionality, includ- ing security, threading, and process and memory management. It’s also possible to write C/C++ applications that run closer to the underlying Linux OS. Although you can do this, in most cases there’s no reason you should need to. If the speed and efficiency of C/C++ is required for your application, Android provides a native development kit (NDK). The NDK is designed to enable you to create C++ libraries using the libc and libm libraries, along with native access to OpenGL. c01.indd 16c01.indd 16 4/11/2012 10:03:27 A4/11/2012 10:03:27 A www.it-ebooks.info 10
  • 11. Android architecture: Application ¤ This layer comprises the applications that ship with the Android devices ¤ Examples: SMS application, music player ¤ Moreover, in many cases Android devices also ship with some proprietary Google mobile apps ¤ Examples: Google Play Store, Gmail email client Meier c01.indd V1 - 11/24/2011 Page 16 16 x CHAPTER 1 HELLO, ANDROID Application Layer Application Framework Native Apps (Contacts, Maps, Browser, etc.) Graphics (OpenGL, SGL, FreeType) Third-Party Apps Location-Based Services Telephony Bluetooth / NFC / Wi-Fi Direct Notifications Media libc SSL & Webkit Android Libraries Android Run Time SQLite Views Resource Manager Surface Manager Dalvik Virtual Machine Memory Management Process Management Power Management Hardware Drivers (USB, Display, Bluetooth, etc.) Content Providers Window Manager Activity Manager Package Manager Developer Apps Libraries Linux Kernel FIGURE 1-1 The Dalvik Virtual Machine One of the key elements of Android is the Dalvik VM. Rather than using a traditional Java VM such as Java ME, Android uses its own custom VM designed to ensure that multiple instances run effi- ciently on a single device. The Dalvik VM uses the device’s underlying Linux kernel to handle low-level functionality, includ- ing security, threading, and process and memory management. It’s also possible to write C/C++ applications that run closer to the underlying Linux OS. Although you can do this, in most cases there’s no reason you should need to. If the speed and efficiency of C/C++ is required for your application, Android provides a native development kit (NDK). The NDK is designed to enable you to create C++ libraries using the libc and libm libraries, along with native access to OpenGL. c01.indd 16c01.indd 16 4/11/2012 10:03:27 A4/11/2012 10:03:27 A www.it-ebooks.info 11