Tải bản đầy đủ (.pptx) (246 trang)

Tài liệu lập trình android tiếng việt đầy đủ

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (5.11 MB, 246 trang )

Android Development
Introduction
Notes are based on:
Unlocking Android
by Frank Ableson, Charlie Collins, and Robi Sen.
ISBN 978-1-933988-67-2
Manning Publications, 2009.
&
Android Developers
/>1
Chapter 1 - Goals
THE BIG PICTURE

What is Android?

Overview development environment
2
Chapter 1 - Resources
Android’s web page
3
/>What is Android?

Android is an open-source software platform
created by Google and the Open Handset
Alliance.

It is primarily used to power mobile phones.

It has the capability to make inroads in many
other (non-phone) embedded application
markets.


4
What is Android?

Android™ consists of a complete set of
software components for mobile devices
including:

an operating system,

middleware, and

embedded key mobile applications

a large market.
5
Why Android?
Listen from the project creators/developers (2.19 min)

Nick Sears. Co-founder of Android

Steve Horowitz. Engineering Director

Dam Morrill. Developer

Peisun Wu. Engineering Project Manager

Erick Tseng. Project Manager

Iliyan Malchev. Engineer


Mike Cleron. Software Manager

Per Gustafsson. Graphics Designer.

etc…

/>•
You will hear statements such as
“…currently it is too difficult to make new products … open software brings more innovation
… choices … lower costs … more applications such as family planner, my taxes, understand my
wife better, … ”
6
What is Open Handset Alliance?

Quoting from www.OpenHandsetAlliance.com page

“… Open Handset Alliance™, a group of 47 technology and
mobile companies have come together to accelerate
innovation in mobile and offer consumers a richer, less
expensive, and better mobile experience.

Together we have developed Android™, the first complete,
open, and free mobile platform.

We are committed to commercially deploy handsets and
services using the Android Platform. “
7
Open Handset Alliance Members
Operators
Software Co.

Commercializat. Semiconductor Handset Manf
China Mobile
China Unicom
KDDI Corp.
NTT DoCoMo
Sprint Nextel
T-Mobile
Telecom Italia
Telefónica
Vodafone
Softbank

Ericsson
Ascender Corp.
eBay
Esmertec
Google
LivingImage
NMS Comm.
Nuance Comm.
PacketVideo
SkyPop
SONiVOX

Borqs
Aplix
Noser Engineering
Astonishing Tribe
Wind River Systems
Omron Software


Teleca
Audience
Broadcom Corp.
Intel Corp.
Marvell Tech.
Group
Nvidia Corp.
Qualcomm
SiRF Tech. Holdings
Synaptics
Texas Instr.
AKM Semicond.
ARM
Atheros Comm
...
EMP
ACER
ASUS
HTC
LG
Motorola
Samsung
ASUSTek
Garmin
Huawei Tech
LG
Samsung

Sony Ericsson

Toshiba
8
See Android Developers
Short video (4 min.)
Showing Dave Bort
and Dan Borstein,
two members of the
Android Open Source
Project talk about the
project.
9
/>The Android Platform
Again, what did they say about Android?

Android is a software environment built for mobile devices.

It is not a hardware platform.

Android includes:

Linux kernel-based OS,

a rich UI,

telephone functionality,

end-user applications,

code libraries,


application frameworks,

multimedia support, ...

User applications are built for Android in Java.
10
11
Android’s Context: Mobile Market Player$
Stakeholders:
Mobile network operators want to
lock down their networks,
controlling and metering traffic.
Device manufacturers want to
differentiate themselves with
features, reliability, and price
points.
Software vendors want complete
access to the hardware to deliver
cutting-edge applications.
The Maturing Mobile Experience
Not so long ago … Today
1. Phone
2. Pager
3. PDA Organizer
4. Laptop
5. Portable music player
6. No Internet access /
limited access
1. Smartphone
2. Laptop (perhaps!)

