877-277-2477
info@capstonecourseware.com
251. Introduction to Android
Version 2.3

Book cover

This course is intended for experienced developers who wish to learn how to develop applications for the Android operating system from Google. Students will build various small example app, service, and widget projects and also work up larger case-study applications involving various UI-design techniques. We work primarily with Android 2.3, but also look ahead to some features and development styles for Android 3.x and 4.0.

While this is an introductory course, we make a point of focusing 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.

This course paves the way for see Course 252, Intermediate Android Development, which covers network, inter-process communication, media, maps and location, and more. For a faster-paced course that runs from introductory to intermediate level, you might also consider Course 255, Android Development.

Prerequisites

  • 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, form widgets, text input, lists, tables, and more.
  • Use advanced UI widgets for scrolling, tabbing, and layout control.
  • Use options and context menus.
  • Store application data on the mobile device, in internal or external storage locations.
  • Support user-specific preferences using the Android Preferences API.

Timeline: 5 days.

IDE Support: Eclipse Indigo

  • In addition to the primary lab files, an optional overlay is available that adds support for Eclipse Indigo. 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
  • 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
  • Centralized Flow Control

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. Views, Adapters, and Dialogs

  • Styles and Themes
  • <include> and <merge>
  • View Orientation
  • Adapters
  • Dialogs
  • onCreateDialog and Related Methods
  • Using AlertDialog
  • Fragments and Designing for Tablets
  • Phone/Tablet Portability

Chapter 6. Working with Text

  • The <TextView>
  • The <EditText>
  • Input Methods
  • Input Types: Phone, E-mail, Date, Time ...
  • DatePicker and TimePicker
  • Date- and Time-Picking Dialogs
  • Providing Auto-Completion
  • Using the Clipboard
  • Linkification

Chapter 7. Working with Lists

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

Chapter 8. Working with Tables

  • The <TableLayout> and <TableRow>
  • Defining Table Cells
  • Static Table Layouts
  • Dynamic Tables
  • Binding Data
  • Using a Template Row
  • Managing IDs

Chapter 9. Graphics and Low-Level Events

  • Drawing on a Canvas
  • The Paint Object
  • Handling Size and Orientation Changes
  • Handling Touch Events
  • Working with Drawables
  • Shape Drawables
  • Bitmap Drawables
  • 9-Patch Bitmaps
  • Custom Drawables
  • The Drawing Cache and Working with Bitmaps

Chapter 10. Menus

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

Chapter 11. Local Storage

  • The Android File System
  • Internal Storage
  • File Formats
  • Parsing JSON
  • The openFileInput and openFileOutput Methods
  • Storage and the Application Lifecycle
  • External Storage
  • Private Storage vs. Public Media
  • Permissions
  • Checking for Availability
  • getExternalStorageDir and Related Methods
  • API Level Differences
  • Preferences
  • Preferences Resources
  • The PreferencesActivity
  • The PreferencesManager
  • Reading Preferences

System Requirements

Hardware Requirements (Minimum) Core 2 Duo, 1.5 GHz, 4 gig RAM, 1 gig disk space.
Hardware Requirements (Recommended) Core 2 Duo, 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.