You are on page 1of 44

Android Platform

Adesh Bora Guide


T.E.I.T Prof. Pawar Mam
Roll No.-10

5-3-2011 Android Platform 1


Main topics

1. Introduction

2. Platform

3. Software development

4. Overall evaluation

5-3-2011 Android Platform 2


Smart phone OS

 Symbian
 Windows Mobile
 RIM Blackberry OS
 Apple iOS
 Google Android
 Palm WebOS
 Windows Phone 7

5-3-2011 Android Platform 3


Android
 Software platform developed by Google for
mobile phone
 Free of charge
 Open source (Apache License except for kernel)
 Packaging OS to upper layer applications such as
browser

 It is said that handset using Android will be


released in 21st oct 2008

5-3-2011 Android Platform 4


Android OS
 Fastest growing mobile OS
 First phone launched HTC G1 in 2008
 Currently an OS of choice for Motorola,
HTC, Samsung, Sony Ericsson, among
others
 Software updates every few months

5-3-2011 Android Platform 5


What is Android?
 A complete software stack for mobile devices..
 Introducing Android
 A first joined project off the Open Handset Alliance (OHA)..
 First open, complete and free platform
 Software stack open-sourced under Apache 2..0 license
 Source code will be available and everyone will have the capability to
built an image
 The Android platform
 It includes an operating system,, a middleware and some applications..
 Lightweight and full featured
 Developers can extend and replace existing components
 A generous development environment
 A SDK is available to build, compile, test and debug user applications..
 Applications are developed using Java programming language
 No difference between the built-in applications and the user ones

5-3-2011 Android Platform 6


The Android platform

 Linux Kernel
 Native Libraries
 Android Runtime
 Applicatiion Framework…
 Anatomy of an Android application
 Creating and deploying an application

5-3-2011 Android Platform 7


Why Android ?
 Full phone software stack including
applications
 Designed as a platform for software
development
 Android is open
 Android is free
 Community support
 Tool support
 100% Java Phone

5-3-2011 Android Platform 8


Android – what is it?

 software stack for mobile devices


 incl. OS, middleware and key applications
 Open source – source code is open and
contributions are welcome
 application framework enabling
reuse/replacement of apps
 integrated browser based on webkit

5-3-2011 Android Platform 9


Android – what is it?
 Optimized graphics – 2D graphics library, 3D
based on OPEN GL ES
 Media support (MPEG4, H.264, MP3, AAC,
JPG, PNG,…)
 Support for radio interfaces, Bluetooth, WiFi,
Camera, GPS, accelerometer
 Software Development Kit (SDK)
 Preinstalled applications from Google (GMS)
 Gmail, Maps, Search, Voice Search, Youtube

5-3-2011 Android Platform 10


Software Stack

 Linux kernel
 Libraries
 Android run time
 core libraries
 Dalvik virtual machine

 application layer
 application protocol

5-3-2011 Android Platform 11


Android GUI
 Java 1.5 support
 GUI is fully written in Java
 but it is not AWT / Swing
 and neither J2ME LCDUI
 Widget toolkit
 XML based GUI
 (Touch) screen
 Might have a keyboard

5-3-2011 Android Platform 12


Android applications are
compiled to Dalvik bytecode
Write
Write app
app in
in Java
Java
Compiled
Compiled in
in Java
Java

Transformed
Transformed to
to Dalvik
Dalvik bytecode
bytecode

Loaded
Loaded into
into Dalvik
Dalvik VM
VM

Linux OS

5-3-2011 Bruce Scharlau, University of Aberdeen, 2010


Android Platform 13
The Dalvik runtime is optimised
for mobile applications

Run multiple VMs efficiently

Each app has its own VM

Minimal memory footprint


5-3-2011 Bruce Scharlau, University of Aberdeen, 2010
Android Platform 14
Android Architecture

5-3-2011 Android Platform 15


Linux Kernel

• Works as a HAL
• Device drivers
• Memory management
• Process management
• Networking

5-3-2011 Android Platform 16


Libraries

• C/C++ libraries
• Interface through Java
• Surface manager – Handling UI Windows
• 2D and 3D graphics
• Media codecs, SQLite, Browser engine

5-3-2011 Android Platform 17


Android Runtime

• Dalvik VM
– Dex files
– Compact and efficient than class files
– Limited memory and battery power
• Core Libraries
– Java 5 Std edition
– Collections, I/O etc…

