Android Unit I MMD
Android Unit I MMD
Android Unit I MMD
dr
oi d
INTRODUCTION
Android's mobile operating
system is based on the Linux
kernel and is the world's best-
selling Smartphone.
There are currently over
200,000 apps available for
Android that are made
accessible through the
Android Market, which is the
online app store run by
Google.
The apps are primarily written
in Java.
BACKGROUND
Android Inc. was founded in Palo
Alto, California in October, 2003 by
Andy Rubin, Rich Miner, Nick Sears,
and Chris White.
Their goal was to develop a
"smarter mobile device that was
more aware of its owner's location
and preferences.”
They operated secretively,
admitting only that they were
working on software for mobile
phones.
BACKGROUND
On October 21st, 2008, Android
1.0 became available to the
public.
"Today's announcement is more
ambitious than any single
'Google Phone' that the press
has been speculating about over
the past few weeks. Our vision is
that the powerful platform we're
unveiling will power thousands
of different phone models.“
-Eric Schmidt, former Google
Chairman/CEO
Android Introduction
Platform Overview
5
What is Android?
6
7
THE ANDROID VERSION
Android 1.0 Alpha
Android 1.1 Beta
Android Cupcake
Android Donut
Android Eclair
Android Froyo
Android Gingerbread
Android Honeycomb
Android Ice Cream Sandwich
Android Jelly Bean
Android KitKat
Android Lollipop
Android Marshmallow
Android Nougat
Android Oreo
Android Pie
Android 10
Android 11
Android 12
Android 12L
Android 13
Android 14
8
OHA (Open Handset Alliance)
A business alliance consisting of 47
companies to develop open standards
for mobile devices
9
Phones
HTC G1,
Droid, Motorola Droid (X)
Tattoo
10
Tablets
11
Features of Android
16
17
18
Android S/W Stack - Application
19
20
Android S/W Stack –
App Framework
Enabling
and simplifying the reuse of
components
Developers have full access to the same
framework APIs used by the core applications.
Users are allowed to replace components.
21
Android S/W Stack –
App Framework (Cont)
Features
Feature Role
View Used to build an application, including lists, grids, text
System boxes, buttons, and embedded web browser
Content Enabling applications to access data from other
Provider applications or to share their own data
Resource Providing access to non-code resources (localized strings,
Manager graphics, and layout files)
Notification Enabling all applications to display customer alerts in the
Manager status bar
Activity Managing the lifecycle of applications and providing
Manager a common navigation backstack
Location Provide access to the location services allowing an
Manager application to receive an updates about location changes
22
Android S/W Stack - Libraries
23
24
@2011 Mihail L. Sichitiu 25
26
Android S/W Stack - Runtime
Core Libraries
Providing most of the functionality available in
the core libraries of the Java language
APIs
Data Structures
Utilities
File Access
Network Access
Graphics
Etc 27
Android S/W Stack – Runtime (Cont)
Dalvik Virtual Machine
Providing environment on which every Android application runs
Each Android application runs in its own process, with its own instance of
the Dalvik VM.
Dalvik has been written such that a device can run multiple VMs efficiently.
28
Android S/W Stack – Runtime (Cont)
Dalvik Virtual Machine (Cont)
Executing the Dalvik Executable (.dex) format
.dex format is optimized for minimal memory footprint.
Compilation
29
30
Android S/W Stack – Linux Kernel
31
32
33
https://www.javatpoint.com/android-operating-system
Application
Structure
Application Components
Services
A service is a component that runs in the background to perform long-running
operations or to perform work for remote processes. A service does not provide a
user interface.
Content providers
A content provider manages a shared set of application data. You can store the
data in the file system, an SQLite database, on the web, or any other persistent
storage location your application can access. Through the content provider, other
applications can query or even modify the data (if the content provider allows it).
Broadcast receivers
A broadcast receiver is a component that responds to system-wide broadcast
announcements. Many broadcasts originate from the system—for example, a
broadcast announcing that the screen has turned off, the battery is low, or a picture
was captured. Applications can also initiate broadcasts.
Activating Components
Your application must declare all its components in this file, which must be at
the root of the application project directory.
And more
Declaring components
The primary task of the manifest is to inform the system about the application's components. For example, a manifest file
can declare an activity as follows:
Activities, services, and content providers that you include in your source but do not declare in the manifest are not visible to
the system and, consequently, can never run.
Application Resources
For every resource that you include in your Android project, the SDK build
tools define a unique integer ID, which you can use to reference the
resource from your application code or from other resources defined in
XML.
Each process has its own virtual machine (VM), so an application's code runs
in isolation from other applications.
/Android/data/<package_name>/your_files
Build process
• AAPT stands for android assets packaging tool. This tool comes with the Android SDK and present in
$ANDROID_HOME/platform-tools/. It takes all the resources present in the res/ directory and compiles them. It generates a
R.java file which contains ids of all the resources. Once you have installed the Android SDK you can directly execute the
aapt commands.
• Then all the java files including R.java gets compiled into byte code.
• Android application runs on dalvik vm so the byte code is cross compiled to the Dalvik byte code (.dex file)
• The .dex file and the compiled resources together forms the .apk file.
• Generated apk file is a debug build, to make a release build we need to sign the apk file using a key. You can do this from Android
Studio.
• Once you sign the apk file it will be ready to use in production.
Android UI
Resources