O'Reilly logo
live online training icon Live Online training

Basic Android Development

Learn the tools, technologies, and fundamentals for creating mobile applications

Ken Kousen

There are currently over two billion Android devices in the world, ranging from phones to tablets to wearables to automotive apps. Each of them supports development using the open source Android operating system.

This online training course teaches the fundamentals of Android development using the latest available tools and techniques. It covers activities, intents, view layer widgets and fragments, networking, services, and more, as well as an overview of the Gradle build system as applied to Android. All applications are created using the free Android Studio development environment, the officially supported Android IDE.

The course is hands on, and requires that students be comfortable with writing general Java code at an intermediate level.

What you'll learn-and how you can apply it

By the end of this live, hands-on, online course, you’ll understand:

  • Android Studio, the only officially supported IDE
  • How to create activities and intents
  • Persistence options
  • Basic libraries in common use

And you’ll be able to:

  • Create Android applications using the Android Studio IDE
  • Save data in files and the included Sqlite database
  • Use asynchronous tasks for multithreaded processing
  • Access RESTful web services over the net
  • Process JSON data
  • Work with preferences

This training course is for you because...

  • You are a Java developer who is interested in writing Android apps
  • You are a team member or leader who needs to support Android applications
  • You are curious about the issues, costs, and benefits of mobile application development

Prerequisites

  • Working knowledge of Java
  • Some familiarity with web applications and RESTful services

Note: Courseware will be accessible online, and all code samples will be made available in a public GitHub repository.

Setup information will be provided before the course, but the preferred setup will use:

  • Java 8 Standard Edition
  • the Gradle Build Tool (as provided by Android Studio)
  • Current release version of Android Studio

Recommended Preparation:

Introduction to Java 8 ("Comfortable with Java 6 or 7" is actually enough)

About your instructor

Schedule

The timeframes are only estimates and may vary according to how the class is progressing

Day 1

Introducing Android (30 min)

  • Android versions and capabilities
  • The Android Studio IDE
  • The SDK Manager
  • Creating an emulator

A Simple Application (30 min)

  • Extending the Activity and AppCompatActivity classes
  • Creating the XML layout
  • Accessing widgets with findViewById
  • Implementing listeners
  • Updating the user interface

Break: 5 min

The Manifest and Gradle Build Files (30 min)

  • Multi-project Gradle builds
  • Top-level and application level Gradle build files
  • The Android plugin for Gradle
  • Repositories and dependencies
  • Setting Android properties
  • The AndroidManifest.xml file

The Activity Lifecycle (30 min)

  • Logging events
  • The Activity callback methods
  • Back button, going home, and aspect changes
  • Preserving data using saved instance state

Break: 5 min

Explicit Intents (30 min)

  • Moving from one activity to another
  • Creating explicit intents
  • Passing data through intents
  • Retrieving data

Resources (30 min)

  • Resource folders
  • Strings, colors, and layouts
  • The R.java file
  • Styles
  • Other resources

Day 2

Asynchronous Tasks (30 min)

  • Operating off of the UI thread
  • Extending AsyncTask
  • Implementing background tasks
  • Updating the UI

Fragments (30 min)

  • Creating fragments
  • Implementing interfaces
  • Adding fragments to activities
  • The fragment lifecycle
  • The back stack
  • ListFragment

Break: 5 min

Menus and the Action Bar (15 min)

  • Menu XML files
  • Adding items
  • Using the Action Bar
  • Reacting to menu selections

Implicit Intents (15 min)

  • Built-in intents
  • Adding intents to the manifest
  • Registering for intents
  • Intent filters
  • Broadcast receivers

Data Storage (30 min)

  • Internal storage in files
  • External storage
  • Shared preferences
  • Preference activities and fragments
  • The Sqlite database
  • Sqlite helpers and adapters

Break: 5 min

Flavors and Variants (20 min)

  • Defining flavors
  • Using build types
  • Changing resources in variants
  • Building APKs

Testing (20 min)

  • Testing non-Android parts of an app
  • The Android Testing Support Library
  • Functional testing with Robotium
  • Activity testing with Espresso

Publishing Your Application (20 min)

  • Signing your app
  • Registering with Google Play
  • Generating release APKs
  • Uploading and customizing your app