5-3-2011 Android Platform 18


Application Framework

• API interface
• Activity manager – manages application
life cycle.

5-3-2011 Android Platform 19


Applications

• Built in and user apps


• Can replace built in apps

5-3-2011 Android Platform 20


Application Framework
 Rich, extensible set of Views
 apps can inclused lists, grids, text boxes, buttons,
web browser
 Content Providers
 allows data access from other applications or share
own data
 Resource Manager
 access to localized strings, graphics, layout files
 Notification Manager
 enables custom alerts to be displayed in status bar
 Activity Manager
 Manages lifecycle of applications and provides
navigation backstack
5-3-2011 Android Platform 21
There is a common file structure
for applications
code
Autogenerated
files resource list
images

UI layouts

constants

5-3-2011 Bruce Scharlau, University of Aberdeen, 2010


Android Platform 22
Standard components form
building blocks for Android apps
Notifications
Has life-cycle
Activity
screen
Views
App to handle content
Intents
Background app
Service Like music player

manifest

ContentProviders Other applications


5-3-2011 Bruce Scharlau, University of Aberdeen, 2010
Android Platform 23
Android applications have
common
Views
Views such
such as
as
structure
lists,
lists, grids,
grids, text
text An
An Activity
Activity Manager
Manager that
that
boxes,
boxes, buttons,
buttons, manages
manages the
the life
life cycle
cycle of
of
and
and even
even an
an applications
applications and
and provides
provides
embeddable
embeddable web web aa common
common navigation
navigation
browser
browser backstack
backstack
Content
Content A
A Notification
Notification Manager
Manager
Providers
Providers that
that that
that enables
enables all
all apps
apps toto
enable
enable display
display custom
custom alerts
alerts in
in the
the
applications
applications toto status
status bar
bar
access
access data
data from
from
other
other applications
applications A
A Resource
Resource Manager,
Manager,
(such
(such as
as providing
providing access
access toto non-
non-
Contacts),
Contacts), oror to
to code
code resources
resources such
such asas
share
share their
their own
own localized
localized strings,
strings,
data
data graphics,
graphics, and
and layout
layout files
files
5-3-2011 Bruce Scharlau, University of Aberdeen, 2010
Android Platform 24
Android applications have
common structure
Broadcast
Broadcast Activity
Activity isis the
the presentation
presentation
receivers
receivers can
can layer
layer of
of your
your app:
app: there
there will
will
trigger
trigger intents
intents that
that be
be one
one per
per screen,
screen, and
and the
the
start
start an
an application
application Views
Views provide
provide the
the UI
UI to
to the
the
activity
activity
Data
Data storage
storage
provide
provide data
data for
for Intents
Intents specify
specify what
what
your
your apps,
apps, and
and specific
specific action
action should
should be
be
can
can be
be shared
shared performed
performed
between
between apps
apps ––
database,
database, file,
file,
and
and shared
shared Services
Services run run in
in the
the
preferences
preferences background
background and and have
have
(hash
(hash map)
map) used
used no
no UI
UI for
for the
the user
user ––
by
by group
group of
of they
they will
will update
update data,
data,
applications
applications and
and trigger
trigger events
events

5-3-2011 Bruce Scharlau, University of Aberdeen, 2010


Android Platform 25
Application Fundamentals
 Activities
 application presentation layer
 Services
 invisible components, update data sources, visible activities, trigger notifications
 perform regular processing even when app is not active or invisible
 Content Providers
 shareable data store
 Intents
 message passing framework
 broadcase messages system wide, for an action to be performed
 Broadcast receivers
 consume intent broadcasts
 lets app listen for intents matching a specific criteria like location
 Notifications
 Toast notification
 Status Bar Notification
 Dialog notification

5-3-2011 Android Platform 26


 

5-3-2011 Android Platform 27


Applications
 All apps (native and 3rd party) are written using
the same APIs and run on the same run time
executable
 All apps have APIs for hardware access,
location-based services, support for
background services, map-based activities, 2D
and 3D graphics.
 App Widgets are miniature app views that can
be embedded in other apps like Home Screen

5-3-2011 Android Platform 28


App Priority and Processes
 Android apps do not have control over their
own life cycles
 Aggressively manages resources to ensure
device responsiveness and kills process/apps
when needed

 Active Process – critical priority


 Visible Process – high priority
 Started Service Process
 Background Process – low priority
 Empty process

5-3-2011 Android Platform 29


