{"id":3699,"url":"https://github.com/android/architecture-samples","last_synced_at":"2025-05-12T22:28:20.302Z","repository":{"id":37271463,"uuid":"51148780","full_name":"android/architecture-samples","owner":"android","description":"A collection of samples to discuss and showcase different architectural tools and patterns for Android apps.","archived":false,"fork":false,"pushed_at":"2025-04-30T23:42:58.000Z","size":13414,"stargazers_count":44987,"open_issues_count":205,"forks_count":11734,"subscribers_count":2402,"default_branch":"main","last_synced_at":"2025-05-05T17:21:08.623Z","etag":null,"topics":["android","android-architecture","samples"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/android.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2016-02-05T13:42:07.000Z","updated_at":"2025-05-05T04:03:58.000Z","dependencies_parsed_at":"2023-11-07T19:38:42.943Z","dependency_job_id":"5ee87bdc-86de-4a55-872f-8c7cfc7a72cf","html_url":"https://github.com/android/architecture-samples","commit_stats":{"total_commits":642,"total_committers":65,"mean_commits":9.876923076923077,"dds":0.4672897196261683,"last_synced_commit":"ff2046bd8fcc6b0d2ead79c6f521a614c9d04198"},"previous_names":["googlesamples/android-architecture"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/android%2Farchitecture-samples","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/android%2Farchitecture-samples/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/android%2Farchitecture-samples/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/android%2Farchitecture-samples/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/android","download_url":"https://codeload.github.com/android/architecture-samples/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253832604,"owners_count":21971298,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","android-architecture","samples"],"created_at":"2024-01-05T20:16:48.930Z","updated_at":"2025-05-12T22:28:20.259Z","avatar_url":"https://github.com/android.png","language":"Kotlin","funding_links":[],"categories":["Samples","Kotlin","Android 应用","Resources","🤖 Android Architecture","Android Apps (Search Results)"],"sub_categories":["网络服务_其他","Code examples","Modern Android Architectures"],"readme":"# Android Architecture Samples\n\nThese samples showcase different architectural approaches to developing Android apps. In its different branches you'll find the same app (a TODO app) implemented with small differences.\n\nIn this branch you'll find:\n*   User Interface built with **[Jetpack Compose](https://developer.android.com/jetpack/compose)** \n*   A single-activity architecture, using **[Navigation Compose](https://developer.android.com/jetpack/compose/navigation)**.\n*   A presentation layer that contains a Compose screen (View) and a **ViewModel** per screen (or feature).\n*   Reactive UIs using **[Flow](https://developer.android.com/kotlin/flow)** and **[coroutines](https://kotlinlang.org/docs/coroutines-overview.html)** for asynchronous operations.\n*   A **data layer** with a repository and two data sources (local using Room and a fake remote).\n*   Two **product flavors**, `mock` and `prod`, [to ease development and testing](https://android-developers.googleblog.com/2015/12/leveraging-product-flavors-in-android.html).\n*   A collection of unit, integration and e2e **tests**, including \"shared\" tests that can be run on emulator/device.\n*   Dependency injection using [Hilt](https://developer.android.com/training/dependency-injection/hilt-android).\n\n## Screenshots\n\n\u003cimg src=\"screenshots/screenshots.png\" alt=\"Screenshot\"\u003e\n\n## Why a to-do app?\n\nThe app in this project aims to be simple enough that you can understand it quickly, but complex enough to showcase difficult design decisions and testing scenarios. For more information, see the [app's specification](https://github.com/googlesamples/android-architecture/wiki/To-do-app-specification).\n\n## What is it not?\n*   A template. Check out the [Architecture Templates](https://github.com/android/architecture-templates) instead.\n*   A UI/Material Design sample. The interface of the app is deliberately kept simple to focus on architecture. Check out the [Compose Samples](https://github.com/android/compose-samples) instead.\n*   A real production app with network access, user authentication, etc. Check out the [Now in Android app](https://github.com/android/nowinandroid) instead.\n\n## Who is it for?\n\n*   Intermediate developers and beginners looking for a way to structure their app in a testable and maintainable way.\n*   Advanced developers looking for quick reference.\n\n## Opening a sample in Android Studio\n\nTo open one of the samples in Android Studio, begin by checking out one of the sample branches, and then open the root directory in Android Studio. The following series of steps illustrate how to open the sample.\n\nClone the repository:\n\n```\ngit clone git@github.com:android/architecture-samples.git\n```\n\nFinally open the `architecture-samples/` directory in Android Studio.\n\n### License\n\n\n```\nCopyright 2024 Google, Inc.\n\nLicensed to the Apache Software Foundation (ASF) under one or more contributor\nlicense agreements. See the NOTICE file distributed with this work for\nadditional information regarding copyright ownership. The ASF licenses this\nfile to you under the Apache License, Version 2.0 (the \"License\"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandroid%2Farchitecture-samples","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandroid%2Farchitecture-samples","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandroid%2Farchitecture-samples/lists"}