Welcome to the Advanced Android Development course, created by the Google Developers Training team. Take this course to learn how to add advanced functionality to your Android apps.

To learn about other Android training created by the Google Developers Training team, visit Google Developers Training: Android.

This course provides a series of codelabs that teach you how to add advanced features like fragments, accessibility and local language support, custom views, animations, and geo capabilities to your apps.

We recommend you take the codelabs in sequence, but it is not a requirement. Each of the lessons is independent of previous lessons in the course (although all lessons assume you know the basics of building Android apps). For example, you can learn how to create custom views without having learned how to use sensors.

Prerequisites

To take the Advanced Android Development course, you must have Java programming experience and know the fundamentals of how to build an Android app using the Java language.

This course builds on skills taught in the Android Developer Fundamentals course. Specifically, you should know how to do the following:

Solution code

As you work through the codelabs in the Advanced Android Development course, you create apps. The solution code for the apps that you create is available in GitHub.

Teaching the course

If you're interested in teaching Advanced Android Development as an instructor-led class, you can find links to additional materials, including slide decks and concept guides, at developer.android.com/courses/fundamentals-training/overview-v2.

Advanced Android Development includes five teaching units:

Each unit contains several codelabs.

Unit 1: Expand the user experience

This unit teaches you how to extend your apps to improve the user experience. You learn how to use fragments, app widgets, and sensors.

Unit 1 includes the following codelabs:

Unit 2: Make your apps fast and small

This unit teaches you how to use tools to identify performance issues in your apps so you can make your apps run faster and more efficiently.

Unit 2 includes the following codelabs:

Unit 3: Make your apps accessible

This unit teaches you how to localize your apps to other languages and how to make your apps accessible to everyone, including users with disabilities.

Unit 3 includes the following codelabs:

Unit 4: Add geo features to your apps

This unit teaches you how to extend your apps to add location functionality. It covers detecting and using the device location, using the Places API, and generating and showing maps.

Unit 4 includes the following codelabs:

Unit 5: Advanced graphics and views

This unit teaches you how to create a custom view that extends or replaces the functionality of views such as buttons and text fields. You also learn how to create advanced graphics and animations, and how to use media files in your app.

Unit 5 includes the following codelabs:

The codelabs in the Advanced Android Development course assume that you're using the latest version of Android Studio, and some of the codelabs require at least Android Studio 3.2.

To set up the latest version of Android Studio, follow the steps below.

If you need more help, see the 1.1 Android Studio and Hello World codelab in the Android Developer Fundamentals course, or these resources:

1. Get Android Studio 3.2 or later

You can keep two independent versions of Android Studio on your development machine, if you want to.

Windows

  1. Download Android Studio for Windows.
  2. Unpack the zip file.
  3. Rename the resulting folder to something unique like "Android Studio 3."
  4. Move the folder to a permanent location, such as next to your existing Android Studio install in C:\Program Files\Android\.
  5. Inside C:\Program Files\Android\Android Studio 3\bin\, launch studio64.exe. Or if you're on a 32-bit machine, launch studio.exe.
  6. To make the version available in your Start menu, right-click studio64.exe and click Pin to Start Menu.

Mac

  1. Download Android Studio for Mac.
  2. Unpack the zip file.
  1. Drag the app file into your Applications folder.
  2. Launch the app.

Linux

  1. Download Android Studio for Linux.
  2. Unpack the zip file.
  3. Rename the resulting folder to something unique like "android-studio-3".
  4. Move the folder to wherever you have your stable version, such as within /usr/local/ for your user profile, or within /opt/ for shared users.
  5. Open a terminal, navigate into android-studio-3/bin/, and execute studio.sh.
  6. To make the new version available in your list of apps, select Tools > Create Desktop Entry from the Android Studio menu bar.

2. Update Android Studio

  1. Open Android Studio.
  2. If you are not prompted to update, select Android Studio > Check for updates....
  3. Continue to check for updates, until you see a dialog saying that you have the latest version.

3. Build an app to verify your Android Studio installation

You probably need to install additional SDK downloads before your app builds.

  1. Open Android Studio, then open an existing app of some complexity. When you build an app that you built with a previous version of Android Studio, you may get errors about components and libraries that are missing.
  2. Click the links as prompted by the error messages, and install the needed components.
  3. Update Gradle, if you're prompted to do so.
  4. Follow the prompts until your app finishes building.

4. Run the app on a mobile device

  1. On your mobile device, enable developer options, if they are not already enabled. To find these settings on the device, open Settings > Developer options.
  2. On Android 4.2 and higher, the Developer options screen is hidden by default. To make the screen visible, go to Settings > About phone and tap Build number seven times. Return to the previous screen to find Developer options at the bottom.
  3. In Developer options, enable USB Debugging. This is necessary for your development machine to see and access your mobile device.
  4. Connect the mobile device to your development computer with a USB data cable.
  5. In Android Studio, click Run.
  6. You may be prompted to install HAXM and emulator images. If you have been using several emulator images, this installation can take a while. Your largest update may be over 1 GB and will take some time to download even on a fast connection. You can postpone the system image downloads and run them later from the AVD manager.
  7. After installation, choose your device and run the app.

5. Run the app on an emulator

  1. If the app is running on your device, stop it.
  2. Run the app again, choosing an emulator. Your emulator may update before it runs your app.
  3. If you don't have an emulator, click Create Virtual Device in the Select Deployment Target dialog. Choose a phone and an existing system image, if you have one, because additional system images are large to download.
  4. Make sure that the app runs correctly.

6. Create and run Hello World

To make sure that you're ready to work, create and run a Hello World app:

  1. Create a new project using the Basic Activity.
  2. Accept all the defaults.
  3. Run the app on any device or emulator.

Start the Advanced Android Development course by taking the first codelab in Unit 1, 1.1: Fragments.