Android codelabs
Your First Health Connect Integrated App
1 hour 30 minutes
Updated February 27, 2025
In this Codelab, you’ll build a health and fitness app that supports reading and writing to Health Connect.
Learn Android XR Fundamentals: Part 1 - Modes and Spatial Panels
33 minutes
Updated February 14, 2025
In this codelab, you’ll learn about the unique user experiences that are made possible by the XR form factor. Then, you’ll learn the fundamentals of how apps can be adapted to make the most of running on an Android XR headset by using the composables provided by the Jetpack Compose XR library.
Android Basics with Compose
Updated January 14, 2025
Learn the basics of building Android apps with Jetpack Compose, the recommended UI toolkit for building Android apps
Add Gemini capabilities to your Android app
Updated January 13, 2025
Learn how to add a simple Gemini API feature to an Android app with Vertex AI for Firebase.
Engage Wear OS users in new ways with the Ongoing Activity API
30 minutes
Updated January 9, 2025
With the Ongoing Activity API in Wear, developers can engage users from the watch face as well as the app launcher with minimal amount of code and allow those users to jump back into the app for important activities with a simple tap.
Use SQL to read and write to a database
Updated January 9, 2025
Learn the core concepts of relational databases and learn to read and manipulate a database using SQL.
Build a Fast Checkout Experience on Android with Google Pay
28 minutes
Updated December 20, 2024
Google Pay API gives users the opportunity to pay everywhere, using the payment information stored in their Google Accounts. In this lab, you make use of Google Pay's client library for Android to improve the checkout experience of a simplified
(Deprecated) Build a musical game using Oboe
1 hour 6 minutes
Updated December 11, 2024
Learn how to build a musical game with the Oboe library.
(Deprecated) Automated Accessibility Testing using Espresso
3 minutes
Updated December 11, 2024
In this codelab, you’ll learn the fundamentals of accessibility testing using Espresso.
(Deprecated) Advanced Android in Kotlin 05.3: Testing Coroutines and Jetpack integrations
Updated December 11, 2024
In this codelab, you learn how to test coroutines, ViewModel scoped coroutines, and Room, and implement end-to-end testing for your Kotlin Android app.
(Deprecated) Advanced Android in Kotlin 05.2: Introduction to Test Doubles and Dependency Injection
Updated December 11, 2024
In this codelab you’ll learn to set up manual dependency injection, a service locator, and how to use fakes and mocks in your Android Kotlin apps. In doing so, you’ll learn how to test a repository and write fragment integration tests.
(Deprecated) Advanced Android in Kotlin 05.1: Testing Basics
Updated December 11, 2024
Learn the basics of testing your Android Kotlin apps. In this codelab you’ll learn to run tests, write basic tests, work with AndroidX Test, as well as test ViewModel and LiveData.
(Deprecated) On Demand Modules
2 hours
Updated December 11, 2024
With the Android App Bundle and Google Play’s Dynamic Delivery, your app can download dynamic feature modules on demand to devices running Android 5.0 (API level 21) and higher. Your app simply needs to call APIs in the Play Core Library to download and install those modules as required, and the Google Play Store pushes only the code and resources needed for that module to the device. You can also use this API to download on demand modules for your instant app.
(Deprecated) Tweakr: Wizard of Oz Prototyping and Remote Control with Firebase + Android
28 minutes
Updated December 11, 2024
Calling all prototypers and motion designers! Are you sick of tweaking one value in your animation and having to wait minutes to compile and see your change? Ever want to hand someone a prototype, and let them try it with various options you can adjust on the fly? Do you get tingles when someone mentions “one-line solution”?
(Deprecated) People: Conversations and Bubbles
16 minutes
Updated December 11, 2024
This codelab demonstrates how to show conversational notifications as Bubbles on Android 11.
(Deprecated) Direct Share to an Android app
47 minutes
Updated December 11, 2024
Direct Share makes sharing content quicker and easier. In this codelab, you’ll build an app that is able to display a list of contacts in the system Intent chooser dialog so you can jump directly into the app to make the sharing process seamless.
(Deprecated) Two-way communication without internet
36 minutes
Updated December 11, 2024
Learn how to connect your users with each other even when no internet is available
(Deprecated) Create different versions of your app using build variants
35 minutes
Updated December 10, 2024
In this codelab, you build a default (“demo”) and premium (“full”) version of the DiceRoller app using build variants.
(Deprecated) Migrating your Dagger app to Hilt
34 minutes
Updated December 10, 2024
In this codelab, you’ll migrate an Android app that uses Dagger as the Dependency Injection library to Hilt.
(Deprecated) Learn Jetpack Navigation
1 hour 25 minutes
Updated December 10, 2024
Learn how to implement common navigation requirements for Android apps. Navigation Components handle fragment transactions, up/back stack, navigation UI patterns like navigation drawers, deep links and more. You’ll also explore the type safe args plugin and the Navigation Editor in Android Studio.
(Deprecated) Using Dagger in your Android app - Kotlin
1 hour 10 minutes
Updated December 10, 2024
In this codelab, you’ll build an Android app that uses Dagger to do Dependency Injection.
(Deprecated) Data Binding in Android
56 minutes
Updated December 10, 2024
In this codelab you’ll learn how to use the Data Binding library. The Data Binding Library allows you to bind UI components in your layouts to data sources in your app using a declarative format rather than programmatically. You’ll learn to set it all up, use layout expressions, work with observable objects, and create custom Binding Adapters to reduce boilerplate to a minimum.
(Deprecated) Learn advanced coroutines with Kotlin Flow and LiveData
57 minutes
Updated December 10, 2024
In this codelab, you’ll build a coroutine-based Android app that uses Architecture Components to fetch data from the network and a Room database.
(Deprecated) Using Hilt in your Android app
1 hour
Updated December 10, 2024
In this codelab, you’ll build an Android app that uses Hilt to do Dependency Injection.
(Deprecated) Use Kotlin Coroutines in your Android App
54 minutes
Updated December 10, 2024
In this codelab, you’ll build a coroutine-based Android app that uses Architecture Components to fetch data from the network and a Room database.
(Deprecated) Building a Data Layer
1 hour 3 minutes
Updated December 10, 2024
In this codelab, you learn about the data layer in Android app architecture. You build repositories, data models, and data sources to read and write data to a local database and a network service.
Jetpack Compose Navigation
1 hour 39 minutes
Updated December 10, 2024
In this codelab, you’ll learn all about the basics of Navigation in Compose.
(Deprecated) Use ConstraintLayout to design your Android views
1 hour 5 minutes
Updated December 9, 2024
In this codelab, you’ll learn how to use Android Studio’s Layout Editor to build your views using ConstraintLayout.
(Deprecated) Android Paging Basics
25 minutes
Updated December 9, 2024
In this codelab, you integrate the Paging library into an app that shows a list. The Paging library helps you load and display pages of data from a larger dataset from local storage or over network.
(Deprecated) Kotlin Bootcamp for programmers: Welcome to the course
Updated December 9, 2024
Welcome to the Kotlin bootcamp for programmers training course.
(Deprecated) Android Paging Advanced codelab
1 hour 28 minutes
Updated December 9, 2024
In this codelab, you modify a sample app to incorporate the Paging Library, which reduces the app’s memory footprint.
(Deprecated) Kotlin Bootcamp for Programmers 1: Get started
Updated December 9, 2024
In this codelab, you learn some of the advantages of using Kotlin, and you install the necessary tools (JDK+IDE).
(Deprecated) Create Hello-CMake with Android Studio
10 minutes
Updated December 9, 2024
In this codelab, you’ll learn how to use Android Studio 4.0+ C++ template
(Deprecated) Android Sleep API Codelab
30 minutes
Updated December 9, 2024
Learn how to register for the Android Sleep API to get the SleepSegmentEvents and SleepClassifyEvents.
(Deprecated) Login with Biometrics on Android
30 minutes
Updated December 9, 2024
In this codelab you will add biometric authentication to your app as part of your login process. You will not replace your current login process – users can still log in with their account password. Instead, you will augment your login process, giving users the convenience to not have to remember their password every time they open your app. The codelab shows how to ask users to opt-in and then how to store the server generated user token behind biometric authentication.
Basic layouts in Compose
54 minutes
Updated December 9, 2024
In this codelab, you’ll learn how to implement real-world designs with the composables and modifiers that Compose provides out of the box.
(Deprecated) Build an app that runs on a work profile
30 minutes
Updated December 9, 2024
In this codelab, you’ll be making changes to an app to provide a better user experience when run on a managed device with a work profile.
(Deprecated) Android Network Security Configuration Codelab
40 minutes
Updated December 9, 2024
In this codelab, you’ll explore the Network Security Configuration on Android and encounter some common pitfalls around establishing secure network communications.
(Deprecated) Converting to Kotlin
53 minutes
Updated December 9, 2024
In this codelab, you’ll learn how to convert your Java code to Kotlin
(Deprecated) Android Room with a View - Kotlin
1 hour
Updated December 9, 2024
In this codelab you’ll build an Android app in Kotlin that uses Android Architecture Components (RoomDatabase, Entity, DAO, AndroidViewModel, LiveData) together with Kotlin coroutines. This sample app stores a list of words in a Room database and displays it in a RecyclerView. You will implement this app using the recommended Android architecture using these components.
(Deprecated) Android Room with a View - Java
58 minutes
Updated December 9, 2024
In this codelab you build an app that uses Android Architecture Components (RoomDatabase, Entity, DAO, AndroidViewModel, LiveData) and implements the recommended architecture for these components. The sample app stores a list of words in a Room database and displays it in a RecyclerView.
Learn Car App Library fundamentals
1 hour 24 minutes
Updated November 29, 2024
In this codelab, you learn the fundamentals of the Car App Library. This library is used to build apps for Android Auto and Android Automotive OS, which can be used both while parked and driving. You learn how to reuse your implementation across both platforms and have it handle the hard stuff, like different screen configurations and input methods.
(Deprecated) Exposing data to watch face complications on Wear OS
45 minutes
Updated November 14, 2024
In this codelab, you’ll learn how to expose your data to watch face complications while keeping best practices for the platform in mind.
Create and use variables in Kotlin
Updated October 31, 2024
Learn why variables are useful in programming, as well as how to define and update variables in your Kotlin code.
Drag and Drop in Compose
35 minutes
Updated October 30, 2024
Learn to enable drag and drop in compose using modifiers.
Introduction to Compose for TV
1 hour 21 minutes
Updated October 15, 2024
Learn the basics of Compose for TV and create two screens that are commonly available in TV apps.
Create your first Tile in Wear OS
47 minutes
Updated October 14, 2024
In this codelab, you’ll learn how to create your own Tile for Wear OS. You’ll use Tiles Material Components, a library that makes it easier to build UI that conforms to Material design guidelines, and preview your tiles in Android Studio as you develop.
Build a list-detail layout with activity embedding and Material Design
1 hour 22 minutes
Updated October 10, 2024
Activity embedding enables activity-based apps to support two-pane layouts on large screens with no code refactoring. You add some dependencies, create an XML configuration file, implement an initializer, and make a few additions to the app manifest. Or, if you prefer working in code, you can make a few Jetpack API calls from the onCreate() method of the main activity. In this codelab, you will use both the XML and API development approaches to update an activity-based app to a list-detail, two-pane layout.
Compose for Wear OS Codelab
57 minutes
Updated October 8, 2024
In this codelab, you’ll learn how to translate your Compose knowledge to wearables with the new Compose for Wear OS. By the end, you’ll have created both simple and advanced composables in an app for your wrist.
Advanced activity embedding
1 hour 7 minutes
Updated October 2, 2024
In this codelab you will learn how to use activity embedding’s newly added feature to improve app large screen experience. These features include pane expansion, overlay presentation, full screen dialog dim and activity stack pinning.
Accessibility in Jetpack Compose
39 minutes
Updated September 24, 2024
In this codelab, you’ll learn how to make your Compose app more accessible. See how to increase touch targets, add content descriptions, click labels, custom actions, and more.
Migrating to Jetpack Compose
51 minutes
Updated September 24, 2024
In this codelab, you’ll learn how to migrate parts of a screen in the View system to Jetpack Compose.
Scalable implementation of Google Play Billing in Kotlin
Updated September 9, 2024
This codelab shows how to add billing to an existing app. You will learn how to use the Google Play Billing Library in your project in a way that hides the nitty-gritty details from the rest of your app and engineering team.
Build a handwritten digit classifier app with TensorFlow Lite
46 minutes
Updated September 4, 2024
In this codelab you will train a handwritten digit classifier model using TensorFlow, then convert it to TensorFlow Lite format and deploy it on an Android app.
Using Play Asset Delivery in Unity games
1 hour 25 minutes
Updated August 21, 2024
In this codelab, modify a sample Unity project to take advantage of Play Asset Delivery for on-demand asset downloading from Google Play.
Add keyboard, mouse, trackpad, and stylus support with Jetpack Compose
1 hour 9 minutes
Updated July 26, 2024
Learn how to develop your apps to support keyboard and pointing devices, such as mouse and trackpad, with Compose.
Support resizable surfaces in your camera app
38 minutes
Updated July 22, 2024
With the advent of Android 12L and the availability of new form factors (such as foldable devices) and display modes such as multi-window and multi-display, many assumptions regarding the relationship between the camera output and the surface have been challenged.
Add predictive back animations
28 minutes
Updated July 16, 2024
In this codelab, you learn how to add predictive back animations to the SociaLite app.
Build and test a parked app for Android Automotive OS
1 hour 11 minutes
Updated July 11, 2024
In this codelab, you’ll learn how to build and test great parked experiences for Android Automotive OS devices. You learn how to make the most of the wide variety of screens found in cars and how to let users control playback of content in various scenarios unique to cars using standard Android mechanisms.
Android Basics with Compose and Firebase
Updated July 1, 2024
Android Basics with Compose and Firebase
Run your first app on the Android Emulator
Updated June 28, 2024
Learn how to run an app on the Android Emulator.
Add Compose to a View-based app
Updated June 28, 2024
In this codelab, you learn how to migrate parts of a screen in the View system to Jetpack Compose.
Build an app with an adaptive layout
Updated June 28, 2024
Learn how to adapt your app for large screens by implementing one of the canonical layout patterns.
Add images to your Android app
Updated June 18, 2024
Learn how to build a simple app with composable functions.
Build a simple app with text composables
Updated June 18, 2024
Learn how to build a simple app with composable functions.
Write unit tests for ViewModel
Updated June 18, 2024
Learn how to test the ViewModel to verify the correctness, functional behavior, and usability of your app.
Background Work with WorkManager
Updated June 4, 2024
The WorkManager API for Android makes working in the background simple. WorkManager can create tasks that are queryable, reusable, and chainable. WorkManager is the recommended task scheduler on Android. This codelab will teach you the ins and outs of WorkManager: everything from writing a simple job to more complex chained jobs.
Build an adaptive app with dynamic navigation
Updated May 31, 2024
Learn how to adapt your app for large screens with adaptive navigation ui patterns.
Starting Android Accessibility
16 minutes
Updated May 25, 2024
In this codelab, you’ll learn the fundamentals of Android Accessibility. You’ll work through exercises to learn how to use the Android platform to build apps that can be used more easily by a wider set of people with different accessibility needs.
Introduction to Coroutines in Android Studio
Updated May 22, 2024
Learn to use Kotlin coroutines inside an Android app and how to test coroutines.
Persist data with Room
Updated May 17, 2024
Learn how to use Room in your Android Kotlin apps. Room is a persistence database library that’s part of Android Jetpack. Room is an abstraction layer over SQLite. Room provides convenient APIs to set up, configure, and query the database.
Read and update data with Room
Updated May 17, 2024
Learn how to use Room to read and update data in your Android Kotlin apps. Room is a database library that’s part of Android Jetpack. Room takes care of many of the chores of setting up and configuring a database, and makes it possible for your app to interact with the database using ordinary function calls.
Codelab for Drag and Drop
55 minutes
Updated May 14, 2024
Learn to enable drag and drop for your views along with use of DragHelper and DropHelper both within the app and across the app.
Practical performance problem solving in Jetpack Compose
50 minutes
Updated May 13, 2024
Make your Compose app run fast by analyzing system traces and fixing common lag causes.
Get data from the internet
Updated May 10, 2024
Learn how to use community-developed libraries to connect to a web service to retrieve and display data in your Android Kotlin compose app. Also learn how to handle potential network errors.
Add repository and Manual DI
Updated May 10, 2024
Learn how to further improve the architecture of the Mars Photos app by separating the network calls into a repository.
Test the Cupcake App
Updated May 8, 2024
Learn how to test the Navigation component and maximize the amount of code that is tested.
Add a scrollable list
Updated May 8, 2024
Build an app that displays a scrollable list of affirmations with text and images.
Add adaptive layouts to a view-based Android app with Compose
1 hour 1 minute
Updated May 7, 2024
Learn how to add adaptive layouts to a view-based Android app with Jetpack Compose.
Create an Art Space app
Updated May 7, 2024
Learn how to create an Android app that showcases your own art space.
Navigate between screens with Compose
Updated May 7, 2024
Add the Navigation component to the Cupcake app to organize the flow of the app, navigate and pass data between different screens.
Simple Animation with Jetpack Compose
Updated May 7, 2024
Learn how to add a simple spring animation to your Compose app.
Create a widget with Glance
Updated May 2, 2024
In this codelab, you learn how to add Glance widgets to the SociaLite app.
Optimize your camera app on foldable devices with Jetpack WindowManager
34 minutes
Updated April 30, 2024
Over the years, Android devices have evolved to include a variety of sizes, shapes, and displays, among other features. Since the beginning, however, taking pictures with your phone has been one of the most important use cases. Today, camera capabilities are still one of the top reasons consumers purchase a phone.
Stages of the Activity lifecycle
Updated April 27, 2024
In this codelab, you learn about the activity lifecycle and logging.
Intro to state in Compose
Updated April 26, 2024
Learn about state, and how it can be used and manipulated by Jetpack Compose.
Material Theming with Jetpack Compose
Updated April 26, 2024
Learn how to add Material Theming to an app, including color, shape, and typography.
Practice: Click behavior
Updated April 26, 2024
Apply what you learned about button click behavior to build an app.
Use the debugger in Android Studio
Updated April 23, 2024
Learn how to use the debugger in Android Studio to inspect and debug the state of your app at runtime.
Create an interactive Dice Roller app
Updated April 23, 2024
Learn how to build an interactive Dice Roller app that lets users roll a dice and then shows them the result.
Handle edge-to-edge enforcements in Android 15
50 minutes
Updated April 18, 2024
Learn how to handle edge-to-edge enforcements in Android 15.
Create an accessible and personalized theme and brand with Material Design 3
Updated April 16, 2024
Learn how to create a theme and brand that’s accessible and personalized with Material 3.
Design an Adaptive Layout with Material Design
4 minutes
Updated April 4, 2024
Learn how to use adaptive design principles in Material Design to achieve consistency across screen sizes. In this codelab, you take a mobile design to tablet format, and learn about the responsive grid, adaptive composition patterns, and the correct components.
Getting started with Vulkan on Android
59 minutes
Updated April 1, 2024
Vulkan is a high performance, modern graphic API. It provides low level accessibility to the GPU and optimizes implementation in various ways, but it is difficult to use. The alternative, OpenGL ES, was simpler but has less features and performance as it is based on legacy hardware architecture. OpenGL ES has been deprecated on most other platforms and is no longer in active development. On Android, we are planning to deprecate OpenGL ES and move to Vulkan and need to prepare developers for the transition.
Integrating Adaptability features into your Native Game
1 hour
Updated February 6, 2024
In this codelab, you’ll start with a simple 3D physics simulation game and integrate Adaptability features to it. You will integrate:
Load and display images from the internet
Updated February 1, 2024
In this codelab, you use the Coil library to load and display photos from the internet in your Android Compose app.
Jetpack Compose basics
1 hour 5 minutes
Updated January 18, 2024
In this codelab, you’ll learn the basics of Compose.
Introduction to Coroutines in Kotlin Playground
Updated January 16, 2024
Within Kotlin Playground, learn to use Kotlin coroutines to write asynchronous code.
Download and install Android Studio
Updated January 12, 2024
Learn how to download and install Android Studio
Receive location updates in Android 10 with Kotlin
Updated January 3, 2024
In this codelab, you'll learn how to continue receiving location updates for Android 10, keeping best practices for the platform in mind.
Getting Started with CameraX
1 hour
Updated January 3, 2024
This codelab introduces how to create a camera app that uses CameraX to show a viewfinder, take photos and analyze an image stream from the camera.
Install Android 11 GSI for App Testing
Updated January 3, 2024
In this codelab, you will install Android 11 Generic System Image (GSI) to Android 9 (Pie) devices. After that, you can develop and validate your application with the new OS!
Working with Preferences DataStore
27 minutes
Updated January 3, 2024
In this codelab, you’ll modify a sample app to incorporate Jetpack Preferences DataStore, a new and improved data store solution and replacement for SharedPreferences.
Theming in Compose with Material 3
31 minutes
Updated January 3, 2024
The purpose of this codelab is to demonstrate theming in Jetpack Compose with new Material Design 3 and Material You implementation.
Convertendo para Kotlin
Updated January 3, 2024
Nesse codelab você aprenderá como converter seu código Java para Kotlin.
Calculate a custom tip
1 hour 3 minutes
Updated January 3, 2024
Learn how to add an action button, set up keyboard actions, and use a Switch composable.
Advanced State and Side Effects in Jetpack Compose
41 minutes
Updated December 22, 2023
In this codelab, you’ll learn advanced concepts of state and side effects in Jetpack Compose. See how to create a state holder for complex stateful composables, how to create coroutines and call suspend functions from Compose code, and how to trigger side effects to accomplish different use cases.
Use classes and objects in Kotlin
Updated December 20, 2023
Learn how to use classes and objects in Kotlin.
State in Jetpack Compose
50 minutes
Updated November 23, 2023
In this codelab you’ll learn about how to build rich, interactive, Compose applications by managing state.
Animating elements in Jetpack Compose
20 minutes
Updated November 23, 2023
In this codelab, you’ll learn how to use some Compose Animation APIs.
Testing in Jetpack Compose
38 minutes
Updated November 21, 2023
In this codelab you’ll learn about testing UIs created with Jetpack Compose. You will write your first tests while learning about testing in isolation, debugging tests, semantics trees and synchronization.
Integrating Android Performance Tuner into your Unity game
1 hour 12 minutes
Updated November 15, 2023
In this codelab, you’ll add Android Performance Tuner to a Unity game, allowing you to get performance measures reported in the Google Play Console when people play your game.
Practice: Kotlin Fundamentals
Updated October 30, 2023
Apply the basic concepts of the Kotlin programming language to solve the given problems.
Support foldable and dual-screen devices with Jetpack WindowManager
1 hour
Updated October 11, 2023
Learn to adapt your app to new form factors, like foldable and dual-screen devices, with the Jetpack WindowManager library.
Activity Recognition Transition API Codelab
31 minutes
Updated September 29, 2023
Learn how to use Activity Recognition Transition Api to build powerful contextual features in your app
Calculate a custom tip
Updated September 29, 2023
Learn how to add an action button, set up keyboard actions, and use a Switch composable.
Your first program in Kotlin
Updated September 29, 2023
Learn how to create and modify simple programs in Kotlin.
Configure, implement, and verify Android App Links
35 minutes
Updated September 21, 2023
In this codelab, you’ll build an Android App which lists a series of restaurants. It aims to help design, configure, and verify Android App Links.
Generics, objects, and extensions
Updated September 21, 2023
Gain a high-level introduction to more Kotlin concepts such as generics, enum classes, data classes, objects, and scope functions which you’ll be using in your Compose code.
Inspect app performance with Macrobenchmark
48 minutes
Updated September 21, 2023
In this codelab, you’ll learn how to measure app startup timing and frame timing with Jetpack Macrobenchmark.
Practice: Build Superheroes app
Updated September 21, 2023
Build upon the concepts of material design, building a list and simple animations to build a list of super-heroes.
Background Work with WorkManager - Java
1 hour 30 minutes
Updated September 21, 2023
Android has many choices for guaranteed background work, which have various pros and cons. The WorkManager library for Android makes working in the background simple. WorkManager deals with edge cases and compatibility issues. It also can create tasks that are query-able, reusable and chain-able. WorkManager is the recommended task scheduler on Android. This codelab will teach you the ins-and-outs of WorkManager: everything from writing a simple job to more complex chained jobs with constraints.
Integrating Android Performance Tuner into your native Android game
1 hour 35 minutes
Updated September 21, 2023
In this codelab, you’ll add Android Performance Tuner to a native Android game, allowing you to get performance measures reported in the Google Play Console when people play your game.
Lesson 1.1 - Get started
Updated September 21, 2023
In this codelab, you learn some of the advantages of using Kotlin, and you install the necessary tools (JDK+IDE).
Improve app performance with Baseline Profiles
48 minutes
Updated September 21, 2023
This codelab shows how to improve app startup timing and frame timing with Baseline Profiles.
Enhance stylus support in an Android app
1 hour 23 minutes
Updated September 21, 2023
Learn how to implement advanced techniques that enable a state-of-the-art stylus experience in an Android app.
Higher-order functions with collections
Updated September 21, 2023
Learn how to use common higher-order functions with collections in Kotlin
Project: Create a Business Card app
Updated September 21, 2023
Learn how to create an Android app that showcases your business card.
Use collections in Kotlin
1 hour 12 minutes
Updated September 21, 2023
Learn how to use arrays and collections, including lists, sets, and maps.
Add Play Integrity to your Android application
1 hour 18 minutes
Updated September 21, 2023
In this codelab, you’ll add the Play Integrity API to a sample application. You’ll use the Play Integrity API to request an integrity verdict that helps you make determinations about the license status and integrity of your app, and the integrity status of the device it is running on.
Using Play Asset Delivery in native games
1 hour 15 minutes
Updated September 21, 2023
In this codelab, modify a C++ demo application to take advantage of Play Asset Delivery for on-demand asset downloading from Google Play.
Add a scrollable list
1 hour 5 minutes
Updated September 21, 2023
Add a scrollable list to the Affirmations app
Add Rewarded Video Ads to your Android App
35 minutes
Updated September 21, 2023
In this codelab, you’ll integrate rewarded video ads into a simple demo game.
Android Testing Codelab
Updated September 21, 2023
In this codelab you’ll learn how to write tests for a real world Android application that uses modern architecture. It showcases unit, integration and end-to-end tests using JUnit4, code coverage tools, Robolectric and Espresso. You’ll also learn how to create tests for an app that uses Kotlin coroutines and Architecture Components like ViewModel, LiveData, Room, Navigation and Data Binding.
Android Privacy Codelab
Updated September 21, 2023
Android has released many individual privacy features over the past few releases, and we are excited for you to adopt them in your apps! This codelab will seek to tie individual privacy features together and show the developer how they can learn about their app’s access to private user data and adopt privacy best practices in an existing, running app.
Use collections in Kotlin
Updated September 21, 2023
Learn how to use arrays and collections, including lists, sets, and maps.
ViewModel and State in Compose
Updated September 21, 2023
In this codelab, you learn how to use a ViewModel, one of the architecture components. You will implement a ViewModel to retain the app state during configuration changes.
Cronet Basics
Updated September 21, 2023
Last Updated: 2022-05-06 Cronet is the Chromium network stack made available to Android apps as a library. Cronet takes advantage of multiple technologies that reduce the latency and increase the throughput of the network requests that your app needs
Managing Android Devices Without an App
34 minutes
Updated September 21, 2023
Managing Android devices has never been easier. With the Android Management API, you can build a policy and provision a device in minutes. Our quickstart guide will give you everything you need to get started, and will help you set up a device from scratch in minutes.
Add Nearby Messages to your app
15 minutes
Updated September 21, 2023
Learn how to send and discover messages with the Nearby Messages API
Working with Proto DataStore
34 minutes
Updated September 21, 2023
In this codelab, you’ll modify a sample app to incorporate Jetpack Proto DataStore, a new and improved data store solution and replacement for SharedPreferences.
Building a Kotlin extensions library
Updated September 21, 2023
In this codelab, you’ll build your own Kotin extensions library for an API that was originally created in the Java programming language. You’ll learn the basics of extension functions and properties, as well as how to implement a coroutines and Flow version of a traditional, callbacks based API.
Use function types and lambda expressions in Kotlin
Updated September 21, 2023
Learn how to use lambda expressions and higher order functions in Kotlin.
Practice: Build Sports app
Updated September 21, 2023
Build upon the concepts of material design by building a list and simple animations to build a list of superheroes.
Advanced WorkManager
45 minutes
Updated September 21, 2023
Built on top of the “WorkManager Basics” codelab, this adds support for the new Progress API introduced in WorkManager v2.3 and shows how to customize WorkManager with a custom configuration. This codelab will also cover how to test Workers.
Practice: Compose Basics
Updated September 21, 2023
Apply the concepts of basic UI composables to implement screens for the given problems.
Optimizing your Android App for ChromeOS
1 hour
Updated September 21, 2023
In this codelab, you’ll build an Android app that contains many of the optimizations needed for a good user experience on ChromeOS.
Improve Engagement on Watch Next for Movie/TV Episodes on Android TV
1 hour 27 minutes
Updated September 21, 2023
In this codelab, you’ll learn best practices for building Watch Next for TV movies/episodes.
Android fundamentals 02.2: Activity lifecycle and state
Updated September 21, 2023
In this codelab you add logging statements to the TwoActivities app and observe activity lifecycle changes. You work with these changes and explore how to handle user input under these conditions.
Building Beautiful Transitions with Material Motion for Android
Updated September 19, 2023
Build Material's motion system into the Reply app using transitions from the Material Components for Android library, and Kotlin.
Incorporate Lifecycle-Aware Components
Updated September 19, 2023
In this codelab, you'll learn about lifecycle-aware architecture components and how to incorporate LiveData and ViewModels into your app.
MDC-104 Android: Material Advanced Components (Java)
Updated September 19, 2023
Improve your design and learn to use our advanced component backdrop menu in Java.
MDC-102 Android: Material Structure and Layout (Java)
Updated September 19, 2023
Learn how to use Material for structure and layout on Android in Java.
MDC-103 Android: Material theming with Color, Motion and Type (Java)
Updated September 19, 2023
Discover how Material Components for Android make it easy to differentiate your product and express your brand through design in Java.
MDC-103 Android: Material Theming with Color, Elevation and Type (Kotlin)
Updated September 19, 2023
Discover how Material Components for Android make it easy to differentiate your product and express your brand through design in Kotlin.
MDC-104 Android: Material Advanced Components (Kotlin)
Updated September 19, 2023
Improve your design and learn to use our advanced component backdrop menu in Kotlin.
MDC-101 Android: Material Components (MDC) Basics (Java)
Updated September 19, 2023
Learn the basics of using Material Components for Android by building a simple app with core components in Java.
Recognize Flowers with TensorFlow Lite on Android
Updated September 19, 2023
In this codelab you will take an image classifier, and run it on an Android phone using TensorFlow Lite.
MDC-102 Android: Material Structure and Layout (Kotlin)
Updated September 19, 2023
Learn how to use Material for structure and layout on Android in Kotlin.
Controlling media through MediaSession
Updated September 19, 2023
In this codelab, you'll expand a video sample to add support for MediaSession. This allows Android to control playback from outside your app, for instance through the Google Assistant, remote controls on TV, or on-screen controls on the lock screen and Wear OS.
Recognize, Identify Language and Translate text with ML Kit and CameraX: Android
Updated September 19, 2023
In this codelab, you'll build an Android app with ML Kit that uses on-device Machine Learning to recognize, identify language and translate text from between 59 languages. You'll also learn how to integrate the CameraX library to accomplish these tasks from a real-time camera feed.
Deprecated: Deeper Content Integration with the New Android TV Home Screen
Updated September 19, 2023
This codelab introduces the new Android TV home screen. You'll learn how to add channels and programs to the Android TV launcher, and make them discoverable. Deprecated by jbax@
Raise engagement on Android TV by integrating with the Play Next row
Updated September 19, 2023
This codelab dives deeper into the new Android TV home screen. You'll learn how to add programs to the Play Next row, the different types of programs allowed, and best practices for your app to integrate with the row.
创建 Birthday Card 应用
Updated November 6, 2023
在本 Codelab 中,您将使用 Android Studio 中的布局编辑器创建一个显示文本的 Android 应用。
在 Kotlin 中添加条件行为
Updated November 6, 2023
在此 Codelab 中,您将创建一个 Lucky Dice Roll Kotlin 程序,用于检查您掷出的数字是否等于给定的幸运数字。
将 LiveData 与 ViewModel 配合使用
Updated November 6, 2023
在此 Codelab 中,您将学习如何使用 LiveData(架构组件之一),如何将 ViewModel 中的应用数据转换为 LiveData,以及如何观察 LiveData 中的更改并自动更新界面。
Preferences DataStore
Updated November 5, 2023
在此 Codelab 中,您将学习如何使用名为 Jetpack DataStore 的数据存储解决方案在应用中存储键值对。
将数据存储在 ViewModel 中
Updated November 5, 2023
在此 Codelab 中,您将学习如何使用 ViewModel(架构组件之一),以及如何实现 ViewModel 以便在配置更改期间保留应用数据。
创建并运行您的首个 Android 应用
Updated November 5, 2023
在此 Codelab 中,您将学习如何通过 Android Studio 使用 Kotlin 构建您的首个 Android 应用。您将使用 Android Studio 模板来创建您的第一个项目。
可选:在移动设备上运行您的应用
Updated November 5, 2023
在此 Codelab 中,您将学习如何设置 Android 设备(如手机或平板电脑)以及如何在 Android 设备上运行通过 Android Studio 开发的应用。
Fragment 之间的共享 ViewModel
Updated November 4, 2023
在更高级的应用示例中使用 Jetpack Navigation 组件,并了解在 activity 的多个 fragment 之间使用共享 ViewModel 的优势。
使用 Room 读取和更新数据
Updated October 31, 2023
了解如何在 Android Kotlin 应用中使用 Room 读取和更新数据。Room 是一个数据库库,属于 Android Jetpack 的一部分。Room 负责处理数据库设置和配置方面的许多繁琐工作,并让应用可以使用普通的函数调用与数据库进行交互。
Room 和 Flow 简介
Updated February 28, 2023
学习关系型数据库的基础知识,并练习在 Android Studio 中使用 Database Inspector 运行 SQL 查询。
使用 Room 持久保留数据
Updated February 28, 2023
了解如何在 Android Kotlin 应用中使用 Room。Room 是一个持久性数据库,属于 Android Jetpack 的一部分。Room 是 SQLite 之上的一个抽象层。Room 提供方便的 API,用于设置和配置数据库以及从数据库查询数据。
使用 Kotlin 03.2 进行高级 Android 开发:使用 MotionLayout 的动画效果
Updated July 29, 2022
在此 Codelab 中,您将使用 MotionLayout 构建具有动态动画效果的 Android Kotlin 应用。
在 Android 上使用 TensorFlow Lite 识别花卉(Beta 版)
Updated July 29, 2022
在此 Codelab 中,您将提取一个图像分类器,然后使用 TensorFlow Lite 在 Android 手机上运行它。
内容与 Android TV 主屏幕频道集成 (Kotlin)
Updated July 29, 2022
此 Codelab 介绍 Android TV 主屏幕功能。您将学习如何在 Android TV 主屏幕上添加频道和节目,并使其可以被用户发现。
使用 Kotlin 进行高级 Android 开发 04.1:Android Google 地图
Updated July 29, 2022
了解如何向 Android Kotlin 应用添加 Google 地图,并为 Google 地图设置样式。
使用 WorkManager 在后台处理工作 - Kotlin
Updated April 16, 2022
Android 为保证执行后台工作提供了许多选择,这些选择既有很多优点,也有很多缺点。面向 Android 的 WorkManager API 可简化后台工作。WorkManager 解决了极端情况和兼容性问题。它还可以创建可查询、可重用和可链接的任务。WorkManager 是 Android 平台上推荐的任务调度程序。本 Codelab 将向您介绍 WorkManager 的详细信息:从编写简单的作业,到更为复杂的具有约束条件的链式作业。
使用 ExoPlayer 流式传输媒体内容
Updated April 11, 2022
在此 Codelab 中,您将构建一个媒体播放器,以使用在 Android 版 YouTube 应用中运行的开源媒体播放器 ExoPlayer 呈现音频和自适应视频串流。此 Codelab 将使用并自定义该库中包含的界面组件,并将演示如何在 activity 生命周期中实例化、设置、重用以及正确集成 SimpleExoPlayer 实例。
Android Kotlin 基础知识:03.2 定义导航路径
Updated October 19, 2021
学习如何使用 Android Studio 的 Navigation Editor 定义应用中的导航流(导航路径)。您将了解如何实现向上按钮、添加选项菜单,以及为应用创建抽屉式导航栏。
Android Kotlin 基础知识:创建 Room 数据库
Updated October 13, 2021
了解如何在 Android Kotlin 应用中使用 Room。Room 是一个数据库,是 Android Jetpack 的一部分。Room 负责处理数据库设置和配置方面的许多繁琐工作,并让应用可以使用普通的函数调用与数据库进行交互。
Android Kotlin 基础知识:03.3 启动外部 activity
Updated October 13, 2021
在此 Codelab 中,您将学习如何使用 Safe Args 把参数传递到 fragment,以便更轻松地调试应用;还会学习如何在应用中调用外部 activity。
Android Kotlin 基础知识:07.2 将 DiffUtil 和数据绑定与 RecyclerView 结合使用
Updated October 11, 2021
学习提高 RecyclerView 效率的技巧,以处理大型列表。此外,您还能学到一些其他技巧,使您的代码更易于维护和扩展,以在您的 Android Kotlin 应用中处理复杂的列表和网格。