Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống
1
/ 43 trang
THÔNG TIN TÀI LIỆU
Thông tin cơ bản
Định dạng
Số trang
43
Dung lượng
1,9 MB
Nội dung
Chapter1‐ 1
Chapter1
AndroidDevelopment
Introduction
VictorMatos
ClevelandStateUniversity
Notesarebasedon:
Ad idDl
A
n
d
ro
id
D
eve
l
opers
http://developer.android.com/index.html
&
UnlockingAndroid
byFrankAbleson,CharlieCollins,andRobi Sen.
ISBN978‐1‐933988‐67‐2
ManningPublications,2009.
1
Chapter1‐ Goals
THEBIGPICTURE
1. WhatisAndroid?
2. Overviewdevelopmentenvironment
2
Chapter1‐ 2
Chapter1‐ Resources
Android’swebpage
http://www.android.com/
3
WhatisAndroid?
• Android isanopen‐sourcesoftwareplatform
tdb Gl
d th
O Hdt
crea
t
e
d
b
y
G
oog
l
ean
d
th
e
O
pen
H
an
d
se
t
Alliance.
• Itisprimarilyusedtopowermobilephones.
• Ithasthecapabilitytomakeinroadsinmany
other(non‐phone)embeddedapplication
markets.
4
Chapter1‐ 3
WhatisAndroid?
• Android™consistsofacompletesetof
ft t f bil di
so
ft
warecomponen
t
s
f
ormo
bil
e
d
ev
i
ces
including:
– anoperatingsystem,
– middleware,and
embedded key mobile applications
–
embedded
key
mobile
applications
– alargemarket.
5
WhyAndroid?
Listenfromtheprojectcreators/developers (2.19min)
– NickSears.Co‐founderofAndroid
St HitEi i Di t
–
St
eve
H
orow
it
z.
E
ng
i
neer
i
ng
Di
rec
t
or
– DamMorrill.Developer
– Peisun Wu.EngineeringProjectManager
– ErickTseng.ProjectManager
– Iliyan Malchev.Engineer
– MikeCleron.SoftwareManager
– PerGustafsson.Gr aphicsDesigner.
– etc…
• http://www.youtube.com/watch?v=6rYozIZOgDk&eurl=http://www.android.com/about/&feature=player_embedd
d
e
d
• Youwillhearstatementssuchas
“…currentlyitistoodifficulttomakenewproducts…opensoftwarebringsmore
innovation…choices…lowercosts…moreapplicationssuchasfamilyplanner,my
taxes,understandmywifebetter,…”
6
Chapter1‐ 4
WhatisOpenHandsetAlliance?
• Quotingfr omwww.OpenHandsetAlliance.com
page
• “…OpenHandsetAlliance™,agroupof47technology
andmobilecompanieshavecometogethertoaccelerate
innovationinmobileandofferconsumersaricher,less
expensive,andbettermobileexperience.
• TogetherwehavedevelopedAndroid™,thefirst
complete open and free mobile
platform
complete
,
open
,
and
free
mobile
platform
.
• Wearecommittedtocommerciallydeployhandsetsand
servicesusingtheAndroidPlatform.“
7
OpenHandsetAllianceMembers
Operators
SoftwareCo.
Commercializat. Semiconductor HandsetManf
ChinaMobile AscenderCorp. Aplix Audience ACER
ChinaUnicom
KDDICorp.
NTTDoCoMo
SprintNextel
T‐Mobile
TelecomItalia
Telefóni ca
Vodafone
Softbank
eBay
Esmertec
Google
LivingImage
NMSComm.
NuanceComm.
PacketVideo
SkyPop
SONiVOX
Noser Engineering
AstonishingTribe
WindRiverSystems
OmronSoftware
…
Teleca
BroadcomCorp.
IntelCorp.
MarvellTec h.
Group
Nvidia Corp.
Qualcomm
SiRF Tech.Holdings
Synaptics
Texas Instr.
AKM
Semicond
ASUS
HTC
LG
Motorola
Samsung
ASUSTek
Garmin
Huawei Tech
LG
Samsung
…
Ericsson
…
Borqs
AKM
Semicond
.
ARM
Atheros Comm
EMP
Samsung
…
SonyEricsson
Toshiba
8
Chapter1‐ 5
SeeAndroidDevelopers
Shortvideo(4min.)
Sh i
D
Bt
http://www.youtube.com/watch?v=7Y4thikv‐OM
Sh
ow
i
ng
D
ave
B
or
t
andDanBorstein,
twomembersofthe
AndroidOpenSource
Projecttalkabout
theproject
.
9
TheAndroidPlatform
Again,whatdidtheysayaboutAndroid?
• Androidisasoftware environmentbuiltformobile
devices.
• Itisnot ahardwareplatform.
• Androidincludes:
• Linuxkernel‐basedOS,
• arichUI,
• telephonefunctionality,
• end‐userapplications,
•
code
libraries,
code
libraries,
• applicationframeworks,
• multimediasupport,
• UserapplicationsarebuiltforAndroidinJava.
10
Chapter1‐ 6
Android’sContext:MobileMarketPlayer$
Stakeholders:
Mobilenetwork operators want
Operators
SoftwareDevice
tolockdowntheirnetworks,
contr ollingandmeteringtraffic.
Device manufacturers wantto
differentiatethemselveswith
features,reliability,andprice
points.
VendorsManufacturers
11
Software vendors wantcomplete
accesstothehardwaretodeliver
cutting‐edgeapplications.
TheMaturingMobileExperience
Notsolongago…Today
Electronictoolsofatypicalbusinesswarrior
1. Phone
2. Pager
3. PDAOrganizer
4. Laptop
5
Portable music player
1. Smartphone
2. Laptop(perhaps!)
5
.
Portable
music
player
6. NoInternet access/
limitedaccess
12
Tomorrow?
Chapter1‐ 7
TheMaturingMobileExperience
Iwant my2015Smartphonetoactas…
Trying to answer Tomorrow ?
1. Phone
2. Pager
3. PDAOrganizer
4. HighQualityCamera(still&video)
5. Po rtablemusicplayer
6. Po rtable TV/VideoPlayer/Radio
7. Laptop
8. PlayStation
9. GPS
10
GlfCdd (b ll i )
Trying
to
answer
:
Tomorrow
?
10
.
G
o
lf
C
a
dd
y
(b
a
ll
retr
i
evertoo
)
11. BookReader(Idon’tread,Itreadstome)
12. Car/Home/OfficeKey
13. RemoteControl(Garage,TV,…)
14. CreditCard/Driver ’sLicense/Passport
15. CashonDemand
16. Cook,housechores
17. Psychologist/Mentor/Adviser
18. ????
13
Androidvs.Competitors
1.AppleInc.
2.Microsoft
3.Nokia
4.Palm
5
Research In Motion
14
5
.
Research
In
Motion
6.Symbian
Chapter1‐ 8
TheSizeof
theMobile
Market
http://gizmodo.com/5489036
/llh
h
/
ce
ll
p
h
one‐overs
h
are
[seeappendix]
1515
AndroidComponents(Stack)
• TheAndroidstackincludesalargearrayof
ft f bil li ti
f
ea
t
ures
f
ormo
bil
eapp
li
ca
ti
ons.
• ItwouldbeeasytoconfuseAndroidwitha
generalpurposecomputingenvironment.
• Allofthemajorcomponentsofacomputing
platform are included
platform
are
included
.
16
Chapter1‐ 9
AndroidComponents
• Applicationframework enablingreuseandreplacementofcomponents
• Dalvik virtualmachine optimizedformobiledevices
• Integratedbrowser basedontheopensourceWebKit engine
• Optimizedgraphics poweredbyacustom2Dgraphicslibrary;3Dgraphics
basedontheOpenGLESspecification(hardwareaccelerationoptional)
• SQLite forstructureddatastorage
• Mediasupport forcommonaudio,video,andstillimageformats(MPEG4,
H.264,MP3,AAC,AMR,JPG,PNG,
GIF)
• GSMTele
p
hon
y
(
hardwarede
p
endent
)
py
( p)
• Bluetooth,EDGE,3G,4G,andWi‐Fi (hardwaredependent)
• Camera,GPS,compass,andaccelerometer (hardwaredependent)
• Richdevelopmentenvironment includingadeviceemulator,toolsfor
debugging,memoryandperformanceprofiling,andaplugin forthe
EclipseIDE
17
AndroidComponents
18
Chapter1‐ 10
AndroidComponents
Video1/3:Android’sArchitecture
PresentedbyMikeCleron,GoogleCorp.(13min)
19
Availableat:http://www.youtube.com/watch?v=QBGfUs9mQYY
AndroidComponents
Video2/3:Application’sLifeCycle
PresentedbyMikeCleron,GoogleCorp.(8min)
20
Availableat:http://www.youtube.com/watch?v=fL6gSd4ugSI&feature=channel
[...]... ... android: label="@string/app_name"> 71 Android Manifest xml File... 51 Android Services Debugging ‐... field. It has specialized methods for reading each type of data. 69 Android Content Provider Example: Posting a query to the Contact list (1/2) package matos.cis493; import android. app.Activity; import android. net.Uri; import android. os.Bundle; import android. widget.EditText; import android. widget.Toast; import android. provider.Contacts.People; import android. content.ContentUris; import android. database.Cursor; public class AndDemo1... 58 Chapter 1 ‐ 29 Android Broadcast Receiver Broadcast Receiver Example (1/5). Intercept arriving SMS package matos b oadcast ecei e matos.broadcastreceiver; import import import import android. content.BroadcastReceiver; android. content.Context; android. content.Intent; android. content.IntentFilter; import android. util.Log; import android. app.Activity; po t a d o d app ct ty; import android. os.Bundle;... /> / i i 63 Android Content Provider • Content providers store and retrieve data and make it ... http://sites.google.com/site/io/inside‐the android application‐framework htt // it l / it /i /i id th d id li ti f k 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! 22 Chapter 1 ‐ 11 Android Components Video: An Introduction to Android