Study how to wire up Dagger for dependency injection in an Android app with clear separation between debug and release builds.
Implement a debug drawer in your own app so testers can switch API endpoints and toggle mock data without rebuilding.
Use the Mock Mode pattern to make manual QA testing predictable by replacing network calls with in-memory fake data.
Reference the library setup when choosing between Retrofit, OkHttp, Picasso, and Moshi for a new Android project.
| jakewharton/u2020 | hanks-zyh/htextview | wasabeef/blurry | |
|---|---|---|---|
| Stars | 5,640 | 5,645 | 5,656 |
| Language | Java | Java | Java |
| Setup difficulty | moderate | easy | easy |
| Complexity | 3/5 | 2/5 | 1/5 |
| Audience | developer | developer | developer |
Figures from each repo's GitHub metadata at analysis time.
Requires Android Studio and familiarity with Gradle build variants, some libraries are outdated compared to current Android standards.
U+2020 is a sample Android application created to demonstrate a particular approach to organizing and wiring together the different pieces of an app. It was built alongside a conference talk about Dagger, a tool that handles dependency injection in Android projects. Dependency injection is a pattern where components of an app receive the objects they need from an external source rather than creating those objects themselves. The app has two build variants: a release version and a debug version. The debug version adds a hidden panel called the Debug Drawer, opened by swiping from the right edge of the screen. From this drawer, developers can change settings like which server the app talks to, toggle fake data mode, and inspect how the app is behaving at runtime. One of the more useful debug features is a mode called Mock Mode. When active, the app stops making real network requests and instead responds with fake data stored in memory. This makes manual testing easier and gives automated tests a predictable, stable data set to work against. The project uses a collection of open-source libraries that were popular in the Android ecosystem at the time: Retrofit for network calls, Picasso for image loading, RxJava for managing asynchronous events, OkHttp as the HTTP client, Moshi for JSON parsing, and several others by the same author (ButterKnife, Timber, Scalpel, LeakCanary). The repo is intended as a reference and learning resource, not as a production-ready application template. It is licensed under the Apache 2.0 license.
A sample Android app demonstrating dependency injection with Dagger and a debug drawer that lets developers switch servers, enable mock data mode, and inspect app behavior at runtime without rebuilding.
Mainly Java. The stack also includes Java, Android, Dagger.
Use freely for any purpose, including commercial, as long as you keep the copyright and license notice.
Setup difficulty is rated moderate, with roughly 30min to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Verify against the repo before relying on details.