Wednesday, July 21, 2010

Android Hands-On - literally!

Android Hands-On












by several Googlers:















Android phones were handed out like candy.

(a bit dated, but still good)

http://developer.android.com (for app development)

Agenda
- What make a great app?
- UI design tips
- Developing REST client apps
- Porting existing C codebases
- Lots of Q&A time at the end

What make a great app?
Roman Nurik
1) Speed, responsiveness
- Use AsyncTasks and Services
2) Quality/Polish
- Clean, flexible, beautiful UI
- Feature completeness
- Stability and error resilience
3) System UX integration
- Widgets, notifications, live folders, Quicx Search box, accounts, sync, etc
- Intuitive and correct navication, proper use of back, menu, search buttons
Bonus: Cross-app integration
- Exposing public intents, content providers, URL schemes, etc

User Interface Design Tips
1) Dos/Dontshttp://oscon2010.blogspot.com/2010/07/android-what-wherefores.html
- Don't simply port from other platforms
- Do create versions of all resources for high density screens
2) Design philosophy and considerations
- Choose clear vs. “simple”
- Content vs. chrome
- Enhanced by the cloud
- Design considerations: screen size, screen density, portrait/landscape, primary ui interaction method, keyboard
3) UI framework features you should definitely be using
-
- Resource qualifiers: ie res/layout, res/layout-port, res/layout-land, res/layout-large-port, res/layout-large-land
- patch drawables
4) New UI design patterns
- introduced in last google i/o talks
- dashboard, action bar, quick actions
5) Icons
- http://j.mp/androidfun for some icon ideas

Official Twitter app was developed by Google. Will be open sourced. No timeline on this.

The Google I/O conference app is still available in the app store. Source is available at: http://code.google.com/p/iosched

Developing REST client apps

1 min. intro to REST

Native REST Client vs. Mobile Web App
- Deep system integration (ie, contacts, sync UI)
- Can run in the backgroud, sync on a schedule
- Potential faster – binary formats
- Some things aren't yet possible with HTML/JS (eg, taking a photo)

Implementing REST
- do data operations in a service, not an activity

Thress design patterns to handle
1) Service API
2) ContentProvider API
3) ContentProvider API with SyncAdapter

Intermission: Android YouTube Commercials

Why SVG isn't supported (yet):
- rather expensive from a storage perspective
- not many websites use it currently
- it might be in foryo

Porting C codebases to Android

Native Code whys:
- Existing C/C++
- HPC
- OpenGL EL 2.0 (in Android)

NDK
- c library
- math libs
- minimal c++ (stl port)
- logging in android
- zlib
- jni graphics
- new in 2.2 (ndk debugging on retail devices)

Using JNI (Java Native Interface)
- public static native void …
- plain 'old JNI can be used

Case Study: Audio Processing and Mixing

Case Study: Driving Android Display from Native Code

Showed a demo of a C (and OpenGL) version of Tetris on a Nexsus One

No comments:

Post a Comment