android workshop session 1
TRANSCRIPT
05-02-2012 http://www.iwillstudy.com/group/android
Session #1
Mobile Ecosystem
Users
Service Provider
OEM
Developers
Mobile Operating Systems
Android
Symbian
iOS
Blackberry OS
Samsung Bada
Windows Mobile
Windows Phone 7
Key Differences: Android vs. iPhone
Android
OS is proprietary
OS runs on iPhone or iPod
Touches only
Apps written in Objective-
C
Dev tools Mac-only
Apple must approve all
apps Application Store
OS is open source
OS can be licensed for any mobile device
Apps written in Java
Dev tools for many OS’s
No approval process for apps Android Market
All apps considered equal (choose your browser)
iPhone
Android History
Founded in 2003.
Acquired by Google in August 2005
OHA was firmed in November 2007.
Since October 2008 Android has been available
under a Free Space Software/Open Source License.
Open Handset Alliance (OHA)
Open Handset Alliance (OHA)
Open Handset Alliance (OHA)
Android Versions
1.0
Sept 2008
1.1
Feb 2009
1.5
Cup Cake
April 2009
1.6
Donut
Sept 2009
2.0/2.1
Éclair
Oct 2009
2.2
Froyo
May 2002
2.3/2.3.3
Gingerbread
Dec 2010
3.X
Honeycomb
Feb 2011
4.0
Ice-Cream Sandwich
Oct 2011
Distribution API level %
1.5 Cupcake 3 0.6%
1.6 Donut 4 1.0%
2.0, 2.1 Eclair 7 7.6%
2.2 Froyo 8 27.8%
2.3.x Gingerbr
ead9-10 58.6%
3.x.x Honeyco
mb11-13 3.4%
4.0.x Ice
Cream
Sandwich
14-16 1.0%Usage share of the different
versions, by February 1, 2011
Google Services
Gmail
Maps
Docs
Latitude
Calendar
Google Talk
Market Place
Market? Revenue?Free
Apps?Review
Systems?
Why Android is growing?
• Open Source
• Free SDK
• Easy To Use APIsDevelopers
• Free
• Open Standards (Design/Hardware)OEMs
• Suits Business Model
• Huge Market Space
Service Providers
Introduction to Android Platform
Android is an open software platform for mobile
development.
Android Architecture
Linux Kernel
The architecture is based on the Linux 2.6 kernel.
Android use Linux kernel as its hardware abstraction
layer.
It also provides memory management, processmanagement, a security model, andnetworking, a lot of core operating system
infrastructures that are robust and have been proven
over time.
Native Libraries
The next level up is the native libraries.
Everything that you see here in green is written
in C and C++.
It's at this level where a lot of the core power
of the Android platform comes from.
Android Run Time
Android Run Time
Application Framework
Application Framework
Application Framework
Application Framework
Application Framework
Applications
And the final layer on top is Applications.
This is where all the applications get written.
It includes the home application, the contacts application, the
browser, and your apps.
And everything at this layer is, again, using the same app
framework provided by the layers below.
Now, if you're going to write an app, the first step is to
decompose it into the components that are supported by
the Android platform.
• UI component typically corresponding to one screen.Activity
• Responds to notification or status changes. Can wake up your process.Intent Receiver
• Faceless task that runs in the background.Service
• Enable applications to share dataContent Provider
Application Building Blocks
Application Building Blocks
An activity is a single, focused
thing that the user can do.
Activity Lifecycle
Actual Representation
Actual Representation
Component
Lifecycles
Application Building Blocks
They are nothing Else but
messages.
We need to intent if we need to
start any Activity , Service or
Broadcast Messages.
An Activity Diagram
Activity One Activity TwoIntent
Application Building Blocks
A service run in the background.
User for long running task.
A good example is a music player.
A Service is not a separate process and A
Service is not a thread.
Component Services
Media PlayerActivity
Service
Background runningfor playback
Binder
Notification
Communication
Pause/rewind
/stop/restart
Application Building Blocks
Content providers store and retrieve data and
make it accessible to all applications.
This is only way to share data across applications.
Examples of Content Provider – Contacts, SMS,
Calendar, User Define etc.. And NOT email
Components - Content Providers
Activity
Application
Activity
Application
Activity
Content Provider
Service
Application
DataSQLite
XML
Remote
Store
Content Resolver Content Resolver
Content Resolver
Let’s make our First AVD
Android Virtual Device
IDE + Hello World + Program
Structure
Lets jump into programming now !!
Learning Android is as simple as biting an Apple!
Installations
&
Configuration
Installation Resources
At Least 2GB of Ram minimum.
Install Java Run Time.
Copy Android SDK directories into your system
Install Android SDK manager
Get Eclipse
Add ADT plug-in to Eclipse
Get Android SDK directory on eclipse
SESSION 1 OVER