Beruflich Dokumente
Kultur Dokumente
Nick Butcher
9th May 2011
@crafty
hashtags: #iobootcamp #android
Session Feedback
http://www.speakermeter.com/talks/guide-android/
http://goo.gl/XLLgk
Agenda
Android platform
Writing your app
Anatomy of an app
Building your app
Surfacing your Content
Hardware Sensors
Quality
Tools
Publishing your app
Registering for Android Market
Targeting
Many Devices, One Platform
170+ devices in 100+ countries
Shipping 350K+ devices per day
1 year ago was 60K per day!
> 1m new potential users every 3 days!!
Any device with Google services must pass
the Compatibility Test Suite
Contract of device capabilities & APIs
Support many screen sizes/resolutions
Market filters on hardware availability
Many Devices, One Platform
New Platform/SDK
releases
Target latest but support
older
Gracefully degrade
functionality
Activity
Service
Content Provider
Broadcast Receiver
Intents
Manifest
Anatomy of an App
Activity
</manifest>
Anatomy of an App
Activity lifecycle
Running in a multitasking
environment
Users switch apps, calls
come in, system runs low on
memory
System invokes callbacks in
your app
The system will kill your app
Be sure to save state!
Anatomy of an App
Activity lifecycle
Activity
created
onCreate()
onResume()
Activity
running
onResume()
Activity
running
Call comes
in
onPause()
onResume()
Activity
running
Return to
app
Call comes
in
onPause()
onResume()
Activity
running
Return to
app
Activity Call comes
destroyed in
Low onPause()
Memory
Event driven
notifications
Optional vibration /
audio / LED alert
Ticker text / pull down
draw with more details
Custom expanded
view
Deep link into your
app with
a PendingIntent
Surfacing Your Content
Unobtrusive notifications
Event driven
notifications
Optional vibration /
audio / LED alert
Ticker text / pull down
draw with more details
Custom expanded
view
Deep link into your
app with
a PendingIntent
Surfacing Your Content
Widgets
Use RelativeLayout
Size with wrap_content, match_parent, weight
Use dp units
Think web style layout
Provide density specific assets
e.g. drawable-hdpi
Provide size specific layouts
e.g. layout-xlarge
Use 9-patch drawables
Building your App
Hardware Sensors
Many devices have access to a variety of sensors
Accelerometer, Gravity, Gyroscope, Light, Magnetic Field
Use SensorManager.getSensorList() to find out what is available
SensorManager.registerListener() for sensor updates
Full guide:
http://developer.android.com/sdk/installing.html
Publishing Your App
Register For
No review process
Publish as many updates as you like
Updates available right away
Supply promotional assets & video
Max APK size 50MB
Accessible on device & on Android Web Market
View crash reports online
View application statistics
Targeting
// in AndroidManifest.xml
Android platform
Writing your app
Anatomy of an app
Building your app
Surfacing your Content
Hardware Sensors
Quality
Tools
Publishing your app
Registering for Android Market
Targeting
Session Feedback
http://www.speakermeter.com/talks/guide-android/
http://goo.gl/XLLgk