SlideShare a Scribd company logo
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

More Related Content

What's hot

Android for Java Developers
Android for Java DevelopersAndroid for Java Developers
Android for Java Developers
Marko 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 2010
Marko Gargenta
 
Android Internals
Android InternalsAndroid Internals
Android Internals
Marko Gargenta
 
Android Operating System Architecture
Android Operating System ArchitectureAndroid Operating System Architecture
Android Operating System Architecture
DINESH KUMAR ARIVARASAN
 
Android For Java Developers
Android For Java DevelopersAndroid For Java Developers
Android For Java Developers
Mike Wolfson
 
Getting started with android
Getting started with androidGetting started with android
Getting started with android
amitgb
 
BruceRamsland_Resume_12282015
BruceRamsland_Resume_12282015BruceRamsland_Resume_12282015
BruceRamsland_Resume_12282015Bruce Ramsland
 
Android
Android Android
Android
Anand Buddarapu
 
Android operating system
Android operating systemAndroid operating system
Android operating systemDev Savalia
 
Android development tutorial
Android development tutorialAndroid development tutorial
Android development tutorial
Vibrant Technologies & Computers
 
Best software development tools in 2021
Best software development tools in 2021Best software development tools in 2021
Best software development tools in 2021
Samaritan InfoTech
 
Android- Introduction for Beginners
Android- Introduction for BeginnersAndroid- Introduction for Beginners
Android- Introduction for Beginners
Tripti 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 architecture
poojapainter
 
An Introduction To Android
An Introduction To AndroidAn Introduction To Android
An Introduction To AndroidGoogleTecTalks
 
Android Architecture
Android ArchitectureAndroid Architecture
Android Architecture
Pietro Alberto Rossi
 
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
 

What's hot (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
 

Viewers also liked

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 2011
Doug Hawkins
 
just in time JIT compiler
just in time JIT compilerjust in time JIT compiler
just in time JIT compiler
Mohit kumar
 
Java-java virtual machine
Java-java virtual machineJava-java virtual machine
Java-java virtual machine
Surbhi Panhalkar
 
Understanding the Dalvik Virtual Machine
Understanding the Dalvik Virtual MachineUnderstanding the Dalvik Virtual Machine
Understanding the Dalvik Virtual Machine
National Cheng Kung University
 
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
Chun-Yu Wang
 

Viewers also liked (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
 

Similar to Introduction To Android

Android Architecture design programming with java
Android Architecture design programming with javaAndroid Architecture design programming with java
Android Architecture design programming with java
ssuser471dfb
 
Android seminar-report-body.doc
Android seminar-report-body.docAndroid seminar-report-body.doc
Android seminar-report-body.doc
Deepak Yadav
 
Android Development - Session 2
Android Development - Session 2Android Development - Session 2
Android Development - Session 2
Mohammad Shaker
 
Android Development - Session 1
Android Development - Session 1Android Development - Session 1
Android Development - Session 1
Mohammad Shaker
 
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
Nitin Bhasin
 
Android Training (Intro)
Android Training (Intro)Android Training (Intro)
Android Training (Intro)Khaled Anaqwa
 
Android Operating System
Android Operating System Android Operating System
Android Operating System
Mehvish Mushtaq
 
Android
AndroidAndroid
Android
Ravi Babu
 
Android Technology
Android TechnologyAndroid Technology
Android Technology
Amar Shah
 
Android Overview
Android OverviewAndroid Overview
Introduction to Android
Introduction to Android Introduction to Android
Introduction to Android
Ranjith Kumar
 
01 02 - introduction - adroid stack
01  02 - introduction - adroid stack01  02 - introduction - adroid stack
01 02 - introduction - adroid stack
Siva Kumar reddy Vasipally
 
Android development process- thorsignia
Android development process- thorsigniaAndroid development process- thorsignia
Android development process- thorsignia
charan Teja
 
Android complete basic Guide
Android complete basic GuideAndroid complete basic Guide
Android complete basic Guide
AKASH SINGH
 
Android : Revolutionizing Mobile Devices
Android : Revolutionizing Mobile DevicesAndroid : Revolutionizing Mobile Devices
Android : Revolutionizing Mobile DevicesRitesh Puthran
 

Similar to 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
 

More from ma-polimi

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

More from 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
 

Recently uploaded

MASS MEDIA STUDIES-835-CLASS XI Resource Material.pdf
MASS MEDIA STUDIES-835-CLASS XI Resource Material.pdfMASS MEDIA STUDIES-835-CLASS XI Resource Material.pdf
MASS MEDIA STUDIES-835-CLASS XI Resource Material.pdf
goswamiyash170123
 
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
Nguyen Thanh Tu Collection
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
MysoreMuleSoftMeetup
 
Azure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHatAzure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHat
Scholarhat
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Thiyagu K
 
The Diamond Necklace by Guy De Maupassant.pptx
The Diamond Necklace by Guy De Maupassant.pptxThe Diamond Necklace by Guy De Maupassant.pptx
The Diamond Necklace by Guy De Maupassant.pptx
DhatriParmar
 
Best Digital Marketing Institute In NOIDA
Best Digital Marketing Institute In NOIDABest Digital Marketing Institute In NOIDA
Best Digital Marketing Institute In NOIDA
deeptiverma2406
 
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBCSTRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
kimdan468
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
Jean Carlos Nunes Paixão
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
TechSoup
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
JosvitaDsouza2
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
Balvir Singh
 
Pride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School DistrictPride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School District
David Douglas School District
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
Jisc
 
The Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collectionThe Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collection
Israel Genealogy Research Association
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
camakaiclarkmusic
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
DeeptiGupta154
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
Celine George
 
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama UniversityNatural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Akanksha trivedi rama nursing college kanpur.
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
Levi Shapiro
 

Recently uploaded (20)

MASS MEDIA STUDIES-835-CLASS XI Resource Material.pdf
MASS MEDIA STUDIES-835-CLASS XI Resource Material.pdfMASS MEDIA STUDIES-835-CLASS XI Resource Material.pdf
MASS MEDIA STUDIES-835-CLASS XI Resource Material.pdf
 
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
 
Azure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHatAzure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHat
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
 
The Diamond Necklace by Guy De Maupassant.pptx
The Diamond Necklace by Guy De Maupassant.pptxThe Diamond Necklace by Guy De Maupassant.pptx
The Diamond Necklace by Guy De Maupassant.pptx
 
Best Digital Marketing Institute In NOIDA
Best Digital Marketing Institute In NOIDABest Digital Marketing Institute In NOIDA
Best Digital Marketing Institute In NOIDA
 
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBCSTRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
 
Pride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School DistrictPride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School District
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
 
The Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collectionThe Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collection
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
 
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama UniversityNatural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
 

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