3. Overview
Android Overview (What? & Why?)
SDK and Development Tools.
Android architecture, building blocks, and security.
Applications’ Framework and Components.
Comparable Features of Android.
Q&A and Demo
4. What is Android?
Modern open-source mobile operating system
Full software stack
Linux kernel 2.6
Java middleware, framework
core applications
Google & OHA
Goals (Being better, open, and standard) and vision.
Latest Release 4.0 (Ice Cream Sandwich)
5. Why Android?
open-source
oapache license
ocost
osetsdevelopers free
solid foundation: Linux kernel
good framework based on Java
empower users
oreplace core apps
oPersonalize
Google stuff
huge opportunity for vendors, developers, users
oOS for free, innovate at app level
not just for phones
6. SDK & Dev Tools
All major platforms supported
(linux, windows, and mac)
NDK for porting native code
OEM USB Driver
ADT for Eclipse v 18.0.0
SDK Package manager & AVD Manager
33.9 MB for the Starter SDK (core)
clean and compact
good documentation
4.0.3 latest version
Alternative Dev tools
7. SDK & Dev Tools (cont)
Eclipse and ADT
Emulator
adb tool from the command line
o Android Debug Bridge
o ex: adb install <path_to_apk>
other third party tools for UI generating,
sensors readings, etc.
8. SDK & Dev Tools (cont)
So what are the development approaches?
Eclipse and ADT
Mono for Android
HTML 5 & Javascript
o Titanium Appaccelator
o PhoneGap
Google App Inventor (MIT)
Android App Makers like andromo
Wordpress and its alike
11. Architecture & Building Blocks
Linux 2.6 based
Provides hardware management
o File System
o Memory management
o Network (3G, EDGE, Wifi, BT)
o Camera
o Keyboard
o Power Management
12. Architecture & Building Blocks
Libraries
Graphics
o OpenGL, Scalable Image, Animations
Media
o Images (.png, .jpeg, etc)
o Videos (.mp4, .3gp, .wmv, etc)
o Audio (.mp3, .mp4 etc)
Local Storage
o File System, and SQLite.
Security
o SSL library
Integrated Web Browser
o Webkit based
oUses Google Chrome
oCSS 3, HTML5, Animation, etc
13. Architecture & Building Blocks
Android Runtime
Dalvik
o A virtual machine executing apps
o Java development language
Provides some supporting libraries
o HTTPClient, XML Parsing, JSON, etc
14. Architecture & Building Blocks
Applications Framework
Functionality managed by the system
Underlying framework for your app
development
Sharing common functionality.
This makes all apps are:
o Equal
o can use any of the mentioned
functionalities
o can cooperate together
15. App Architecture
Activity
visible screens
Service
background services
Content Provider
shared data
Broadcast receivers
receive and react to broadcasted events
Intent
activating components
AndroidManifest.xml
16. App Architecture (Cont.)
Activity
Visual User Interface for one task
o ex: list of menu items & input fields
Work together to form a cohesive UI
One of the activities is marked as the
first or main starting point.
Can use additional UI elements such as
pop-ups and dialogue boxes
18. App Architecture (Cont.)
Services
Run in the background for an indefinite
period of time
Interact with services using API or through
UI interfaces.
A service starts via a UI element, does not
stop even after the activity gets disposed.
Difference between Create() & Bind()
Can communicate with other services.
Examples:
o Media player service
o Location Monitor Service
19. App Architecture (Cont.)
Broadcast Receiver
Receive announcements and react.
Examples of System broadcast:
Time zone has changed
Battery is low, and soon.
Applications can also initiate broadcasts
ex: Data has been downloaded
An app can have many broadcastReceivers
Difference between BroadcastReceiver and
the services.
o Broadcast intents delivered to all BR.
o Some Broadcast intents are sticky.
20. App Architecture (Cont.)
Content Provider
Makes app data available to other apps by
storing it to:
o File system
o SQLite
Implement a standard set of methods
o Enable other apps to access and store
data
Apps cannot call methods directly
ContentResolver object is used to
o communicate with other content
provider
o Cooperate with the provider to
manage any interprocess
communication that is involved
21. App Architecture (Cont.)
Intent
Passive data structure holding an abstract description of an operation to be
performed
Facilitate late run-time binding between components
All Activities, Services, and BroadcastReceivers are activated by intents.
An intent is passed with its data to the System to start an operation, the system
finds the appropriate action and performs it.
The primary pieces of information in an intent are:
o Action: action to be performed (ex: ACTION_VIEW, ACTION_DIAL, etc)
o Data: data to operate on (ex: person record from the database)
Examples:
Intent i = new Intent(this, NameOfClassToTransitTo.class);
i.putExtra(“key”, “value”);
startActivity(i);
22. App Architecture (Cont.)
An intent filter declares the capabilities of its parent component — what an activity
or service can do and what types of broadcasts a receiver can handle
24. Applications packaging
So what is delivered?
zip file (.apk)
Java .class converted to .dex
XML-files compressed into binary form
manifest for app permissions
signed with developer private key
developer public key included
assets packaged as is
25. Security
Android apps run in sandboxed instances
Linux user account per app
Based on app permissions
Apps are signed by developer private key
No central authority
why signing at all:
two sibling apps can share data (process and
userid)
upgrade also smooth, same key
26. Other Android Features
Open Nature
Open Source
Freedom of Customisability
(Custom ROM, OS Builds, Core App Replacement).
User widgets
Community Based Development
Third Party App Stores
Flash Support
Seamless Integration with Google Stuff
Application framework enabling reusability and replacement of App components
SQLite for structured data storage
Media Support
o Property-based animation and Renderscript 3D graphics.
o Support MTP and PTP protocols
Full device encryption
o DPM policies for encrypted storage and passwords
28. Conclusions
Android advantages outweigh its drawbacks as mentioned earlier.
Android OS is still Consumer focused, no considerable presence in corporate
market.
Fragmentation and Security are the two major concerns in Android.
Development tools are evolving.
In Future, Android might loose a bit of the share to other OS like Windows 7, but
would still be one of the top Mobile OS.
It all depends on how Google Plays it.