[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-7147":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":18,"stars30d":19,"stars90d":16,"forks30d":16,"starsTrendScore":20,"compositeScore":21,"rankGlobal":10,"rankLanguage":10,"license":22,"archived":23,"fork":23,"defaultBranch":24,"hasWiki":25,"hasPages":23,"topics":26,"createdAt":10,"pushedAt":10,"updatedAt":29,"readmeContent":30,"aiSummary":31,"trendingCount":16,"starSnapshotCount":16,"syncStatus":32,"lastSyncTime":33,"discoverSource":34},7147,"nowinandroid","android\u002Fnowinandroid","android","A fully functional Android app built entirely with Kotlin and Jetpack Compose","",null,"Kotlin",21343,4460,415,180,0,3,24,140,16,45,"Apache License 2.0",false,"main",true,[7,27,28],"jetpack-compose","kotlin","2026-06-12 02:01:35","![Now in Android](docs\u002Fimages\u002Fnia-splash.jpg \"Now in Android\")\n\n\u003Ca href=\"https:\u002F\u002Fplay.google.com\u002Fstore\u002Fapps\u002Fdetails?id=com.google.samples.apps.nowinandroid\">\u003Cimg src=\"https:\u002F\u002Fplay.google.com\u002Fintl\u002Fen_us\u002Fbadges\u002Fstatic\u002Fimages\u002Fbadges\u002Fen_badge_web_generic.png\" height=\"70\">\u003C\u002Fa>\n\nNow in Android App\n==================\n\n**Learn how this app was designed and built in the [design case study](https:\u002F\u002Fgoo.gle\u002Fnia-figma), [architecture learning journey](docs\u002FArchitectureLearningJourney.md) and [modularization learning journey](docs\u002FModularizationLearningJourney.md).**\n\nThis is the repository for the [Now in Android](https:\u002F\u002Fdeveloper.android.com\u002Fseries\u002Fnow-in-android)\napp. It is a **work in progress** 🚧.\n\n**Now in Android** is a fully functional Android app built entirely with Kotlin and Jetpack Compose. It\nfollows Android design and development best practices and is intended to be a useful reference\nfor developers. As a running app, it's intended to help developers keep up-to-date with the world\nof Android development by providing regular news updates.\n\nThe app is currently in development. The `prodRelease` variant is [available on the Play Store](https:\u002F\u002Fplay.google.com\u002Fstore\u002Fapps\u002Fdetails?id=com.google.samples.apps.nowinandroid).\n\n# Features\n\n**Now in Android** displays content from the\n[Now in Android](https:\u002F\u002Fdeveloper.android.com\u002Fseries\u002Fnow-in-android) series. Users can browse for\nlinks to recent videos, articles and other content. Users can also follow topics they are interested\nin, and be notified when new content is published which matches interests they are following.\n\n## Screenshots\n\n![Screenshot showing For You screen, Interests screen and Topic detail screen](docs\u002Fimages\u002Fscreenshots.png \"Screenshot showing For You screen, Interests screen and Topic detail screen\")\n\n# Development Environment\n\n**Now in Android** uses the Gradle build system and can be imported directly into Android Studio (make sure you are using the latest stable version available [here](https:\u002F\u002Fdeveloper.android.com\u002Fstudio)). \n\nChange the run configuration to `app`.\n\n![image](https:\u002F\u002Fuser-images.githubusercontent.com\u002F873212\u002F210559920-ef4a40c5-c8e0-478b-bb00-4879a8cf184a.png)\n\nThe `demoDebug` and `demoRelease` build variants can be built and run (the `prod` variants use a backend server which is not currently publicly available).\n\n![image](https:\u002F\u002Fuser-images.githubusercontent.com\u002F873212\u002F210560507-44045dc5-b6d5-41ca-9746-f0f7acf22f8e.png)\n\nOnce you're up and running, you can refer to the learning journeys below to get a better\nunderstanding of which libraries and tools are being used, the reasoning behind the approaches to\nUI, testing, architecture and more, and how all of these different pieces of the project fit\ntogether to create a complete app.\n\n# Architecture\n\nThe **Now in Android** app follows the\n[official architecture guidance](https:\u002F\u002Fdeveloper.android.com\u002Ftopic\u002Farchitecture) \nand is described in detail in the\n[architecture learning journey](docs\u002FArchitectureLearningJourney.md).\n\n# Modularization\n\nThe **Now in Android** app has been fully modularized and you can find the detailed guidance and\ndescription of the modularization strategy used in\n[modularization learning journey](docs\u002FModularizationLearningJourney.md).\n\n# Build\n\nThe app contains the usual `debug` and `release` build variants. \n\nIn addition, the `benchmark` variant of `app` is used to test startup performance and generate a\nbaseline profile (see below for more information).\n\n`app-nia-catalog` is a standalone app that displays the list of components that are stylized for\n**Now in Android**.\n\nThe app also uses\n[product flavors](https:\u002F\u002Fdeveloper.android.com\u002Fstudio\u002Fbuild\u002Fbuild-variants#product-flavors) to\ncontrol where content for the app should be loaded from.\n\nThe `demo` flavor uses static local data to allow immediate building and exploring of the UI.\n\nThe `prod` flavor makes real network calls to a backend server, providing up-to-date content. At \nthis time, there is not a public backend available.\n\nFor normal development use the `demoDebug` variant. For UI performance testing use the\n`demoRelease` variant. \n\n# Testing\n\nTo facilitate testing of components, **Now in Android** uses dependency injection with\n[Hilt](https:\u002F\u002Fdeveloper.android.com\u002Ftraining\u002Fdependency-injection\u002Fhilt-android).\n\nMost data layer components are defined as interfaces.\nThen, concrete implementations (with various dependencies) are bound to provide those interfaces to\nother components in the app.\nIn tests, **Now in Android** notably does _not_ use any mocking libraries.\nInstead, the production implementations can be replaced with test doubles using Hilt's testing APIs\n(or via manual constructor injection for `ViewModel` tests).\n\nThese test doubles implement the same interface as the production implementations and generally\nprovide a simplified (but still realistic) implementation with additional testing hooks.\nThis results in less brittle tests that may exercise more production code, instead of just verifying\nspecific calls against mocks.\n\nExamples:\n- In instrumentation tests, a temporary folder is used to store the user's preferences, which is\n  wiped after each test.\n  This allows using the real `DataStore` and exercising all related code, instead of mocking the \n  flow of data updates.\n\n- There are `Test` implementations of each repository, which implement the normal, full repository\n  interface and also provide test-only hooks.\n  `ViewModel` tests use these `Test` repositories, and thus can use the test-only hooks to\n  manipulate the state of the `Test` repository and verify the resulting behavior, instead of\n  checking that specific repository methods were called.\n\nTo run the tests execute the following gradle tasks: \n\n- `testDemoDebug` run all local tests against the `demoDebug` variant. Screenshot tests will fail\n(see below for explanation). To avoid this, run `recordRoborazziDemoDebug` prior to running unit tests.\n- `connectedDemoDebugAndroidTest` run all instrumented tests against the `demoDebug` variant. \n\n> [!NOTE]\n> You should not run `.\u002Fgradlew test` or `.\u002Fgradlew connectedAndroidTest` as this will execute \ntests against _all_ build variants which is both unnecessary and will result in failures as only the\n`demoDebug` variant is supported. No other variants have any tests (although this might change in future). \n\n## Screenshot tests\nA screenshot test takes a screenshot of a screen or a UI component within the app, and compares it \nwith a previously recorded screenshot which is known to be rendered correctly. \n\nFor example, Now in Android has [screenshot tests](https:\u002F\u002Fgithub.com\u002Fandroid\u002Fnowinandroid\u002Fblob\u002Fmain\u002Fapp\u002Fsrc\u002FtestDemo\u002Fkotlin\u002Fcom\u002Fgoogle\u002Fsamples\u002Fapps\u002Fnowinandroid\u002Fui\u002FNiaAppScreenSizesScreenshotTests.kt)\nto verify that the navigation is displayed correctly on different screen sizes \n([known correct screenshots](https:\u002F\u002Fgithub.com\u002Fandroid\u002Fnowinandroid\u002Ftree\u002Fmain\u002Fapp\u002Fsrc\u002FtestDemo\u002Fscreenshots)). \n\nNow In Android uses [Roborazzi](https:\u002F\u002Fgithub.com\u002Ftakahirom\u002Froborazzi) to run screenshot tests\nof certain screens and UI components. When working with screenshot tests the following gradle tasks are useful:\n\n- `verifyRoborazziDemoDebug` run all screenshot tests, verifying the screenshots against the known\ncorrect screenshots.\n- `recordRoborazziDemoDebug` record new \"known correct\" screenshots. Use this command when you have\nmade changes to the UI and manually verified that they are rendered correctly. Screenshots will be\nstored in `modulename\u002Fsrc\u002Ftest\u002Fscreenshots`.\n- `compareRoborazziDemoDebug` create comparison images between failed tests and the known correct\nimages. These can also be found in `modulename\u002Fsrc\u002Ftest\u002Fscreenshots`. \n\n> [!NOTE]\n> **Note on failing screenshot tests**   \n> The known correct screenshots stored in this repository are recorded on CI using Linux. Other\nplatforms may (and probably will) generate slightly different images, making the screenshot tests fail. \nWhen working on a non-Linux platform, a workaround to this is to run `recordRoborazziDemoDebug` on the\n`main` branch before starting work. After making changes, `verifyRoborazziDemoDebug` will identify only\nlegitimate changes. \n\nFor more information about screenshot testing \n[check out this talk](https:\u002F\u002Fwww.droidcon.com\u002F2023\u002F11\u002F15\u002Feasy-screenshot-testing-with-compose\u002F).\n\n# UI\nThe app was designed using [Material 3 guidelines](https:\u002F\u002Fm3.material.io\u002F). Learn more about the design process and \nobtain the design files in the [Now in Android Material 3 Case Study](https:\u002F\u002Fgoo.gle\u002Fnia-figma) (design assets [also available as a PDF](docs\u002FNow-In-Android-Design-File.pdf)).\n\nThe Screens and UI elements are built entirely using [Jetpack Compose](https:\u002F\u002Fdeveloper.android.com\u002Fjetpack\u002Fcompose). \n\nThe app has two themes: \n\n- Dynamic color - uses colors based on the [user's current color theme](https:\u002F\u002Fmaterial.io\u002Fblog\u002Fannouncing-material-you) (if supported)\n- Default theme - uses predefined colors when dynamic color is not supported\n\nEach theme also supports dark mode. \n\nThe app uses adaptive layouts to\n[support different screen sizes](https:\u002F\u002Fdeveloper.android.com\u002Fguide\u002Ftopics\u002Flarge-screens\u002Fsupport-different-screen-sizes).\n\nFind out more about the [UI architecture here](docs\u002FArchitectureLearningJourney.md#ui-layer).\n\n# Performance\n\n## Benchmarks\n\nFind all tests written using [`Macrobenchmark`](https:\u002F\u002Fdeveloper.android.com\u002Ftopic\u002Fperformance\u002Fbenchmarking\u002Fmacrobenchmark-overview)\nin the `benchmarks` module. This module also contains the test to generate the Baseline profile.\n\n## Baseline profiles\n\nThe baseline profile for this app is located at [`app\u002Fsrc\u002Fmain\u002Fbaseline-prof.txt`](app\u002Fsrc\u002Fmain\u002Fbaseline-prof.txt).\nIt contains rules that enable AOT compilation of the critical user path taken during app launch.\nFor more information on baseline profiles, read [this document](https:\u002F\u002Fdeveloper.android.com\u002Fstudio\u002Fprofile\u002Fbaselineprofiles).\n\n> [!NOTE]\n> The baseline profile needs to be re-generated for release builds that touch code which changes app startup.\n\nTo generate the baseline profile, select the `benchmark` build variant and run the\n`BaselineProfileGenerator` benchmark test on an AOSP Android Emulator.\nThen copy the resulting baseline profile from the emulator to [`app\u002Fsrc\u002Fmain\u002Fbaseline-prof.txt`](app\u002Fsrc\u002Fmain\u002Fbaseline-prof.txt).\n\n## Compose compiler metrics\n\nRun the following command to get and analyze compose compiler metrics:\n\n```bash\n.\u002Fgradlew assembleRelease -PenableComposeCompilerMetrics=true -PenableComposeCompilerReports=true\n```\n\nThe reports files will be added to [build\u002Fcompose-reports](build\u002Fcompose-reports). The metrics files will also be \nadded to [build\u002Fcompose-metrics](build\u002Fcompose-metrics).\n\nFor more information on Compose compiler metrics, see [this blog post](https:\u002F\u002Fmedium.com\u002Fandroiddevelopers\u002Fjetpack-compose-stability-explained-79c10db270c8).\n\n# License\n\n**Now in Android** is distributed under the terms of the Apache License (Version 2.0). See the\n[license](LICENSE) for more information.\n","Now in Android 是一个完全使用 Kotlin 和 Jetpack Compose 构建的功能齐全的 Android 应用程序。该应用遵循了 Android 设计和开发的最佳实践，旨在为开发者提供一个有用的参考案例，并帮助他们通过定期更新的新闻内容保持对 Android 开发世界的最新了解。其核心功能包括展示来自 Now in Android 系列的内容，允许用户浏览最新的视频、文章和其他资源链接，以及根据兴趣订阅话题并接收相关内容的通知。此项目非常适合希望深入学习现代 Android 开发技术，尤其是 Jetpack Compose 和模块化架构设计的开发者们。",2,"2026-06-11 03:10:45","top_language"]