12
Tomorrow ?
Electronic tools of a typical business warrior
The Maturing Mobile Experience
I want my 2015 Smartphone to act as …
1. Phone
2. Pager
3. PDA Organizer
4. High Quality Camera (still & video)
5. Portable music player
6. Portable TV / Video Player / Radio
7. Laptop
8. Play Station
9. GPS
10. Golf Caddy (ball retriever too)
11. Book Reader (I don’t read, It reads to me)
12. Car / Home / Office Key
13. Remote Control (Garage, TV, …)
14. Credit Card / Driver’s License / Passport
15. Cash on Demand
16. Cook, house chores
17. Psychologist / Mentor / Adviser
18. ????
13
Trying to answer: Tomorrow ?
Android vs. Competitors
14
1.Apple Inc.
2.Microsoft
3.Nokia

4.Palm
5.Research In Motion
6.Symbian
15
15
The Size of
the Mobile
Market
/>cellphone-overshare
[see appendix]
Android Components (Stack)

The Android stack includes a large array of
features for mobile applications.

It would be easy to confuse Android with a
general purpose computing environment.

All of the major components of a computing
platform are included.
16
Android Components

Application framework enabling reuse and replacement of components

Dalvik virtual machine optimized for mobile devices

Integrated browser based on the open source WebKit engine

Optimized graphics powered by a custom 2D graphics library; 3D graphics

based on the OpenGL ES specification (hardware acceleration optional)

SQLite for structured data storage

Media support for common audio, video, and still image formats (MPEG4,
H.264, MP3, AAC, AMR, JPG, PNG, GIF)

GSM Telephony (hardware dependent)

Bluetooth, EDGE, 3G, 4G, and Wi-Fi (hardware dependent)

Camera, GPS, compass, and accelerometer (hardware dependent)

Rich development environment including a device emulator, tools for
debugging, memory and performance profiling, and a plugin for the Eclipse
IDE
17
Android Components
18
Android Components
19
Video 1/3: Android’s Architecture
Presented by Mike Cleron, Google Corp. (13 min)
Available at:
Android Components
20
Video 2/3: Application’s Life Cycle
Presented by Mike Cleron, Google Corp. (8 min)
Available at:
Android Components

21
Video 3/3: Android’s API
Presented by Mike Cleron, Google Corp. (7 min)
Available at:
Android Application Framework
Video:
Inside the
Android Application Framework
(about 52 min)
Presented by Dan Morrill – Google
At Google Developer Conference
San Francisco - 2008
Available at:
/>22
Android is designed to be fast, powerful, and easy to develop for. This session
will discuss the Android application framework in depth, showing you the
machinery behind the application framework.
explains the life-cycle of an android apk. very good!
Android Components
Video:
An Introduction to Android
(about 52 min)
Presented by Jason Chen – Google
At Google Developer Conference
San Francisco - 2008
Available at:
/>23
Why use Linux for a phone?

Linux kernel is a proven core platform.


Reliability is more important than performance when it
comes to a mobile phone, because voice communication is
the primary use of a phone.

Linux provides a hardware abstraction layer, letting the upper
levels remain unchanged despite changes in the underlying
hardware.

As new accessories appear on the market, drivers can be
written at the Linux level to provide support, just as on other
Linux platforms.
24
Dalvik Virtual Machine

User application, cũng như các ứng dụng core Android, được
viết bằng Java và được dịch thành byte code.

Android byte code được thông dịch tại thời gian chạy bởi máy
ảo Dalvik (Dalvik virtual machine).

Tại sao dùng một máy ảo khác?

Các file bytecode Android tương đương về lô-gic với Java
bytecode, nhưng chúng cho phép Android

Chạy các ứng dụng trong môi trường ảo của riêng nó, không bị
rằng buộc bởi các hạn chế trong giấy phép của Sun

Là một nền tảng mở mà Google và có thể cả cộng đồng mã nguồn

mở có thể cải tiến khi cần thiết.
25

×