About this project
Android Architecture Samples is a Google-maintained collection of sample Android applications that demonstrate different architectural approaches. Each branch of the repository contains the same TODO app implemented with small variations, making it easy to compare patterns side by side.
The current branch shows a modern setup:
- User interface built with Jetpack Compose.
- Single-activity architecture using Navigation Compose.
- A presentation layer with a Compose screen (View) and a ViewModel per screen or feature.
- Reactive UIs using Flow and Kotlin coroutines for asynchronous work.
- A data layer with a repository and two data sources: a local Room database and a fake remote source.
- Two product flavors, mock and prod, intended to ease development and testing.
- A collection of unit, integration and end-to-end tests, including shared tests that can run on an emulator or device.
- Dependency injection with Hilt.
The project deliberately uses a to-do app because it is simple enough to grasp quickly yet complex enough to illustrate difficult design decisions and testing scenarios. The README is explicit about what the project is not: it is not a template (the Architecture Templates repository is suggested instead), not a UI or Material Design sample (Compose Samples is suggested), and not a production app with networking or authentication (Now in Android is suggested).
It targets intermediate developers and beginners who want a testable, maintainable app structure, as well as advanced developers seeking a quick reference. To use a sample, clone the repository, check out a sample branch, and open the root directory in Android Studio. The code is licensed under Apache 2.0, copyright Google.
Comments
0 Rating appears after 10 ratings
Sign in to join the discussion.