You are on page 1of 11

Matt McComb

@msmccomb
matt@ecIipticIabs.com
#1 Android Versioning
So good they named it three times
Code name (for Joe Bloggs). ce Cream Sandwich, Froyo, Honeycomb
PIatform Version
API Version (Links Android platform -> Software SDK version)
Project has min/target and max SDKs
Conditional/runtime checks are possible.
f (Build.VERSON.SDK < Build.VERSON_CODES.FROYO)
Each SDK has an associated Google SDK
#2 Screen Sizing
Android runs on many devices
Screen Size (Physical)
Screen Resolution (Pixels)
Each device classified by screen size AND screen
resolution
Screen Size 2 inches (small) . 10 inches (xlarge)
Screen Resolution 426 x 320 (small) . 960 x 720 (xlarge)
Android provides two ways to handle this.
mage density independence via image handling
Screen size independence via multiple layouts
DPs and SPs!? WTF.
#3 Embrace XML
Defacto mechanism for defining non-code
resources
XML as it should be easily read/edited
XML Resource identifiers used to identify layouts
and elements
All resources stored under /res subdirectories
res/drawable, res/layout, res/xml, res/anim
Avoid Eclipse Add-on for building Ui
#4 Memory Is Precious
Unlike iOS Android provides runtime garbage
collection
BUT!
Memory is limited (16Mb heap in 2.0)
Garbage Collection isn't an insurance against leaks
Always consider the implications of code on
memory
Be a good citizen help your collector.
Null out object references ASAP
Use SoftReference and WeakReference
#5 Beware Java Libraries
Wealth of Open Source Java libraries
But most are enterprise level
Some wont work missing packages
Others not optimized for low-level
environments
And worse yet subtle bugs i.e. Rome
RSS parser
#6 Threading
All applications have a single main thread
Main thread processes U events and should
NOT be blocked
For responsive U you will need.
AsyncTask<Params, Progress, Update>
1. onPreExecute()
2. donBackground(Params.)
1. publishProgress(Progress.)
2. onProgressUpdate(Progress.)
3. onPostExecute(Result)
runOnUThread(Runnable)
#7 Test, test, test.
Android provides Junit integration out of the
box
Support for unit and functional testing
AcitivityTestCase (functional (activity))
nstrumentationTestCase (unit (model))
With support for mocks!
Tests are written in a separate project
3
rd
Party Libraries too Robotium (black box)
#8 TooI Up
Android provides powerful platform tools
Hidden in the Android installation dir
Not as well integerated as Xcode
Special note.
emulator
adb logcat
Hierahcyviewer
Monkey (Chaos Monkey)
#9 PubIishing
All apps MUST be signed with a private
key
Debug key for local deployment/testing
ReIease key for publishing to the store
No provisioning portal!
Much more pleasant experience than iOS
#10 Expand Your Mind
There is a wealth of online resources for
learning Android
Official Developers Guide fantastic
resource for explanations of core
concepts/paradigms
Official JavaDocs code level documentation
of Android packages. Concise and very
readable.
Official Sampe Projects example projects
for many OS and device level features.
your company name. All rights reserved. Title of your presentation