Client apps
 Developed using the Android SDK and
installed on user devices
 Compiled Java code, with data and resource –
bundled by Android Asset Packaging tool
(AAPT) into Android package or .apk
 All applications have Android Manifest file in its
root directory
 provides essential information about app
 Could be installed directly on phone, but
necessary to be distributed thru Market

5-3-2011 Android Platform 30


Web Apps

 An alternative to standalone apps


 Developed using web standards and
accessed through browser – nothing to
install on devices
 Mixing client and web apps is also
possible – Client apps can embed web
pages using “Webview” in Android app

5-3-2011 Android Platform 31


SDK
 Android APIs, Full Documentation and Sample code
 Development tools
 Dalvik Debug Monitor Service (DDMS)
 Android Debug Bridge (ADB)
 Android Emulator
 Online support and blog
 Native Development Kit also available
 allows developers to implement parts of apps in native-
code languages like C/C++
 Plug in available to use Eclipse integrated development
environment
 Developer forums and developer phones from Google,
MOTO Dev studio from Motorola

5-3-2011 Android Platform 32


Android Market
 Google Market - Part of GMS apps
 3rd party apps submitted to Google, approved and distributed
through Market
 Both Free and Paid apps
 Apps now limited to 50 MB; updates possible through Market
 Monetization through ads available
 Available in many countries, not all countries have support for paid
apps
 Other Market place applications available – Amazon has announced
its own Android Market place
 App searches filtered based on Manifest file (eg. if a device does
not have trackball, apps using trackball will be filtered out)
 Every app publishes a list of components the app will access and
permissions need to be granted before installation
 Apps installed on device and SD card (SD Card from Froyo)

5-3-2011 Android Platform 33


Search
 Core feature in android
 User should be able to search any data on
device or internet
 Usually one of the android buttons
 Search suggestions based on recent queries
 Provide custom search suggestions that match
actual results in application data
 system side Quick Search Box
 Voice Search available and enhanced in recent
releases
5-3-2011 Android Platform 34
Locations & Maps
 Compelling and most popular apps for
mobile devices
 Google Maps provides free navigation
 applications allowed access to location
services supported by device
 Google provides Maps external library
 allows built-in downloading, rendering and
caching of Maps tiles, and other display
options and controls

5-3-2011 Android Platform 35


Device Administration

 Froyo introduces support for enterprise


applications with Device Administraion API
 allows to create security-aware
applications to control employee devices
 Apps might include
 Email clients
 remote wipe

 device management services and apps

5-3-2011 Android Platform 36


Android Software Updates
 Android 1.0 – G1
 1.5 – Cupcake
 1.6 – Donuts (CDMA support)
 2.0 – Éclair (Droid introduced with Éclair)
 2.2 – Froyo
 2.3 Gingerbread (SDK released 2 weeks ago and source
will follow soon)
 API Levels used by apps to identify software version on
the device
 Android apps are generally forward compatible with
newer version, but not necessarily backwards compatible

5-3-2011 Android Platform 37


Compatibility
 Why?
 Allow customizable devices
 Create Common eco system
 Android compatibility is free and easy
 Obtain Android source code
 Comply with Android Compatibility Definition (ACD) doc
 List requirements that need to be met for devices to be compatible with a
particular version on Android
 Pass the Compatibility Test Suite (CTS)
 Automated test harness running on desktop, manages test exectuion
 Test cases written, packaged as .apk to run on actual device or emulator
 Porting guide available for bringing up Android on custom
HW

5-3-2011 Android Platform 38


Other possibilities

 Google TV - a new platform based on


Android
 Tablets – Samsung Galaxy tab
introduced in Oct 2010
 eBook reader – Latest Barnes and Noble
Nook is an Android tablet

5-3-2011 Android Platform 39


A real word example I

 A translater for Android


 You cannot read anything
 If you are in a country where no one
understands your language
 No aditional device needed
 You have your mobile phone always
with you

5-3-2011 Android Platform 40


A real word example II

 Uses the google translator


 Can be extended with new languages
 Adaptive GUI
 Uses XMPP for data transmission
 GUI fully defined in XML
 Uses camera input and OCR

5-3-2011 Android Platform 41


Resources

 http://www.android.com
 http://http://android
developers.blogspot.com
 http://developer.motorola.com/

5-3-2011 Android Platform 42


5-3-2011 Android Platform 43
Thanks

5-3-2011 Android Platform 44

You might also like