# Dagger

A compile-time dependency injection framework for Java, Kotlin, and Android.

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

## A Simple MVI Architecture Approach Using LiveData

DevFeed: [A Simple MVI Architecture Approach Using LiveData](<https://devfeed.tech/articles/simple-mvi-32343.md>)

Original publisher: [Read original article](<https://dustn.dev/page/presentations/2019-08-14-simple-mvi/>)

Author: dustin@dustn.dev (Dustin Summers)

Published: 2026-09-17T04:13:15.404035Z

Content type: opinion

Language: en

Sources: [Dustin Summers](<https://devfeed.tech/sources/dustin-summers.md>)

Topics: [Android](<https://devfeed.tech/topics/android.md>), [Dagger](<https://devfeed.tech/topics/dagger.md>)

Tags: [architecture](<https://devfeed.tech/tags/architecture.md>), [architecture-pattern](<https://devfeed.tech/tags/architecture-pattern.md>), [error](<https://devfeed.tech/tags/error.md>), [livedata](<https://devfeed.tech/tags/livedata.md>), [loading](<https://devfeed.tech/tags/loading.md>), [mvi](<https://devfeed.tech/tags/mvi.md>)

### AI overview

A talk from Android Summit 2019 discusses a simple implementation of the MVI architecture pattern using LiveData and the Loading, Content, Error pattern.

### Source excerpt

This was a talk provided by myself and Dan Lowe at Android Summit, 2019. In this we discuss a simple approach to the MVI (Model, View, Intent) Architecture Pattern using LiveData and the common Loading, Content, Error Pattern. Link to Dan's blog post is here which is what our talk was based around.

## 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...

## 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...

## 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.

## 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

## 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

## Basic Auth with OkHttp and Retrofit

DevFeed: [Basic Auth with OkHttp and Retrofit](<https://devfeed.tech/articles/basic-auth-with-okhttp-and-retrofit-22649.md>)

Original publisher: [Read original article](<https://www.valueof.io/blog/basic-auth-okhttp-retrofit-dagger>)

Author: James Shvarts

Published: 2022-11-05T22:25:12Z

Content type: tutorial

Language: en

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

Topics: [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [Android](<https://devfeed.tech/topics/android.md>), [HTTP](<https://devfeed.tech/topics/http.md>), [API](<https://devfeed.tech/topics/api.md>), [Dagger](<https://devfeed.tech/topics/dagger.md>), [Library](<https://devfeed.tech/topics/library.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [api](<https://devfeed.tech/tags/api.md>), [auth](<https://devfeed.tech/tags/auth.md>), [authentication](<https://devfeed.tech/tags/authentication.md>), [dagger-hilt](<https://devfeed.tech/tags/dagger-hilt.md>), [dependencies](<https://devfeed.tech/tags/dependencies.md>), [http](<https://devfeed.tech/tags/http.md>), [json](<https://devfeed.tech/tags/json.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [libraries](<https://devfeed.tech/tags/libraries.md>), [payload](<https://devfeed.tech/tags/payload.md>), [request](<https://devfeed.tech/tags/request.md>), [retrofit](<https://devfeed.tech/tags/retrofit.md>), [viewmodel](<https://devfeed.tech/tags/viewmodel.md>)

### AI overview

A tutorial showing how to perform authenticated HTTP GET requests in a Kotlin Android project using Basic Authentication with OkHttp, Retrofit, Dagger/Hilt, and Moshi.

### Source excerpt

Basic Auth example using OkHttp, Retrofit, Dagger in a Kotlin project

## 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:

## 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

## Dagger Tips: Guide to using Dagger-Android effectively

DevFeed: [Dagger Tips: Guide to using Dagger-Android effectively](<https://devfeed.tech/articles/dagger-tips-guide-to-using-dagger-android-effectively-25929.md>)

Original publisher: [Read original article](<https://itnext.io/dagger-tips-guide-to-using-dagger-android-effectively-c3e5b2883b38?source=rss-7a8d96da8cb6------2>)

Author: Gabor Varadi

Published: 2021-02-13T05:05:50Z

Content type: tutorial

Language: en

Sources: [Stories by Gabor Varadi on Medium](<https://devfeed.tech/sources/stories-by-gabor-varadi-on-medium.md>)

Topics: [Dagger](<https://devfeed.tech/topics/dagger.md>), [Android](<https://devfeed.tech/topics/android.md>), [Architecture & Design](<https://devfeed.tech/topics/architecture-design.md>), [Development](<https://devfeed.tech/topics/development.md>), [Scalability](<https://devfeed.tech/topics/scalability.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [dagger](<https://devfeed.tech/tags/dagger.md>), [dagger-2](<https://devfeed.tech/tags/dagger-2.md>), [dagger-android](<https://devfeed.tech/tags/dagger-android.md>), [dependency-injection](<https://devfeed.tech/tags/dependency-injection.md>), [development](<https://devfeed.tech/tags/development.md>), [guide](<https://devfeed.tech/tags/guide.md>), [interface](<https://devfeed.tech/tags/interface.md>), [modularization](<https://devfeed.tech/tags/modularization.md>), [module](<https://devfeed.tech/tags/module.md>), [scalability](<https://devfeed.tech/tags/scalability.md>)

### AI overview

A guide to using Dagger-Android, explaining its field-injection approach, the modularization constraints it addresses, and alternatives involving interfaces or shared superclasses. The article notes that Dagger-Android has been superseded by Hilt for common injection cases.

### Source excerpt

Something people could ask me as they're reading this title: "Hold on a second, isn't Dagger-Android no longer in active development? Isn't it made obsolete with the introduction of Hilt?" Technically, yes. Dagger-Android is superseded by Hilt. So there is a good chance that if you are already using Hilt, then for the most common cases (injecting Activity, Fragment, ViewModel, Worker), you don't need to think about Dagger-Android whatsoever. However, as I still see @ContributesAndroidInjector popping up every now and then, I feel that it's best if I write an article on how it works, what it intended to solve, how to use it, and how NOT to use it (for better scalability). What was Dagger-Android? Dagger-Android was a way to field-inject classes (not necessarily just Android classes since Dagger 2.20+) without having to define a fun inject(target: MyConcreteClassTarget) injector method on the component -- as we don't know the class itself. When do you want to avoid creating fun inject(t: T) in a component? After all, this is what normally allows field injection to be type-safe. The answer is, when you can't. If you use a modularization pattern where :app contains the ApplicationComponent(or SingletonComponent), then while ApplicationComponent can see any Activity or Fragment within the app, the submodules don't see :app and therefore don't see ApplicationComponent. Therefore, they can't call component.inject(this)! On the other hand, if you were to define an Application.ActivityLifecycleCallbacks to do it automatically, that wouldn't work with the standard approach -- as you see only the superclass, but not the concrete class! So if one wants to use field injection with our provided restrictions, there are two options: Expose an interface from the child module that defines the injection targets, and implement that on the ApplicationComponent -- then make it possible to access it (for example, using the ApplicationContext for lookup) and cast it to the interface to be abl

## The Corner Round-up June 2020

DevFeed: [The Corner Round-up June 2020](<https://devfeed.tech/articles/the-corner-round-up-june-2020-27019.md>)

Original publisher: [Read original article](<https://medium.com/square-corner-blog/the-corner-round-up-june-2020-5f0eaa1d341e?source=rss----3650599ae4e2---4>)

Author: Richard Moot

Published: 2020-06-30T22:59:20Z

Content type: article

Language: en

Sources: [Square Corner Blog - Medium](<https://devfeed.tech/sources/square-corner-blog-medium.md>)

Topics: [API](<https://devfeed.tech/topics/api.md>), [Dependency injection](<https://devfeed.tech/topics/dependency-injection.md>), [Compiler](<https://devfeed.tech/topics/compiler.md>), [Dagger](<https://devfeed.tech/topics/dagger.md>), [Kubernetes](<https://devfeed.tech/topics/kubernetes.md>)

Tags: [api](<https://devfeed.tech/tags/api.md>), [apis](<https://devfeed.tech/tags/apis.md>), [cloud](<https://devfeed.tech/tags/cloud.md>), [compiler](<https://devfeed.tech/tags/compiler.md>), [dagger](<https://devfeed.tech/tags/dagger.md>), [dagger-2](<https://devfeed.tech/tags/dagger-2.md>), [dependency-injection](<https://devfeed.tech/tags/dependency-injection.md>), [kubernetes](<https://devfeed.tech/tags/kubernetes.md>), [payments](<https://devfeed.tech/tags/payments.md>), [pos](<https://devfeed.tech/tags/pos.md>), [security](<https://devfeed.tech/tags/security.md>)

### AI overview

The Corner Round-up June 2020 recaps selected publications from Square's developer blog. It covers the Square Team API, the Hephaestus open source compiler plugin for Dagger 2, API Explorer's move from beta to general availability, Kubernetes pod security guidance, Loyalty and Customers APIs, and the Square Terminal API beta.

### Source excerpt

In order to keep some of the followers still here on Medium, we wanted to provide a quick recap on some of the things that have been published over at The Corner Blog's new home https://developer.squareup.com/blog (in case you didn't know that already). We'll just be doing a quick summary of each new thing, but you can check out each topic in detail over at our new home. Manage Team Data from Any Platform with Square Team API We released a new Team API to allow managing Team data from any platform. You can track and edit large volumes of team member data automatically and synchronize data with any third-party platform in real time! Introducing Hephaestus In order to make dependency injection with Dagger 2 easier, we had created Hephaestus. It is an open source compiler plugin that automatically merges Dagger modules and component interfaces to make development more enjoyable. API Explorer Moves to General Availability The Square Developer team also transitioned the API Explorer from Beta to GA, bringing with it a lot of improvements to make testing Square APIs much more enjoyable and easy. Kubernetes - Pod Security Policies The cloud team at Square also did a write-up that provides some useful guidance and examples for handling Pod Security in Kubernetes. Reward Customers Wherever They Shop with Loyalty API and Customers API Additionally, Square Loyalty now has an API to make providing rewards to customers on other platforms. Using the Customers API and Loyalty API in combination can allow any developer to create a great rewards system, no matter where their customers are. Announcing Square Terminal API Beta Finally, we also released Terminal API, which lets you programmatically take payments using Square Terminal. This API allows developers to connect Square Terminal, an all-in-one card payments device, to their custom-built POS systems, no matter which platforms or operating systems they're developed on. Now that isn't everything that we've published since you've

## Introducing Anvil

DevFeed: [Introducing Anvil](<https://devfeed.tech/articles/introducing-anvil-15698.md>)

Original publisher: [Read original article](<https://developer.squareup.com/blog/introducing-anvil>)

Author: Ralf Wondratschek

Published: 2020-06-23T19:00:00Z

Content type: article

Language: en

Sources: [Square Corner Blog RSS Feed](<https://devfeed.tech/sources/square-corner-blog-rss-feed.md>)

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

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

### AI overview

Square introduces Anvil, a Kotlin compiler plugin that automatically adds Dagger modules and component interfaces to required Dagger components. The tool reduces repetitive setup steps in large modularized Android codebases while preserving compile-time dependency graph validation.

### Source excerpt

Make dependency injection with Dagger 2 easier

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