Android ApplicationDevelopment
Android ApplicationDevelopment
Agenda
WhyAndroid? Applicationframework Gettingstarted UIandwidgets Applicationdistribution Externallibraries Demo
WhyAndroid?
WhyAndroid?
Opensource
Thatmeansthatitsfree!
EasytouseframeworkbasedonJava Truecustomization
Replacestockapps PersonalizeHomeScreenswithwidgets
Betternotications Easiertopublishnoreviewprocess
WhyAndroid?Security
ReputationaslesssecurethaniOS
True,butitisstillverysecure!
Eachapplicationlivesinitsownsecurity
sandbox
SystemassignseachappauniqueLinux
userID
Eachprocesshasitsownvirtual
Applicationframework
Applicationframework
srcsourceleswherethe
actualcodingtakesplace
rescollectionofresources
Manifestrepresents
Applicationframework
srccodeexample
Applicationframework
res
res/drawablelogoandallimages Customizablefordierentpixeldensities res/rawsoundsandmusic res/layouttheXMLlayoutforeachactivity
Customizablefordierentscreensizesand orientations
res/valuessavesallstringsandobjectstyles
NotasstreamlinedorstandardizedasiOS
Applicationframework
Layoutexample
Applicationframework
Manifest
Permissions e.g.accessinternet,accessSMSmessages MinimumAPI Hardwareandsoftwarefeaturesrequired Youmustalsodeclareeveryactivityyoucreate!
Applicationframework
Manifestexample
ApplicationframeworkActivityLifecycle
ApplicationFramework
Activity
Visiblescreens
Service
Backgroundservices
Contentprovider
Shareddata
Broadcastreceivers
Receiveandreacttobroadcastevents
Intent
Launchnewactivities
Gettingstarted
Gettingstartedinstallation
GetthelatestJavaDevelopmentKit(JDK) GetthelatestversionofEclipseClassic(recommended) InstalltheAndroidSoftwareDevelopmentKit(SDK) InstalltheAndroidDevelopmentTools(ADT)pluginfor
Eclipse
Makesyourlifeeasier:letsyouquicklysetupnewAndroid
projects,createanapplicationUI,debugyourapps,andexport APKsfordistribution!
GettingstartedEclipse+ADT
GettingstartedEmulator
Eclipse+ADT+Emulator=
Gettingstarteddebugging
DDMSdebuggernotfun,butyoushoulddoit.
UIandwidgets
UIandwidgets
Androiduserinterfaceiscomposedof
hierarchiesofobjectscalledViews
View:adrawableobjectsuchasabutton,image,
UIandwidgets
LinearLayout,RelativeLayout,andTable
Layout
Applicationdistribution
Applicationdistribution
PublishintheAndroidMarket
Purchaseadeveloperaccountfor$25 ExportAPKfromEclipsewithADT UploadAPK,images,anddescription
ExternalLibraries
ExternalLibraries
Easilyaddexternallibrariesbyimporting3rd
partyJARs(.jarles)
Allowsyoutoeasilyintegratecoolfeaturesinto
ExternalLibrariesAnalytics
GoogleAnalytics(recommended)
Understandhowusersinteractwithyourapp
Numberofvisitorsperday Timeonpage(inactivity) Demographicsandlocation Trackappversion Appinteraction(buttonpresses,conversions,etc.)
ExternalLibrariesMonetization
ExternalLibrariesMonetization
Opensourcephilosophy
Peoplearelesswillingtopayforapps,so
developersmaymoneythroughadvertisements
AdMob(recommended)
BoughtbyGooglein2009for$750million Paidbyclick,notbyimpression Easilytransferfundstoadvertiseyourownapp
(20%bonus)
ExternalLibrariesOthers
ManylargecompanieshavetheirownSDKs
intheformofJARs
Facebook,Twitter,Dropbox,OpenFeint,etc. SearchonlineforJARsforotherfunctions
(advancedmathoperations,etc.)
Demo
TutorialforHello,world!
http://developer.android.com/resources/
tutorials/helloworld.html
TutorialsforViews
http://developer.android.com/resources/tutorials/
views/index.html
Othertutorials
http://developer.android.com/resources/
browser.html?tag=tutorial
Thanksforcoming!