CH1.Introduction to Android
CH1.Introduction to Android
1.1 Introduction
Android is an open source and Linux-based Operating
System for mobile devices such as smartphones and
tablet computers. Android was developed by the Open
Handset Alliance, led by Google, and other companies.
based on the Linux kernel and designed primarily for
touchscreen mobile devices such as smartphones and
tablets.
Android offers a unified approach to application
development for mobile devices which means developers
need only develop for Android, and their applications
should be able to run on different devices powered by
Android.
1.1
History of Android
Android Inc.founded in Palo Alto,california ,united states
in October 2003 by Andy Rubin[co-founder of danger ],
Rich Miner[co-founder of wildfire communication Inc.],
Nick Sears[once VP at Tmobile],and Chris White[Headed
design and interface development at web TV] to develop
“smarter mobile devices that are more aware of its
owner's location and preferences”.
History of Android
History of Android
On November 5, 2007, the Open Handset Alliance, a
consortium of technology companies including Google,
HTC, Sony and Samsung and chipset makers such as
Qualcomm unveiled itself, with a goal to develop open
standards for mobile devices.
That day, ANDROID WAS UNVEILED AS ITS
FIRST PRODUCT, a mobile device platform built on
the LINUX KERNEL.
In September 2008 T-Mobile announced the availability
of the T-Mobile G1, the first smartphone based on the
Android Platform.
1.1
History of Android
The first commercially available smartphone
running Android was the HTC Dream, released
on October 22, 2008.
1.1
History of Android
A few days after that, Google announced the availability
of Android SDK Release Candidate 1.0.
HTC G1,
Droid, Motorola Droid (X)
Tattoo
Equipment Maker:
Android equipment's are available in the
market in a huge amount.
Smartwatches:
A smartwatch is a handheld, wearable
device that closely relates a wristwatch or
other time device.
In addition to telling time, many
smartwatches are wireless connectivity
oriented such as Bluetooth capable.
Android Eco-System
1.1
Alliance (OHA)
Handset Manufacturers
Equipment Maker:
Smartwatches:
The traditional watch becomes, in effect, a
wireless Bluetooth technology extending
the capabilities of the wearer's smartphone
to the watch.
Smart TV:
An Android TV box is a small computer
that plugs into any TV and gives the user
the ability to stream content, locally and
online.
Android Eco-System
1.1
Alliance (OHA)
Handset Manufacturers
Equipment Maker:
Smart TV:
Apps can be downloaded from the Google
Play Store, installed, and do most
anything a standard computer can do from
streaming videos to writing an email.
Smart Speakers: Smart speakers are
booming in the market now, Smart speakers
like Google Home, Alexa, We can control our
android device via voice using these smart
speakers.
Android Eco-System
1.1
Alliance (OHA)
Handset Manufacturers
Equipment Maker:
Users
Industry Developer
Industry Users Developer
• Software stack open- • Users have control of • Don not need
sourced under Apache their experience permission to ship an
2.0 license • They control what gets application
• Source available after installed • No hidden or privileged
first handsets ship • They choose the defaults framework APIs
• Anyone will be able to • Can integrate, extend
build a system image and replace existing
components
1.1
Android Eco-System
Developer Can:
2. Open Source:
• The Android OS is an open-source platform
based on the Linux kernel and multiple open-
source libraries.
• In this way developers are free to contribute or
extend the platform as necessary for building
mobile apps which run on Android devices.
1.2
1.2 Need ofAlliance
Android(OHA)
Handset Manufacturers
3. Multi-Platform Support:
In market, there are a wide range of hardware
devices powered by the Android OS, including
many different phones and tablet. Even
development of android mobile apps can occur
on Windows, Mac OS or Linux.
1.2
1.2 Need ofAlliance
Android(OHA)
Handset Manufacturers
4. Multi-Carrier Support:
World wide a large number of telecom carriers
like Airtel, Vodafone, Idea Cellular, AT&T
Mobility, BSNL etc. are supporting Android
powered phones.
1.2
1.2 Need ofAlliance
Android(OHA)
Handset Manufacturers
Features of Android
Interface:
Android's default user interface is mainly based
on direct manipulation, using touch inputs that
loosely correspond to real-world actions, like
swiping, tapping, pinching, and reverse pinching
to manipulate on-screen objects, along with a
virtual keyboard.
1.2
Features of Android
Applications :
Applications ("apps"), which extend the
functionality of devices, are written using the
Android software development kit (SDK) and,
often, the Java programming language.
Features of Android
The Go programming language is also
supported, although with a limited set of
application programming interfaces (API).
In May 2017, Google announced support for
Android app development in the Kotlin
programming language.
1.2
Features of Android
Handset Layouts :
The platform is adaptable to larger, VGA, 2D
graphics library, 3D graphics library based on
OpenGL ES 2.0 specifications, and traditional
smartphone layouts.
Storage:
SQLite, a lightweight relational database, is
used for data storage purposes
1.2
Features of Android
Connectivity:
Android supports connectivity technologies
including GSM/EDGE, IDEN, CDMA, EV-DO,
UMTS, Bluetooth, Wi-Fi (no connections
through Proxy server and no Ad hoc wireless
network) LTE, NFC and WiMAX.
Storage:
SQLite, a lightweight relational database, is
used for data storage purposes
1.2
Features of Android
Messaging:
SMS and MMS are available forms of
messaging, including threaded text messaging
and now Android Cloud to Device Messaging
Framework is also a part of the Android
Messaging service.
1.2
Features of Android
Media Support:
Android supports the following audio/video/still
media formats:
– H.264 (in 3GP or – MP3
MP4 container) – MIDI
– MPEG-4 SP – WAV
– AMR – JPEG
– AAC – PNG
– GIF
– HE-AAC (in MP4
– BMP
or 3GP container)
1.2
Features of Android
Multi-Touch:
Android has support for multi-touch which was
originally made available in handsets such as the
HTC Hero.
The feature was originally disabled at the kernel
level (possibly to avoid infringing Apple's
patents on touch-screen technology at the time).
Google has since released an update for the
Nexus One and the Motorola Droid which
enables multi-touch.
1.2
Features of Android
Multi-Touch:
1.2
Features of Android
Application framework enabling reuse and
replacement of components
Dalvik virtual machine optimized for mobile
devices (register based)
Integrated browser based on the open source
WebKit engine
Optimized graphics powered by a custom 2D
graphics library; 3D graphics based on the
OpenGL ES specification (hardware
acceleration optional)
1.2
Features of Android
Media support for common audio, video, and still
image formats (MPEG4, H.264, MP3, AAC, AMR,
JPG, PNG, GIF)
GSM Telephony (hardware dependent)
Bluetooth, EDGE, 3G, WiFi, NFC (hardware
dependent)
Camera, GPS, compass, accelerometer, gyroscope
(hardware dependent)
Rich development environment including a device
emulator, tools for debugging, memory and
performance profiling, and a plugin for the Eclipse
IDE
1.2
Features of Android
JPEG – Joint Photographic Experts Group
GIF – Graphics Interchange Format,
PNG – Portable Network Graphics
BMP – Windows Bitmap
TIFF – Tag Image File Format
WAV – Waveform PCM Audio
WMA – Windows Media Audio
BWF – Broadcast Wave Format
DAT – Digital Audio Tape
AMR-Adaptive Multi-Rate
1.2
Features of Android
MPEG-Moving Picture Experts Group
AAC-Advanced Audio Coding
AVI-Audio Video Interleave
MP3-MPEG Audio Layer III
MP4-MPEG-4 AVC (Advanced Video Coding)
MKV-Matroska Video
DVI-Digital Video Interactive
1.3
Android
1.3 Tools Architecture
& Software Required
Software Development IDE and Tools:
Java JDK:
• The Java Development Kit (JDK) is a software
development environment used for developing
Java applications and applets.
1.3
Android
1.3 Tools Architecture
& Software Required
Software Development IDE and Tools:
Java JDK:
• It includes the Java Runtime Environment
(JRE), an interpreter/loader (java), a compiler
(javac), an archiver (jar), a documentation
generator (javadoc) and other tools needed in
Java development.
1.3
Android
1.3 Tools Architecture
& Software Required
Software Development IDE and Tools:
Java JDK: JVM
⁃ JVM (Java Virtual Machine) is a specification that
provides runtime environment in which java
bytecode can be executed.
⁃ JVMs are available for many hardware and
software platforms. JVM is a part of Java Run
Environment (JRE).
1.3
Android
1.3 Tools Architecture
& Software Required
Software Development IDE and Tools:
Java JDK: JVM
⁃ The JVM performs following operation:
• Loads code
• Verifies code
• Executes code
• Provides runtime environment
1.3
Android
1.3 Tools Architecture
& Software Required
Software Development IDE and Tools:
Java JDK: JRE
⁃ The Java Runtime Environment (JRE) is a set of
software tools for development of Java
applications.
⁃ It combines the Java Virtual Machine (JVM),
platform core classes and supporting libraries.
1.3
Android
1.3 Tools Architecture
& Software Required
Software Development IDE and Tools:
Android SDK:
• The Android SDK (software development kit) is
a set of development tools used to develop
applications for Android platform.
1.3
Android
1.3 Tools Architecture
& Software Required
Software Development IDE and Tools:
Android SDK:
• The Android SDK includes the following:
⁃ Required libraries
⁃ Debugger
⁃ An Emulator
1.3
Android
1.3 Tools Architecture
& Software Required
Software Development IDE and Tools:
Android SDK:
• The Android SDK includes the following:
⁃ Relevant documentation for the Android
application program interfaces (APIs)
⁃ Sample source code
⁃ Tutorials for the Android OS
1.3
Android
1.3 Tools Architecture
& Software Required
Software Development IDE and Tools:
IDE: Android Studio
• Developed by Google, Android Studio is an all-
rounder integrated development environment.
• Android has Gradle-base support that has
features like visual layout editor, intelligent code
editor, real-time profilers and APK analyzer.
1.3
Android
1.3 Tools Architecture
& Software Required
Software Development IDE and Tools:
IDE: Visual Studio – Xamarin
• Xamarin was launched in 2011 which is the best
free IDE for delivering an enterprise-quality,
cross platform approach.
• Xamarin supplies add-ins to Microsoft Visual
Studio that allows developers to build Android,
iOS, and Windows apps within the IDE.
1.3
Android
1.3 Tools Architecture
& Software Required
Software Development IDE and Tools:
IDE: IntelliJ IDEA
• Using this IDE, you can do in-depth coding,
quick navigation, and error analysis. It supports
mobile app development with the help of Java,
Scala, Kotlin, Groovy.
1.3
Android
1.3 Tools Architecture
& Software Required
Software Development IDE and Tools:
IDE: Eclipse IDE
• It is one of the most popular IDES of Android
apps.
• The open-source software is free to use.
Released under the Eclipse Public License, it
holds a large community having plenty of
plugins and configurations.
1.3
Android
1.3 Tools Architecture
& Software Required
Software Development IDE and Tools:
IDE: Eclipse IDE
• Highly customizable offers full support for Java
programming language and XML.
1.3
Android
1.3 Tools Architecture
& Software Required
Software Development IDE and Tools:
App Development Tools : ADB (Android Debug
Bridge)
• ADB is a command-line communication bridge between
the android devices and computer devices on which you
are doing the coding. ADB allows the installation and
debugging of the android apps on the devices.
1.3
Android
1.3 Tools Architecture
& Software Required
Software Development IDE and Tools:
App Development Tools : AVD Manager (Android
Virtual Device)
• AVD is an emulator, or you can say the virtual device
that allows you to test and debug the android apps. AVD
has a range of characteristics, including android phones,
tablets, wearOS, androidTV, etc.
1.3
Android
1.3 Tools Architecture
& Software Required
Software Development IDE and Tools:
App Development Tools : Gradle Build Tool
• Gradle Build is also a powerful and most widely used
tool for android app development. It is primarily used to
speed up the android app development process by the
developers. The numerous API and plugins available in
the Gradle build tool automate the whole procedure and
made the deployment faster.
1.4
Android
1.4 AndroidArchitecture
Architecture
1.4
Android
1.4 AndroidArchitecture
Architecture
Android architecture or Android software
stack is categorized into five parts:
Linux kernel
Native Libraries (middleware)
Android Runtime
Application Framework
Applications
1.4
Linux Kernel
• Android OS is built on top of the Linux 2.6 Kernel
– Linux Core functionality
• Memory management
• Process management
• Networking
• Security settings
– Hardware drivers
1.4
Linux Kernel
The basic Layer is the Linux Kernel. The entire Android OS is built
on the top the Linus 2.6 Kernel with the architectural changes made
by Google.
It is highly trusted for years together for giving better security and
networking etc.
This layer has 10 major components which are nothing but drivers.
Android run time gives .dex file which converted from the .class file.
.dex file goes to the Linux Kernel and call the suitable drivers so that
it can communicate with the corresponding drivers.
1.4
Native Libraries
• Android’s Native Libraries:
– Libc: c standard lib.
– SSL: Secure Socket Layer
– SGL(Scalable Graphics Libraries): 2D image engine
– OpenGL|ES: 3D image engine
– Media Framework: media codecs
– SQLite: Database engine
– WebKit: Kernel of web browser
– FreeType: Bitmap and Vector
– SufraceManager: Compose window manager with off-screen buffering.
1.4
Native Libraries
Each Component of the frame like button, textfield,
image(2D, 3D) is rendered & interacted by the Surface
Manager.
Open GLIES: This Component is provides mostly 3D
graphics libraries which have to implemented by Java
application and it is rendered by the application layer when
they want some 3D graphics.
SQLite: We can use SQLite which is an open source
database as our applications are light weight.
1.4
Native Libraries
Media Framework: Picture Quality Should be good,
Multimedia actions should be good which includes Sounds, so
to get those activities or application Android API has to call
Media Framework Component to play and view the video-
audio.
SGL(Scalable Graphics Libraries): It is responsible for the
implementing low level graphics by using JNI.
FreeType: It is responsible for to support the font quality, the
image(bitmap images).
1.4
Native Libraries
SSL(Secured Socket Layer): It is used in internal applications. If we
want go through online from mobile then at that time we need some
secure socket layer. It is also used in case of Chat & messaging
system.
WebKit: It is responsible for giving the browser supports. Eg.
Google chrome, Apples Safari.
Libc: When we want to access some code C libraries headers then
this component is useful.
1.4
Runtime
Android Runtime
• Core Libraries:
– Provides the functionality of the JAVA Programming Language
• Dalvik VM:
– A type of Java Virtual Machine
– Register based (not stack machine like JVM)
– Optimization for low memory requirements, provides Security
– Executes .dex (Dalvik-Executable) files instead of .class
– DX tool converts classes to .dex format
Each Android application:
• runs on its own Process
• runs on its own Instance of Dalvik VM
• is assigned its own Linux user ID
1.4
Android Runtime
The android runtime provides a key component called Dalvik
Virtual Machine which is a kind of java virtual machine. It is
specially designed and optimized for android. The Dalvik VM
is the process virtual machine in the android operating system.
It is software that runs apps on android devices.
The Dalvik VM makes use of Linux core features like memory
management and multithreading which is in java language. The
Dalvik VM enables every Android application to run its own
process. The Dalvik VM executes the files in the .dex format.
1.4
Application Framework
Application Framework
• The blocks that our applications directly interact with.
• Important blocks:
– Activity Manager: Manages the activity life cycle of applications
– Content Providers: Manage the data sharing between applications
– Telephony Manager: Manages all voice calls. We use telephony
manager if we want to access voice calls in our application.
– Location Manager: Location management, using GPS or cell tower
– Resource Manager: Manage the various types of resources we use in
our Application
1.4
Applications
You will find all the android applications at the top layer
and you will write your application and install it on this
layer. Examples of such applications are contacts, books,
browsers, services, etc. Each application performs a
different role in the overall applications.
As developers, we are able to write an app which replaces
any existing system app.
1.4
AndroidDetails
Architecture
Apps • Design goals
Java – Open Source
App Framework – High flexibility
– High data accessibility
Libraries C/C++
Runtime – Rapid development
(XML, Java)
C Linux Kernel
• Used Languages
– App: Java
– Framework: Java
– Libraries: C/C++
– OS & Drivers: C
1.4
Android
1.4 AndroidArchitecture
Architecture
1.4
Details Layer (HAL)
Hardware Abstraction
1.4
• Android Architecture
http://www.android-app-market.com/android-architecture.html
• Application Fundamentals
http://developer.android.com/guide/components/fundamentals.html