android introduction&hello world

19
ANDROID INTRODUCTION & MY FIRST ANDROID APP (HELLO WORLD) 2010/11/23 made by John

Post on 22-Oct-2014

806 views

Category:

Documents


0 download

DESCRIPTION

Android introduction and Hello world

TRANSCRIPT

Page 1: Android introduction&hello world

ANDROID INTRODUCTION &MY FIRST ANDROID APP (HELLO WORLD)

2010/11/23 made by John

Page 2: Android introduction&hello world

What we want from Android?

Page 3: Android introduction&hello world

Agenda

Background Androidology : Architecture Overview Androidology : Application Building

Blocks Androidology : Reusing & Replacing

Compnts Androidology : Application Life Cycle Androidology : APIs Brief View Developer Tool chain My first Android App : HelloWorld Q & A

Page 4: Android introduction&hello world

Background (1)Source: International Telecommunication Union

Page 5: Android introduction&hello world

Background (2)

Android continues to put in a powerful performance as measured by the share of mobile web consumption

In August Android took share from every corner of the market, putting in its best month share gain since November 2009

Page 6: Android introduction&hello world

Background (3)What’s Android : Android is a mobile operating system initially developed by Android Inc. The unveiling of the Android distribution on 5 November 2007 was announced with the founding of the Open Handset Alliance. The Android operating system software stack consists of Java applications running on a Java based object oriented application framework on top of Java core libraries running on a Dalvik virtual machine featuring JIT compilation. Android has been available under a free software / open source license since 21 October 2008. Google published the entire source code (including network and telephony stacks)[34]

 under an Apache License.

Copyleft : copyleft is a general method for making a program (or other work) free, and requiring all modified and extended versions of the program to be free as well.

 Allows vendors to add proprietary extensions without submitting them back to the open source community.

Google on Purchasing Android Inc: “Best Deal Ever”

For those of you that don’t know, Android and its mobile operating system was once separate from Google. In 2005, Google “quietly” acquired Android for what’s estimated to be around $50 million USD – a good hunk of their acquisition money that year, the whole lump being somewhere around $130 million. Now, at a panel at the 16th annual Stanford Accel Symposium, vice president of corporate development at Google David Lawee said that the pickup of Android was Google’s “best deal ever.”

Page 7: Android introduction&hello world

Background (3)

Industry

What does means ?

Software stack open sourced under Apache 2.0 license Source available after first handsets ship Anyone will be able to build a system image User

Users have control of their experience They control what gets installed They choose the defaults

DEVELOPER Don’t need permission to ship an application No hidden or privileged framework APIs Can integrate, extend and replace existing components

Page 8: Android introduction&hello world

Architecture Overview

UI DB

mp3, mp4

Open source WebKit is a layout engine designed to allow web browsers to render web pages.

≈ J2SE

GUI Design

Page 9: Android introduction&hello world

Application Building BlocksName Description

Activity UI component typically corresponding to one screen.

IntentReceiver Set and respond to notifications or statuschanges. Can wake up your app

Service Faceless task that runs in the background. (Ex: MP3 Player)

ContentProvider Enable applications to share data among several different Activities.

Page 10: Android introduction&hello world

Reusing & Replacing Compnts

GMail

Home

Player

ToDo

“Pick photo”

Client component makes a request for a specific action.

Photo

Gallery

Picasa

“Browsing”

“Send mail”

“Word processi

ng”

“Media play”

“Record voice”

Page 11: Android introduction&hello world

Reusing & Replacing Compnts

Page 12: Android introduction&hello world

Applications run in their own process. Process are started and stopped as

needed to run an application’s component. Process may be killed to reclaim

resources.

Application Life Cycle

Page 13: Android introduction&hello world

Application Life Cycle (1)System

Process

Home ProcessHom

e

Mail Process

MailMessa

ge

Browser Process Brows

er

Map Process

Map

Page 14: Android introduction&hello world

Application Life Cycle (2)System

Process

Home ProcessHom

e

Map Process

Map

Browser Process Brows

er

Mail ProcessMessa

geMail

Page 15: Android introduction&hello world

APIs Brief View

Page 16: Android introduction&hello world

Developer Tool Chain (1)

Android provide free and cross-platform IDE and Emulator for developers to focus on bringing their thoughts into the implementation of application.To build up a developing environment, you should have : JDK5 or JDK6 Eclipse IDE ADT (Android Development Tools plug in) Android SDK (Include Emulator)

安裝 Android 開發工具

Page 17: Android introduction&hello world

Developer Tool Chain (2)

Page 18: Android introduction&hello world

Appendix Android 官方網站  http://www.android.com/  開放手持裝置聯盟 (Open Handset Alliance) http://www.openhandsetalliance.com/  Google Android 開發者部落格 http://android-developers.blogspot.com/  Android 開發者大賽網站  http://code.google.com/android/adc.html  Android 文件  http://developer.android.com/ http://www.onlamp.com/pub/a/onlamp/2007/11/12/goog...ing-inside-the-gphone-sdk.html  CNet專訪: Google手機平台背後的原創者 http://www.zdnet.com.tw/news/comm/0,2000085675,20125898,00.htm  Android 原始碼網站  http://source.android.com  Android 相關事件時間表 http://www.androidacademy.com/4-android-timeline 深入淺出 Android -- Google 手持設備應用程式設計入門

Page 19: Android introduction&hello world