Beruflich Dokumente
Kultur Dokumente
DanielRoth,Google'sOpenSourceAndroidOSWillFreetheWirelessWeb WiredMagazine,July2009.
AndroidHistory
Android1.5(Cupcake)
supportforsoft(onscreen)keyboards videorecording applicationwidgets morethan1,000changestoAPI
SystemArchitecture
Android1.6(Donut)
high andlowdensitydisplays anumberofminorchanges
Android2.0(Eclair)
multitouch virtualkeys centralizedaccountmanagement synchronizationAPIs Docking HTML5,andmore
http://media.techeblog.com
Android2.1(EclairMaintenanceRelease1) addedsupportforlivewallpapers,
moreHTML5support otherminorimprovement Homescreenenhancements livewallpapersandwidgets
Android2.1(EclairMaintenanceRelease1)
livewallpapers moreHTML5support otherminorimprovements
SystemArchitecture
SystemArchitecture
Hardwareabstractionlayer
Security Memorymanagement Processmanagement Networkstack Drivermodel
CorC++ Compiled for particular architecture Compiledforparticulararchitecture
SurfaceManager
Noscreenbuffer offscreenbitmaps(combinedwithotherbitmaps)
2Dand3Dgraphics MediaCodecs
AAC,AVC,H.263,MP3,MPEG4
YouwillnevermakeLinuxcallsdirectly Canusesomeutils(adbshell)toexamine
Filesystem,viewactiveprocesses
SQLDatabase(Firefox/iPhone) BrowserEngine(Crome,Safari,iPhone,NokiaS60)
4/5/2010
SystemArchitecture
SystemArchitecture
Dalvik VirtualMachine
GooglesimplementationofJava OptimizedforMobiledevices
Contentproviders
Encapsulatesanydatatosharebetweenapplications(contacts)
Runs.dex files
Morecompactandefficientthan.classfiles
Memoryandpowerconcerns
Resourcemanager
Partsofprogramthatarenotcode(soundbites,video,images) Androidalwaysknowwhereitis.. Events,messages,appointments,anyalerts
Locationmanager Notificationmanager
CoreJavalibrariesaredifferentfromJavaSE andJavaME
SystemArchitecture
Apps
Programswhichtakeoverthe entirescreen
OutoftheBox..
PhoneDialer Email Contacts WebBrowser AndroidMarket
DLanyprograms
Widgets(Gadgets)
Operateinasmallrectangle ofHomescreen
All apps h have same playing fi ld l i field System apps have to use same public API as you. You can replace these applications with your own if you want. Full Customization!!!
CurrentIssues
VersionFragmentation
Currently4versionsrunningonphones(1.5,1.6, 2.0,and2.1) Manufacturers'haven tbeentimelyinpushing Manufacturers havent been timely in pushing updates DetachAndroid'sstandardapplications& componentsfromcore&makethem downloadableandupdatablethroughtheMarket
(http://www.engadget.com/2010/03/29/exclusiveandroidfroyototakeaseriousshotatstemmingplat/)
ApplicationFundamentals
Javaprogrammed
.apkAndroidpackagearchivefile Bundledbyaapttool Includesanydataandresources Allcodeinasingle.apkfileisconsideredtobean application
4/5/2010
ApplicationFundamentals
Anelementof1appcanbeusedbyotherapp(OOP)
Noinclusion,linkingetc Juststartspieceofotherappwhenneeded
Nomain()
Multipleentrypointstoaprogram Appconsistsofessentialcomponentswhichsysteminstantiatesand runasneeded
EachprocesshasitsownVM
Coderunsisolatedfromotherapps
ApplicationComponents
Activities
Auserinterfacescreenfora singletask Ex: list of menu items photos Ex:listofmenuitems,photos withcaptions,listofcontacts Eachactivityisindependent, thoughformsingleapp
Activities Services
Activities
Services
Intents
Content Providers
Intents
Content Providers
ApplicationComponents
Services
NoUI Runsinbackground,Unixdaemon Ex: music network data retrieval Ex:music,networkdataretrieval Runinmainthreadofprocess,but
Spawnownthreadfortime consumingtasks
Activities Services
ApplicationComponents
Broadcastreceivers/Intents
Receiveandbroadcast announcements Ex:batterylow,picturetaken, timezone change Appshavereceiverstorespondto anyannouncements NoUI,butcanstartactivityor notification Notifications:backlight,vibrate, sound,etc
Activities
Services
Intents
Content Providers
Intents
Content Providers
4/5/2010
ApplicationComponents
ContentProviders
Meanstoshareinfo/databetween apps Lists specific set of data available Listsspecificsetofdataavailable tootherapps ContentProvider& ContentResolver
Activities Services
Applications
Anapplicationcanbealiveevenifits processhasbeenkilled. ActivityLifecycleISNOTtiedtoprocess lifecycle. lifecycle Processesaredisposablecontainers
Intents
Content Providers
ActivityLifecycle
Eachactivitycanbeinoneofseveralstates
Active/running
Foreground,toptask,userfocus
ActivityLifecycle
Paused
L f Lostfocus,butstillvisible b ill i ibl IEanotheractivityliesontopofit(transparent,notfull screen) Canbekilledifneedresources
Stopped
Completelyhiddenbyanotheractivity Canbekilledifneedresources
DesignbyDeclaration
UItypicallydefinedprocedural code Declarativedesign(HTML) nocode Androidusesablendofboth
Eitherapproach(JavaorXML) GooglesaysusedeclarativeXMLasmuchas possible
Shorter Easiertounderstand Lesslikelytochangeinfutureversions
WhyXML?
IsntXMLbulky/inefficient?
XMLisverbose,humanreadable Doesntworkwithlimitedmemoryandcpu
A d id Androidcompiler,aapt il t
CompressesXMLintobinaryformat Binaryformatisstoredondevice
4/5/2010
SafeandSecure
H/Wprohibitsmemorysharing UserIDpreventsappsreading/writingotherapps files p Accesstocriticaloperationsarerestricted
Mustaskpermissiontousethem Oninstallation,certificates/userprompts
Internet Read/Writecontacts ReceiveSMS Location(GPSandTower)
Android-Manifest.xml
AndroidonPC
Androidx86
http://www.androidx86.org/
LiveAndroid
http://code.google.com/p/liveandroid/
ForThursdaysLecture:
DLandinstallSunJDKSE6.0 DLandinstallEclipse3.3.1+
NotEclipseSDKclassic,butEclipseIDEforJava Developers
DLandinstallAndroidSDK d ll d d RunSDKsetupprogram
Easiesttoacceptallpackages,butyoucanpickand choose
DLandinstallEclipsePlugin:Android DevelopmentToolkit(ADT)