39
05-02-2012 http://www.iwillstudy.com/group/android Session #1

Android Workshop Session 1

Embed Size (px)

Citation preview

Page 1: Android Workshop Session 1

05-02-2012 http://www.iwillstudy.com/group/android

Session #1

Page 2: Android Workshop Session 1

Mobile Ecosystem

Users

Service Provider

OEM

Developers

Page 3: Android Workshop Session 1

Mobile Operating Systems

Android

Symbian

iOS

Blackberry OS

Samsung Bada

Windows Mobile

Windows Phone 7

Page 4: Android Workshop Session 1

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

Page 5: Android Workshop Session 1

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.

Page 6: Android Workshop Session 1

Open Handset Alliance (OHA)

Page 7: Android Workshop Session 1

Open Handset Alliance (OHA)

Page 8: Android Workshop Session 1

Open Handset Alliance (OHA)

Page 9: Android Workshop Session 1

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

Page 10: Android Workshop Session 1

Google Services

Gmail

Maps

Docs

Latitude

Calendar

Google Talk

Page 11: Android Workshop Session 1

Market Place

Market? Revenue?Free

Apps?Review

Systems?

Page 12: Android Workshop Session 1

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

Page 13: Android Workshop Session 1

Introduction to Android Platform

Android is an open software platform for mobile

development.

Page 14: Android Workshop Session 1

Android Architecture

Page 15: Android Workshop Session 1

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.

Page 16: Android Workshop Session 1

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.

Page 17: Android Workshop Session 1

Android Run Time

Page 18: Android Workshop Session 1

Android Run Time

Page 19: Android Workshop Session 1

Application Framework

Page 20: Android Workshop Session 1

Application Framework

Page 21: Android Workshop Session 1

Application Framework

Page 22: Android Workshop Session 1

Application Framework

Page 23: Android Workshop Session 1

Application Framework

Page 24: Android Workshop Session 1

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.

Page 25: Android Workshop Session 1

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

Page 26: Android Workshop Session 1

Application Building Blocks

An activity is a single, focused

thing that the user can do.

Activity Lifecycle

Actual Representation

Page 27: Android Workshop Session 1
Page 28: Android Workshop Session 1

Actual Representation

Component

Lifecycles

Page 29: Android Workshop Session 1

Application Building Blocks

They are nothing Else but

messages.

We need to intent if we need to

start any Activity , Service or

Broadcast Messages.

Page 30: Android Workshop Session 1

An Activity Diagram

Activity One Activity TwoIntent

Page 31: Android Workshop Session 1

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.

Page 32: Android Workshop Session 1

Component Services

Media PlayerActivity

Service

Background runningfor playback

Binder

Notification

Communication

Pause/rewind

/stop/restart

Page 33: Android Workshop Session 1

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

Page 34: Android Workshop Session 1

Components - Content Providers

Activity

Application

Activity

Application

Activity

Content Provider

Service

Application

DataSQLite

XML

Remote

Store

Content Resolver Content Resolver

Content Resolver

Page 35: Android Workshop Session 1

Let’s make our First AVD

Android Virtual Device

Page 36: Android Workshop Session 1

IDE + Hello World + Program

Structure

Lets jump into programming now !!

Learning Android is as simple as biting an Apple!

Page 37: Android Workshop Session 1

Installations

&

Configuration

Page 38: Android Workshop Session 1

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

Page 39: Android Workshop Session 1

SESSION 1 OVER