Android Technology
Guide
Reshma.R
By
Veena.G.Y
Out Line:
•What is Android?
•Architecture of Android
•Development for Android
What is Android:
• Android is a automated machine designed to look and
act like a human
• Android is a combination of human brain and
mechanism, which in turn we call
Android Technology.
Android:
• Android™ delivers a complete set of software for mobile
devices: an operating system, middleware and key
mobile applications.
• Open
• All application and Created equal
• Breaking down application boundaries
• Fast & easy application development
Open
• Android is built on the open Linux Kernel.
All applications are created equal:
• Android does not
differentiate between the
phone's core
applications .
• With devices built on the
Android Platform, users
are able to fully tailor the
phone to their interests.
Breaking down application boundaries:
• Android breaks down the barriers to building new and
innovative applications.
• A developer can combine information from the web with
data on an individual's mobile phone -- such as the
user's contacts, calendar, or geographic location
Fast & easy application development:
• Android provides access to a wide range of useful libraries and tools
that can be used to build rich applications.
• For example, Android enables developers to obtain the location of
the device, and allows devices to communicate with one another
enabling rich peer-to-peer social applications.
History of Android
• 2001 search service for wireless device
• 2005 Andrew Rubin started work on Android
Technology.
• 2007 Nov 5: Android announced.
• 2008 Jan 3: Android Developer Challenge 1
starts accepting submissions.
• 2008 Nov: Android Phone(G1 Phone by HTC/T-mobile)
• 2008 Nov: Full Source Open.
• 2009 July: HTC Hero, Samsung i7500, Android Netbook,
Set-top……
Open:
• Industry
• Software stack open-sourced under Apache 2.0 license
• Source available after first handsets ship
• Anyone will be able to build a system image
• Users
• Users have control of their experience
• They control what gets installed
• They choose the defaults
• Developer
• Don not need permission to ship an application
• No hidden or privileged framework APIs
• Can integrate, extend and replace existing component
Introduction to Android
• Open software platform for mobile
development
• A complete stack – OS, Middleware,
Applications
• An Open Handset Alliance (OHA) project
• Powered by Linux operating system
• Fast application development in Java
• Open source under the Apache 2 license
Android Architecture
Application Layer
Application
Framework
Libraries
Linux Kernel
Linux Kernel
• Works as a HAL
• Device drivers
• Memory management
• Process management
• Networking
Libraries
• C/C++ libraries
• Interface through Java
• Surface manager – Handling UI Windows
• 2D and 3D graphics
• Media codecs, SQLite, Browser engine
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…
Application Framework
• API interface
• Activity manager – manages application life
cycle.
Applications
• Built in and user apps
• Can replace built in apps
Agenda
• Mobile Application Development (MAD)
• Intro to Android platform
• Platform architecture
• Application building blocks
• Development tools
• Hello Android
Application Building Blocks
• Activity
• IntentReceiver
• Service
• ContentProvider
Activities
• Typically correspond to one UI screen
• But, they can:
– Be faceless
– Be in a floating window
– Return a value
IntentReceivers
• Components that respond to broadcast
‘Intents’
• Way to respond to external notification or
alarms
• Apps can invent and broadcast their own
Intent
Intents
• Think of Intents as a verb and object; a
description of what you want done
– E.g. VIEW, CALL, PLAY etc..
• System matches Intent with Activity that
can best provide the service
• Activities and IntentReceivers describe
what Intents they can service
Intents
Home
Picasa
Photo
Gallery
Contacts
“Pick photo”
GMail
Client component makes a
System picks best
Chat
request
New for a specific
components can use
component for that action
action
existing functionality
Blogger
Blogger
Services
• Faceless components that run in the
background
– E.g. music player, network download etc…
ContentProviders
• Enables sharing of data across
applications
– E.g. address book, photo gallery
• Provides uniform APIs for:
– querying
– delete, update and insert.
• Content is represented by URI and MIME
type
Agenda
• Mobile Application Development (MAD)
• Intro to Android platform
• Platform architecture
• Application building blocks
• Development tools
• Hello Android
Development Tools
• Eclipse
• Android SDK 1.0-2.0
developer.android.com
The Emulator
• QEMU-based ARM emulator
• Runs the same image as the
device
• Limitations:
– No Camera support
Devices
Hello World
• http://developer.android.com/guide/tutorial
s/hello-world.html
• Generating UIs
– Views – building blocks
– E.g. TextView, EditText, Button
– Placed into Layouts
– E.g. LinearLayout, TableLayout,
AbsoluteLayout
Application Lifecycle
• Application run in their own processes
(VM, PID)
• Processes are started and stopped as
needed to run an application's
components
• Processes may be killed to reclaim
resources
Lifecycle
• System • Home • Mail • Browser
Process
Home
• Map
Contacts
GMail
Location Manager
XMPP Services
• Allows any app to send device-to-device
messages to other android users
• Data Messages are Intents with
name/value pairs
• Works with any gmail account…
• Can also build servers to deliver server-to-
device messages
Notification Manager
Notification Manager
• How background app interact with users
• Consistent notification presentation
Views
Views
Location Manager