Android Java course week six
Here are my notes from the final weekly session of O’Reilly’s Android Java programming course, plus a Google I/O talk on targetting all Android devices (i.e. avoiding Java ME‘s write-once, debug-everywhere problems).
You can read my previous weeks’ notes by clicking the appropriate link: week 1 notes | week 2 notes | week 3 notes | week 4 notes | week 5 notes.
- We finished the #AndroidJava app by posting photos to Twitpic #
- Posting photos using Twitpic4j library http://bit.ly/cJh3MD #
- Cast of characters this week: SharedPreferences for user prefs, Twitpic4j to upload photos, MediaStore containing photo info #
- Menuinflater http://bit.ly/csJeKR is used to instantiate menu XML files into Menu http://bit.ly/9DNKnQ objects #
- SharedPreferences http://bit.ly/cYoFJU provides an easy way to save user preferences locally without using SQL Lite #
- Use Intent.ACTION_GET_CONTENT http://bit.ly/9bv2bF with type 'image/' to open photo library and allow user to select a photo #
- Capture camera snaps using ACTION_IMAGE_CAPTURE http://bit.ly/cw4hXv #
- Add URI Extra to the Intent with key EXTRA_OUTPUT http://bit.ly/chcIIF to tell camera to save full-sized photo at given URI #
- Post the photo using AsyncTask http://bit.ly/aZ41Di with a responder interface, returning TwitPicResponse when complete #
- ContentResolver http://bit.ly/ajWeSh allows you to get an InputStream from URI given the proper permissions #
- Homework if you dare: Upload video using MediaStore.ACTION_VIDEO_CAPTURE http://bit.ly/b22A8Y and URI Extra #
- Sites to try for video upload: Youtube direct upload http://bit.ly/aiuXKB and Viddler API http://bit.ly/bqa76B #
- Reminder: O'Reilly "Developing Android Applications" forums remain open at http://bit.ly/bG3vRk #
Comments are closed.