# Dagger

Published articles for Dagger.

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## Hilt in Android Auto: From Manual Factories to a Cleaner Screen Provider

DevFeed: [Hilt in Android Auto: From Manual Factories to a Cleaner Screen Provider](<https://devfeed.tech/articles/hilt-in-android-auto-from-manual-factories-to-a-cleaner-screen-provider-22963.md>)

Original publisher: [Read original article](<https://funkymuse.github.io/posts/car-sample-with-hilt/>)

Author: FunkyMuse

Published: 2026-06-05T09:30:00Z

Content type: tutorial

Language: en

Sources: [FunkyMuse](<https://devfeed.tech/sources/funkymuse.md>)

Topics: [Android](<https://devfeed.tech/topics/android.md>), [Dagger](<https://devfeed.tech/topics/dagger.md>), [Dependency management](<https://devfeed.tech/topics/dependency-management.md>), [App](<https://devfeed.tech/topics/app.md>), [Testing](<https://devfeed.tech/topics/testing.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [android-auto](<https://devfeed.tech/tags/android-auto.md>), [dagger](<https://devfeed.tech/tags/dagger.md>), [dependency-management](<https://devfeed.tech/tags/dependency-management.md>), [di](<https://devfeed.tech/tags/di.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [testing](<https://devfeed.tech/tags/testing.md>)

### AI overview

A tutorial on replacing manual dependency wiring in an Android Auto Car App with compile-time dependency injection using Hilt. It explains using Hilt entry points, screen providers, multibinding, and a central module to reduce constructor boilerplate and improve testability.

### Source excerpt

If you've ever followed the Android Auto Codelabs, you've seen the "sample" way of building a Car App. It works, it's functional, but as soon as you try to scale it beyond a simple demo, you hit a wall: Dependency Management. Keep in mind this is only one way to wire things, I'm pretty sure many others exist, I'm exploring things on Android Auto and Android Wear lately and how to connect and w...

## Metro DI for KMP mobile: From God Objects and manually checked Singletons to Compile-Time Injection

DevFeed: [Metro DI for KMP mobile: From God Objects and manually checked Singletons to Compile-Time Injection](<https://devfeed.tech/articles/metro-di-for-kmp-mobile-from-god-objects-and-manually-checked-singletons-to-compile-time-injection-22965.md>)

Original publisher: [Read original article](<https://funkymuse.github.io/posts/metro-di-kmp-mobile/>)

Author: FunkyMuse

Published: 2026-05-24T17:30:00Z

Content type: tutorial

Language: en

Sources: [FunkyMuse](<https://devfeed.tech/sources/funkymuse.md>)

Topics: [Mobile](<https://devfeed.tech/topics/mobile.md>), [Code](<https://devfeed.tech/topics/code.md>), [Android](<https://devfeed.tech/topics/android.md>), [iOS](<https://devfeed.tech/topics/ios.md>), [Java](<https://devfeed.tech/topics/java.md>), [Dagger](<https://devfeed.tech/topics/dagger.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [code](<https://devfeed.tech/tags/code.md>), [dagger](<https://devfeed.tech/tags/dagger.md>), [di](<https://devfeed.tech/tags/di.md>), [ios](<https://devfeed.tech/tags/ios.md>), [jvm](<https://devfeed.tech/tags/jvm.md>), [kmp](<https://devfeed.tech/tags/kmp.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [mobile](<https://devfeed.tech/tags/mobile.md>)

### AI overview

This article describes migrating the mobile side of the Rudio Kotlin Multiplatform project from God Objects, custom thread-safe singletons, and manually managed lazy dependencies to Metro's compile-time dependency-injection graph. It explains different startup and platform-binding requirements for Android, iOS, and JVM desktop, including Android integration with Room and platform-specific Metro hooks.

### Source excerpt

The Starting Point: God Object, Custom Singletons, and Lazy Maps In the previous article i talked about how the Ktor backend replaced a God Object BackendComponent with Metro's compile-time graph. The mobile side of Rudio had a remarkably similar story, except it was more interesting because there were actually two God Objects working together and someone (looks in the code, realizes it was me...

## Introducing the Koin Migration Skills

DevFeed: [Introducing the Koin Migration Skills](<https://devfeed.tech/articles/introducing-the-koin-migration-skills-22970.md>)

Original publisher: [Read original article](<https://blog.insert-koin.io/introducing-the-koin-migration-skills-0b4be9c819cc?source=rss----925561f2ecdf---4>)

Author: Arnaud Giuliani

Published: 2026-04-22T13:23:59Z

Content type: article

Language: en

Sources: [Koin developers - Medium](<https://devfeed.tech/sources/koin-developers-medium.md>)

Topics: [migration](<https://devfeed.tech/topics/migration.md>), [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [Claude Code](<https://devfeed.tech/topics/claude-code.md>), [Android](<https://devfeed.tech/topics/android.md>), [Dagger](<https://devfeed.tech/topics/dagger.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [claude-code](<https://devfeed.tech/tags/claude-code.md>), [compiler](<https://devfeed.tech/tags/compiler.md>), [dagger](<https://devfeed.tech/tags/dagger.md>), [dagger-hilt](<https://devfeed.tech/tags/dagger-hilt.md>), [dependency-injection](<https://devfeed.tech/tags/dependency-injection.md>), [gradle](<https://devfeed.tech/tags/gradle.md>), [koin](<https://devfeed.tech/tags/koin.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [migration](<https://devfeed.tech/tags/migration.md>), [module](<https://devfeed.tech/tags/module.md>), [verification](<https://devfeed.tech/tags/verification.md>)

### AI overview

The article introduces the Koin Migration Skill, a Claude Code plugin for migrating Kotlin and Android projects from Hilt, Dagger, Toothpick, Kodein, or older Koin versions to Koin 4.x and the Koin Compiler Plugin. It describes module-by-module inventory, ranked migration planning, compile-time verification, and human checkpoints.

### Source excerpt

Hello all 👋 Migrating a Kotlin or Android project between DI frameworks (Hilt, Dagger, Toothpick, Kodein, or older Koin versions) is one of those strategic refactors that every team puts off. It touches every module, the call sites are everywhere, and the migration plan never quite survives contact with the real codebase. We wanted to take the pain out of it. So we built the Koin Migration Skill: a Claude Code plugin that automates DI migrations to Koin 4.x and the Koin Compiler Plugin, module by module, with compile-time verification and a human-in-the-loop at every step. Koin Migration Project -- 1.0.0What it covers Initially, this project is intended to help Koin developers to migrate to use the new Koin Compiler Plugin. The skill supports every realistic migration path into modern Koin, with Koin Compiler if possible. This uses either annotations or the safe DSL: Hilt -> Koin (with koin-android-dagger bridging during migration) Dagger -> Koin Toothpick -> Koin Kodein -> Koin Koin 3.x -> Koin 4.x upgrade Classic Koin DSL -> Safe DSL Koin KSP Annotations -> Koin Compiler Plugin All paths converge on the same target: Koin 4.x with Annotations or Safe DSL, powered by the Koin Compiler Plugin for compile-time DI graph verification. How it works Project documentation is available: https://github.com/InsertKoinIO/koin-migration. Point Claude at your project and describe what you want to migrate. /plugin marketplace add InsertKoinIO/koin-migration /plugin install koin-migration@koin-migrationAdding Skill in current project The skill opens with a full inventory of your DI setup: every module, binding, qualifier, and scope. It immediately produces a ranked migration table. The NowInAndroid project below has 35 DI files across core, feature, app, and sync layers. The skill maps each one: bindings count, downstream dependants, complexity rating, and a recommended order. Modules inventory, DI features usage and mapping You can't go "big-bang" in that kind of approach. You need to st

## Re: Dependency Injection vs. Service Locators

DevFeed: [Re: Dependency Injection vs. Service Locators](<https://devfeed.tech/articles/re-dependency-injection-vs-service-locators-39043.md>)

Original publisher: [Read original article](<https://www.zacsweers.dev/re-dependency-injection-vs-service-locators/>)

Author: Zac Sweers

Published: 2026-02-20T05:10:16Z

Content type: opinion

Language: en

Sources: [Zac Sweers](<https://devfeed.tech/sources/zac-sweers.md>)

Topics: [Dependency injection](<https://devfeed.tech/topics/dependency-injection.md>), [Dagger](<https://devfeed.tech/topics/dagger.md>), [koin](<https://devfeed.tech/topics/koin.md>), [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [service](<https://devfeed.tech/topics/service.md>), [multiplatform](<https://devfeed.tech/topics/multiplatform.md>)

Tags: [dagger](<https://devfeed.tech/tags/dagger.md>), [dependency-injection](<https://devfeed.tech/tags/dependency-injection.md>), [koin](<https://devfeed.tech/tags/koin.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [metro](<https://devfeed.tech/tags/metro.md>), [service](<https://devfeed.tech/tags/service.md>)

### AI overview

The article compares dependency injection frameworks with service locators, focusing on compile-time validation, testing, isolation, generated performance, and the tradeoff of requiring more explicit code. It discusses Metro, Dagger, Hilt, Anvil, kotlin-inject, Koin, and manual dependency injection.

### Source excerpt

This is a port of a write-up I did in the Kotlin Lang slack here in response to the question "Dagger vs. Hilt vs. Koin vs. Metro vs. <what comes next>. Serious question: Are there any compelling reasons to switch from Koin to Metro in a

## From Dagger to Metro

DevFeed: [From Dagger to Metro](<https://devfeed.tech/articles/from-dagger-to-metro-20445.md>)

Original publisher: [Read original article](<https://vinted.engineering//2026/02/12/from-dagger-to-metro/>)

Author: Andrius Semionovas

Published: 2026-02-12T00:00:00Z

Content type: article

Language: en

Sources: [Vinted](<https://devfeed.tech/sources/vinted.md>)

Topics: [Dependency injection](<https://devfeed.tech/topics/dependency-injection.md>), [Android](<https://devfeed.tech/topics/android.md>), [migration](<https://devfeed.tech/topics/migration.md>), [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [Dagger](<https://devfeed.tech/topics/dagger.md>), [interoperability](<https://devfeed.tech/topics/interoperability.md>), [Compiler](<https://devfeed.tech/topics/compiler.md>), [modules](<https://devfeed.tech/topics/modules.md>), [Gradle](<https://devfeed.tech/topics/gradle.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [compatibility](<https://devfeed.tech/tags/compatibility.md>), [compilation](<https://devfeed.tech/tags/compilation.md>), [dagger](<https://devfeed.tech/tags/dagger.md>), [dependency-injection](<https://devfeed.tech/tags/dependency-injection.md>), [gradle](<https://devfeed.tech/tags/gradle.md>), [interoperability](<https://devfeed.tech/tags/interoperability.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [migration](<https://devfeed.tech/tags/migration.md>), [modules](<https://devfeed.tech/tags/modules.md>)

### AI overview

Vinted's Android developers describe their migration from Dagger and related dependency-injection tools to Metro. The article covers their large, modular codebase, Anvil's maintenance status and K2 migration pressure, and Metro's interoperability with Dagger, Anvil, and kotlin-inject.

### Source excerpt

Metro - modern and kotlin injection framework created by Zac Sweers. And we, Android developers at Vinted, officially and fully migrated to it! It was quite a bumpy ride for our huge codebase. Our story begins...

## Cash Android Moves to Metro

DevFeed: [Cash Android Moves to Metro](<https://devfeed.tech/articles/cash-android-moves-to-metro-29007.md>)

Original publisher: [Read original article](<https://code.cash.app/cash-android-moves-to-metro>)

Author: Egor Andreevich

Published: 2025-11-18T00:00:00Z

Content type: article

Language: en

Sources: [Cash App Code Blog](<https://devfeed.tech/sources/cash-app-code-blog.md>)

Topics: [migration](<https://devfeed.tech/topics/migration.md>), [Android](<https://devfeed.tech/topics/android.md>), [Dependency injection](<https://devfeed.tech/topics/dependency-injection.md>), [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [Dagger](<https://devfeed.tech/topics/dagger.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [dagger](<https://devfeed.tech/tags/dagger.md>), [dependency-injection](<https://devfeed.tech/tags/dependency-injection.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [migration](<https://devfeed.tech/tags/migration.md>)

### AI overview

The Cash Android team completed a migration from Dagger and Anvil to Metro, a compile-time dependency injection framework. The move was driven by the Kotlin-heavy codebase, the complexity of Dagger's Java-based build pipeline, and Anvil's lack of K2 support.

### Source excerpt

The Cash Android team have completed the migration to Metro.

## Container Use for Locally Sandboxed, Background Agents in Zed

DevFeed: [Container Use for Locally Sandboxed, Background Agents in Zed](<https://devfeed.tech/articles/container-use-for-locally-sandboxed-background-agents-in-zed-13446.md>)

Original publisher: [Read original article](<https://zed.dev/blog/container-use-background-agents>)

Author: Jeremy Adams

Published: 2025-07-30T00:00:00Z

Content type: tutorial

Language: en

Sources: [Zed Industries - Blog](<https://devfeed.tech/sources/zed-industries-blog.md>)

Topics: [Containers](<https://devfeed.tech/topics/containers.md>), [AI-assisted coding](<https://devfeed.tech/topics/ai-assisted-coding.md>), [Git](<https://devfeed.tech/topics/git.md>), [Command-line interface](<https://devfeed.tech/topics/cli.md>), [MCP](<https://devfeed.tech/topics/mcp.md>), [Dagger](<https://devfeed.tech/topics/dagger.md>)

Tags: [agents](<https://devfeed.tech/tags/agents.md>), [ai-coding-agents](<https://devfeed.tech/tags/ai-coding-agents.md>), [cli](<https://devfeed.tech/tags/cli.md>), [container](<https://devfeed.tech/tags/container.md>), [dagger](<https://devfeed.tech/tags/dagger.md>), [git](<https://devfeed.tech/tags/git.md>), [mcp](<https://devfeed.tech/tags/mcp.md>)

### AI overview

This article explains how to use Zed with Container Use to run background coding agents in isolated containerized environments while maintaining parallel Git worktrees. It describes using MCP, Dagger containers, and CLI commands to manage and inspect agent environments.

### Source excerpt

Run AI agents in parallel without interference using containerized environments and Git Worktrees.

## Introducing Metro, a Kotlin compiler-plugin dependency injection framework

DevFeed: [Introducing Metro, a Kotlin compiler-plugin dependency injection framework](<https://devfeed.tech/articles/introducing-metro-39038.md>)

Original publisher: [Read original article](<https://www.zacsweers.dev/introducing-metro/>)

Author: Zac Sweers

Published: 2025-04-03T16:14:23Z

Content type: article

Language: en

Sources: [Zac Sweers](<https://devfeed.tech/sources/zac-sweers.md>)

Topics: [Dependency injection](<https://devfeed.tech/topics/dependency-injection.md>), [Compiler](<https://devfeed.tech/topics/compiler.md>), [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [multiplatform](<https://devfeed.tech/topics/multiplatform.md>), [build performance](<https://devfeed.tech/topics/build-performance.md>), [benchmarking](<https://devfeed.tech/topics/benchmarking.md>)

Tags: [anvil](<https://devfeed.tech/tags/anvil.md>), [benchmarking](<https://devfeed.tech/tags/benchmarking.md>), [build-performance](<https://devfeed.tech/tags/build-performance.md>), [compilation](<https://devfeed.tech/tags/compilation.md>), [compiler](<https://devfeed.tech/tags/compiler.md>), [dagger](<https://devfeed.tech/tags/dagger.md>), [dependency-injection](<https://devfeed.tech/tags/dependency-injection.md>), [error-messages](<https://devfeed.tech/tags/error-messages.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [metro](<https://devfeed.tech/tags/metro.md>), [multiplatform](<https://devfeed.tech/tags/multiplatform.md>)

### AI overview

The article introduces Metro, a Kotlin compiler-plugin framework for compile-time dependency injection. It combines ideas from Dagger, Anvil, and Kotlin-Inject, and describes features including dependency graph validation, code generation, multiplatform support, IDE integration, and diagnostics. The author reports benchmarked build-time improvements in a CatchUp app and notes that Metro 0.1.1 is in active development.

### Source excerpt

I'm excited to share something new I've been working on the past few months!

## GameChanger and Anvil

DevFeed: [GameChanger and Anvil](<https://devfeed.tech/articles/gamechanger-and-anvil-19834.md>)

Original publisher: [Read original article](<https://tech.gc.com/gamechanger-and-anvil/>)

Author: GameChanger

Published: 2024-09-18T04:00:00Z

Content type: article

Language: en

Sources: [GameChanger](<https://devfeed.tech/sources/gamechanger.md>)

Topics: [Dagger](<https://devfeed.tech/topics/dagger.md>), [Dependency injection](<https://devfeed.tech/topics/dependency-injection.md>), [Android](<https://devfeed.tech/topics/android.md>), [Architecture & Design](<https://devfeed.tech/topics/architecture-design.md>), [Code quality](<https://devfeed.tech/topics/code-quality.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [code-quality](<https://devfeed.tech/tags/code-quality.md>), [dagger](<https://devfeed.tech/tags/dagger.md>), [dependency-injection](<https://devfeed.tech/tags/dependency-injection.md>), [development-tools](<https://devfeed.tech/tags/development-tools.md>), [workflows](<https://devfeed.tech/tags/workflows.md>)

### AI overview

GameChanger describes how its App Platform team integrates Anvil with an existing Dagger setup in an Android codebase. The effort streamlines dependency injection and supports modularization, consistent architecture, reduced cognitive load, faster onboarding, and improved code quality.

### Source excerpt

At GameChanger, we have a dedicated App Platform team that focuses on scaling our engineering organization and supporting development teams across the company. Our mission is to make building things the right way the easy way for all developers at GameChanger. This involves: Implementing and maintaining core infrastructure like dependency injection systems Creating and improving development tools and workflows Establishing best practices and architectural patterns Providing support and guidance to feature teams By having a dedicated team focus on these foundational aspects, we achieve several benefits: Consistency across the codebase, making it easier for developers to switch between projects Reduced cognitive load for feature teams, allowing them to focus on business logic Faster onboarding for new team members Improved code quality and maintainability The work on integrating Anvil with our existing Dagger setup is a prime example of how the App Platform team contributes to these goals. By streamlining our dependency injection process, we're making it easier for all teams to build features efficiently and correctly. With this context in mind, let's explore the technical details of our setup and why we chose to augment Dagger with Anvil. What's the setup? The Android codebase has the following Dagger components: a longstanding Application Component, a User Component that lives for as long as the user is logged in, and Game Components that last for as long as any live game. Features usually involve a fragment to render UI and a view model to manage business logic and state. Said view model is supplied by a factory in either the Application Component or User Component and pulls in dependencies from the rest of the Dagger graph that may come from any of the mentioned components. So Why Anvil? 1. Anvil makes modularization easy: We're following, as shown in the diagram above, a format for modules across the codebase to follow that involve the inversion of control princi

## Crafting Android bytecode analysis tooling using a secret ingredient (Part 1)

DevFeed: [Crafting Android bytecode analysis tooling using a secret ingredient (Part 1)](<https://devfeed.tech/articles/crafting-android-bytecode-analysis-tooling-using-a-secret-ingredient-part-1-22597.md>)

Original publisher: [Read original article](<https://medium.com/bumble-tech/crafting-android-bytecode-analysis-tooling-using-a-secret-ingredient-part-1-13e2d5a65113?source=rss----6353b5325b1a---4>)

Author: Konstantin Zolotov

Published: 2024-02-09T11:50:19Z

Content type: tutorial

Language: en

Sources: [Bumble Tech](<https://devfeed.tech/sources/bumble-tech.md>)

Topics: [Android](<https://devfeed.tech/topics/android.md>), [Tooling](<https://devfeed.tech/topics/tooling.md>), [APK](<https://devfeed.tech/topics/apk.md>), [obfuscation](<https://devfeed.tech/topics/obfuscation.md>), [R8](<https://devfeed.tech/topics/r8.md>), [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [Java](<https://devfeed.tech/topics/java.md>), [Compiler](<https://devfeed.tech/topics/compiler.md>)

Tags: [andriod-app-development](<https://devfeed.tech/tags/andriod-app-development.md>), [android](<https://devfeed.tech/tags/android.md>), [apk](<https://devfeed.tech/tags/apk.md>), [bytecode](<https://devfeed.tech/tags/bytecode.md>), [compilation](<https://devfeed.tech/tags/compilation.md>), [compiler](<https://devfeed.tech/tags/compiler.md>), [dagger](<https://devfeed.tech/tags/dagger.md>), [inlining](<https://devfeed.tech/tags/inlining.md>), [java](<https://devfeed.tech/tags/java.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [obfuscation](<https://devfeed.tech/tags/obfuscation.md>), [optimization](<https://devfeed.tech/tags/optimization.md>), [r8](<https://devfeed.tech/tags/r8.md>), [tooling](<https://devfeed.tech/tags/tooling.md>)

### AI overview

This tutorial introduces Android bytecode analysis through DEX inspection and a tool for examining how source-code changes affect compiled binaries. It explains the Android compilation pipeline from Java or Kotlin source through JVM class files and D8-generated DEX files, then describes R8 obfuscation and optimization, including source maps, tree-shaking, inlining, and outlining.

### Source excerpt

During the development process, we often focus on the source code but rarely inspect the compiled bytecode. This means we're missing out on a valuable source of information and data for analysis. How? Let's delve into Dex file inspection and build a tool that demonstrates how source code changes impact the compiled binary. Have you ever set R8 rules to obfuscate your app? Have you used an APK analyzer or a diffuse tool to understand how the code is compiled? Are you confident that debug code hasn't leaked into production? There's another potential pitfall: libraries may provide obfuscation rules (e.g., Gson) that merge with the ones in your project. This means third-party dependencies can alter configurations for the entire app. We often assume everything is fine and that we'll notice if something isn't right. But will we? Does this make you feel uneasy? Does it concern you? Because it certainly concerns me. Here, we'll attempt to enhance the situation and enable you to see precisely how your code changes impact the compiled binary. To better comprehend this, let's start with the code compilation process: It all begins with the Java and/or Kotlin source code, which is then compiled into JVM .class files. Note that at this stage, Java and Kotlin compilers can execute annotation processing tools (APT/KAPT) to generate source code (e.g., Dagger), and Kotlin compiler can run plugins to modify the internal code representation. Then, the D8 compiler takes these compiled classes, third-party libraries (JARs, AARs), and converts them into .dex files. However, if obfuscation and/or minification are enabled (which is almost always the case for release builds), R8 comes into play after D8. R8 obfuscates and optimises the bytecode, and additionally, R8 produces a source map file -- a special file listing all the changes and replacements. Obfuscation replaces human-readable names of various entities (classes, functions, fields, etc.) with very short, yet still unique names, for e

## DIY: your own Dependency Injection library!

DevFeed: [DIY: your own Dependency Injection library!](<https://devfeed.tech/articles/diy-your-own-dependency-injection-library-25622.md>)

Original publisher: [Read original article](<https://blog.p-y.wtf/diy-your-own-dependency-injection-library>)

Author: Pierre-Yves Ricau

Published: 2024-01-18T20:08:04Z

Content type: tutorial

Language: en

Sources: [Py's blog](<https://devfeed.tech/sources/py-s-blog.md>)

Topics: [Dependency injection](<https://devfeed.tech/topics/dependency-injection.md>), [Dagger](<https://devfeed.tech/topics/dagger.md>), [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [Library](<https://devfeed.tech/topics/library.md>), [Code](<https://devfeed.tech/topics/code.md>), [Graphs](<https://devfeed.tech/topics/graphs.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [code](<https://devfeed.tech/tags/code.md>), [dagger](<https://devfeed.tech/tags/dagger.md>), [dagger-hilt](<https://devfeed.tech/tags/dagger-hilt.md>), [dependency-injection](<https://devfeed.tech/tags/dependency-injection.md>), [graph](<https://devfeed.tech/tags/graph.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [internals](<https://devfeed.tech/tags/internals.md>), [java](<https://devfeed.tech/tags/java.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [library](<https://devfeed.tech/tags/library.md>)

### AI overview

This tutorial explains dependency injection by progressively building a simple library, moving from manual dependency injection toward simplified versions of Google Guice, Dagger 1, and Dagger 2. It uses Kotlin and discusses dependency graphs, object graphs, factories, modules, and APIs.

### Source excerpt

Dependency Injection libraries are powerful tools, but they're often also intimidating & confusing. When that happens to me, I find that understanding how a tool works helps me get over the initial scare of the dark magic internals. In this article, ...

## Dependency Injection in Legacy Code

DevFeed: [Dependency Injection in Legacy Code](<https://devfeed.tech/articles/dependency-injection-in-legacy-code-24906.md>)

Original publisher: [Read original article](<https://blog.blundellapps.co.uk/dependency-injection-in-legacy-code/>)

Author: blundell

Published: 2023-10-19T12:26:59Z

Content type: tutorial

Language: en

Sources: [Blundell](<https://devfeed.tech/sources/blundell.md>)

Topics: [Dependency injection](<https://devfeed.tech/topics/dependency-injection.md>), [Dagger](<https://devfeed.tech/topics/dagger.md>), [Android](<https://devfeed.tech/topics/android.md>), [android-development](<https://devfeed.tech/topics/android-development.md>), [legacy](<https://devfeed.tech/topics/legacy.md>), [Development](<https://devfeed.tech/topics/development.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [android-development](<https://devfeed.tech/tags/android-development.md>), [dagger](<https://devfeed.tech/tags/dagger.md>), [dependency-injection](<https://devfeed.tech/tags/dependency-injection.md>), [development](<https://devfeed.tech/tags/development.md>), [intermediate](<https://devfeed.tech/tags/intermediate.md>), [legacy](<https://devfeed.tech/tags/legacy.md>), [legacy-code](<https://devfeed.tech/tags/legacy-code.md>), [reference](<https://devfeed.tech/tags/reference.md>)

### AI overview

This tutorial explains how to use Dagger and Hilt entry points to inject dependencies into Android legacy singletons and other classes that are not managed by the current architecture. It focuses on cases where the legacy code can access a Context and describes defining an entry-point interface for required bindings.

### Source excerpt

This post explains how you can inject dependencies into Android legacy singletons, or any classes that aren't conforming to your current Android architecture, using Dagger & Hilt. I'll cut straight to the chase, if you have a reference to Context, (which you usually always do in spaghetti legacy code) then you can use your normal [...] The post Dependency Injection in Legacy Code first appeared on Blundell.

## Why Dagger's Provider Interface Is Simple and Flexible

DevFeed: [Why Dagger's Provider Interface Is Simple and Flexible](<https://devfeed.tech/articles/simple-apis-are-elegant-apis-30604.md>)

Original publisher: [Read original article](<https://ryanharter.com/blog/2023/08/simple-apis-are-elegant-apis/>)

Published: 2023-08-10T02:55:50Z

Content type: opinion

Language: en

Sources: [Blogs on Ryan Harter](<https://devfeed.tech/sources/blogs-on-ryan-harter.md>)

Topics: [Dagger](<https://devfeed.tech/topics/dagger.md>), [Dependency injection](<https://devfeed.tech/topics/dependency-injection.md>), [Code](<https://devfeed.tech/topics/code.md>)

Tags: [apis](<https://devfeed.tech/tags/apis.md>), [dagger](<https://devfeed.tech/tags/dagger.md>), [dependency-injection](<https://devfeed.tech/tags/dependency-injection.md>), [interface](<https://devfeed.tech/tags/interface.md>), [jvm](<https://devfeed.tech/tags/jvm.md>)

### AI overview

The article examines how Dagger's javax.inject.Provider interface supports generated dependency providers and flexible object-creation strategies. It discusses shared instances, lazy and eager instantiation, and lifecycle scoping.

### Source excerpt

I recently gave a presentation about how Dagger works under the hood, and I was once again struck by the elegance of the javax.inject.Provider interface. The interface is so simple it almost seems useless, but it's also incredibly flexible, and forms the basis of much of the code generated by Dagger. Like many dependency injection frameworks for JVM languages, Dagger uses and builds on the standard set of annotations for injectable classes defined in JSR-330 and provided in the javax.inject package.

## Slim down your Android components with LifecycleObserver

DevFeed: [Slim down your Android components with LifecycleObserver](<https://devfeed.tech/articles/slim-down-your-android-components-with-lifecycleobserver-22657.md>)

Original publisher: [Read original article](<https://www.valueof.io/blog/default-lifecycle-observer>)

Author: james shvarts

Published: 2022-11-17T21:11:40Z

Content type: tutorial

Language: en

Sources: [Android Blog - Mobile Dev Notes](<https://devfeed.tech/sources/android-blog-mobile-dev-notes.md>)

Topics: [Android](<https://devfeed.tech/topics/android.md>), [Jetpack](<https://devfeed.tech/topics/jetpack.md>), [android-development](<https://devfeed.tech/topics/android-development.md>), [Development](<https://devfeed.tech/topics/development.md>), [Library](<https://devfeed.tech/topics/library.md>), [Dagger](<https://devfeed.tech/topics/dagger.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [android-development](<https://devfeed.tech/tags/android-development.md>), [dagger](<https://devfeed.tech/tags/dagger.md>), [dagger-hilt](<https://devfeed.tech/tags/dagger-hilt.md>), [development](<https://devfeed.tech/tags/development.md>), [jetpack](<https://devfeed.tech/tags/jetpack.md>), [library](<https://devfeed.tech/tags/library.md>), [lifecycle](<https://devfeed.tech/tags/lifecycle.md>), [logs](<https://devfeed.tech/tags/logs.md>)

### AI overview

A tutorial on using Android LifecycleObserver to move lifecycle-related logic out of large Activities, Fragments, and Application classes. It covers reusable observers, observing Activity and Fragment view lifecycles, observing the application process, and injecting lifecycle-aware components with Dagger/Hilt.

### Source excerpt

Learn to create custom LifecycleObserver components and inject them with Dagger/Hilt

## Things you can do in Android Studio

DevFeed: [Things you can do in Android Studio](<https://devfeed.tech/articles/things-you-can-do-in-android-studio-25669.md>)

Original publisher: [Read original article](<https://adambennett.dev/2022/06/things-you-can-do-in-android-studio/>)

Published: 2022-06-18T08:38:44Z

Content type: tutorial

Language: en

Sources: [Posts on Adam Bennett](<https://devfeed.tech/sources/posts-on-adam-bennett.md>)

Topics: [Android Studio](<https://devfeed.tech/topics/android-studio.md>), [IntelliJ IDEA](<https://devfeed.tech/topics/intellij-idea.md>), [Dagger](<https://devfeed.tech/topics/dagger.md>), [Code](<https://devfeed.tech/topics/code.md>)

Tags: [algorithms](<https://devfeed.tech/tags/algorithms.md>), [android](<https://devfeed.tech/tags/android.md>), [android-studio](<https://devfeed.tech/tags/android-studio.md>), [blog](<https://devfeed.tech/tags/blog.md>), [career](<https://devfeed.tech/tags/career.md>), [code](<https://devfeed.tech/tags/code.md>), [compose](<https://devfeed.tech/tags/compose.md>), [copy](<https://devfeed.tech/tags/copy.md>), [dagger](<https://devfeed.tech/tags/dagger.md>), [dependency](<https://devfeed.tech/tags/dependency.md>), [development](<https://devfeed.tech/tags/development.md>), [engineering](<https://devfeed.tech/tags/engineering.md>), [finance](<https://devfeed.tech/tags/finance.md>), [function](<https://devfeed.tech/tags/function.md>), [functional](<https://devfeed.tech/tags/functional.md>), [growth](<https://devfeed.tech/tags/growth.md>), [intellij](<https://devfeed.tech/tags/intellij.md>), [java](<https://devfeed.tech/tags/java.md>), [jetpack](<https://devfeed.tech/tags/jetpack.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [money](<https://devfeed.tech/tags/money.md>), [opinions](<https://devfeed.tech/tags/opinions.md>), [productivity](<https://devfeed.tech/tags/productivity.md>), [scopes](<https://devfeed.tech/tags/scopes.md>), [software](<https://devfeed.tech/tags/software.md>), [startups](<https://devfeed.tech/tags/startups.md>), [thoughts](<https://devfeed.tech/tags/thoughts.md>), [tooling](<https://devfeed.tech/tags/tooling.md>), [training](<https://devfeed.tech/tags/training.md>), [tutorial](<https://devfeed.tech/tags/tutorial.md>)

### AI overview

A practical list of Android Studio and IntelliJ productivity features, including excluding generated files with Scopes, using scratch files to test ideas, editing multiple lines simultaneously, and accessing clipboard history.

### Source excerpt

Based on a recent discussion on Twitter: a list of things that you can do in Android Studio which can make your life much easier. Hide files you don't care about If you work in a project with lots of generated code (e.g.: you use Dagger), you can exclude generated files from searches using Scopes:

## Slope-intercept library design

DevFeed: [Slope-intercept library design](<https://devfeed.tech/articles/slope-intercept-library-design-20972.md>)

Original publisher: [Read original article](<https://jakewharton.com/slope-intercept-library-design/>)

Published: 2022-04-05T00:00:00Z

Content type: opinion

Language: en

Sources: [Jake Wharton](<https://devfeed.tech/sources/jake-wharton.md>)

Topics: [Library](<https://devfeed.tech/topics/library.md>), [Picasso](<https://devfeed.tech/topics/picasso.md>), [Android](<https://devfeed.tech/topics/android.md>), [configuration](<https://devfeed.tech/topics/configuration.md>), [Dependency injection](<https://devfeed.tech/topics/dependency-injection.md>), [Scala](<https://devfeed.tech/topics/scala.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [configuration](<https://devfeed.tech/tags/configuration.md>), [dagger](<https://devfeed.tech/tags/dagger.md>), [dependency-injection](<https://devfeed.tech/tags/dependency-injection.md>), [http](<https://devfeed.tech/tags/http.md>), [jvm](<https://devfeed.tech/tags/jvm.md>), [library](<https://devfeed.tech/tags/library.md>), [picasso](<https://devfeed.tech/tags/picasso.md>)

### AI overview

The article proposes using slope-intercept form as a way to evaluate library design. The intercept represents the initial learning and setup cost, while the slope represents how complexity changes as requirements grow. It compares Picasso, Retrofit, and Dagger to show how libraries can trade a low initial barrier for steeper long-term complexity, or require more conceptual investment up front to remain easier to extend.

### Source excerpt

The equation y=mx+b defines a line in slope-intercept form. The line will intercept the y-axis at the value b and for each change in x its slope (the amount the line goes up or down) will change by m. Slope-intercept gives me a way to think about the design of libraries in relation to each other. The intercept is the initial cost of learning and setup for a library, and the slope is how the library's complexity changes over time. There's no real units here and the values are entirely subjective. Let's try it! Picasso Exactly 10 years ago today I introduced Picasso internally at Square. As an image loading library for Android, its primary selling point was a low intercept. It required no real configuration and only one line of code (even in a ListView adapter). Picasso.with(context).load("https://...").into(imageView); At the time this was a refreshing change from the existing libraries which required a lot of up-front and per-request configuration. The downside, however, was that as your needs grow the slope of complexity also grows faster than desired. Configuring the global instance, managing multiple instances, intercepting requests, and transforming images are all possible but more difficult than if the library was designed differently. Retrofit Retrofit is a declarative HTTP client abstraction for the JVM and Android. It requires configuration of a central object before you can use it to create instances of service interfaces. interface GitHubService { @GET("users/{user}/repos") Call<List<Repo>> listRepos(@Path("user") String user); } var retrofit = new Retrofit.Builder() .baseUrl("https://api.github.com/") .addConverter(MoshiJsonConverter.create()) .build(); var service = retrofit.create(GitHubService.class); This up-front configuration gives Retrofit a higher intercept on the y-axis. Exposure to these APIs gives you an entrypoint to discover functionality and encourages you to manage their lifetimes in an efficient way for your usage allowing the slope of com

## Dagger/Hilt vs. Koin for Jetpack Compose Apps

DevFeed: [Dagger/Hilt vs. Koin for Jetpack Compose Apps](<https://devfeed.tech/articles/dagger-hilt-vs-koin-for-jetpack-compose-apps-25520.md>)

Original publisher: [Read original article](<https://patrykkosieradzki.com/dagger-hilt-vs-koin-dependency-injection-for-jetpack-compose-apps>)

Published: 2022-03-13T00:00:00Z

Content type: comparison

Language: en

Sources: [Patryk Kosieradzki](<https://devfeed.tech/sources/patryk-kosieradzki.md>)

Topics: [Dagger](<https://devfeed.tech/topics/dagger.md>), [Dependency injection](<https://devfeed.tech/topics/dependency-injection.md>), [Jetpack Compose](<https://devfeed.tech/topics/jetpack-compose.md>), [Android](<https://devfeed.tech/topics/android.md>), [interoperability](<https://devfeed.tech/topics/interoperability.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [comparison](<https://devfeed.tech/tags/comparison.md>), [dagger](<https://devfeed.tech/tags/dagger.md>), [dagger-hilt](<https://devfeed.tech/tags/dagger-hilt.md>), [dependency-injection](<https://devfeed.tech/tags/dependency-injection.md>), [interoperability](<https://devfeed.tech/tags/interoperability.md>), [jetpack-compose](<https://devfeed.tech/tags/jetpack-compose.md>), [koin](<https://devfeed.tech/tags/koin.md>)

### AI overview

A comparison of Dagger/Hilt and Koin for dependency injection in Jetpack Compose Android applications. It discusses code generation, build and runtime considerations, Google's recommendation of Hilt, and two Compose integration approaches: pure Compose with navigation-compose or Fragments with ComposeView.

### Source excerpt

A detailed comparison of using Hilt versus Koin for dependency injection in Jetpack Compose applications.

## Scaling navigation in Jetpack Compose: NavHost structure and a possible solution

DevFeed: [Scaling navigation in Jetpack Compose: NavHost structure and a possible solution](<https://devfeed.tech/articles/jetpack-compose-navigation-23644.md>)

Original publisher: [Read original article](<https://habr.com/ru/companies/badoo/articles/596953/>)

Author: vaccum (Badoo)

Published: 2021-12-23T09:00:11Z

Content type: tutorial

Language: ru

Sources: [Badoo EN](<https://devfeed.tech/sources/badoo-en.md>), [Badoo RU](<https://devfeed.tech/sources/badoo-ru.md>)

Topics: [Jetpack Compose](<https://devfeed.tech/topics/jetpack-compose.md>), [navigation](<https://devfeed.tech/topics/navigation.md>), [Dagger](<https://devfeed.tech/topics/dagger.md>), [Google](<https://devfeed.tech/topics/google.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [dagger](<https://devfeed.tech/tags/dagger.md>), [dagger-hilt](<https://devfeed.tech/tags/dagger-hilt.md>), [google](<https://devfeed.tech/tags/google.md>), [jetpack-compose](<https://devfeed.tech/tags/jetpack-compose.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [navigation](<https://devfeed.tech/tags/navigation.md>)

### AI overview

The article examines how navigation is structured in Jetpack Compose, describes Google's NavHost-based approach, and discusses the maintainability and scalability challenges it can create as the number of composable routes grows.

### Source excerpt

В одном из моих личных проектов я решил использовать Jetpack Compose в качестве основной технологии. Это означало, что моё приложение будет иметь одну Activity, а вся навигация будет выполняться с помощью Compose. Когда я начал планировать проект, библиотеки Compose Navigation ещё не было, как не было и способа внедрить ViewModel в Composable без использования компонентов Activity, Fragment или View. Но примерно за полгода до публикации этой статьи появилась библиотека Jetpack Compose Navigation, и Dagger-Hilt стал поддерживать Compose. Сегодня я расскажу о моём пути: поделюсь видением проблемы масштабируемости навигации на примерах Google и предложу её возможное решение. Читать далее

## Input validation in Jetpack Compose

DevFeed: [Input validation in Jetpack Compose](<https://devfeed.tech/articles/input-validation-in-jetpack-compose-25897.md>)

Original publisher: [Read original article](<https://proandroiddev.com/input-validation-in-jetpack-compose-e99c18b44fe3?source=rss-56174fa84bcc------2>)

Author: Denys Rudenko

Published: 2021-08-22T16:42:02Z

Content type: tutorial

Language: en

Sources: [Stories by Denis Rudenko on Medium](<https://devfeed.tech/sources/stories-by-denis-rudenko-on-medium.md>)

Topics: [Jetpack Compose](<https://devfeed.tech/topics/jetpack-compose.md>), [Dagger](<https://devfeed.tech/topics/dagger.md>), [Processes](<https://devfeed.tech/topics/processes.md>), [User experience (UX)](<https://devfeed.tech/topics/ux.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [android-app-development](<https://devfeed.tech/tags/android-app-development.md>), [androiddev](<https://devfeed.tech/tags/androiddev.md>), [androiddevweekly](<https://devfeed.tech/tags/androiddevweekly.md>), [dagger](<https://devfeed.tech/tags/dagger.md>), [jetpack-compose](<https://devfeed.tech/tags/jetpack-compose.md>), [savedstatehandle](<https://devfeed.tech/tags/savedstatehandle.md>), [stateflow](<https://devfeed.tech/tags/stateflow.md>), [ux](<https://devfeed.tech/tags/ux.md>), [validation](<https://devfeed.tech/tags/validation.md>), [viewmodel](<https://devfeed.tech/tags/viewmodel.md>)

### AI overview

This tutorial demonstrates manual and automatic input validation in Jetpack Compose. It uses composables, ViewModels, Dagger Hilt, StateFlow, and savedStateHandle to preserve input state after process death, validate fields, control button state, and emit success or error events. It also discusses restoring focus and improving keyboard-related user experience.

### Source excerpt

This post will not only focus on manual & auto validation of TextField inputs, but also on how to provide a nice UX by handling process death, including highlighting the last focused field upon restoration. https://medium.com/media/7d776a0ec6ff89810e194adf54680973/hrefSetup We'll use composables, viewModels & Dagger Hilt in these samples. Part 1: InputWrapper Let's create a wrapper for inputs, so it can contain both input value and errorId, if there is a validation error. Class is parcelable, so we can save it inside savedStateHandle later. https://medium.com/media/6c74ba5b4f958d63646a819643b45620/hrefPart 2: ViewModel (simplified version)https://medium.com/media/39bf975a63461cd00f68b8360c6a8f6b/href We're getting a stateFlow from the savedStateHandle using .getStateFlow extension. Using savedStateHandle here allows us to retain the latest data after process death happens. You can also use getLiveData, it's a matter of personal preferences unless you plan to perform observable.switchMap/flatMapLatest type of operations, since there is a subtle difference between stateFlow & liveData in such scenarios described here & change proposal created. areInputsValid stateFlow is combining name & creditCardNumber flows into a single one. The results it returns depend on whether input fields are valid or not. It's invoked whenever there is new emition to name or creditCardNumber flows. We'll use it's value to control buttons enabled/disabled state in our composable. _events will be used for one time events emission to the view layer. ScreenEvent is a sealed class representing all of our one time events. onNameEntered & onCardNumberEntered will be invoked when user enters symbols inside the TextField. We find out whether the input is valid by using an InputValidator object. It's returning either a string resource id containing error message, or a null. Latter means that input is valid. We store the new value & errorId using: https://medium.com/media/d9ad9c61328481f3318c143e6daf3

## Providing AssistedInject supported ViewModel for Composable using Hilt

DevFeed: [Providing AssistedInject supported ViewModel for Composable using Hilt](<https://devfeed.tech/articles/providing-assistedinject-supported-viewmodel-for-composable-using-hilt-25742.md>)

Original publisher: [Read original article](<https://blog.shreyaspatil.dev/providing-assistedinject-supported-viewmodel-for-composable-using-hilt/>)

Author: Shreyas Patil

Published: 2021-06-29T14:52:48Z

Content type: tutorial

Language: en

Sources: [Shreyas Patil's Blog](<https://devfeed.tech/sources/shreyas-patil-s-blog.md>)

Topics: [Dependency injection](<https://devfeed.tech/topics/dependency-injection.md>), [Dagger](<https://devfeed.tech/topics/dagger.md>), [Android](<https://devfeed.tech/topics/android.md>), [Jetpack Compose](<https://devfeed.tech/topics/jetpack-compose.md>), [navigation](<https://devfeed.tech/topics/navigation.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [compose](<https://devfeed.tech/tags/compose.md>), [dagger](<https://devfeed.tech/tags/dagger.md>), [dagger-hilt](<https://devfeed.tech/tags/dagger-hilt.md>), [dependencies](<https://devfeed.tech/tags/dependencies.md>), [dependency-injection](<https://devfeed.tech/tags/dependency-injection.md>), [di](<https://devfeed.tech/tags/di.md>), [guide](<https://devfeed.tech/tags/guide.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [interface](<https://devfeed.tech/tags/interface.md>), [java](<https://devfeed.tech/tags/java.md>), [jetpack](<https://devfeed.tech/tags/jetpack.md>), [jetpack-compose](<https://devfeed.tech/tags/jetpack-compose.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [learn-coding](<https://devfeed.tech/tags/learn-coding.md>), [navigation-component](<https://devfeed.tech/tags/navigation-component.md>)

### AI overview

This tutorial explains how to provide an AssistedInject-supported ViewModel for Jetpack Compose using Hilt. It describes AssistedInject runtime parameters and an EntryPoint-based approach for accessing the ViewModel factory because Hilt does not directly support this use case.

### Source excerpt

Learn how to provide Hilt ViewModels with AssistedInject to Jetpack Compose Composables for dynamic dependency injection with runtime parameters.

## Integration verbosity and good layering

DevFeed: [Integration verbosity and good layering](<https://devfeed.tech/articles/integration-verbosity-and-good-layering-20941.md>)

Original publisher: [Read original article](<https://jakewharton.com/integration-verbosity-and-good-layering/>)

Published: 2021-04-07T00:00:00Z

Content type: article

Language: en

Sources: [Jake Wharton](<https://devfeed.tech/sources/jake-wharton.md>)

Topics: [Android](<https://devfeed.tech/topics/android.md>), [XML](<https://devfeed.tech/topics/xml.md>), [Dagger](<https://devfeed.tech/topics/dagger.md>), [SQLite](<https://devfeed.tech/topics/sqlite.md>), [MySQL](<https://devfeed.tech/topics/mysql.md>)

Tags: [abstraction](<https://devfeed.tech/tags/abstraction.md>), [dagger](<https://devfeed.tech/tags/dagger.md>), [dependency](<https://devfeed.tech/tags/dependency.md>), [design](<https://devfeed.tech/tags/design.md>), [env-file-security](<https://devfeed.tech/tags/env-file-security.md>), [integrations](<https://devfeed.tech/tags/integrations.md>), [mysql](<https://devfeed.tech/tags/mysql.md>), [net-conf](<https://devfeed.tech/tags/net-conf.md>)

### AI overview

The article argues that integration verbosity can be a consequence of good layering. General-purpose libraries such as view binding, Dagger, SQLDelight, and RecyclerView must leave higher-level integration and configuration decisions to their callers, enabling more flexible libraries and platforms.

### Source excerpt

One of my favorite non-features from building view binding is that it lacks integration with activities or fragments. If you use view binding with activities or fragments, however, this fact might be to your disdain. Every activity using view binding is forced to do something along the lines of: override fun onCreate(savedInstanceState: Bundle) { super.onCreate(savedInstanceState) val binding = ProfileViewBinding.inflate(layoutInflater) setContentView(binding.root) // Do stuff with 'binding' } This is textbook verbosity, and some would argue boilerplate. It only gets worse with fragments (due to their poor design and to no specific fault of view binding which works the same as any View reference). View binding exists at a different layer of abstraction than is appropriate for integration with higher-level components like activities or fragments. It serves as a type-safe representation of a schema declared in an XML file and that's it. It has no more knowledge of activities and fragments than the associated R.layout.profile_view integer does. Higher-level libraries like androidx.activity and androidx.fragment have integrations with those R.layout integers. If you're upset that view binding has no turn-key solution for activities and fragments then this is the tree you should be barking up. View binding wasn't built with verbosity in mind. Hell, it's not even that verbose. It ended up this way because it's the design the layer of abstraction it operates at demands. The same pattern occurs in some of my other favorite libraries. Dagger offers you nothing and requires that you build up the dependency injectors, their hierarchy, and their lifecycle entirely yourself. SQLDelight makes you specify database info in the build configuration and a database driver in the runtime API. RecylerView requires at minimum an adapter subtype and to choose and configure a layout manager. The layer at which these tools operate is sufficiently general such that their good design requires

## Migrating from Square AssistedInject to Dagger AssistedInject

DevFeed: [Migrating from Square AssistedInject to Dagger AssistedInject](<https://devfeed.tech/articles/assistedinject-is-dead-long-live-assistedinject-20885.md>)

Original publisher: [Read original article](<https://code.cash.app/assisted-inject-is-dead-long-live-assisted-inject>)

Author: Jake Wharton

Published: 2021-03-31T00:00:00Z

Content type: tutorial

Language: en

Sources: [Jake Wharton](<https://devfeed.tech/sources/jake-wharton.md>)

Topics: [Dagger](<https://devfeed.tech/topics/dagger.md>), [migration](<https://devfeed.tech/topics/migration.md>), [interoperability](<https://devfeed.tech/topics/interoperability.md>), [Library](<https://devfeed.tech/topics/library.md>), [Open Source](<https://devfeed.tech/topics/open-source.md>)

Tags: [bug-fixes](<https://devfeed.tech/tags/bug-fixes.md>), [dagger](<https://devfeed.tech/tags/dagger.md>), [interoperability](<https://devfeed.tech/tags/interoperability.md>), [library](<https://devfeed.tech/tags/library.md>), [migration](<https://devfeed.tech/tags/migration.md>), [open-source](<https://devfeed.tech/tags/open-source.md>)

### AI overview

This tutorial explains how to migrate from Square AssistedInject to Dagger AssistedInject. It covers staged upgrades, annotation changes, interoperability considerations, and differences between the two libraries, while also noting that InflationInject has its own repository.

### Source excerpt

This post was published externally on Cash App Code Blog. Read it at https://code.cash.app/assisted-inject-is-dead-long-live-assisted-inject.

## IntoSet: Dagger Multibindings and Architecture

DevFeed: [IntoSet: Dagger Multibindings and Architecture](<https://devfeed.tech/articles/intoset-dagger-multibindings-and-architecture-25665.md>)

Original publisher: [Read original article](<https://adambennett.dev/2021/03/intoset-dagger-multibindings-and-architecture/>)

Published: 2021-03-05T09:30:09Z

Content type: tutorial

Language: en

Sources: [Posts on Adam Bennett](<https://devfeed.tech/sources/posts-on-adam-bennett.md>)

Topics: [Dagger](<https://devfeed.tech/topics/dagger.md>), [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [implementation](<https://devfeed.tech/topics/implementation.md>), [Gradle](<https://devfeed.tech/topics/gradle.md>)

Tags: [algorithms](<https://devfeed.tech/tags/algorithms.md>), [android](<https://devfeed.tech/tags/android.md>), [architecture](<https://devfeed.tech/tags/architecture.md>), [blog](<https://devfeed.tech/tags/blog.md>), [career](<https://devfeed.tech/tags/career.md>), [components](<https://devfeed.tech/tags/components.md>), [compose](<https://devfeed.tech/tags/compose.md>), [dagger](<https://devfeed.tech/tags/dagger.md>), [development](<https://devfeed.tech/tags/development.md>), [engineering](<https://devfeed.tech/tags/engineering.md>), [finance](<https://devfeed.tech/tags/finance.md>), [functional](<https://devfeed.tech/tags/functional.md>), [gradle](<https://devfeed.tech/tags/gradle.md>), [growth](<https://devfeed.tech/tags/growth.md>), [implementation](<https://devfeed.tech/tags/implementation.md>), [java](<https://devfeed.tech/tags/java.md>), [jetpack](<https://devfeed.tech/tags/jetpack.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [money](<https://devfeed.tech/tags/money.md>), [opinions](<https://devfeed.tech/tags/opinions.md>), [software](<https://devfeed.tech/tags/software.md>), [startups](<https://devfeed.tech/tags/startups.md>), [thoughts](<https://devfeed.tech/tags/thoughts.md>), [training](<https://devfeed.tech/tags/training.md>), [tutorial](<https://devfeed.tech/tags/tutorial.md>)

### AI overview

This tutorial explains how Dagger multibindings with sets can inject collections and register components across Gradle modules. It presents uses including decoupling runtime initialization, isolating third-party SDKs behind facades, reducing dependencies, and registering Moshi adapters.

### Source excerpt

Featured in Kotlin Weekly #240 Dagger is typically my DI framework of choice for large projects (insert controversy here) and while most people are familiar with the basic concepts, some aspects immediately cause internal panic when mentioned. Multibindings is one of them, which is a shame because it's a highly useful pattern which can solve real problems.

## Using @JvmSuppressWildcards to resolve Kotlin and Java generic type issues

DevFeed: [Using @JvmSuppressWildcards to resolve Kotlin and Java generic type issues](<https://devfeed.tech/articles/jvmsuppresswildcards-the-secret-sauce-to-your-sandwich-style-generics-25906.md>)

Original publisher: [Read original article](<https://chao2zhang.medium.com/jvmsuppresswildcards-the-secret-sauce-to-your-sandwich-style-generics-b0093aa5979d?source=rss-d19045640fe------2>)

Author: Chao Zhang

Published: 2021-02-23T16:01:15Z

Content type: tutorial

Language: en

Sources: [Stories by Chao Zhang on Medium](<https://devfeed.tech/sources/stories-by-chao-zhang-on-medium.md>)

Topics: [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [generics](<https://devfeed.tech/topics/generics.md>), [Java](<https://devfeed.tech/topics/java.md>), [Android](<https://devfeed.tech/topics/android.md>), [Dagger](<https://devfeed.tech/topics/dagger.md>), [recyclerview](<https://devfeed.tech/topics/recyclerview.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [android-app-development](<https://devfeed.tech/tags/android-app-development.md>), [compilation-error](<https://devfeed.tech/tags/compilation-error.md>), [compiler](<https://devfeed.tech/tags/compiler.md>), [dagger](<https://devfeed.tech/tags/dagger.md>), [generics](<https://devfeed.tech/tags/generics.md>), [java](<https://devfeed.tech/tags/java.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [kotlin-generics](<https://devfeed.tech/tags/kotlin-generics.md>), [recyclerview](<https://devfeed.tech/tags/recyclerview.md>)

### AI overview

This tutorial explains how Kotlin generics interact with Java in mixed Kotlin-Java codebases, including Android applications and Dagger-based dependencies. It shows how the @JvmSuppressWildcards annotation can resolve compilation and type-inference problems when Kotlin generic APIs are consumed by Java code.

### Source excerpt

Photo: amirali mirhashemian from Unsplash If generic types are exposed in Kotlin API, consider @JvmSuppressWildcards so that your Java consumer can compile successfully. Kotlin generics are different from (in my opinion, smarter than) Java generics. Kotlin generics has declaration-site variance and type projections, which are officially documented here. Generics is a gigantic topic itself. My usual practice is to leverage IDE warnings and compiler error messages to fix my code since they usually contain the necessary information to show you where you did wrong. However, as we are Kotlinizing our codebase from Java to Kotlin, it is possible to have a sandwich-style code dependency that mixes Java code and Kotlin code. In such cases, when dealing with generics, your compiler and IDE may not be smart enough to help you fix those issues. What is sandwich-style code dependency?🥪 Sandwich-style Kotlin conversion At a certain time during your Java to Kotlin conversion, there could be some Java code depending on Kotlin code, which in turn depends on Java code. A typical example on Android is that your app code in Java depending on your library in Kotlin, which depends on Android SDK in Java. Even if your app code is written purely in Kotlin, the sandwich might still exist: The Java-based annotation processing Dagger, depends on your app code in Kotlin, which depends on Android SDK in Java. Now let's look at how the secret sauce @JvmSuppressWildcards can help us by making our generic sandwich tasty. Sandwich: List<Object> in RecyclerView methodshttps://medium.com/media/87fd0c63db2b9c82af2b241bf61cef31/href With the code above, the following compilation error is observed: MyChildAdapter.java:13: error: name clash: onBindViewHolder(MyViewHolder,int,List<Object>) in MyChildAdapter overrides a method whose erasure is the same as another method, yet neither overrides the other The error message leads us to think that we need to change our type here: Change the Kotlin generic para

[Next page](<https://devfeed.tech/tags/dagger.md?cursor=WyIyMDIxLTAyLTIzVDE2OjAxOjE1KzAwOjAwIiwgIjkwZjI3MmE4LWJkNWYtNDYwMy1iNzVjLWMxNWIxMTljMDY5NSJd>)