I am working on a multi-module android project. In main module we have a CoreComponent with CoreModule. CoreModule provides some objects. I want to in ...
I am working on a multi-module android project. In main module we have a CoreComponent with CoreModule. CoreModule provides some objects. I want to in ...
. Answers to this question are eligible for a +50 reputation bounty. DI ...
In different tutorials I see how to substitute @Component`s dependencies with mock or fakes. To do so, one can make test variant of @Component extendi ...
I'm working on Android library that other apps will use it. This library will not have any activity, but it will have Fragments, VM, domain etc. So fa ...
On the one hand, DI (in my case it is Dagger2) is a helpful/useful tool, however, on the other hand, I just can't stop thinking that it broke the inca ...
Here's an extremely simplified example: I'm wondering if there's a better way to approach this. Again, this is a simplified example of what I have. ...
I have Application component with two modules - applicationModule and activityModule. In my MvpApp.java class i create component with modules: My A ...
I am trying to use dependency injection to use datastore API. Datastore API I've come up with this article on medium. Link Problem I can't inject m ...
Android project Code base is full java and dagger 2 is implemented in java as well. I am integrating kotlin in the code and each time I rebuild, Dagge ...
I am implementing Dagger2 and when I am using @ContributesAndroidInjector, I get compile time error:@dagger.android.ContributesAndroidInjector was use ...
I'm using Dagger to inject a Map<Int,Handler> into a class. It works perfectly when something like this is defined in a module: @Binds @IntoMap ...
I just updates the following plugins in my gradle files and second gradle file I updated kotlin version then I got this error this the full g ...
I'm starting to learn dagger. I try to get a string from the ViewModel, an error occurs: MainActivity: StringFragment: StringRepository: S ...
I have ViewModel like bellow: And here is LoginViewModelFactory: I edited like bellow but not work: And: And here: And: And: I ca ...
I have background service in Android to handle Google Firebase Push Notifications: class MyFirebaseMessagingService : FirebaseMessagingService() { ...
// Previously, our Api looks like this: @Component(modules = ApiManagerModule.class) public interface ApiComponent { @Component.Builder interfa ...
I have two bindings for a single BaseClass. For example I dont want to sepcify @Named("b") in all the places which needs Base as dependency, but bi ...
In a large codebase, I have 3 classes at concern. DataDao.kt, DataManager.kt, and InfoPageActivity.kt. The DataManager injects DataDao and it has get ...
Is there a way to get dagger to spit out why it didn't generate a particular component? I tried refactoring some of our modules and ended up breaking ...
I am trying to migrate my existing Dagger implementation to Hilt. I have one common interface which is implemented by multiple classes. Then there ...