Providing Instances of the Same Type with HILT (Dagger2)

  Рет қаралды 11,210

CodingWithMitch

CodingWithMitch

4 жыл бұрын

The best android courses in the world: codingwithmitch.com/
Watch the HILT course here (FREE): codingwithmitch.com/courses/h...
Sometimes you have need to provide two (or more) instances of the object type through a Hilt (Dagger2) module. We can use annotations to mark the dependencies in the module.
Code: github.com/mitchtabian/Dagger...
Instagram: / codingwithmitch
Twitter: / mitch_tabian
.
.
#AndroidDev

Пікірлер: 39
@codingwithmitch
@codingwithmitch 4 жыл бұрын
Just kidding, these annotations are not new to dagger. I just didn't know they existed before.
@codinginflow
@codinginflow 4 жыл бұрын
You got me bro
@darkmaster666.
@darkmaster666. 4 жыл бұрын
Your channel should be more popular. The way you explain stuff is extremely clear and gets the job done.
@ArpitA5724
@ArpitA5724 4 жыл бұрын
Keep up the good work. You are the best on KZbin.
@DanielGibby
@DanielGibby 3 жыл бұрын
This is a great video series! I've had a little bit of Dagger experience and even tried to use AssistedInject in an app, but I didn't really understand everything I was doing until I watched this series. Please keep them coming!
@muhammadhumzakhan9888
@muhammadhumzakhan9888 3 жыл бұрын
Best playlist I found sofar. Keep up the good work
@aaronbruckner
@aaronbruckner 3 жыл бұрын
Great vid! Feel like you should have shown the `@named` option too though. Feels pretty clean to me!
@kumarbharani2718
@kumarbharani2718 4 жыл бұрын
Good job sir, eagerly waiting for next videos.
@AlgeriaHere
@AlgeriaHere 3 жыл бұрын
I like your videos , thank you for making them , they are pretty useful
@mostafasamy2002
@mostafasamy2002 2 жыл бұрын
thank you about great job Mostafa from Egypt
@sukowidodo4482
@sukowidodo4482 3 жыл бұрын
This is i need, thank yu
@KIRILLINGUSS21
@KIRILLINGUSS21 3 жыл бұрын
great thanks we love you
@prudhvir3ddy
@prudhvir3ddy 4 жыл бұрын
Good one mitch
@rajdeepgoswami744
@rajdeepgoswami744 4 жыл бұрын
✨✨✨✨🙏🙏🙏 Awesome Mitch
@aryandashtbani2626
@aryandashtbani2626 2 жыл бұрын
you are the BEST
@emreergun1978
@emreergun1978 3 жыл бұрын
u do great job thank u :)
@jamtodayexcellent
@jamtodayexcellent 3 жыл бұрын
Really good video, I have just started learning Kotlin development. I my day job is C# where of test driven development DI is standard. I was surpised to find Dagger had such a steep learning curve. Then I found your videos. Hilt is worth investing time in, but I have a couple of questions. 1 When in the lifetime does injection occur and when does garbage collection occur? 2 Does Hilt really do DI it looks more like a service locator pattern because of the need to provide explcit details of how to construct a service if the service itself has dependencies, what is your opinion? Cheers
@Zaika_All_India
@Zaika_All_India 3 жыл бұрын
great job
@hamid-karimi
@hamid-karimi 3 жыл бұрын
awesome
@prashantsurti5788
@prashantsurti5788 3 жыл бұрын
Viewer engagement yesss
@MrJoker-ze6bb
@MrJoker-ze6bb 3 жыл бұрын
Should i learn dagger 2 or hilt? As a beginner in dependency injection
@eddiej204
@eddiej204 3 жыл бұрын
Would I be able to use SomeInterfaces instances that I put in MyModule in 'any' Activity if I use @InstallIn(ActivityComponent:class) ? If yes, can I have my own Custom ActivityComponent that will scope only specific things I need in the specific activity?
@riyupapa39
@riyupapa39 3 жыл бұрын
Can I use @Impl1 in abstract mudule on @Bind?
@nitinnegi9343
@nitinnegi9343 4 жыл бұрын
When are the next videos going to come?
@oscarperry641
@oscarperry641 4 жыл бұрын
so passionate
@Zeeshan-Syed
@Zeeshan-Syed 4 жыл бұрын
So, next is ViewModel inject?
@martinseal1987
@martinseal1987 4 жыл бұрын
Can you please add in the navigation component and scope view models to it, I think there's a small bug which doesn't like the view model store owner and you have to tell it to get the default factory but you don't see many examples of it and definitely none using hilt
@codingwithmitch
@codingwithmitch 4 жыл бұрын
Maybe. I want to finish this up and move onto jetpack compose
@ozgurtas4508
@ozgurtas4508 4 жыл бұрын
so bro, these "some&things" because that we're watching free? :D just kidding great hilt videos, many thanks
@astrologykhan8125
@astrologykhan8125 4 жыл бұрын
Difference???
@Berk45632
@Berk45632 3 жыл бұрын
What is AnnotationRetention.BINARY?
@dxslly
@dxslly 4 жыл бұрын
These are called qualified bindings and not new to hilt. FYI, they are also useful for limiting the visibility of a binding as only classes that have access to the qualifier can inject it.
@PeteStMartin
@PeteStMartin 2 жыл бұрын
Engagement!
@Zeeshan-Syed
@Zeeshan-Syed 4 жыл бұрын
I pressed the gray color like icon and it turned blue. 😯
@prashantsurti5788
@prashantsurti5788 3 жыл бұрын
wow
@leninomarfmtz2154
@leninomarfmtz2154 3 жыл бұрын
So THAT'S how it works. I thought by yelling at youtube it would know I enjoyed the video.
@bryanneuberger5886
@bryanneuberger5886 3 жыл бұрын
engagement
@ChrisAthanas
@ChrisAthanas 3 жыл бұрын
Engagement
Fragment Constructor Injection with Hilt and Navigation Component
24:38
Hilt Modules, Binds and Provides (Dagger2)
18:02
CodingWithMitch
Рет қаралды 21 М.
Alat Seru Penolong untuk Mimpi Indah Bayi!
00:31
Let's GLOW! Indonesian
Рет қаралды 14 МЛН
Increíble final 😱
00:37
Juan De Dios Pantoja 2
Рет қаралды 114 МЛН
Каха ограбил банк
01:00
К-Media
Рет қаралды 11 МЛН
Scoping with HILT (Dagger2)
9:39
CodingWithMitch
Рет қаралды 17 М.
DO NOT do this in a Software Engineering Interview
7:59
CodingWithMitch
Рет қаралды 9 М.
HILT Field Injection and Constructor Injection
9:44
CodingWithMitch
Рет қаралды 25 М.
Hilt - Providing Retrofit Instance and Repository
20:36
CodingWithMitch
Рет қаралды 18 М.
Why didn't the Angular team just use RxJS instead of Signals?
8:15
Joshua Morony
Рет қаралды 88 М.
Hilt - Android Dependency Injection
28:57
Android Developers
Рет қаралды 51 М.
Hilt makes testing easier on Android
32:38
CodingWithMitch
Рет қаралды 16 М.
The Story of Next.js
12:13
uidotdev
Рет қаралды 552 М.
Урна с айфонами!
0:30
По ту сторону Гугла
Рет қаралды 8 МЛН
iPhone 16 с инновационным аккумулятором
0:45
ÉЖИ АКСЁНОВ
Рет қаралды 2,1 МЛН
Хотела заскамить на Айфон!😱📱(@gertieinar)
0:21
Взрывная История
Рет қаралды 4,9 МЛН