255. Android Development
Version 4.2

Book cover

This fast-paced course gets the experienced Java programmer up and running with the Android API and development tools and in a position to develop useful applications that incorporate the most exciting features of emerging mobile devices. It is designed as an accelerated alternative to the series of Courses 251, Introduction to Android Development, and 252, Intermediate Android Development, concentrating on what many enterprises will see as the most high-value topics and techniques while leaving some areas for later study. The lab software includes all exercises from both courses.

As with those two courses, this one focuses on practical concerns faced by the corporate IT developer. The primary case-study application connects popular mobile features such as maps and multimedia with a RESTful web service and a JPA persistence tier that connects to a fully-worked enterprise database (15 tables, 998 rows). The mobile side of the application includes 47 Java classes and 8 distinct activities. Supporting applications provide overlapping exercise in key techniques such as using asynchronous tasks, communicating with external applications, and error-handling.


  • Java programming experience is required; Course 103, "Java Programming," is excellent preparation.
  • Exposure to related technology including web applications, user-interface design, SQL, XML, and web services, all are beneficial but none are required.

Learning Objectives

  • Describe the Android OS architecture.
  • Install and use appropriate tools for Android development, including IDE, device emulator, and profiling tools.
  • Understand the Android application architecture, including the roles of the task stack, activities, and services.
  • Build user interfaces with views and basic form widgets.
  • Present menus via the Android action bar and handle menu selections.
  • Store application data on the mobile device, in internal or external storage locations.
  • Make remote connections using HTTP, XML, and JSON, and take advantage of mapping and other web services.
  • Implement background work as asynchronous tasks.
  • Implement Android services for asynchronous notification, and integrate these services with applications.
  • Manage audio, photo, and video content, and integrate built-in media applications in your own Android applications.
  • Integrate map views into your application, and provide custom overlays of map markers and other information.

Timeline: 5 days.

IDE Support: Eclipse Juno

  • In addition to the primary lab files, an optional overlay is available that adds support for Eclipse Juno. Students can code, build, deploy, and test all exercises from within the IDE. We make full use of the Android SDK and its Eclipse plugin and device emulators. See also our orientation to Using Capstone's Eclipse Overlays.

Chapter 1. The Android Operating System

  • Mobile Form Factors
  • Versions of Android
  • Applications and APK Files
  • Process Architecture
  • The Role of Java
  • Hello, Dalvik
  • What's In, What's Out
  • Services
  • User Interface
  • Memory and Storage
  • Operating-System Services
  • Inter-Process Communication

Chapter 2. Android Development

  • The Android SDK
  • The SDK and AVD Managers
  • Configuring the Emulator
  • Eclipse
  • Resources
  • APK Files
  • Build Process
  • The R Class
  • Assets
  • The Dalvik Debug Monitor Server
  • The Android Debugger (adb)
  • Command Shells
  • The Android Log and LogCat
  • Ant

Chapter 3. Applications

  • Activities and Fragments
  • Activity Lifecycle
  • The onCreate Method
  • Layouts and Views
  • The findViewById Method
  • Tasks and the "Back Stack"
  • Intents and Results
  • startActivity and Related Methods
  • Custom Application Classes
  • Shared Application State

Chapter 4. User Interface Design

  • XML Layouts
  • Layout Parameters
  • The Box Model
  • Gravity
  • The LayoutInflater Service
  • The <LinearLayout>
  • The <RelativeLayout>
  • Views and Adapters
  • Form Widgets

Chapter 5. Fragments and Multi-Form Design

  • The Fragments API
  • Fragment Lifecycle
  • Relationship Between Activity and Fragment
  • Possible Cardinalities
  • Communication between Activity and Fragment
  • Fragment Arguments
  • Callback Interfaces
  • Designing for Multiple Form Factors
  • Fragments on the Back Stack

Chapter 6. Working with Lists

  • AdapterView and Subclasses
  • Adapter and Subinterfaces
  • ListView and ListAdapter
  • ListFragment
  • Spinner and SpinnerAdapter
  • Handling Item Selection
  • Custom Adapters
  • ExpandableListView and ExpandableListAdapter

Chapter 7. Menus and the Action Bar

  • Options and Context Menus
  • The Action Bar
  • Menu Resources
  • The MenuInflater Service
  • The <Menu>
  • The Menu and MenuItem Classes
  • Handling Menu Selections
  • The Escape from switch/case!
  • Using a Dispatch Map
  • Building Menus Dynamically

Chapter 8. Local Storage

  • The Android File System
  • Internal Storage
  • File Formats
  • Parsing JSON
  • Storage and the Application Lifecycle
  • External Storage
  • Private Storage vs. Public Media
  • Permissions
  • Checking for Availability

Chapter 9. Networking and Web Services

  • java.net
  • android.net
  • Apache HttpClient
  • Consuming RESTful Web Services
  • Building URLs
  • Parsing JSON
  • Parsing XML
  • Connected Applications
  • Offline Operation and Server Synchronization

Chapter 10. Asynchronous Tasks

  • The UI Thread
  • Background Tasks
  • Loopers and Handlers
  • Using AsyncTask
  • Using ProgressDialog
  • Error Handling

Chapter 11. Multimedia

  • Playing Sounds
  • Haptic Feedback (Vibrating)
  • Managing Images
  • Storage and Retrieval
  • Invoking the Camera
  • Invoking the Media Recorder
  • Gallery and other Image Views

Chapter 12. Location Services and Maps

  • Location Services
  • Location Notifications
  • The Google Maps API
  • License Terms and Maps API Keys
  • Map View and Map Activity Classes
  • Configuring a Map
  • Controlling a Map
  • Events
  • Projections
  • Map Overlays
  • Item Overlays
  • Custom Overlays

System Requirements

Hardware Requirements (Minimum) Core i5, 1.5 GHz, 4 gig RAM, 1 gig disk space.
Hardware Requirements (Recommended) Core i5, 2.5 GHz GHz, 8 gig RAM, 1 gig disk space.
Operating System Tested on Windows 7. Course software should be viable on all systems which support a Java 6 Developer's Kit.
Network and Security Limited privileges required -- please see our standard security requirements.
Software Requirements All free downloadable tools.